/* GST Case Law Platform - Modern Design System */

:root {
    /* Color Palette */
    --primary: #2B4C7E;
    --primary-light: #567EBB;
    --primary-dark: #1A365D;
    --secondary: #506D84;
    --accent: #D4A5A5;
    --success: #4CAF50;
    --warning: #FFC107;
    --danger: #F44336;
    --info: #2196F3;
    
    /* Neutral Colors */
    --gray-100: #F8F9FA;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #CED4DA;
    --gray-500: #ADB5BD;
    --gray-600: #6C757D;
    --gray-700: #495057;
    --gray-800: #343A40;
    --gray-900: #212529;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Merriweather', Georgia, serif;
    --font-mono: 'Roboto Mono', monospace;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    --primary-color: #2B4C7E;
    --secondary-color: #506D84;
    --accent-color: #D4A5A5;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f0;
    color: var(--text-color);
    line-height: 1.6;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
    padding-top: 60px;
}

/* Side Navigation */
.side-nav {
    width: 280px;
    background-color: #fff;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    top: 60px;
    height: calc(100vh - 60px);
}

.nav-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.nav-header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
}

.nav-menu {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.nav-section-title {
    color: var(--secondary-color);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.nav-item i {
    width: 1.5rem;
    margin-right: 0.75rem;
    color: var(--secondary-color);
}

.nav-item:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.nav-item.active {
    background-color: var(--primary-color);
    color: white;
}

.nav-item.active i {
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    background-color: #f5f5f0;
    overflow-y: auto;
    margin-top: 0;
    height: calc(100vh - 60px);
}

/* Cards */
.card {
    background: white;
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Forms */
.form-control {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(43, 76, 126, 0.25);
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1a365d;
    border-color: #1a365d;
}

/* Alerts */
.alert {
    border-radius: 0.5rem;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

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

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

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Navigation disabled state */
.nav-item.disabled {
    color: #6c757d !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.nav-item.disabled:hover {
    background-color: transparent !important;
    padding-left: 1rem !important;
}

/* Auth buttons in navigation */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive Design - Mobile First */

/* Mobile styles (default) */
.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background-color: var(--gray-100);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.mobile-overlay.active {
    display: block;
}

/* Top Navigation Mobile */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    box-shadow: var(--shadow-sm);
}

.top-nav .nav-header {
    padding: 0;
    border: none;
}

.top-nav .nav-header h1 {
    font-size: 1.2rem;
    margin: 0;
}

.top-nav .nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-icon {
    padding: 0.5rem;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-icon:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
}

.username {
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-right: 0.5rem;
}

/* Side Navigation Mobile */
.side-nav {
    position: fixed;
    top: 60px;
    left: -280px;
    width: 280px;
    height: calc(100vh - 60px);
    background: white;
    border-right: 1px solid var(--border-color);
    transition: left var(--transition-normal);
    z-index: 999;
    overflow-y: auto;
}

.side-nav.mobile-open {
    left: 0;
}

/* Main Content Mobile */
.main-content {
    margin-top: 60px;
    padding: 1rem;
    width: 100%;
    min-height: calc(100vh - 60px);
}

.main-content.auth-content {
    margin-top: 0;
    padding-top: 60px;
}

/* Cards Mobile */
.card {
    margin-bottom: 1rem;
}

.card-body {
    padding: 1rem;
}

/* Forms Mobile */
.form-control {
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    min-height: 44px; /* Touch target size */
}

.btn {
    padding: 0.625rem 1.25rem;
    min-height: 44px; /* Touch target size */
    font-size: 1rem;
}

/* Chat Layout Mobile */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    gap: 0;
}

.chat-history {
    display: none; /* Hide on mobile by default */
}

.chat-messages {
    flex: 1;
    margin: 0;
    border-radius: 0;
    border: none;
    background: var(--gray-100);
}

.sources-panel {
    display: none; /* Hide on mobile by default */
    position: fixed;
    top: 60px;
    right: -300px;
    width: 300px;
    height: calc(100vh - 60px);
    z-index: 997;
    transition: right var(--transition-normal);
}

.sources-panel.mobile-open {
    right: 0;
}

.chat-input {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    z-index: 900;
}

.message {
    max-width: 90%;
    margin-bottom: 1rem;
}

/* Tables Mobile */
.table-responsive {
    border: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    font-size: 0.875rem;
    min-width: 600px; /* Prevent table from becoming too narrow */
}

.table th,
.table td {
    padding: 0.5rem;
    white-space: nowrap;
    min-width: 120px;
}

/* Responsive table pattern for very small screens */
@media (max-width: 480px) {
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-card {
        display: block;
        width: 100%;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
        box-shadow: var(--shadow-sm);
    }
    
    .table-card-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .table-card-row:last-child {
        border-bottom: none;
    }
    
    .table-card-label {
        font-weight: 600;
        color: var(--gray-700);
        font-size: 0.875rem;
    }
    
    .table-card-value {
        color: var(--gray-900);
        text-align: right;
        word-break: break-word;
    }
}

/* Auth buttons mobile */
.auth-buttons {
    flex-direction: column;
    gap: 0.25rem;
}

.auth-buttons .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    min-height: auto;
}

/* Navigation items mobile */
.nav-item {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* Tablet styles */
@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
    
    .side-nav {
        position: fixed;
        left: 0;
        top: 60px;
    }
    
    .main-content {
        margin-left: 280px;
        padding: 2rem;
    }
    
    .chat-container {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 1rem;
    }
    
    .chat-history {
        display: block;
    }
    
    .sources-panel {
        position: static;
        display: block;
        right: auto;
        width: auto;
        height: auto;
    }
    
    .chat-input {
        position: static;
        bottom: auto;
        left: auto;
        right: auto;
        background: transparent;
        border-top: none;
        z-index: auto;
    }
    
    .auth-buttons {
        flex-direction: row;
        gap: 0.5rem;
    }
}

/* Desktop styles */
@media (min-width: 1024px) {
    .main-content {
        padding: 2rem 3rem;
    }
    
    .chat-container {
        grid-template-columns: 300px 1fr 300px;
    }
    
    .chat-history {
        display: block;
    }
    
    .card-body {
        padding: 2rem;
    }
    
    .message {
        max-width: 80%;
    }
}

/* Large desktop */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .main-content {
        padding: 2rem 4rem;
    }
}

