/* ═══════════════════════════════════════════════════════════════════════════
   BEE Automation Project — Unified Stylesheet
   Brand Colors: Primary #FF7600 (Orange), Dark #1A202C, 
                 Light #F7FAFC, Success #28A745
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --primary: #FF7600;
    --primary-light: rgba(255, 118, 0, 0.1);
    --primary-gradient: linear-gradient(135deg, #FF7600 0%, #FF9E4A 100%);
    --accent: #FF7600;
    --accent-gradient: linear-gradient(135deg, #FF7600 0%, #FF9E4A 100%);
    --dark: #1A202C;
    --slate: #4A5568;
    --light: #F7FAFC;
    --glass: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.1);
    --radius-lg: 24px;
    --radius-md: 12px;
    --glass-blur: blur(12px);
    --shadow-smart: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* ─── RESET & BASE ─────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Verdana', sans-serif;
    background-color: #f4f4f4;
    color: #59585B;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* ─── GLOBAL APP LAYOUT ───────────────────────────────────────────────── */
.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* --- MANAGEMENT PORTAL HEADER (TOP NAVIGATION) -------------------------- */
.mgmt-portal-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 0 40px;
    box-shadow: var(--shadow-smart);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 9000;
    height: 70px;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left,
.header-right {
    flex: 0 0 200px;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 45px;
    width: auto;
}

.mgmt-nav {
    display: flex;
    gap: 30px;
}

.mgmt-nav-item {
    color: #4A5568;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    padding: 24px 0;
    border-bottom: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 9px;
    opacity: 0.8;
}

.mgmt-nav-item i {
    font-size: 15px;
    color: #718096;
    transition: transform 0.3s ease;
}

.mgmt-nav-item:hover,
.mgmt-nav-item.active {
    color: #FF7600;
    opacity: 1;
}

.mgmt-nav-item.active {
    border-bottom-color: #FF7600;
}

.mgmt-nav-item:hover i {
    transform: translateY(-1px);
    color: #FF7600;
}

.mgmt-nav-item.active i {
    color: #FF7600;
}

/* Legacy mgmt-logout-btn removed for unified floating design */

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #f8fafc;
    min-width: 0;
    /* Prevent flex breaking */
}

.simple-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    min-height: 70px;
    /* Use min-height */
    box-shadow: var(--shadow-smart);
    display: flex;
    align-items: center;
}

.content-area {
    flex: 1;
    padding: 0 32px 32px 32px;
    width: 100%;
}

.content-area.premium-mgmt {
    padding: 40px;
    background: #FFFFFF;
    margin: 24px;
    border-radius: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(226, 232, 240, 0.4);
    min-height: calc(100vh - 118px);
    /* Account for top header and margins */
}

@media (max-width: 768px) {
    .global-sidebar {
        display: none;
        /* Mobile navigation would go here */
    }
}

/* ─── CONTAINERS ───────────────────────────────────────────────────────── */
.container {
    max-width: 480px;
    padding: 30px 40px;
    background-color: #ffffff;
    margin: 30px auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-size: 15px;
    font-family: 'Segoe UI', 'Verdana', sans-serif;
}

