/* Modern Professional Translator App Styles */

:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #ef4444;
    --primary-bg: #fef2f2;
    --secondary: #f97316;
    --secondary-dark: #ea580c;
    --danger: #dc2626;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.2s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f3f4f6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--gray-800);
    line-height: 1.5;
}

/* Navbar */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--primary);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: var(--transition);
}

.navbar-brand:hover {
    opacity: 0.8;
}

.brand-logo img {
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    color: var(--primary);
}

.brand-tagline {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--gray-500);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-info-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--gray-100);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-700);
    text-decoration: none;
    transition: var(--transition);
}

.user-info-badge:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.user-info-badge i {
    font-size: 1rem;
    color: var(--gray-500);
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.nav-btn.admin-btn {
    background: var(--primary-bg);
    color: var(--primary);
    border: 1px solid #fecaca;
}

.nav-btn.admin-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.nav-btn.logout-btn {
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 0.375rem;
}

.nav-btn.logout-btn:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: var(--primary-bg);
    border: 1px solid #fecaca;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Main Container */
.container {
    max-width: 1200px;
}

main.container {
    flex: 1;
    padding: 2rem 1rem;
}

.navbar .container {
    padding-top: 0;
    padding-bottom: 0;
}

/* Translator Container */
.translator-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Header */
.translator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.main-title {
    color: var(--primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.title-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.subtitle {
    color: var(--gray-600);
    font-size: 1rem;
    font-weight: 400;
}

/* Main Tabs */
.main-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--white);
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--gray-500);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.tab-btn.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.tab-btn i {
    font-size: 1.1rem;
}

.tab-badge {
    background: var(--primary);
    color: var(--white);
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    font-weight: 600;
}

.tab-btn.active .tab-badge {
    background: var(--primary-bg);
    color: var(--primary);
}

/* Tab Content */
.tab-content-wrapper {
    position: relative;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active {
    display: block;
}

/* Translation Box */
.translation-box,
.file-upload-box,
.glossary-box {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

/* Language Bar */
.language-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.lang-select {
    flex: 1;
    max-width: 200px;
    text-align: center;
}

.lang-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gray-700);
}

.swap-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.swap-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: rotate(180deg);
}

.swap-btn i {
    font-size: 1rem;
}

/* Translation Panels */
.translation-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 300px;
}

.panel {
    display: flex;
    flex-direction: column;
}

.source-panel {
    border-right: 1px solid var(--gray-200);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.panel-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--gray-400);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.panel-body {
    flex: 1;
    padding: 1rem;
    position: relative;
}

.panel-body textarea {
    width: 100%;
    height: 100%;
    min-height: 200px;
    border: none;
    outline: none;
    resize: none;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-800);
    font-family: inherit;
}

.panel-body textarea::placeholder {
    color: var(--gray-400);
}

.translated-output {
    min-height: 200px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-800);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.placeholder-text {
    color: var(--gray-400);
    font-style: italic;
}

.spinner-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.spinner-text {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.panel-footer {
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--gray-100);
    min-height: 36px;
}

.char-count {
    font-size: 0.8rem;
    color: var(--gray-400);
}

.copy-feedback {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
}

/* Translate Button */
.translate-btn-wrapper {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: center;
}

.translate-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.translate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.translate-btn:active {
    transform: translateY(0);
}

