﻿/* ---------------------------------------------
   Global Styles
--------------------------------------------- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease;
}

    a:hover {
        color: #0056b3;
        text-decoration: underline;
    }
/* ---- Login Hero ---- */
.login-hero {
    background: url('/images/login-hero.jpg') center/cover no-repeat;
    color: #fff;
}

    /* ensure the hero has a subtle dark overlay for contrast */
    .login-hero::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.4);
        z-index: 0;
    }

    .login-hero > * {
        position: relative;
        z-index: 1;
    }

/* tweak the card a bit */
.card {
    border: none;
    border-radius: .75rem;
}

/* ---------------------------------------------
   Header and Footer
--------------------------------------------- */
header, footer {
    background-color: #343a40;
    color: white;
    padding: 8px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header {
    position: sticky;
    top: 0;
    z-index: 1030;
}

    header h1 {
        margin: 0;
        font-size: 1.5rem;
    }

    header .header-text, footer a {
        font-size: 0.875rem;
        color: #bbb;
    }

footer {
    text-align: center;
    margin-top: auto;
    padding: 10px;
    font-size: 0.875rem;
}

    footer a:hover {
        color: #fff;
    }

h1:focus, h2:focus, h3:focus {
    outline: none;
}
/* ---------------------------------------------
   Layout (Sidebar + Content)
--------------------------------------------- */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background-color: #343a40;
    color: white;
    flex-shrink: 0;
    overflow-y: auto;
    position: fixed;
    top: 50px; /* Header height */
    left: 0;
    height: calc(100vh - 50px);
    padding: 0 20px 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.content {
    margin-left: 250px;
    flex-grow: 1;
    padding: 1rem;
    background-color: #f8f9fa;
    overflow-y: auto;
}

/* Sidebar Sections */
.sidebar-header {
    margin: 20px 0 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #495057;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding-top: 1rem;
}

.sidebar a:hover, .sidebar a.active {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-heading {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600; /* ✅ Semi-bold */
    color: #adb5bd; /* ✅ Light gray color */
    margin-bottom: 0.5rem;
    padding-left: 1rem;
}

/* ---------------------------------------------
   Components
--------------------------------------------- */
/* Cards */
.card {
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header, .card-footer {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.95rem;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

    .btn:hover {
        background-color: #0056b3;
    }

    .btn:disabled {
        background-color: #d6d6d6;
        cursor: not-allowed;
    }

.btn-primary {
    background-color: #007bff;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-success {
    background-color: #28a745;
}

.btn-danger {
    background-color: #dc3545;
}

    .btn-danger:hover {
        background-color: #bd2130;
    }

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1.1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-control {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.15s ease-in-out;
}

    .form-control:focus {
        border-color: #80bdff;
        outline: 0;
        box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
    }

.form-label, .form-text, .validation-message {
    font-size: 0.875rem;
}

.validation-message {
    color: #dc3545;
}

.validation-summary {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px 15px;
    border-radius: 4px;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

    .table th, .table td {
        padding: 12px;
        border: 1px solid #e9ecef;
    }

    .table th {
        background-color: #f8f9fa;
        font-weight: 600;
    }

    .table tr:nth-child(even) {
        background-color: #f9f9f9;
    }

    .table tr:hover {
        background-color: #f1f1f1;
    }

/* Alerts */
.alert {
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid transparent;
    border-radius: 4px;
    font-size: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

/* Tabs */
.tab-container {
    display: flex;
    border-bottom: 3px solid #ccc;
    margin-bottom: 1rem;
}

.tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    background-color: #e9ecef;
    border: 1px solid #ccc;
    border-bottom: none;
    font-weight: bold;
    border-radius: 6px 6px 0 0;
}

    .tab:hover {
        background-color: #dcdcdc;
        color: #000;
    }

    .tab.active {
        background-color: #007bff;
        color: white;
        border-color: #007bff;
        z-index: 1;
    }

.tab-content {
    background-color: white;
    padding: 1.5rem;
    border: 1px solid #ccc;
    border-radius: 0 0 6px 6px;
}

/* Markdown Content */
.markdown-content {
    line-height: 1.6;
}

    .markdown-content h1, .markdown-content h2, .markdown-content h3 {
        border-bottom: 1px solid #eaecef;
        margin-top: 1.5rem;
    }

    .markdown-content p, .markdown-content ul, .markdown-content ol, .markdown-content blockquote {
        margin-bottom: 1rem;
    }

    .markdown-content code, .markdown-content pre {
        background-color: #f6f8fa;
        border-radius: 3px;
        font-family: SFMono-Regular, Consolas, Menlo, monospace;
    }

/* ---------------------------------------------
   Utilities
--------------------------------------------- */
.text-center {
    text-align: center !important;
}

.text-left {
    text-align: left !important;
}

.text-right {
    text-align: right !important;
}

.d-flex {
    display: flex !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.justify-content-center {
    justify-content: center !important;
}

.align-items-center {
    align-items: center !important;
}

.w-100 {
    width: 100% !important;
}

.h-100 {
    height: 100% !important;
}

/* ---------------------------------------------
   Responsive Design
--------------------------------------------- */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        top: 0;
        border-right: none;
        border-bottom: 1px solid #444;
    }

    .content {
        margin-left: 0;
        padding: 0.5rem;
    }
    /* GPGalaxy Logo Styling */
    /* Override navbar padding for tighter fit */
    .navbar {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        height: 50px;
    }

    /* Logo styling that accounts for the navbar height */
    .navbar-logo {
        height: calc(100% - 10px) !important; /* Full height minus some padding */
        max-height: 40px !important; /* Absolute max to prevent huge size */
        width: auto !important;
        object-fit: contain !important;
        display: inline-block;
        vertical-align: middle;
        margin-right: 15px;
    }

    /* Ensure the container is properly aligned */
    .navbar .container-fluid {
        height: 100%;
        padding-top: 5px;
        padding-bottom: 5px;
    }
    /* Optional: Make it clickable as a brand link */
    .navbar-brand {
        padding: 0;
        margin-right: 1rem;
        display: flex;
        align-items: center;
        height: 100%;
    }

        .navbar-brand:hover .navbar-logo {
            opacity: 0.9;
            transition: opacity 0.2s ease;
        }
}