/* Additional Mobile Optimizations */

/* Input focus improvements for mobile */
@media (max-width: 768px) {
    .form-control:focus {
        transform: scale(1.02);
        transition: transform 0.2s ease;
    }
    
    /* Better spacing for mobile forms */
    .form-group,
    .mb-3 {
        margin-bottom: 1.5rem;
    }
    
    /* Improved button layout for mobile */
    .btn-group-vertical .btn {
        margin-bottom: 0.5rem;
    }
    
    .btn-group-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group-mobile .btn {
        width: 100%;
    }
    
    /* Card improvements for mobile */
    .card {
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
    }
    
    .card-header {
        padding: 1rem;
        background: var(--gray-50);
    }
    
    /* Alert improvements for mobile */
    .alert {
        border-radius: var(--radius-md);
        margin: 1rem 0;
        padding: 1rem;
    }
    
    /* Modal improvements for mobile */
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .modal-content {
        border-radius: var(--radius-lg);
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    /* Search input improvements */
    .search-container {
        position: relative;
        margin-bottom: 1rem;
    }
    
    .search-input {
        width: 100%;
        padding-right: 3rem;
    }
    
    .search-button {
        position: absolute;
        right: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        border: none;
        background: none;
        color: var(--gray-600);
        padding: 0.5rem;
    }
}

/* Very small screens (portrait phones) */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .main-content {
        padding: 0.75rem;
    }
    
    .top-nav .nav-header h1 {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    /* Stack buttons vertically on very small screens */
    .btn + .btn {
        margin-top: 0.5rem;
        margin-left: 0;
    }
    
    .d-flex.gap-2 {
        flex-direction: column;
    }
    
    .d-flex.gap-2 > * {
        margin-bottom: 0.5rem;
    }
}

/* Landscape orientation optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    .top-nav {
        height: 50px;
    }
    
    .side-nav {
        top: 50px;
        height: calc(100vh - 50px);
    }
    
    .main-content {
        margin-top: 50px;
        min-height: calc(100vh - 50px);
    }
    
    .chat-input {
        position: static;
        padding: 0.5rem;
    }
}

/* Touch-friendly improvements */
.btn,
.nav-item,
.form-control,
.nav-icon {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

/* Disable text selection on UI elements */
.nav-item,
.btn,
.nav-icon,
.mobile-menu-toggle {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Loading states for mobile */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Chat Layout */
.chat-container {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 1rem;
    height: calc(100vh - 4rem);
}

.chat-history {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-y: auto;
}

.chat-messages {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.chat-input {
    margin-top: auto;
    padding-top: 1rem;
}

.sources-panel {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-y: auto;
}

.message {
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: 0.5rem;
    max-width: 80%;
}

.message.user {
    background-color: var(--primary-color);
    color: white;
    margin-left: auto;
}

.message.bot {
    background-color: var(--light-bg);
    margin-right: auto;
}

.source-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.source-item:hover {
    background-color: var(--light-bg);
}

.source-item:last-child {
    border-bottom: none;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
}

.table th {
    background-color: var(--light-bg);
    border-bottom: 2px solid var(--border-color);
    padding: 0.75rem;
    font-weight: 600;
}

.table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: var(--light-bg);
}

/* Wrapper */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
}

#sidebarToggle {
    background: transparent;
    border: none;
    color: #495057;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s;
}

#sidebarToggle:hover {
    background: #e9ecef;
    color: #007bff;
}

