@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap');

/* ==========================================================================
   ZALOPRO.IO - ZALO MARKETING & SEEDING PLATFORM STYLESHEET
   UI/UX PRO MAX DESIGN SYSTEM: BENTO BOX GRID + OFFICIAL ZALO BLUE + CRISP WHITE
   ========================================================================== */

:root {
    --bg-main: #f0f6ff;
    --bg-card: #ffffff;
    --bg-card-hover: #e8f2ff;
    --bg-sidebar: linear-gradient(180deg, #004ecc 0%, #002866 100%);
    --border-color: #cbd5e1;
    --border-light: #e2e8f0;
    --border-focus: #0068ff;
    
    --primary: #0068ff; /* Official Zalo Blue */
    --primary-hover: #0051cc;
    --primary-light: #e6f0ff;
    --primary-glow: rgba(0, 104, 255, 0.28);
    
    --secondary: #0ea5e9;
    --secondary-hover: #0284c7;
    
    --accent-gold: #f59e0b;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;

    --text-main: #0f172a; /* Slate 900 - High Contrast */
    --text-muted: #334155; /* Slate 700 */
    --text-dark: #64748b; /* Slate 500 */

    --font-main: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --sidebar-width: 275px;
    --shadow-card: 0 10px 25px -5px rgba(0, 104, 255, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    --shadow-hover: 0 18px 38px -5px rgba(0, 104, 255, 0.16), 0 8px 16px -2px rgba(15, 23, 42, 0.06);
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(0, 104, 255, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 90% 60%, rgba(14, 165, 233, 0.07) 0%, transparent 40%);
    background-attachment: fixed;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* ==========================================================================
   MAIN APP LAYOUT (LEFT SIDEBAR + RIGHT CONTENT)
   ========================================================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* LEFT SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 4px 0 25px rgba(0, 40, 102, 0.3);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 28px;
    padding-left: 8px;
}

.sidebar-logo span {
    color: #38bdf8;
}

.sidebar-logo .max-badge {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #ffffff !important;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    margin-left: 5px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.45);
    display: inline-block;
    vertical-align: middle;
}

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 104, 255, 0.45);
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.logo-icon:hover {
    transform: scale(1.08) rotate(3deg);
}

.logo-icon img, .logo-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.94rem;
    font-weight: 700;
    color: #ffffff !important;
    transition: var(--transition);
}

.sidebar-link i {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
    color: #ffffff !important;
    opacity: 0.9;
    transition: var(--transition);
}

.sidebar-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.16);
    transform: translateX(4px);
}

.sidebar-link:hover i {
    color: #ffffff !important;
    opacity: 1;
}

.sidebar-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #0068ff, #0284c7) !important;
    box-shadow: 0 4px 15px rgba(0, 104, 255, 0.45);
    font-weight: 800;
}

.sidebar-link.active i {
    color: #ffffff !important;
    opacity: 1;
}

.sidebar-user-widget {
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: auto;
}