.translate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Error/Success Messages */
.error-message {
    margin: 1rem 1.5rem;
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    color: #dc2626;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.success-message {
    margin: 1rem 1.5rem;
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    color: #dc2626;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* File Upload */
.upload-area {
    padding: 3rem 2rem;
    text-align: center;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    margin: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon i {
    font-size: 2rem;
    color: var(--primary);
}

.upload-area h3 {
    font-size: 1.1rem;
    color: var(--gray-700);
    margin-bottom: 0.25rem;
}

.upload-area p {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.browse-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--white);
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.browse-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.file-types {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.file-type {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.file-type i {
    font-size: 1rem;
}

/* Selected File */
.selected-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    margin: 1.5rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    font-size: 2rem;
    color: var(--primary);
}

.file-details {
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 600;
    color: var(--gray-800);
}

.file-size {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.remove-file-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--gray-400);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.remove-file-btn:hover {
    background: #fef2f2;
    color: var(--danger);
}

/* Progress Container */
.progress-container {
    padding: 1rem 1.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.progress {
    height: 8px;
    background: var(--gray-200);
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 100px;
    transition: width 0.3s ease;
}

/* Glossary */
.glossary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.search-wrapper {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-wrapper input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.add-term-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.add-term-btn:hover {
    background: var(--primary-dark);
}

.glossary-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.loading-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
}

.loading-state p {
    margin-top: 1rem;
}

/* Glossary Items */
.glossary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    margin: 0.25rem 0;
    border-radius: var(--radius);
    transition: var(--transition);
    border: 1px solid transparent;
}

.glossary-item:hover {
    background: var(--gray-50);
    border-color: var(--gray-200);
}

.glossary-term-en {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1rem;
}

.glossary-term-lao {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 1.25rem 1.5rem;
    border: none;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 18px;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 3px;
}

.lang-flag.lao {
    background: #fef2f2;
    color: #dc2626;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.btn-cancel {
    padding: 0.625rem 1.25rem;
    background: var(--gray-100);
    color: var(--gray-600);
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cancel:hover {
    background: var(--gray-200);
}

.btn-save {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-save:hover {
    background: var(--primary-dark);
}

/* Footer */
footer {
    background: var(--white);
    border-top: 2px solid var(--primary);
    padding: 1.5rem 0;
    margin-top: auto;
    text-align: center;
}

footer p {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

footer small {
    color: var(--gray-500);
    font-size: 0.8rem;
}

/* Utilities */
.d-none {
    display: none !important;
}

.d-flex {
    display: flex;
}

.me-2 {
    margin-right: 0.5rem;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 1.5rem;
    }

    .title-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .main-tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1;
        justify-content: center;
        padding: 0.625rem 1rem;
    }

    .tab-btn span:not(.tab-badge) {
        display: none;
    }

    .translation-panels {
        grid-template-columns: 1fr;
    }

    .source-panel {
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }

    .language-bar {
        flex-wrap: wrap;
    }

    .glossary-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-wrapper {
        max-width: none;
    }

    .add-term-btn {
        justify-content: center;
    }

    /* Navbar responsive */
    .brand-tagline {
        display: none;
    }

    .brand-name {
        font-size: 0.9rem;
    }

    .brand-logo img {
        height: 24px;
    }

    .status-badge span:not(.status-dot) {
        display: none;
    }

    .status-badge {
        padding: 0.375rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 100px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Focus States */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--primary-light);
    color: var(--white);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Authentication Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 140px);
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    border: 1px solid var(--gray-200);
}

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

.auth-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.auth-icon i {
    font-size: 2rem;
    color: var(--white);
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

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

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-form label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

.auth-form .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-form .input-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--gray-400);
    font-size: 1rem;
}

.auth-form input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--white);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.auth-form input::placeholder {
    color: var(--gray-400);
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.auth-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), #991b1b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

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

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

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

.forgot-password-link {
    text-align: right;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

.forgot-password-link a {
    color: var(--gray-500);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.forgot-password-link a:hover {
    color: var(--primary);
}

.auth-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.auth-notice i {
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.auth-notice span {
    color: var(--gray-600);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Alert styles for auth pages */
.auth-card .alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.auth-card .alert i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.auth-card .alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.auth-card .alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.auth-card .alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #d97706;
}

.auth-card .alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
}

.auth-card .btn-close {
    margin-left: auto;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.5;
    padding: 0;
    line-height: 1;
}

.auth-card .btn-close:hover {
    opacity: 1;
}

/* Responsive for auth pages */
@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
    }

    .auth-icon {
        width: 60px;
        height: 60px;
    }

    .auth-icon i {
        font-size: 1.75rem;
    }

    .auth-header h1 {
        font-size: 1.25rem;
    }
}

/* Admin Panel Styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

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

.admin-header h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.admin-header h1 i {
    color: var(--primary);
}

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

.admin-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0;
}

.section-header h2 i {
    color: var(--primary);
}

.section-header .badge {
    background: var(--primary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.section-header .badge.success {
    background: #16a34a;
}

.users-table-wrapper {
    overflow-x: auto;
}

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

.users-table th,
.users-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.users-table th {
    background: var(--white);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.users-table tbody tr:hover {
    background: var(--gray-50);
}

.users-table tbody tr:last-child td {
    border-bottom: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--white);
}

.user-avatar.pending {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.user-avatar.approved {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.user-avatar.admin {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.role-badge.admin {
    background: #fef2f2;
    color: var(--primary);
    border: 1px solid #fecaca;
}

.role-badge.user {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-approve,
.btn-reject,
.btn-toggle,
.btn-delete {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-approve {
    background: #16a34a;
    color: var(--white);
}

.btn-approve:hover {
    background: #15803d;
}

.btn-reject {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-reject:hover {
    background: #fecaca;
    color: var(--primary);
}

.btn-toggle {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

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

.btn-delete {
    background: transparent;
    color: var(--gray-500);
    padding: 0.5rem;
}

.btn-delete:hover {
    background: #fef2f2;
    color: var(--primary);
}

.btn-toggle-active {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-toggle-active.deactivate {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.btn-toggle-active.deactivate:hover {
    background: #fef3c7;
}

.btn-toggle-active.activate {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.btn-toggle-active.activate:hover {
    background: #dcfce7;
}

.status-badge-active,
.status-badge-inactive {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge-active {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.status-badge-inactive {
    background: var(--gray-100);
    color: var(--gray-500);
    border: 1px solid var(--gray-300);
}

.user-avatar.inactive {
    background: linear-gradient(135deg, var(--gray-400), var(--gray-500));
}

.inactive-row {
    opacity: 0.7;
    background: var(--gray-50);
}

.current-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--gray-100);
    color: var(--gray-500);
    border-radius: 20px;
    font-size: 0.85rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--gray-400);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1rem;
}

/* Admin page alerts */
.admin-container .alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.admin-container .alert i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.admin-container .alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.admin-container .alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.admin-container .alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #d97706;
}