.container-wide {
    max-width: 900px;
    padding: 30px 40px;
    background-color: #ffffff;
    margin: 30px auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ─── HEADINGS ─────────────────────────────────────────────────────────── */
h1 {
    font-weight: 700;
    color: #59585B;
    font-size: 32px;
    text-align: center;
    margin-bottom: 10px;
}

h2 {
    color: #FF7600;
    text-align: center;
    font-weight: 700;
    margin-bottom: 15px;
}

h3 {
    color: #59585B;
    margin-bottom: 10px;
}

/* ─── LABELS ───────────────────────────────────────────────────────────── */
label,
legend {
    color: #59585B;
    font-size: 14px;
    font-weight: 500;
    display: block;
    margin-top: 10px;
    margin-bottom: 3px;
}

/* ─── INPUTS ───────────────────────────────────────────────────────────── */
.input,
.form-control {
    outline: none;
    font-size: 15px;
    width: 100%;
    line-height: 1.8;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
}

.input:hover,
.form-control:hover {
    background-color: #fafafa;
}

.input:focus,
.form-control:focus {
    border-color: #FF7600;
    box-shadow: 0 0 0 3px rgba(255, 118, 0, 0.12);
}

/* ─── BUTTONS ──────────────────────────────────────────────────────────── */
.btn-primary {
    background-color: #FF7600;
    color: #ffffff;
    padding: 10px 20px;
    width: 100%;
    border: 2px solid #FF7600;
    border-radius: 6px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 200ms ease-in-out;
    display: block;
    text-align: center;
    margin-top: 20px;
}

.btn-primary:hover {
    background-color: #ffffff;
    color: #FF7600;
}

.btn-secondary {
    background-color: #59585B;
    color: #ffffff;
    padding: 10px 20px;
    width: 100%;
    border: 2px solid #59585B;
    border-radius: 6px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 200ms ease-in-out;
    display: block;
    text-align: center;
    margin-top: 10px;
}

.btn-secondary:hover {
    background-color: #ffffff;
    color: #59585B;
}

.btn-teal {
    background-color: #FF7600;
    color: #ffffff;
    padding: 10px 20px;
    border: 2px solid #FF7600;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 200ms ease-in-out;
    display: inline-block;
    text-align: center;
}

.btn-teal:hover {
    background-color: #ffffff;
    color: #FF7600;
}

.btn-sm {
    padding: 6px 12px;
    width: auto;
    font-size: 13px;
}

.btn-danger {
    background-color: #c62828;
    color: #ffffff;
    border: 2px solid #c62828;
    border-radius: 6px;
    font-weight: 700;
    transition: all 200ms ease-in-out;
    cursor: pointer;
}

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

.btn-orange {
    background: #FF7300;
    color: white !important;
    border: none !important;
    border-radius: 12px;
    padding: 12px 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 6px rgba(255, 115, 0, 0.1);
}

.btn-orange:hover {
    background: #E66700;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(255, 115, 0, 0.2);
}

.btn-orange i {
    font-size: 1.1em;
}

/* ─── MODALS & DIALOGS ─────────────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(43, 42, 45, 0.4);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #ffffff;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 24px 30px;
    background: linear-gradient(135deg, #fff 0%, #f9f9fafb 100%);
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
}

.modal-header h3 {
    margin: 0;
    color: #FF7600;
    font-size: 22px;
    font-weight: 700;
}

.modal-body {
    padding: 30px;
    color: #59585B;
    font-size: 16px;
}

.modal-footer {
    padding: 20px 30px;
    background-color: #fcfcfc;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* ─── BUTTON ROWS ──────────────────────────────────────────────────────── */
.btn-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
}

.btn-row .btn-primary,
.btn-row .btn-secondary,
.btn-row .btn-teal {
    width: auto;
    flex: 1;
    margin-top: 0;
}

/* ─── SUCCESS ICON ─────────────────────────────────────────────────────── */
.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #28A745;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px;
    color: #ffffff;
    font-size: 40px;
}

/* ─── TEXT UTILITIES ───────────────────────────────────────────────────── */
.text-center {
    text-align: center;
}

.text-muted {
    color: #848287;
    font-size: 13px;
    font-style: italic;
}

.text-small {
    font-size: 13px;
}

.text-error {
    color: #c62828;
    font-size: 13px;
    margin-top: 5px;
}

.text-success {
    color: #28A745;
    font-size: 13px;
    margin-top: 5px;
}

p.description {
    text-align: center;
    color: #59585B;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* ─── FLASH MESSAGES ───────────────────────────────────────────────────── */
.flash-messages {
    max-width: 480px;
    margin: 10px auto;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flash-error {
    background-color: #fdecea;
    color: #c62828;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    border-left: 4px solid #c62828;
}

.flash-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    border-left: 4px solid #2e7d32;
}

.flash-info {
    background-color: #e3f2fd;
    color: #1565c0;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    border-left: 4px solid #1565c0;
}

.notification-banner {
    background-color: #fff8e1;
    border: 1px solid #ffe082;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    margin: 20px auto;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

/* ─── LINKS ────────────────────────────────────────────────────────────── */
.link {
    color: #FF7600;
    font-size: 13px;
    transition: color 0.2s;
}

.link:hover {
    color: #cc5f00;
    text-decoration: underline;
}

/* ─── CHECKBOX ─────────────────────────────────────────────────────────── */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.checkbox-row input[type="checkbox"] {
    accent-color: #FF7600;
    width: 16px;
    height: 16px;
}

/* ─── PREMIUM TABLES ───────────────────────────────────────────────────── */
.table-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #edf2f7;
    overflow-x: auto;
    /* ENABLE HORIZONTAL SCROLLING */
    margin-top: 25px;
    width: 100%;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 800px;
    /* Base minimum */
}

.premium-table th {
    background-color: #f8fafc;
    color: #4a5568;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 16px 20px;
    border-bottom: 2px solid #edf2f7;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.premium-table td {
    padding: 16px 20px;
    font-size: 14px;
    color: #2d3748;
    border-bottom: 1px solid #edf2f7;
    transition: background-color 0.2s ease;
}

.premium-table.compact td,
.premium-table.compact th {
    padding: 10px 15px;
    /* Compact version for wide tables */
}

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

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

.premium-table tbody tr:hover {
    background-color: #f7fafc;
}

/* ─── DASHBOARD STATS ──────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.stat-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card .label {
    font-size: 14px;
    color: #718096;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
}

.stat-card.primary {
    border-left: 4px solid #FF7600;
}

.stat-card.success {
    border-left: 4px solid #28A745;
}

.stat-card.warning {
    border-left: 4px solid #f9a825;
}

.stat-card.danger {
    border-left: 4px solid #c62828;
}

/* Adjust container widths */
.container-wide {
    max-width: 1280px;
    padding: 25px 30px;
}

/* ─── SUMMARY CARDS (Dashboard) ────────────────────────────────────────── */
.summary-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.summary-card {
    flex: 1;
    padding: 18px;
    text-align: center;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
}

.summary-card.valid {
    background: #e8f5e9;
    color: #2e7d32;
}

.summary-card.expiring {
    background: #fff8e1;
    color: #f9a825;
}

.summary-card.expired {
    background: #fdecea;
    color: #c62828;
}

.summary-card.missing {
    background: #eceff1;
    color: #37474f;
}

/* ─── STATUS BADGES ────────────────────────────────────────────────────── */
.status-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
    display: inline-block;
}