/* Main Content Area */
.container-fluid {
    max-width: 1200px;
    margin: 0 auto;
}

/* Alerts */
.alert {
    margin-bottom: 20px;
    border-radius: 4px;
}

/* Cards */
.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Response Container */
#response-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-lg);
}

/* Headnote Section */
.headnote-section {
    background-color: var(--gray-100);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    border-left: 4px solid var(--primary);
}

/* Practice Notes */
.practice-notes {
    background-color: var(--gray-100);
    border-left: 4px solid var(--info);
    padding: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    border-radius: var(--radius-lg);
}

/* Case Citations */
.case-citation {
    background-color: var(--gray-100);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin: var(--spacing-sm) 0;
    border-left: 3px solid var(--secondary);
}

/* Spinner Overlay */
.spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: var(--radius-lg);
}

/* Relevance Indicators */
.relevance-indicator {
    width: 16px;
    height: 16px;
    display: inline-block;
    border-radius: 50%;
    margin-right: var(--spacing-sm);
}

.relevance-high { background-color: var(--success); }
.relevance-medium { background-color: var(--warning); }
.relevance-low { background-color: var(--danger); }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn var(--transition-normal);
}

/* Text formatting for legal content */
.legal-text {
    font-family: 'Georgia', serif;
    line-height: 1.6;
}

.legal-citation {
    font-style: italic;
    color: var(--bs-secondary);
}

/* File type badges */
.file-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.file-badge-pdf {
    background-color: var(--bs-danger-bg-subtle);
    color: var(--bs-danger);
}

.file-badge-txt {
    background-color: var(--bs-success-bg-subtle);
    color: var(--bs-success);
}

/* Query input */
.query-input-container {
    position: relative;
}

.query-input {
    padding-right: 50px;
}

.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 10;
}

/* Response formatting */
.response-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.response-section:last-child {
    border-bottom: none;
}

/* Document cards */
.document-card:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

.document-meta {
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
}

/* Notifications Sidebar */
.notifications-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
}

.notifications-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background-color: var(--bs-body-bg);
    z-index: 1050;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.notifications-sidebar.active {
    right: 0;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.notifications-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: var(--bs-light);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-title {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.notification-message {
    font-size: 0.9rem;
    color: var(--bs-secondary-color);
}

.notification-time {
    font-size: 0.8rem;
    color: var(--bs-tertiary-color);
    margin-top: 0.5rem;
}

.notification-item.info {
    border-left: 4px solid var(--bs-info);
}

.notification-item.warning {
    border-left: 4px solid var(--bs-warning);
}

.notification-item.success {
    border-left: 4px solid var(--bs-success);
}

.notification-item.danger {
    border-left: 4px solid var(--bs-danger);
}

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.top-nav .nav-header {
    padding: 0;
    border: none;
}

.top-nav .nav-header h1 {
    font-size: 1.25rem;
    margin: 0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.username {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background-color: var(--light-bg);
    font-size: 0.9rem;
}

.username i {
    color: var(--primary-color);
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text-color);
    background-color: var(--light-bg);
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-icon:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.nav-icon i {
    font-size: 1rem;
}

/* Tooltip styles */
.nav-icon[title] {
    position: relative;
}

.nav-icon[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--text-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
}

/* Adjust main content and side nav for top nav */
.app-container {
    padding-top: 60px;
}

.side-nav {
    top: 60px;
    height: calc(100vh - 60px);
}

.main-content {
    margin-top: 0;
    height: calc(100vh - 60px);
}

/* Auth Pages */
.auth-page {
    padding-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--light-bg);
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
}

.auth-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header i {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.auth-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-color);
}

.auth-header p {
    font-size: 1rem;
    color: var(--gray-600);
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form .form-label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.auth-form .input-group {
    border-radius: 0.5rem;
    overflow: hidden;
}

.auth-form .input-group-text {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-right: none;
    color: var(--gray-600);
}

.auth-form .form-control {
    border: 1px solid var(--border-color);
    border-left: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.auth-form .form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.auth-form .form-control:focus + .input-group-text {
    border-color: var(--primary-color);
}

.auth-form .btn-primary {
    background-color: var(--primary-color);
    border: none;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-form .btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.auth-form .form-check {
    margin-bottom: 1.5rem;
}

.auth-form .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer a {
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Admin Panel Styles */
#adminPanel {
    position: fixed;
    top: 70px;
    right: 20px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 250px;
}

.admin-panel-content {
    padding: 1.5rem;
}

.admin-panel-content h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.admin-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.admin-link:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.admin-link i {
    width: 1.5rem;
    margin-right: 0.75rem;
    color: var(--secondary-color);
}

.admin-link:hover i {
    color: var(--primary-color);
}

/* Mobile responsiveness for admin panel */
@media (max-width: 768px) {
    #adminPanel {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}