.admin-container .alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
}

.admin-container .btn-close {
    margin-left: auto;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.5;
    padding: 0;
    line-height: 1;
}

.admin-container .btn-close:hover {
    opacity: 1;
}

/* Admin Filter Section */
.admin-filter-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filter-group {
    flex: 1;
    min-width: 180px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 0.875rem;
    color: var(--gray-400);
}

.filter-input {
    width: 100%;
    padding: 0.625rem 0.875rem 0.625rem 2.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: var(--transition);
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.filter-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    background: var(--primary);
    color: var(--white);
}

.filter-btn:hover {
    background: var(--primary-dark);
}

.filter-btn.clear {
    background: var(--gray-200);
    color: var(--gray-700);
}

.filter-btn.clear:hover {
    background: var(--gray-300);
}

.filter-btn.add-btn {
    background: #16a34a;
    color: var(--white);
}

.filter-btn.add-btn:hover {
    background: #15803d;
}

/* Admin Quick Links */
.admin-quick-links {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.quick-link:hover {
    background: var(--gray-50);
    color: var(--gray-800);
}

.quick-link.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.quick-link i {
    font-size: 1rem;
}

/* Glossary Styles */
.glossary-table .term-text {
    font-size: 0.95rem;
}

.glossary-table .term-text.english {
    font-weight: 500;
    color: var(--gray-800);
}

.glossary-table .term-text.lao {
    color: var(--gray-700);
}

.glossary-table .date-text {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.info-box {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    margin-top: 1.5rem;
}

.info-box > i {
    color: #2563eb;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-box strong {
    color: #1e40af;
    font-size: 0.9rem;
}

.info-box p {
    color: #3b82f6;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    margin-bottom: 0;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.term-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-top: 0.5rem;
}

.term-info .info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.term-info .info-label {
    color: var(--gray-500);
    min-width: 100px;
}

/* Edit Button */
.btn-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    background: var(--gray-100);
    color: var(--gray-600);
    text-decoration: none;
    transition: var(--transition);
}

.btn-edit:hover {
    background: #eff6ff;
    color: #2563eb;
}

/* Edit User Page Styles */
.optional-label {
    font-weight: 400;
    color: var(--gray-400);
    font-size: 0.8rem;
}

.user-status-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-top: 0.5rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    min-width: 80px;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.auth-btn.secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.auth-btn.secondary:hover {
    background: var(--gray-300);
    transform: none;
    box-shadow: none;
}

/* Responsive for admin panel */
@media (max-width: 768px) {
    .admin-header h1 {
        font-size: 1.5rem;
    }

    .users-table th,
    .users-table td {
        padding: 0.75rem 1rem;
    }

    .action-buttons {
        flex-wrap: wrap;
    }

    .btn-approve,
    .btn-reject,
    .btn-toggle {
        padding: 0.375rem 0.625rem;
        font-size: 0.8rem;
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .filter-actions {
        width: 100%;
        justify-content: stretch;
    }

    .filter-btn {
        flex: 1;
        justify-content: center;
    }
}

/* ================================ */
/* Statistics & Activity Styles     */
/* ================================ */

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.5rem;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-icon-red {
    background: var(--primary-bg);
    color: var(--primary);
}

.stat-icon-green {
    background: #f0fdf4;
    color: #16a34a;
}

.stat-icon-amber {
    background: #fffbeb;
    color: #d97706;
}

.stat-icon-blue {
    background: #eff6ff;
    color: #2563eb;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-500);
    margin-top: 0.125rem;
}

/* Charts Layout */
.stats-charts-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stats-chart-wide {
    flex: 2;
}

.stats-chart-narrow {
    flex: 1;
}

.stats-chart-body {
    padding: 1.5rem;
    height: 280px;
}

/* Filter Label Text */
.filter-label-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}

/* Rank Number */
.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 0.8rem;
    font-weight: 600;
}