.status-valid {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-expiring {
    background: #fff8e1;
    color: #f9a825;
}

.status-expired {
    background: #fdecea;
    color: #c62828;
}

.status-missing {
    background: #eceff1;
    color: #37474f;
}

/* ─── FILE INPUT ───────────────────────────────────────────────────────── */
input[type="file"] {
    display: block;
    width: 100%;
    padding: 8px;
    font-size: 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    margin-top: 5px;
    background-color: #fff;
}

/* ─── EMPTY STATE ──────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 30px;
    color: #999;
    font-style: italic;
}

/* ─── FOOTER ───────────────────────────────────────────────────────────── */
footer {
    text-align: center;
    padding: 20px;
    color: #FF7600;
    font-size: 13px;
    margin-top: auto;
}

/* ─── COUNTDOWN / INFO ─────────────────────────────────────────────────── */
.countdown {
    text-align: center;
    font-size: 13px;
    color: #555;
    margin-top: 10px;
}

.resend {
    text-align: center;
    font-size: 13px;
    color: #555;
    margin-top: 5px;
}

.info-message {
    text-align: center;
    font-size: 13px;
    color: #2e7d32;
    margin-top: 8px;
    display: none;
}

/* ─── PASSWORD MATCH MESSAGES ──────────────────────────────────────────── */
.message {
    font-size: 13px;
    margin-top: 3px;
}

.message.success {
    color: #28A745;
}

.message.error {
    color: #c62828;
}

/* ─── DASHBOARD NAV ────────────────────────────────────────────────────── */
.dashboard-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.dashboard-nav a {
    padding: 8px 16px;
    background: #FF7600;
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 200ms ease;
}

.dashboard-nav a:hover {
    background: #fff;
    color: #FF7600;
    border: 1px solid #FF7600;
}

/* ─── PREMIUM DASHBOARD LAYOUT ────────────────────────────────────────── */
.dashboard-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 100px);
}

.dashboard-sidebar {
    background: #fff;
    border-right: 1px solid #edf2f7;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 600;
    color: #718096;
    transition: all 0.2s;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 118, 0, 0.08);
    color: #FF7600;
}

.dashboard-main {
    padding: 30px 40px;
    background: #f8fafc;
}

/* ─── PREMIUM CARDS ────────────────────────────────────────────────────── */
.premium-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    border: 1px solid #edf2f7;
    padding: 24px;
    transition: transform 0.2s;
}

.premium-card:hover {
    transform: translateY(-2px);
}

.premium-card h3 {
    font-weight: 700;
    font-size: 18px;
    color: #2d3748;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ─── GLASSMORPHISM WIDGETS ───────────────────────────────────────────── */
.glass-widget {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
}

/* ─── RESPONSIVE ───────────────────────────────────────────────────────── */
@media (max-width: 992px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        display: none;
        /* Mobile menu needed later */
    }
}

