/* ebuyerhub v2 Global Design System - Signature Orange, Sky Blue & Clean Light Theme */
:root {
    /* Brand Color Combination (Orange, Sky Blue, Crisp White/Slate) */
    --primary-orange: #ff6600;
    --primary-orange-hover: #e55c00;
    --primary-orange-gradient: linear-gradient(135deg, #ff7a1a 0%, #ff6600 50%, #e65c00 100%);
    --primary-orange-light: rgba(255, 102, 0, 0.08);
    --primary-orange-border: rgba(255, 102, 0, 0.3);

    --accent-blue: #0284c7;
    --accent-blue-hover: #0369a1;
    --accent-blue-gradient: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    --accent-blue-light: rgba(2, 132, 199, 0.1);

    --bg-base: #f4f6f9;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-muted: #f8fafc;

    --border-subtle: #e2e8f0;
    --border-medium: #cbd5e1;
    --border-focus: #ff6600;
    --border-glow: rgba(255, 102, 0, 0.25);

    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);

    --text-main: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
    --shadow-orange: 0 4px 14px rgba(255, 102, 0, 0.3);

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Top Accent Bar */
.top-strip {
    height: 4px;
    background: var(--primary-orange-gradient);
    width: 100%;
}

/* Header & Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 3rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: var(--primary-orange-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 1.25rem;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.35);
}

.brand-text-e {
    color: var(--primary-orange);
}

.brand-text-buyerhub {
    color: #0f172a;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0.95rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-link svg {
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary-orange);
    background: rgba(255, 102, 0, 0.08);
    border-color: rgba(255, 102, 0, 0.2);
}

.nav-link:hover svg {
    transform: translateY(-1px);
}

.nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, #ff7a1a 0%, #ff6600 100%);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.28);
    border-color: transparent;
}

.nav-link.active svg {
    stroke: #ffffff;
}

.nav-link-badge {
    background: var(--accent-blue-light);
    color: var(--accent-blue);
    border: 1px solid rgba(2, 132, 199, 0.2);
}

.nav-link-badge:hover {
    background: var(--accent-blue);
    color: #ffffff;
}

/* Navigation User Profile Dropdown */
.nav-user-dropdown-container {
    position: relative;
    display: inline-block;
}
}

.nav-user-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all var(--transition-fast);
}

.nav-user-dropdown-trigger:hover,
.nav-user-dropdown-trigger.active {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.nav-user-avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.nav-user-info-col {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.25;
}

.nav-user-display-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-user-subtitle {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.nav-user-chevron {
    font-size: 0.8rem;
    color: #64748b;
    transition: transform 0.2s ease;
    margin-left: 0.25rem;
}

.nav-user-dropdown-trigger.open .nav-user-chevron {
    transform: rotate(180deg);
}

.nav-user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    padding: 0.4rem 0;
    z-index: 1000;
    display: none;
    animation: dropdownFadeIn 0.15s ease;
}

.nav-user-dropdown-menu.show {
    display: block;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1.15rem;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    transition: all var(--transition-fast);
}

.nav-dropdown-item:hover {
    background: #f8fafc;
    color: #0f172a;
}

.nav-dropdown-item svg {
    color: #64748b;
    flex-shrink: 0;
}

.nav-dropdown-item:hover svg {
    color: var(--primary-orange);
}

.nav-dropdown-item.logout {
    color: #ef4444;
}

.nav-dropdown-item.logout svg {
    color: #ef4444;
}

.nav-dropdown-item.logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

.nav-dropdown-divider {
    height: 1px;
    background-color: #f1f5f9;
    margin: 0.35rem 0;
}

/* Modal Styling */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: modalPopIn 0.2s ease;
}

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
}

.modal-close-btn:hover {
    color: #0f172a;
}

/* Main Container */
.container,
main.container {
    max-width: 1400px;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    padding: 0 1.25rem;
    flex: 1;
    width: 100%;
}

/* Card Component */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    box-shadow: var(--shadow-md);
    position: relative;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.card-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.card-header h1 {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.card-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Tab Navigation (Styled in Signature Orange) */
.tabs-nav {
    display: flex;
    background: #e2e8f0;
    padding: 0.3rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.75rem;
    gap: 0.35rem;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: var(--primary-orange);
    background: rgba(255, 255, 255, 0.6);
}

.tab-btn.active {
    background: var(--primary-orange);
    color: #ffffff;
    box-shadow: var(--shadow-orange);
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.7rem 0.95rem;
    background: var(--bg-input);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.92rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--border-glow);
}

select.form-control {
    cursor: pointer;
    background-color: #ffffff;
}