.rank-number.top-rank {
    background: var(--primary-bg);
    color: var(--primary);
}

/* Quick Actions */
.stats-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Activity Date */
.activity-date {
    display: flex;
    flex-direction: column;
}

.date-primary {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-700);
}

.date-secondary {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.user-name-text {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--gray-800);
}

.text-muted-custom {
    color: var(--gray-400);
    font-size: 0.85rem;
}

/* Direction Badge */
.direction-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.direction-badge.en-lao {
    background: var(--primary-bg);
    color: var(--primary);
    border: 1px solid #fecaca;
}

.direction-badge.lao-en {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Text Preview Cell */
.text-preview-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* Pagination */
.stats-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    gap: 0.75rem;
}

.pagination-list {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-link-custom {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid var(--gray-200);
    text-decoration: none;
    transition: var(--transition);
}

.page-link-custom:hover {
    background: var(--gray-50);
    color: var(--gray-800);
    border-color: var(--gray-300);
}

.page-link-custom.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.page-link-custom.disabled {
    opacity: 0.5;
    cursor: default;
    border: none;
    background: none;
}

.pagination-info {
    font-size: 0.8rem;
    color: var(--gray-400);
}

/* ================================ */
/* Profile Page Styles              */
/* ================================ */

.profile-body {
    padding: 2rem 1.5rem;
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-name-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.profile-display-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

.profile-email {
    font-size: 0.9rem;
    color: var(--gray-500);
}

.profile-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.profile-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.profile-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.profile-detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-detail-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-700);
}

/* Profile Form */
.profile-form-body {
    padding: 1.5rem;
}

.form-group-custom {
    margin-bottom: 1.25rem;
}

.form-label-custom {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-label-custom i {
    color: var(--gray-400);
}

.form-input-custom {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--white);
    transition: var(--transition);
}

.form-input-custom:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-input-custom::placeholder {
    color: var(--gray-400);
}

.profile-form-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 0;
    margin-bottom: 1rem;
    border-top: 1px solid var(--gray-200);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
}

.profile-form-divider .optional-label {
    font-weight: 400;
    color: var(--gray-400);
    font-size: 0.8rem;
}

.profile-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

@media (max-width: 768px) {
    .profile-avatar-section {
        flex-direction: column;
        text-align: center;
    }

    .profile-badges {
        justify-content: center;
    }

    .profile-form-actions {
        flex-direction: column;
    }

    .profile-form-actions .filter-btn {
        justify-content: center;
    }
}