/* ─── PROFESSIONAL AUTHENTICATION ───────────────────────────────────────── */
.auth-wrapper {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.auth-card h1 {
    font-size: 19px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
    text-align: center;
}

.auth-card .description {
    text-align: center;
    color: #64748b;
    margin-bottom: 24px;
}

.simple-header {
    padding: 10px 30px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    background: transparent;
    box-shadow: none;
}

.simple-header .logo {
    max-width: 170px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
    transition: transform 0.3s ease;
}

.simple-header .logo:hover {
    transform: scale(1.02);
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

.auth-footer .link {
    color: #FF7600;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-footer .link:hover {
    color: #e66a00;
}

/* ─── PASSWORD TOGGLE ─────────────────────────────────────────────────── */
.password-container {
    position: relative;
    width: 100%;
}

.password-container .input {
    width: 100%;
    box-sizing: border-box;
    padding-right: 45px !important;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    height: 40px;
    /* Matching input height approximation */
}

.toggle-password:hover {
    color: #FF7600;
}

/* Hide browser-native password reveal/clear buttons (Edge, IE, etc.) */
input::-ms-reveal,
input::-ms-clear {
    display: none;
}

/* Hide pseudo-elements that might appear in some browsers */
input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
    position: absolute;
    right: 0;
}

/* --- CLIENT PORTAL NAVIGATION (FINAL REFINE) ----------------------------- */
.client-portal-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 0 40px;
    box-shadow: var(--shadow-smart);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9000;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Professional Integrated Logout Button (Management Header) */
.btn-logout-sleek {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: transparent;
    color: #E53E3E;
    border: 1.5px solid rgba(229, 62, 62, 0.4);
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn-logout-sleek i {
    font-size: 15px;
    color: #FF7600;
    /* Brand orange icon */
    transition: transform 0.3s ease;
}

.btn-logout-sleek:hover {
    background: rgba(229, 62, 62, 0.05);
    border-color: #E53E3E;
    transform: translateY(-1.5px);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.1);
}

.btn-logout-sleek:hover i {
    transform: translateX(-2px);
}

.header-logo {
    height: auto !important;
    max-height: 65px;
    width: auto !important;
    display: block;
}

/* --- FLOATING LOGOUT BUTTON (Bottom Left) --- */
.btn-logout-floating {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: #FFFFFF;
    color: #E53E3E;
    padding: 12px 24px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 14.5px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1.5px solid rgba(229, 62, 62, 0.15);
    text-decoration: none;
    text-transform: none;
}

.btn-logout-floating i {
    font-size: 16px;
    color: #FF7600;
    /* Use brand orange for icon as in user request */
    transition: transform 0.3s ease;
}

.btn-logout-floating:hover {
    background: #E53E3E;
    color: #FFFFFF;
    border-color: #E53E3E;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(229, 62, 62, 0.25);
}

.btn-logout-floating:hover i {
    color: #FFFFFF;
    transform: translateX(-3px);
}

/* --- FLASH MESSAGES (PREMIUM MODESTY) ----------------------------------- */
.flash-messages {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    width: 100%;
    max-width: 600px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    animation: slideDownToast 0.6s cubic-bezier(0.2, 1, 0.3, 1);
}

@keyframes slideDownToast {
    from {
        transform: translate(-50%, -30px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.flash-success,
.flash-error,
.flash-danger,
.flash-info,
.flash-warning {
    padding: 16px 28px;
    border-radius: 20px;
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    pointer-events: auto;
    width: fit-content;
}

.flash-success {
    background: rgba(40, 167, 69, 0.95);
    color: #FFFFFF;
}

.flash-success::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-size: 18px;
}

.flash-error,
.flash-danger {
    background: rgba(229, 62, 62, 0.08);
    color: #C53030;
    border-color: rgba(229, 62, 62, 0.2);
}

.flash-error::before,
.flash-danger::before {
    content: '\f06a';
    font-family: 'Font Awesome 6 Free';
    font-size: 18px;
}

.flash-warning {
    background: rgba(255, 118, 0, 0.08);
    color: #C05621;
    border-color: rgba(255, 118, 0, 0.2);
}

.flash-warning::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-size: 18px;
}

/* Page Layout Adjustments */
.app-layout:not(:has(.global-sidebar)) .main-wrapper {
    padding-top: 100px;
    /* Offset for header */
}

@media (min-width: 769px) {
    .app-layout:not(:has(.global-sidebar)) .content-area {
        max-width: 1150px;
        margin: 0 auto;
    }
}

/* --- FORM ACTION BUTTONS (CLEANUP) -------------------------------------- */
.form-actions-premium {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #EDF2F7;
}

.btn-cancel-secondary {
    color: #718096;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 14px;
    transition: background 0.2s;
}

.btn-cancel-secondary:hover {
    background: #F7FAFC;
    color: #1A202C;
}

.btn-save-finalize {
    background: linear-gradient(135deg, #FF7600 0%, #FF9E4A 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 8px 20px rgba(255, 118, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save-finalize:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 118, 0, 0.35);
}

/* --- PREMIUM FORM STYLES (COMPACT & PROFESSIONAL) ------------------------ */
.premium-layout-container {
    max-width: 850px;
    margin: 0 auto;
    padding: 10px;
}

.premium-glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    padding: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-glass-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.smart-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 118, 0, 0.1);
    color: #FF7600;
    border-radius: 1000px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.premium-input-group label {
    font-weight: 700;
    color: #1A202C;
    margin-bottom: 6px;
    font-size: 13px;
    display: block;
}

.premium-input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 10px;
    border: 2px solid #EDF2F7;
    background: #FFFFFF;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    color: #1A202C;
}

.premium-input:focus {
    border-color: #FF7600;
    box-shadow: 0 0 0 4px rgba(255, 118, 0, 0.1);
    outline: none;
}

.onboarding-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.icon-box {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    transition: color 0.3s ease;
}

/* Base Responsive Rules */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 20px;
    }

    .header-left,
    .header-right {
        flex: 0 0 auto;
    }

    .mgmt-nav {
        gap: 15px;
    }

    .mgmt-nav-item {
        font-size: 12px;
        padding: 24px 5px;
    }
}