/* Purpose: Ensure fixed / disabled supervisor form fields remain crisp and clearly readable */
.form-control:disabled,
.form-control[readonly],
select.form-control:disabled {
    background-color: #f8fafc;
    color: var(--text-main) !important;
    -webkit-text-fill-color: var(--text-main) !important;
    opacity: 1 !important;
    cursor: default;
    border-color: #cbd5e1;
    font-weight: 500;
}

/* Section Title */
.section-title {
    grid-column: 1 / -1;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--primary-orange-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title span {
    border-left: 4px solid var(--primary-orange);
    padding-left: 0.6rem;
}

/* Buttons (Orange Primary, Sky Blue Secondary) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-orange);
    color: #ffffff;
    box-shadow: var(--shadow-orange);
}

.btn-primary:hover {
    background: var(--primary-orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 102, 0, 0.4);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-accent {
    background: var(--accent-blue);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.btn-accent:hover {
    background: var(--accent-blue-hover);
}

.btn-danger {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: var(--danger);
    color: #ffffff;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-staff {
    background: var(--primary-orange-light);
    color: var(--primary-orange);
    border: 1px solid var(--primary-orange-border);
}

.badge-individual {
    background: rgba(16, 185, 129, 0.12);
    color: #0d9488;
    border: 1px solid rgba(13, 148, 136, 0.25);
}

.badge-buyer {
    background: var(--accent-blue-light);
    color: var(--accent-blue);
    border: 1px solid rgba(2, 132, 199, 0.25);
}

.badge-seller {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-supplier {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: #ffffff;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.data-table th {
    background: #f8fafc;
    color: var(--text-secondary);
    font-weight: 700;
    padding: 0.85rem 1rem;
    border-bottom: 2px solid var(--border-subtle);
    white-space: nowrap;
}

.data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-main);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: #f8fafc;
}

/* Modals */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop.show {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 2000;
}

.toast {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    font-weight: 500;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success {
    border-left: 5px solid var(--primary-orange);
}

.toast.error {
    border-left: 5px solid var(--danger);
}

.toast.info {
    border-left: 5px solid var(--accent-blue);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Bottom Footer (Styled in Solid Signature Orange) */
.footer-bar {
    background: var(--primary-orange);
    color: #ffffff;
    padding: 1.5rem 3rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    opacity: 0.9;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ==========================================================================
   Mobile Responsive Navigation & Responsive Layouts
   ========================================================================== */

/* Hamburger Button (Hidden on Desktop) */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.mobile-nav-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #0f172a;
    border-radius: 2px;
    transition: all 0.25s ease-in-out;
}

.mobile-nav-toggle.open span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
    background-color: var(--primary-orange);
}

.mobile-nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.open span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
    background-color: var(--primary-orange);
}

.mobile-nav-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.mobile-nav-backdrop.show {
    display: block;
    opacity: 1;
}

/* Tablet & Mobile Screens (<= 768px) */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1.25rem;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        align-items: stretch;
        padding: 4.5rem 1.5rem 2rem 1.5rem;
        gap: 0.85rem;
        box-shadow: -8px 0 25px rgba(0, 0, 0, 0.12);
        z-index: 1050;
        transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        overflow-y: auto;
    }

    .nav-links.mobile-open {
        right: 0;
    }

    .nav-link {
        width: 100%;
        text-align: left;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .nav-user-dropdown-container {
        width: 100%;
        margin-top: 0.5rem;
    }

    .nav-user-dropdown-trigger {
        width: 100%;
        justify-content: space-between;
        padding: 0.65rem 0.85rem;
    }

    .nav-user-dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border: 1px solid #e2e8f0;
        margin-top: 0.5rem;
    }

    /* Container & Cards */
    .container {
        padding: 0 1rem;
        margin: 1.25rem auto;
    }

    .card {
        padding: 1.5rem 1.25rem !important;
        border-radius: 12px;
    }

    /* Form Grids -> Single Column */
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 0.9rem;
    }

    /* Users & Department Management Page Responsive Controls */
    .users-page-header,
    .dept-page-header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 1rem;
    }

    .users-page-header .btn-new-user,
    .dept-page-header .btn-primary {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .users-filter-bar,
    .dept-filter-bar {
        flex-direction: column;
        gap: 0.75rem;
    }

    .users-search-input,
    .users-filter-select,
    .users-btn-refresh,
    .dept-search-input,
    .dept-filter-select,
    .dept-btn-refresh {
        width: 100% !important;
        min-width: 100% !important;
    }

    /* Modals on Mobile */
    .modal-card {
        width: 94vw;
        max-height: 90vh;
        margin: 0.5rem;
        overflow-y: auto;
    }

    /* Table responsive wrapper */
    .table-container,
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Footer */
    .footer-bar {
        padding: 1.25rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* User & Department Management Desktop Controls */
.users-page-header,
.dept-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.users-filter-bar,
.dept-filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.users-search-input,
.dept-search-input {
    flex: 1;
    min-width: 250px;
}

.users-filter-select,
.dept-filter-select {
    width: 220px;
}

/* Compact Mobile (<= 480px) */
@media (max-width: 480px) {
    .brand {
        font-size: 1.25rem;
    }

    .brand-icon {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }

    .btn {
        width: 100%;
    }
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .tabs-nav {
        flex-direction: column;
    }

    .navbar {
        padding: 0.75rem 1rem;
    }

    .container {
        padding: 0 1rem;
        margin: 1rem auto;
    }
}

/* Exact button styles from user mockup */
.btn-save-orange {
    background-color: #f97316 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 0.7rem 2.2rem !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, transform 0.1s ease !important;
}

.btn-save-orange:hover {
    background-color: #ea580c !important;
    transform: translateY(-1px) !important;
}

.btn-reset-gray {
    background-color: #6b7280 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 0.7rem 2.2rem !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, transform 0.1s ease !important;
}

.btn-reset-gray:hover {
    background-color: #4b5563 !important;
    transform: translateY(-1px) !important;
}

.btn-home-blue {
    background-color: #0284c7 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 0.7rem 2.2rem !important;
    border: none !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, transform 0.1s ease !important;
}

.btn-home-blue:hover {
    background-color: #0369a1 !important;
    transform: translateY(-1px) !important;
}

/* Top 3 Segmented Pill Tab Buttons matching user screenshot */
.reg-tabs {
    display: flex;
    background-color: #e2e8f0;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 2rem;
    gap: 4px;
    border: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.reg-tab {
    flex: 1;
    text-align: center;
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: #475569;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    outline: none;
    user-select: none;
}

.reg-tab:hover:not(.active) {
    color: #1e293b;
    background-color: rgba(255, 255, 255, 0.6);
}

.reg-tab.active {
    background: #ff6600 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.35) !important;
}

.section-title {
    grid-column: 1 / -1;
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background-color: var(--primary-orange);
    border-radius: 2px;
}

/* ==========================================================================
   DYNAMIC MULTI-THEME ENGINE (CSS CUSTOM PROPERTIES)
   ========================================================================== */

[data-theme="dark"],
[data-theme="midnight"] {
    --primary-orange: #ff9800;
    --primary-orange-hover: #f57c00;
    --primary-orange-gradient: linear-gradient(135deg, #ffb74d 0%, #ff9800 50%, #f57c00 100%);
    --primary-orange-light: rgba(255, 152, 0, 0.15);
    --primary-orange-border: rgba(255, 152, 0, 0.4);

    --accent-blue: #38bdf8;
    --accent-blue-hover: #0ea5e9;
    --accent-blue-gradient: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 100%);
    --accent-blue-light: rgba(56, 189, 248, 0.15);

    --bg-base: #0b0f17;
    --bg-surface: #131b2e;
    --bg-card: #182238;
    --bg-input: #101726;
    --bg-muted: #1e293b;

    --border-subtle: #243048;
    --border-medium: #334155;
    --border-focus: #ff9800;
    --border-glow: rgba(255, 152, 0, 0.3);

    --text-main: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);
}

[data-theme="cyberpunk"] {
    --primary-orange: #a855f7;
    --primary-orange-hover: #9333ea;
    --primary-orange-gradient: linear-gradient(135deg, #c084fc 0%, #a855f7 50%, #7e22ce 100%);
    --primary-orange-light: rgba(168, 85, 247, 0.18);
    --primary-orange-border: rgba(168, 85, 247, 0.4);

    --accent-blue: #06b6d4;
    --accent-blue-hover: #0891b2;
    --accent-blue-gradient: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
    --accent-blue-light: rgba(6, 182, 212, 0.18);

    --bg-base: #0d0618;
    --bg-surface: #170e28;
    --bg-card: #1f1435;
    --bg-input: #130a22;
    --bg-muted: #2a1b47;

    --border-subtle: #3b1d64;
    --border-medium: #581c87;
    --border-focus: #a855f7;
    --border-glow: rgba(168, 85, 247, 0.35);

    --text-main: #fdf4ff;
    --text-secondary: #e9d5ff;
    --text-muted: #c084fc;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 25px rgba(168, 85, 247, 0.2);
}

[data-theme="emerald"] {
    --primary-orange: #10b981;
    --primary-orange-hover: #059669;
    --primary-orange-gradient: linear-gradient(135deg, #34d399 0%, #10b981 50%, #047857 100%);
    --primary-orange-light: rgba(16, 185, 129, 0.12);
    --primary-orange-border: rgba(16, 185, 129, 0.35);

    --accent-blue: #0284c7;
    --accent-blue-hover: #0369a1;
    --accent-blue-gradient: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    --accent-blue-light: rgba(2, 132, 199, 0.12);

    --bg-base: #f0fdf4;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-muted: #dcfce7;

    --border-subtle: #bbf7d0;
    --border-medium: #86efac;
    --border-focus: #10b981;
    --border-glow: rgba(16, 185, 129, 0.25);

    --text-main: #064e3b;
    --text-secondary: #065f46;
    --text-muted: #047857;
}

[data-theme="ocean"] {
    --primary-orange: #0284c7;
    --primary-orange-hover: #0369a1;
    --primary-orange-gradient: linear-gradient(135deg, #38bdf8 0%, #0284c7 50%, #075985 100%);
    --primary-orange-light: rgba(2, 132, 199, 0.12);
    --primary-orange-border: rgba(2, 132, 199, 0.35);

    --accent-blue: #06b6d4;
    --accent-blue-hover: #0891b2;
    --accent-blue-gradient: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
    --accent-blue-light: rgba(6, 182, 212, 0.12);

    --bg-base: #f0f9ff;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-muted: #e0f2fe;

    --border-subtle: #bae6fd;
    --border-medium: #7dd3fc;
    --border-focus: #0284c7;
    --border-glow: rgba(2, 132, 199, 0.25);

    --text-main: #0c4a6e;
    --text-secondary: #0369a1;
    --text-muted: #0284c7;
}

[data-theme="sunset"] {
    --primary-orange: #e11d48;
    --primary-orange-hover: #be123c;
    --primary-orange-gradient: linear-gradient(135deg, #f43f5e 0%, #e11d48 50%, #9f1239 100%);
    --primary-orange-light: rgba(225, 29, 72, 0.12);
    --primary-orange-border: rgba(225, 29, 72, 0.35);

    --accent-blue: #f59e0b;
    --accent-blue-hover: #d97706;
    --accent-blue-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --accent-blue-light: rgba(245, 158, 11, 0.12);

    --bg-base: #fff1f2;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-muted: #ffe4e6;

    --border-subtle: #fecdd3;
    --border-medium: #fda4af;
    --border-focus: #e11d48;
    --border-glow: rgba(225, 29, 72, 0.25);

    --text-main: #881337;
    --text-secondary: #9f1239;
    --text-muted: #be123c;
}

/* Theme Selector Cards */
.theme-card {
    cursor: pointer;
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
}

.theme-card:hover {
    border-color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.theme-card.active {
    border-color: var(--primary-orange) !important;
    background: var(--primary-orange-light) !important;
    box-shadow: 0 0 0 1px var(--primary-orange);
}

.theme-card.active .theme-badge-status {
    display: inline-block !important;
    background: var(--primary-orange) !important;
    color: #ffffff !important;
}

/* iOS Style Toggle Switch */
.theme-switch input:checked+.theme-slider {
    background-color: #10b981 !important;
}

.theme-switch input:focus+.theme-slider {
    box-shadow: 0 0 1px #10b981;
}

.theme-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-switch input:checked+.theme-slider:before {
    transform: translateX(26px);
}

/* ==========================================================================
   Global Standardized Pagination Component
   ========================================================================== */
.app-global-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    margin-top: 1.25rem;
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-subtle, #e2e8f0);
    border-radius: var(--radius-md, 10px);
    color: var(--text-main, #0f172a);
    font-size: 0.88rem;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.05));
    transition: background 0.3s ease, border-color 0.3s ease;
}

.app-pagination-summary {
    color: var(--text-secondary, #64748b);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.app-pagination-summary strong {
    color: var(--text-main, #0f172a);
    font-weight: 700;
}

.app-pagination-pagesize {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-secondary, #64748b);
}

.app-pagination-label {
    font-weight: 600;
    color: var(--text-secondary, #64748b);
}

.app-pagination-select {
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm, 6px);
    border: 1px solid var(--border-medium, #cbd5e1);
    background-color: var(--bg-card, #ffffff);
    color: var(--text-main, #0f172a);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.app-pagination-select:focus {
    border-color: var(--primary-orange, #ff6600);
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.18);
}

.app-pagination-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.app-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 0.55rem;
    border-radius: var(--radius-sm, 6px);
    border: 1px solid var(--border-medium, #cbd5e1);
    background: var(--bg-card, #ffffff);
    color: var(--text-main, #0f172a);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.app-page-btn:hover:not(:disabled) {
    background: var(--primary-orange-light, rgba(255, 102, 0, 0.1));
    border-color: var(--primary-orange, #ff6600);
    color: var(--primary-orange, #ff6600);
    transform: translateY(-1px);
}

.app-page-btn.active {
    background: var(--primary-orange, #ff6600) !important;
    border-color: var(--primary-orange, #ff6600) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.35);
}

.app-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: var(--border-subtle, #e2e8f0);
}

.app-pagination-ellipsis {
    padding: 0 0.35rem;
    color: var(--text-muted, #94a3b8);
    font-weight: 700;
    user-select: none;
}