/* Responsive for stats */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-charts-row {
        flex-direction: column;
    }

    .stats-chart-wide,
    .stats-chart-narrow {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-actions {
        flex-direction: column;
    }

    .stats-actions .filter-btn {
        justify-content: center;
    }

    .admin-quick-links {
        flex-wrap: wrap;
    }

    .text-preview-cell {
        max-width: 120px;
    }
}

/* Enhanced Responsive Styles */

/* Mobile navigation */
@media (max-width: 576px) {
    .navbar-container {
        padding: 0.25rem 0.75rem;
    }

    .navbar-brand {
        gap: 0.375rem;
    }

    .brand-logo img {
        height: 22px;
    }

    .brand-name {
        font-size: 0.85rem;
    }

    .user-menu {
        gap: 0.25rem;
    }

    .nav-btn.admin-btn span {
        display: none;
    }

    .nav-btn.admin-btn {
        padding: 0.375rem;
    }

    .user-info-badge span {
        display: none;
    }

    .user-info-badge {
        padding: 0.375rem;
    }
}

/* Admin pages responsive */
@media (max-width: 768px) {
    .admin-container {
        padding: 1rem 0.75rem;
    }

    .admin-header h1 {
        font-size: 1.35rem;
    }

    .admin-section {
        border-radius: var(--radius);
    }

    .section-header {
        padding: 0.875rem 1rem;
    }

    .section-header h2 {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .admin-container {
        padding: 0.75rem 0.5rem;
    }

    .admin-header {
        margin-bottom: 1rem;
    }

    .admin-header h1 {
        font-size: 1.15rem;
        flex-wrap: wrap;
    }

    .admin-header p {
        font-size: 0.85rem;
    }

    .admin-quick-links {
        gap: 0.375rem;
        margin-bottom: 1rem;
        justify-content: center;
    }

    .quick-link {
        padding: 0.5rem 0.625rem;
        font-size: 0.8rem;
    }

    .quick-link span {
        display: none;
    }

    .quick-link i {
        font-size: 1.1rem;
    }

    .admin-section {
        margin-bottom: 1rem;
    }

    .section-header {
        padding: 0.75rem;
    }

    .section-header h2 {
        font-size: 0.95rem;
        gap: 0.5rem;
    }

    /* Forms responsive */
    .form-group-custom {
        margin-bottom: 0.875rem;
    }

    .form-label-custom {
        font-size: 0.85rem;
    }

    .form-input-custom {
        padding: 0.625rem 0.75rem;
        font-size: 0.9rem;
    }

    /* Tables responsive */
    .users-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .users-table {
        min-width: 600px;
    }

    .users-table th,
    .users-table td {
        padding: 0.625rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Filter section responsive */
    .admin-filter-section {
        padding: 0.75rem;
    }

    .filter-form {
        flex-direction: column;
        gap: 0.5rem;
    }

    .filter-group {
        width: 100%;
    }

    .filter-input,
    .filter-select {
        font-size: 0.9rem;
    }

    .filter-actions {
        width: 100%;
        justify-content: center;
    }

    .filter-btn {
        flex: 1;
        justify-content: center;
    }
}

/* Site settings page responsive */
@media (max-width: 768px) {
    .site-settings-grid {
        grid-template-columns: 1fr !important;
    }

    .current-file-preview {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .current-file-preview span {
        margin-left: 0 !important;
    }
}

@media (max-width: 576px) {
    input[type="file"].form-input-custom::file-selector-button {
        padding: 0.375rem 0.75rem;
        font-size: 0.85rem;
        margin-right: 0.5rem;
    }

    .file-upload-wrapper {
        gap: 0.5rem;
    }
}

/* Footer responsive */
@media (max-width: 576px) {
    footer {
        padding: 1rem 0;
    }

    footer p {
        font-size: 0.85rem;
    }

    footer small {
        font-size: 0.75rem;
    }
}

/* Buttons responsive */
@media (max-width: 576px) {
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .profile-form-actions,
    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .profile-form-actions .btn,
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Alert responsive */
@media (max-width: 576px) {
    .alert {
        font-size: 0.85rem;
        padding: 0.75rem 1rem;
    }
}