@media (max-width: 850px) {

    /* Management Mobile Navigation */
    .menu-toggle {
        display: block;
    }

    .mgmt-nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        padding: 40px;
        gap: 0;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9999;
        box-shadow: var(--shadow-smart);
    }

    .mgmt-nav.mobile-active {
        left: 0;
    }

    .mgmt-nav-item {
        width: 100%;
        padding: 20px 0;
        border-bottom: 1px solid #EDF2F7;
        font-size: 16px;
        justify-content: flex-start;
    }

    .mgmt-nav-item.active {
        border-bottom-color: #FF7600;
    }

    /* Responsive Grid & Layouts */
    .stats-grid,
    .stats-grid-premium {
        grid-template-columns: 1fr;
    }

    .dashboard-main-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .onboarding-grid {
        grid-template-columns: 1fr;
    }

    div[style*="display: grid; grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .premium-mgmt {
        margin: 15px;
        padding: 25px;
        border-radius: 16px;
    }

    .main-wrapper {
        padding-top: 100px;
        /* More padding to prevent clipping */
    }

    .content-area {
        padding: 0 15px 30px 15px;
    }

    /* Responsive Tables */
    .table-container,
    .table-wrapper,
    .table-scroll-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
        border-radius: 12px;
        border: 1px solid #EDF2F7;
    }

    table {
        min-width: 700px;
        /* Slight increase for better spreadsheet feel */
    }

    /* Fix floating logout for small screens - make it more discreet */
    .btn-logout-floating {
        bottom: 15px;
        left: 15px;
        padding: 8px 14px;
        font-size: 11px;
        border-radius: 10px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 999;
        /* Ensure it's below headers but above content */
    }

    .btn-logout-floating i {
        font-size: 12px;
    }

    /* Management Header Adjustments */
    .header-container {
        height: auto;
        padding: 10px 15px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-left {
        order: 1;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .header-left .header-logo img {
        height: auto !important;
        max-height: 55px;
        /* Slightly smaller for mobile */
    }

    .header-right {
        order: 2;
    }

    .header-right .btn-logout-mgmt {
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .premium-display-title {
        font-size: 26px;
    }

    .high-standard-card {
        padding: 40px 20px;
    }

    .btn-high-standard-primary,
    .btn-high-standard-ghost {
        padding: 15px 20px;
        font-size: 14px;
        width: 100%;
    }

    .roadmap-stepper {
        flex-direction: column;
        gap: 40px;
        /* More gap for labels */
        align-items: flex-start;
        padding-left: 20px;
        margin-bottom: 40px;
        /* More bottom margin to clear floating button */
    }

    .step-line {
        display: none;
    }

    .step {
        flex-direction: row;
        align-items: center;
        gap: 15px;
        width: 100%;
        text-align: left;
    }

    .step-circle {
        flex-shrink: 0;
    }

    .step-label {
        text-align: left;
        max-width: none;
        font-size: 12px;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Custom Select Dropdown Styling */
select.premium-input {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px !important;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23CBD5E0%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 10px auto;
}