/* RIGHT CONTENT WRAPPER */
.main-wrapper {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* TOP FAST MARQUEE BANNER */
.top-fast-marquee {
    background: linear-gradient(90deg, #0068ff 0%, #004ecc 100%);
    border-bottom: 1px solid rgba(0, 104, 255, 0.3);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.9rem;
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: 0 4px 15px rgba(0, 104, 255, 0.2);
}

.marquee-badge {
    background: #ffffff;
    color: #0068ff;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.main-content {
    padding: 28px 24px;
    flex: 1;
}

/* ==========================================================================
   BUTTONS & FORM STYLES
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, #0068ff, #0051cc);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 104, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 104, 255, 0.45);
}

.btn-secondary {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.25);
}

.btn-secondary:hover {
    transform: translateY(-2px);
}

.btn-outline {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    font-weight: 700;
}

.btn-outline:hover {
    background: #e6f0ff;
    border-color: #0068ff;
    color: #0068ff;
    transform: translateY(-2px);
}

.btn-gold {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(245, 158, 11, 0.45);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.4);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   CARDS & BENTO BOX GRID (UI/UX PRO MAX)
   ========================================================================== */
.card-box {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    margin-bottom: 24px;
    color: var(--text-main);
}

.card-box:hover {
    border-color: rgba(0, 104, 255, 0.35);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.card-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.card-box-title {
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
}

.card-box-title i {
    color: var(--primary);
}

/* BENTO BOX GRID STYLES */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.bento-col-4 { grid-column: span 4; }
.bento-col-5 { grid-column: span 5; }
.bento-col-6 { grid-column: span 6; }
.bento-col-7 { grid-column: span 7; }
.bento-col-8 { grid-column: span 8; }
.bento-col-12 { grid-column: span 12; }

.bento-feature-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bento-feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 104, 255, 0.4);
    box-shadow: var(--shadow-hover);
}

.bento-icon-badge {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: #e6f0ff;
    color: #0068ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 104, 255, 0.15);
}

.bento-feature-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.bento-feature-desc {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 16px;
}

.grid-main {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 24px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #334155;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    background: #ffffff;
    box-shadow: 0 0 10px rgba(0, 104, 255, 0.25);
}

.stat-card {
    text-align: center;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.stat-card:hover {
    border-color: rgba(0, 104, 255, 0.4);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0068ff;
    transition: transform 0.25s ease;
}

.stat-title {
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-top: 4px;
    font-weight: 600;
}

/* TAB BUTTONS */
.tab-list {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.tab-list.tab-split-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    margin-bottom: 22px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 14px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: #475569;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-list.tab-split-2 .tab-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 13px 20px;
    font-size: 0.96rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    background: #f8fafc;
    color: #475569;
    border: 1.5px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-list.tab-split-2 .tab-btn i {
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.tab-btn:hover {
    color: #0068ff;
    background: #e6f0ff;
}

.tab-list.tab-split-2 .tab-btn:hover {
    background: #eff6ff;
    color: #0068ff;
    border-color: #93c5fd;
    transform: translateY(-1px);
}

.tab-btn.active {
    color: #ffffff;
    background: #0068ff;
    box-shadow: 0 4px 12px rgba(0, 104, 255, 0.3);
}

.tab-list.tab-split-2 .tab-btn.active {
    background: #0068ff;
    color: #ffffff;
    border-color: #0068ff;
    box-shadow: 0 4px 14px rgba(0, 104, 255, 0.35);
}

.tab-list.tab-split-2 .tab-btn.active i {
    color: #ffffff !important;
}

@media (max-width: 640px) {
    .tab-list.tab-split-2 {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .tab-list.tab-split-2 .tab-btn {
        padding: 10px 8px;
        font-size: 0.82rem;
        gap: 6px;
    }
    .tab-list.tab-split-2 .tab-btn i {
        font-size: 0.95rem;
    }
}

@media (max-width: 420px) {
    .tab-list.tab-split-2 .tab-btn {
        padding: 9px 4px;
        font-size: 0.78rem;
        flex-direction: column;
        gap: 4px;
    }
}

/* TABLES & BADGES */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.custom-table th {
    background: #e6f0ff;
    color: #004ecc;
    font-weight: 800;
    padding: 12px 16px;
    border-bottom: 2px solid #99c2ff;
    white-space: nowrap;
}

.custom-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
    font-weight: 600;
    white-space: nowrap;
}

.custom-table tr:hover td {
    background: #f8fafc;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.badge-warning {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
}

.badge-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.badge-info {
    background: #e0f2fe;
    color: #0051a8;
    border: 1px solid #7dd3fc;
}

.badge-primary {
    background: #e6f0ff;
    color: #0068ff;
    border: 1px solid #b3d1ff;
}

/* PROGRESS BAR */
.progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 6px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0068ff, #38bdf8);
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

/* MODALS & TOASTS */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-backdrop.active {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
}

.modal-box {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    padding: 28px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
    transform: translateY(-20px);
    transition: var(--transition);
    position: relative;
    color: #0f172a;
}

.modal-backdrop.active .modal-box {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-close:hover {
    color: #0f172a;
}

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-left: 4px solid var(--primary);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 600;
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* FOOTER */
.footer {
    margin-top: auto;
    background: #ffffff;
    border-top: 1px solid var(--border-light);
    padding: 24px 0 20px;
}

.footer-bottom {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-dark);
}

/* ==========================================================================
   DESKTOP DEFAULT RULES (HIDE MOBILE UI ON SCREENS > 992px)
   ========================================================================== */
.mobile-topbar,
.mobile-bottom-nav,
.mobile-backdrop,
.sidebar-close-btn {
    display: none !important;
}

/* ==========================================================================
   ADAPTIVE MOBILE & TABLET LAYOUT (<= 992px)
   Native App Feel: Slide Drawer, Sticky Topbar, Bottom Navigation, Bento Polish
   ========================================================================== */
@media (max-width: 992px) {
    /* 1. SIDEBAR AS SLIDE-OUT DRAWER */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 295px !important;
        max-width: 84vw !important;
        height: 100vh !important;
        z-index: 10000 !important;
        transform: translateX(-100%);
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
        box-shadow: none !important;
        padding: 20px 16px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar.open {
        transform: translateX(0) !important;
        box-shadow: 16px 0 50px rgba(0, 20, 60, 0.45) !important;
    }

    .sidebar-logo {
        position: relative;
        padding-right: 40px;
        margin-bottom: 22px;
    }

    /* Keep all labels visible inside mobile drawer */
    .sidebar-logo div:not(.logo-icon), 
    .sidebar-logo span, 
    .sidebar-link span, 
    .sidebar-user-widget span {
        display: inline !important;
    }

    .sidebar-link {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    /* Close Button Inside Drawer */
    .sidebar-close-btn {
        display: flex !important;
        position: absolute;
        top: 0;
        right: 0;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.16);
        border: 1px solid rgba(255, 255, 255, 0.28);
        color: #ffffff;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        cursor: pointer;
        transition: var(--transition);
        z-index: 10;
    }

    .sidebar-close-btn:active {
        transform: scale(0.92);
        background: rgba(239, 68, 68, 0.45);
    }

    /* 2. BACKDROP OVERLAY */
    .mobile-backdrop {
        display: block !important;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.65);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 9999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .mobile-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    body.drawer-open {
        overflow: hidden !important;
    }

    /* 3. FULL WIDTH MAIN WRAPPER */
    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        min-height: 100vh;
        padding-bottom: 76px !important; /* Space for bottom nav */
    }

    /* 4. MOBILE STICKY TOPBAR */
    .mobile-topbar {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        height: 58px;
        padding: 0 14px;
        background: #ffffff;
        border-bottom: 1px solid var(--border-light);
        position: sticky;
        top: 0;
        z-index: 900;
        box-shadow: 0 2px 10px rgba(0, 104, 255, 0.05);
    }

    .mobile-menu-btn {
        background: #f1f5f9;
        border: 1px solid var(--border-light);
        width: 40px;
        height: 40px;
        border-radius: 10px;
        color: var(--primary);
        font-size: 1.15rem;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: var(--transition);
    }

    .mobile-menu-btn:active {
        background: var(--primary-light);
        transform: scale(0.94);
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 8px;
        text-decoration: none;
    }

    .mobile-brand-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .mobile-brand-text {
        font-weight: 800;
        font-size: 1.05rem;
        color: #0f172a;
        letter-spacing: -0.3px;
    }

    .mobile-brand-text span {
        color: var(--primary);
    }

    .mobile-balance-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: #eff6ff;
        border: 1px solid #bfdbfe;
        color: #0068ff;
        font-size: 0.78rem;
        font-weight: 700;
        padding: 6px 10px;
        border-radius: var(--radius-full);
        text-decoration: none;
        transition: var(--transition);
    }

    .mobile-login-pill {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        background: var(--primary);
        color: #ffffff !important;
        font-size: 0.78rem;
        font-weight: 700;
        padding: 7px 12px;
        border-radius: var(--radius-full);
        text-decoration: none;
    }

    /* 5. MOBILE BOTTOM NAVIGATION BAR (APP STYLE) */
    .mobile-bottom-nav {
        display: flex !important;
        align-items: center;
        justify-content: space-around;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 62px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid var(--border-light);
        z-index: 900;
        box-shadow: 0 -3px 18px rgba(15, 23, 42, 0.08);
        padding: 0 4px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        flex: 1;
        height: 100%;
        color: #64748b;
        font-size: 0.68rem;
        font-weight: 600;
        text-decoration: none;
        border: none;
        background: transparent;
        cursor: pointer;
        transition: color 0.2s ease;
        position: relative;
    }

    .bottom-nav-item i {
        font-size: 1.15rem;
    }

    .bottom-nav-item.active {
        color: #0068ff !important;
        font-weight: 800;
    }

    .bottom-nav-item.active::after {
        content: '';
        position: absolute;
        top: 6px;
        width: 4px;
        height: 4px;
        background: #0068ff;
        border-radius: 50%;
    }

    .bottom-nav-item:active {
        transform: scale(0.92);
    }

    /* 6. CONTENT & BENTO GRID ADAPTATION */
    .main-content {
        padding: 14px 12px !important;
    }

    .grid-main, .bento-grid, .grid-2, .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .bento-col-4, .bento-col-5, .bento-col-6, .bento-col-7, .bento-col-8, .bento-col-12 {
        grid-column: span 12 !important;
    }

    .bento-card, .bento-feature-card {
        padding: 16px !important;
        border-radius: 14px !important;
    }

    h1, .bento-feature-card h1 {
        font-size: 1.35rem !important;
        line-height: 1.35 !important;
    }

    /* Stats Grid: 2 columns on mobile */
    .grid-4, .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .stat-card {
        padding: 12px 10px !important;
    }

    .stat-card .stat-value {
        font-size: 1.25rem !important;
    }

    /* Form Controls: Touch-friendly & Prevent iOS Zoom */
    input, select, textarea, .form-control {
        font-size: 16px !important;
        min-height: 46px;
    }

    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Tables: Smooth Horizontal Touch Scroll */
    .table-responsive, .table-container, .table-wrapper {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin-bottom: 14px;
        border-radius: 10px;
        border: 1px solid var(--border-light);
    }

    table {
        min-width: 580px;
    }

    /* Fast Marquee Compact on Mobile */
    .top-fast-marquee {
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    .marquee-badge {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
}

/* ANIMATED GLOW BOX FOR AUTH PAGES */
.animated-glow-box {
    position: relative;
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 36px;
    z-index: 1;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 104, 255, 0.15);
}

.animated-glow-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent, 
        rgba(0, 104, 255, 0.95), 
        rgba(56, 189, 248, 0.95), 
        rgba(245, 158, 11, 0.95), 
        transparent 35%
    );
    animation: rotateGlow 3.5s linear infinite;
    z-index: -2;
}

.animated-glow-box::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: #ffffff;
    border-radius: calc(var(--radius-lg) - 3px);
    z-index: -1;
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   ADMIN PRIVILEGE & RESTRICTED ACCESS RULES
   ========================================================================== */
.admin-only,
.admin-only-item,
li:has(> a[href="admin"]),
li:has(> a[href="/admin"]) {
    display: none !important;
}

html.is-admin .admin-only {
    display: block !important;
}

html.is-admin .admin-only.bento-feature-card {
    display: flex !important;
}

html.is-admin .admin-only.flex-row {
    display: flex !important;
}

html.is-admin .admin-only-item,
html.is-admin li:has(> a[href="admin"]),
html.is-admin li:has(> a[href="/admin"]) {
    display: list-item !important;
}

/* ==========================================================================
   CUSTOM FORM VALIDATION & INTERACTIVE HIGHLIGHTS
   ========================================================================== */
.form-control.is-invalid,
.form-control.input-error {
    border-color: #ef4444 !important;
    background-color: #fffaf0 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
    animation: fieldShake 0.35s ease-in-out;
}

@keyframes fieldShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.input-error-tip {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #ef4444;
    font-size: 0.84rem;
    font-weight: 700;
    margin-top: 6px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 6px 12px;
    border-radius: 8px;
    animation: fadeIn 0.25s ease;
}

/* ==========================================================================
   REALTIME SOCIAL PROOF FOMO NOTIFICATION & TRANSACTION PULSE
   ========================================================================== */
.social-proof-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #ffffff;
    border: 1px solid #bfdbfe;
    border-left: 3.5px solid #10b981;
    border-radius: 12px;
    padding: 7px 11px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9990;
    max-width: 285px; /* Kích thước bé gọn, tinh tế */
    pointer-events: auto;
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.social-proof-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.social-proof-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.social-proof-content {
    font-size: 0.77rem;
    color: #0f172a;
    line-height: 1.3;
}

.social-proof-content strong {
    color: #059669;
    font-weight: 700;
}

.social-proof-time {
    font-size: 0.68rem;
    color: #64748b;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.social-proof-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0 2px;
    margin-left: 2px;
    transition: color 0.2s;
}

.social-proof-close:hover {
    color: #ef4444;
}

@media (max-width: 992px) {
    .social-proof-toast {
        bottom: 72px; /* Vừa vặn trên thanh điều hướng dưới mobile */
        left: 10px;
        right: auto;
        max-width: 275px;
    }
}

@keyframes rowPulseGlow {
    0% { background-color: #ecfdf5; }
    50% { background-color: #d1fae5; }
    100% { background-color: transparent; }
}

.new-topup-row {
    animation: rowPulseGlow 2.5s ease;
}


