/* ============================================================================
 * VĂN HẬU MEDIA - SMM PANEL UNIFIED SOFT DARK THEME v5.5
 * Architecture:
 *  - Fixed SMM Left Sidebar (width: 260px, Glassmorphism, 100% Desktop Sticky)
 *  - Fixed SMM Docked Header (flush with sidebar & viewport top edge)
 *  - Content Canvas auto-offset (.wrap margin-left: 260px, padding-top: 84px)
 *  - Strict 2-Tier Responsive System: PC (>= 1024px) vs Mobile (< 1024px)
 *  - Admin Control 3/7 Master-Detail Architecture
 *  - Universal Rich Text Editor & Smooth Resizable Textareas
 *  - Compact 1-Line Telegram Message Templates Accordion
 *  - High-Contrast Soft Dark Slate / Midnight Navy Palette
 * ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

    /* Global Dimensions */
    --sidebar-w: 260px;
    --sidebar-width: 260px;
    --header-h: 64px;

    /* Soft Dark Palette */
    --bg-dark: #080c14;
    --bg-surface: #0f172a;
    --card: rgba(15, 23, 42, 0.85);
    --card-hover: rgba(22, 32, 54, 0.92);
    --card-border: rgba(56, 189, 248, 0.12);
    --card-border-hover: rgba(56, 189, 248, 0.35);
    --line: rgba(255, 255, 255, 0.07);

    /* Text */
    --text: #e2e8f0;
    --text-bright: #ffffff;
    --muted: #94a3b8;
    --muted-light: #cbd5e1;

    /* Accents */
    --brand: #0284c7;
    --brand-cyan: #38bdf8;
    --brand-indigo: #6366f1;
    --brand-soft: rgba(56, 189, 248, 0.12);
    --brand-border: rgba(56, 189, 248, 0.25);

    --primary-grad: linear-gradient(135deg, #0284c7, #2563eb);
    --primary-grad-hover: linear-gradient(135deg, #0ea5e9, #3b82f6);
    --cyan-grad: linear-gradient(135deg, #06b6d4, #0284c7);
    --gold-grad: linear-gradient(135deg, #f59e0b, #d97706);

    --ok: #10b981;
    --ok-soft: rgba(16, 185, 129, 0.14);
    --ok-border: rgba(16, 185, 129, 0.3);

    --warn: #f59e0b;
    --warn-soft: rgba(245, 158, 11, 0.14);
    --warn-border: rgba(245, 158, 11, 0.3);

    --danger: #f43f5e;
    --danger-soft: rgba(244, 63, 94, 0.14);
    --danger-border: rgba(244, 63, 94, 0.3);

    /* Soft, curved, tranquil geometry & Ethereal Outer Glow (50% Softened) */
    --radius: 16px;
    --radius-md: 12px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --radius-pill: 9999px;

    /* Harmonized Whisper-Soft Ambient Light Aura */
    --shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.48), 
              0 0 16px -1px rgba(56, 189, 248, 0.08), 
              0 0 35px 1px rgba(99, 102, 241, 0.06), 
              0 0 55px -2px rgba(168, 85, 247, 0.04);

    --shadow-hover: 0 16px 40px -4px rgba(0, 0, 0, 0.55), 
                    0 0 22px 1px rgba(56, 189, 248, 0.16), 
                    0 0 45px 3px rgba(99, 102, 241, 0.12), 
                    0 0 70px 2px rgba(168, 85, 247, 0.08);

    --glow-cyan: 0 0 14px rgba(56, 189, 248, 0.14), 0 0 28px rgba(56, 189, 248, 0.07);
    --glow-indigo: 0 0 15px rgba(99, 102, 241, 0.14), 0 0 30px rgba(99, 102, 241, 0.08);
    --glow-ambient: 0 0 18px -1px rgba(56, 189, 248, 0.1), 0 0 40px 2px rgba(99, 102, 241, 0.075), 0 0 60px 0px rgba(168, 85, 247, 0.05);

    /* Apple-standard ultra-smooth spring deceleration */
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
 * GLOBAL RESET & BASE
 * ============================================================================ */

*, *::before, *::after {
    box-sizing: border-box !important;
}

html {
    scroll-behavior: smooth !important;
}

html, body {
    min-height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    background: #080c14 !important;
    color: var(--text);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip !important;
    width: 100% !important;
    max-width: 100vw !important;
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
}

/* Gentle Page Entrance */
.wrap {
    animation: serenePageIn 0.32s var(--ease-smooth) forwards !important;
}

@keyframes serenePageIn {
    from {
        opacity: 0.86;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Strictly hide legacy topbar across all pages */
.topbar {
    display: none !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    letter-spacing: -0.015em;
    font-weight: 700;
    color: var(--text-bright);
    margin: 0 0 10px 0;
}

p.sub, .hint {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-size: 12px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 6px;
    padding: 2px 6px;
    color: #38bdf8;
}

/* ============================================================================
 * GPU MOTION & KEYFRAMES
 * ============================================================================ */

@keyframes panel-logo-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes panel-shine-sweep {
    0% { transform: translateX(-130%) rotate(25deg); opacity: 0; }
    15% { opacity: 0.8; }
    60% { opacity: 0.8; }
    75% { transform: translateX(130%) rotate(25deg); opacity: 0; }
    100% { transform: translateX(130%) rotate(25deg); opacity: 0; }
}

@keyframes statusPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

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

/* ============================================================================
 * FIXED DOCKED TOP HEADER
 * ============================================================================ */

.smm-top-header {
    background: rgba(11, 17, 33, 0.94) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border-bottom: 1px solid rgba(56, 189, 248, 0.12) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin: 0 !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.38), 0 1px 12px rgba(56, 189, 248, 0.06) !important;
    transition: all 0.2s ease;
    box-sizing: border-box !important;
}

.smm-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.panel-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
}

.panel-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #38bdf8;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.smm-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.breadcrumb-root {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}

.breadcrumb-separator {
    color: rgba(56, 189, 248, 0.35);
    font-size: 12px;
}

.breadcrumb-current {
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: linear-gradient(135deg, #ffffff, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.smm-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.smm-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.32);
    font-size: 11.5px;
    font-weight: 600;
    color: #34d399;
}

.status-dot-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: statusPulse 2s infinite;
}

.smm-support-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    font-size: 12px;
    font-weight: 600;
    color: #38bdf8;
    text-decoration: none;
    transition: all 0.2s ease;
}

.smm-support-btn:hover {
    background: rgba(56, 189, 248, 0.22);
    border-color: rgba(56, 189, 248, 0.6);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.smm-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    padding: 2px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    cursor: pointer;
    transition: transform 0.2s ease;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}

.smm-header-avatar:hover {
    transform: scale(1.06);
    border-color: rgba(56, 189, 248, 0.85);
    box-shadow: var(--glow-cyan);
}

.smm-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 9px;
    animation: panel-logo-pulse 2s ease-in-out infinite;
}

/* ============================================================================
 * FIXED DOCKED LEFT SIDEBAR
 * ============================================================================ */

.panel-sidebar {
    background: rgba(11, 17, 33, 0.96) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border-right: 1px solid rgba(56, 189, 248, 0.12) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.45), 1px 0 14px rgba(99, 102, 241, 0.05) !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

.sidebar-brand {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.4), transparent);
}

.sidebar-brand-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-avatar-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    padding: 2px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    cursor: pointer;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sidebar-avatar-wrap::after {
    content: "";
    position: absolute;
    inset: -30%;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 0%, transparent 35%, rgba(255, 255, 255, 0.2) 45%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.2) 55%, transparent 65%, transparent 100%);
    transform: translateX(-130%) rotate(25deg);
    animation: panel-shine-sweep 2.5s cubic-bezier(.4, 0, .2, 1) infinite;
}

.sidebar-avatar-wrap:hover {
    transform: scale(1.05);
    border-color: rgba(56, 189, 248, 0.75);
    box-shadow: var(--glow-cyan);
}

.sidebar-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.sidebar-brand-info strong {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    display: block;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #ffffff, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-role-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 4px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    font-size: 9.5px;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: 0.05em;
    margin-top: 3px;
}

.sidebar-nav-container {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.08em;
    padding: 8px 12px 4px;
    text-transform: uppercase;
}

.sidebar-nav-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar-nav-list .nav-link {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 9px 12px !important;
    border-radius: 10px !important;
    color: var(--text) !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: all 0.18s var(--ease-smooth) !important;
    border: 1px solid transparent !important;
    position: relative !important;
}

.sidebar-nav-list .nav-link:hover {
    background: rgba(30, 41, 59, 0.6) !important;
    color: #ffffff !important;
    border-color: rgba(56, 189, 248, 0.25) !important;
    transform: translateX(3px) !important;
}

.sidebar-nav-list .nav-link.active {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.25), rgba(37, 99, 235, 0.35)) !important;
    border-color: rgba(56, 189, 248, 0.6) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.2) !important;
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.nav-icon img, .nav-img-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.nav-label {
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-chevron {
    color: var(--muted);
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: grid;
    place-items: center;
}

.nav-link:hover .nav-chevron {
    opacity: 1;
    transform: translateX(2px);
    color: #38bdf8;
}

.sidebar-footer {
    padding: 12px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    background: rgba(15, 23, 42, 0.4);
}

.sidebar-footer-card {
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-status-pill {
    font-size: 11.5px;
    font-weight: 700;
    color: #34d399;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot-online {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

/* ============================================================================
 * 2-TIER RESPONSIVE SYSTEM (PC vs Mobile)
 * ============================================================================ */

/* PC MODE (>= 1024px) */
@media (min-width: 1024px) {
    .panel-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: var(--sidebar-w, 260px) !important;
        z-index: 1000 !important;
        transform: none !important;
    }

    body:not(.sidebar-open) .panel-sidebar,
    body.sidebar-open .panel-sidebar {
        width: var(--sidebar-w, 260px) !important;
        transform: none !important;
        display: flex !important;
    }

    body:not(.sidebar-open) .sidebar-brand-info,
    body:not(.sidebar-open) .sidebar-label,
    body:not(.sidebar-open) .nav-label,
    body:not(.sidebar-open) .nav-chevron,
    body:not(.sidebar-open) .sidebar-footer {
        display: block !important;
    }

    body:not(.sidebar-open) .sidebar-brand {
        display: block !important;
        padding: 16px 18px !important;
    }

    body:not(.sidebar-open) .sidebar-brand-top {
        display: flex !important;
    }

    body:not(.sidebar-open) .sidebar-nav-list .nav-link {
        justify-content: flex-start !important;
        padding: 9px 12px !important;
    }

    .panel-menu-toggle {
        display: none !important;
    }

    .smm-top-header {
        position: fixed !important;
        top: 0 !important;
        left: var(--sidebar-w, 260px) !important;
        right: 0 !important;
        height: var(--header-h, 64px) !important;
        z-index: 999 !important;
        padding: 0 24px !important;
    }

    .wrap {
        margin-left: var(--sidebar-w, 260px) !important;
        padding-top: calc(var(--header-h, 64px) + 20px) !important;
        padding-left: 24px !important;
        padding-right: 24px !important;
        padding-bottom: 48px !important;
        width: calc(100vw - var(--sidebar-w, 260px)) !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }

    .panel-sidebar-backdrop {
        display: none !important;
    }
}

/* MOBILE MODE (< 1024px) */
@media (max-width: 1023px) {
    .panel-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        z-index: 10001 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    }

    body.sidebar-open .panel-sidebar {
        transform: translateX(0) !important;
    }

    .panel-menu-toggle {
        display: flex !important;
    }

    .smm-top-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: var(--header-h, 64px) !important;
        z-index: 999 !important;
        padding: 0 14px !important;
    }

    .wrap {
        margin-left: 0 !important;
        padding-top: calc(var(--header-h, 64px) + 14px) !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        padding-bottom: 36px !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    .panel-sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.65);
        backdrop-filter: blur(4px);
        z-index: 10000;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.28s ease;
        border: none;
        padding: 0;
    }

    body.sidebar-open .panel-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
}

/* ============================================================================
 * UNIFIED DASH CARDS & HERO STATUS
 * ============================================================================ */

.dashboard-grid, .admin-hero-grid, .bank-hero-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
    margin-bottom: 18px !important;
}

@media (max-width: 1100px) {
    .dashboard-grid, .admin-hero-grid, .bank-hero-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    .dashboard-grid, .admin-hero-grid, .bank-hero-grid {
        grid-template-columns: 1fr !important;
    }
}

.dash-card,
.dash-card.blue,
.dash-card.green,
.dash-card.purple,
.dash-card.orange,
.dash-card.pink,
.dash-card.cyan {
    background: radial-gradient(140% 120% at 30% 0%, rgba(56, 189, 248, 0.04) 0%, rgba(99, 102, 241, 0.02) 45%, rgba(13, 20, 36, 0.94) 90%) !important;
    border: 1px solid rgba(56, 189, 248, 0.14) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 14px 18px !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    transition: transform 0.3s var(--ease-smooth), border-color 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth) !important;
}

.dash-card:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(56, 189, 248, 0.35) !important;
    box-shadow: var(--shadow-hover) !important;
}

.dash-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(56, 189, 248, 0.3) 30%, rgba(168, 85, 247, 0.38) 50%, rgba(56, 189, 248, 0.3) 70%, transparent 100%);
    pointer-events: none;
    border-radius: 9999px;
    opacity: 0.35;
    filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.25));
    transition: opacity 0.3s var(--ease-smooth), filter 0.3s var(--ease-smooth);
}

.dash-card:hover::before {
    opacity: 0.55;
    filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.45));
}

.dash-card .dash-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    background: rgba(56, 189, 248, 0.12) !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
    display: grid !important;
    place-items: center !important;
    flex-shrink: 0 !important;
}

.dash-card .dash-label {
    color: var(--muted-light) !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    margin-bottom: 2px !important;
}

.dash-card .dash-value {
    color: #ffffff !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    font-family: var(--font-heading) !important;
}

/* ============================================================================
 * MASTER-DETAIL (3:7 SPLIT) ARCHITECTURE FOR ADMIN CONTROL
 * ============================================================================ */

.admin-master-detail {
    display: grid !important;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr) !important;
    gap: 20px !important;
    align-items: start !important;
    margin-top: 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 1024px) {
    .admin-master-detail {
        grid-template-columns: 1fr !important;
    }
}

/* Master Nav Container (Left 3 parts) */
.admin-master-nav {
    background: radial-gradient(130% 120% at 50% 0%, rgba(56, 189, 248, 0.04) 0%, rgba(99, 102, 241, 0.02) 40%, rgba(15, 23, 42, 0.95) 85%) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(56, 189, 248, 0.14) !important;
    border-radius: var(--radius, 14px) !important;
    box-shadow: var(--shadow) !important;
    padding: 14px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    position: sticky !important;
    top: 78px !important;
    max-height: calc(100vh - 94px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    scrollbar-width: thin !important;
    align-self: start !important;
    z-index: 20 !important;
    transition: box-shadow 0.3s var(--ease-smooth), border-color 0.3s var(--ease-smooth) !important;
}

.admin-master-nav:hover {
    border-color: rgba(56, 189, 248, 0.3) !important;
    box-shadow: var(--shadow-hover) !important;
}

.admin-master-nav::-webkit-scrollbar {
    width: 4px !important;
}

.admin-master-nav::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3) !important;
    border-radius: 4px !important;
}

.admin-master-header {
    padding: 6px 10px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-master-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted-light, #cbd5e1);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.admin-master-count {
    font-size: 11px;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    padding: 2px 8px;
    border-radius: 9999px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.admin-master-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.admin-master-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 11px 14px !important;
    border-radius: 10px !important;
    background: rgba(30, 41, 59, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: var(--text, #e2e8f0) !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    text-align: left !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.admin-master-item:hover {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(56, 189, 248, 0.35) !important;
    transform: translateX(3px) !important;
    color: #ffffff !important;
}

.admin-master-item.active {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.3), rgba(37, 99, 235, 0.4)) !important;
    border-color: rgba(56, 189, 248, 0.7) !important;
    box-shadow: 0 4px 18px rgba(2, 132, 199, 0.25), inset 0 0 12px rgba(56, 189, 248, 0.15) !important;
    color: #ffffff !important;
}

.admin-master-item .item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    display: grid;
    place-items: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.admin-master-item.active .item-icon {
    background: rgba(56, 189, 248, 0.25);
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
    transform: scale(1.06);
}

.admin-master-item .item-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-master-item .item-title {
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-master-item .item-hint {
    font-size: 11px;
    color: var(--muted, #94a3b8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-master-item.active .item-hint {
    color: #bae6fd;
}

.admin-master-item .item-arrow {
    color: var(--muted, #94a3b8);
    opacity: 0.4;
    transition: all 0.2s ease;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.admin-master-item:hover .item-arrow,
.admin-master-item.active .item-arrow {
    opacity: 1;
    color: #38bdf8;
    transform: translateX(2px);
}

/* Detail Pane Container (Right 7 parts) */
.admin-detail-pane {
    width: 100% !important;
    min-width: 0 !important;
}

.admin-detail-panel {
    display: none;
    animation: fadeInFast 0.22s ease-out forwards;
}

.admin-detail-panel.active {
    display: block !important;
}

.admin-detail-panel > .card {
    margin-top: 0 !important;
}

/* ============================================================================
 * TELEGRAM MESSAGES COMPACT 1-LINE ACCORDION
 * ============================================================================ */

.telegram-message-template {
    border: 1px solid rgba(56, 189, 248, 0.16) !important;
    border-radius: 10px !important;
    background: rgba(15, 23, 42, 0.75) !important;
    margin-bottom: 8px !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
}

.telegram-message-template:hover {
    border-color: rgba(56, 189, 248, 0.4) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

.telegram-msg-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 10px 14px !important;
    cursor: pointer !important;
    background: rgba(30, 41, 59, 0.4) !important;
    transition: background 0.2s ease !important;
    user-select: none !important;
}

.telegram-msg-header:hover {
    background: rgba(56, 189, 248, 0.08) !important;
}

.telegram-msg-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

.telegram-msg-group-badge {
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 2px 7px !important;
    border-radius: 5px !important;
    background: rgba(56, 189, 248, 0.15) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    text-transform: uppercase !important;
    flex-shrink: 0 !important;
}

.telegram-msg-title {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #f8fafc !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.telegram-msg-key {
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    color: var(--muted, #94a3b8) !important;
    background: rgba(0, 0, 0, 0.25) !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
}

.telegram-msg-toggle-btn {
    width: 26px !important;
    height: 26px !important;
    border-radius: 6px !important;
    background: rgba(56, 189, 248, 0.12) !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
    color: #38bdf8 !important;
    display: grid !important;
    place-items: center !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.telegram-msg-header:hover .telegram-msg-toggle-btn {
    background: rgba(56, 189, 248, 0.25) !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
}

.telegram-message-template .chevron-icon {
    transition: transform 0.22s ease;
}

.telegram-message-template.is-collapsed .chevron-icon {
    transform: rotate(0deg);
}

.telegram-message-template:not(.is-collapsed) .chevron-icon {
    transform: rotate(180deg);
}

.telegram-message-template.is-collapsed .telegram-msg-body {
    display: none !important;
}

.telegram-msg-body {
    padding: 14px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    background: rgba(10, 16, 30, 0.5) !important;
}

/* ============================================================================
 * UNIVERSAL RICH TEXT EDITOR & RESIZABLE TEXTAREAS
 * ============================================================================ */

.universal-rich-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

textarea,
.universal-rich-editor textarea,
.telegram-message-template textarea {
    width: 100% !important;
    min-height: 140px !important;
    max-height: 80vh !important;
    resize: vertical !important;
    font-family: var(--font-main, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif) !important;
    font-size: 13.5px !important;
    line-height: 1.6 !important;
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 8px !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
    display: block !important;
    color: #f8fafc !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(56, 189, 248, 0.45) rgba(15, 23, 42, 0.6) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

textarea:focus,
.universal-rich-editor textarea:focus,
.telegram-message-template textarea:focus {
    border-color: #38bdf8 !important;
    background: rgba(15, 23, 42, 0.98) !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18) !important;
    outline: none !important;
}

/* Dedicated High-Visibility Webkit Scrollbar for Textarea */
textarea::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
    display: block !important;
}

textarea::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6) !important;
    border-radius: 4px !important;
}

textarea::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.35) !important;
    border-radius: 4px !important;
    border: 1px solid rgba(56, 189, 248, 0.2) !important;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.65) !important;
}

textarea::-webkit-scrollbar-corner {
    background: rgba(15, 23, 42, 0.8) !important;
}

/* High-Visibility Custom Glowing Cyan Resize Handle */
textarea::-webkit-resizer {
    background-color: transparent !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cline x1='14' y1='4' x2='4' y2='14' stroke='%2338bdf8' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='14' y1='8' x2='8' y2='14' stroke='%2338bdf8' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='14' y1='12' x2='12' y2='14' stroke='%2338bdf8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-position: right bottom !important;
    background-repeat: no-repeat !important;
    width: 16px !important;
    height: 16px !important;
}

.editor-toolbar-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.editor-chip-btn {
    padding: 4px 9px !important;
    font-size: 11.5px !important;
    border-radius: 6px !important;
    background: rgba(56, 189, 248, 0.08) !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
    color: #7dd3fc !important;
    font-family: var(--font-mono) !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.editor-chip-btn:hover {
    background: rgba(56, 189, 248, 0.22) !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

.editor-desc-box {
    margin-top: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.15);
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.45;
}

/* ============================================================================
 * CARDS & SURFACES
 * ============================================================================ */

.card {
    background: radial-gradient(130% 120% at 50% -10%, rgba(56, 189, 248, 0.035) 0%, rgba(99, 102, 241, 0.02) 40%, rgba(15, 23, 42, 0.88) 85%) !important;
    border: 1px solid rgba(56, 189, 248, 0.12) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    padding: 20px !important;
    position: relative !important;
    transition: border-color 0.35s var(--ease-smooth), box-shadow 0.35s var(--ease-smooth), transform 0.35s var(--ease-smooth) !important;
}

.card:hover {
    border-color: rgba(56, 189, 248, 0.28) !important;
    box-shadow: var(--shadow-hover) !important;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(56, 189, 248, 0.25) 25%, rgba(168, 85, 247, 0.35) 50%, rgba(56, 189, 248, 0.25) 75%, transparent 100%);
    pointer-events: none;
    border-radius: 9999px;
    opacity: 0.35;
    filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.25));
    transition: opacity 0.35s var(--ease-smooth), filter 0.35s var(--ease-smooth);
}

.card:hover::before {
    opacity: 0.55;
    filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.45));
}

.card h2 {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    font-size: 16px !important;
    color: #ffffff !important;
    margin-bottom: 12px !important;
}

/* ============================================================================
 * FORM INPUTS & BUTTONS
 * ============================================================================ */

input, select {
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: var(--radius-sm) !important;
    color: #f8fafc !important;
    padding: 9px 13px !important;
    font-family: var(--font-main) !important;
    font-size: 13.5px !important;
    box-sizing: border-box !important;
    transition: border-color 0.22s var(--ease-smooth), box-shadow 0.22s var(--ease-smooth), background 0.22s var(--ease-smooth) !important;
}

input:hover, select:hover {
    border-color: rgba(56, 189, 248, 0.3) !important;
    background: rgba(15, 23, 42, 0.92) !important;
}

input:focus, select:focus {
    outline: none !important;
    border-color: #38bdf8 !important;
    background: rgba(15, 23, 42, 0.98) !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16), 0 0 16px rgba(56, 189, 248, 0.1) !important;
}

.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 8px 16px !important;
    border-radius: var(--radius-sm) !important;
    font-family: var(--font-main) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: transform 0.22s var(--ease-smooth), background 0.22s var(--ease-smooth), border-color 0.22s var(--ease-smooth), box-shadow 0.22s var(--ease-smooth), color 0.22s var(--ease-smooth) !important;
    background: rgba(30, 41, 59, 0.75) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.btn:hover {
    background: rgba(51, 65, 85, 0.85) !important;
    border-color: rgba(56, 189, 248, 0.35) !important;
    transform: translateY(-1.5px) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), 0 0 14px rgba(56, 189, 248, 0.15) !important;
}

.btn:active, button:active, .nav-link:active, .tab-btn:active, .order-detail-btn:active {
    transform: scale(0.972) !important;
    transition: transform 0.08s ease !important;
}

.btn.ok {
    background: linear-gradient(135deg, #0284c7, #2563eb) !important;
    border-color: rgba(56, 189, 248, 0.5) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28), 0 0 10px rgba(56, 189, 248, 0.12) !important;
}

.btn.ok:hover {
    background: linear-gradient(135deg, #0ea5e9, #3b82f6) !important;
    border-color: rgba(56, 189, 248, 0.75) !important;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45), 0 0 16px rgba(56, 189, 248, 0.25) !important;
}

.btn.danger {
    background: linear-gradient(135deg, #e11d48, #be123c) !important;
    border-color: rgba(244, 63, 94, 0.5) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.28), 0 0 10px rgba(244, 63, 94, 0.12) !important;
}

.btn.danger:hover {
    background: linear-gradient(135deg, #f43f5e, #e11d48) !important;
    border-color: rgba(244, 63, 94, 0.75) !important;
    box-shadow: 0 6px 20px rgba(225, 29, 72, 0.45), 0 0 16px rgba(244, 63, 94, 0.25) !important;
}

.btn.ghost {
    background: rgba(15, 23, 42, 0.55) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--text) !important;
}

.btn.ghost:hover {
    background: rgba(30, 41, 59, 0.75) !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 10px rgba(56, 189, 248, 0.1) !important;
}

.btn.small {
    padding: 6px 12px !important;
    font-size: 12px !important;
    border-radius: var(--radius-xs, 6px) !important;
}

/* Modern Checkbox */
input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 5px !important;
    border: 2px solid rgba(56, 189, 248, 0.45) !important;
    background: rgba(15, 23, 42, 0.85) !important;
    cursor: pointer !important;
    display: grid !important;
    place-items: center !important;
    flex-shrink: 0 !important;
    position: relative !important;
    transition: all 0.18s ease !important;
    margin: 0 !important;
}

input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #0284c7, #2563eb) !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4) !important;
}

input[type="checkbox"]:checked::after {
    content: "" !important;
    width: 4px !important;
    height: 8px !important;
    border: solid #ffffff !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg) translate(-1px, -1px) !important;
    display: block !important;
}

/* ============================================================================
 * COLLAPSE & ACCORDION BUTTONS (CRISP ICONS)
 * ============================================================================ */

.collapse-toggle, .card-collapse-btn {
    background: rgba(56, 189, 248, 0.12) !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    color: #38bdf8 !important;
    border-radius: 8px !important;
    width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
}

.collapse-toggle:hover, .card-collapse-btn:hover {
    background: rgba(56, 189, 248, 0.25) !important;
    border-color: rgba(56, 189, 248, 0.6) !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3) !important;
}

.collapse-toggle svg, .card-collapse-btn svg {
    transition: transform 0.2s ease;
}

.is-collapsed .collapse-toggle svg {
    transform: rotate(-90deg);
}

/* ============================================================================
 * UNIFIED SEAMLESS COLLAPSIBLE CARDS (WARRANTY & GLOBAL PANELS)
 * ============================================================================ */

.card.warranty-collapsible {
    padding: 0 !important;
    overflow: hidden !important;
    background: radial-gradient(130% 120% at 50% 0%, rgba(56, 189, 248, 0.03) 0%, rgba(99, 102, 241, 0.02) 40%, rgba(15, 23, 42, 0.88) 85%) !important;
    border: 1px solid rgba(56, 189, 248, 0.12) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    transition: border-color 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth) !important;
}

.card.warranty-collapsible:hover {
    border-color: rgba(56, 189, 248, 0.28) !important;
    box-shadow: var(--shadow-hover) !important;
}

.warranty-collapse-toggle {
    width: 100% !important;
    min-height: 58px !important;
    padding: 14px 18px !important;
    border: 0 !important;
    background: transparent !important;
    color: #f8fafc !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    text-align: left !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    box-sizing: border-box !important;
}

.warranty-collapse-toggle:hover {
    background: rgba(56, 189, 248, 0.04) !important;
}

.warranty-collapse-toggle > span:first-child {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

.warranty-collapse-toggle b {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}

.warranty-collapse-toggle small {
    color: #94a3b8 !important;
    font-size: 12px !important;
    font-weight: 400 !important;
}

.warranty-collapse-symbol {
    width: 30px !important;
    height: 30px !important;
    flex: 0 0 30px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    background: rgba(56, 189, 248, 0.1) !important;
    color: #38bdf8 !important;
    display: inline-grid !important;
    place-items: center !important;
    font: 700 18px/1 Arial, sans-serif !important;
    transition: all 0.2s ease !important;
}

.warranty-collapse-toggle:hover .warranty-collapse-symbol {
    background: rgba(56, 189, 248, 0.22) !important;
    border-color: rgba(56, 189, 248, 0.6) !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3) !important;
}

.warranty-collapse-body {
    padding: 18px 20px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(11, 18, 38, 0.35) !important;
}

.warranty-collapsible.is-collapsed .warranty-collapse-body {
    display: none !important;
}

.warranty-msg-item {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    background: rgba(15, 23, 42, 0.6) !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
}

.warranty-msg-item:not(.is-collapsed) {
    border-color: rgba(56, 189, 248, 0.4) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

.warranty-msg-toggle {
    width: 100% !important;
    padding: 11px 15px !important;
    border: 0 !important;
    background: rgba(30, 41, 59, 0.35) !important;
    color: #f8fafc !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    text-align: left !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
}

.warranty-msg-toggle:hover {
    background: rgba(56, 189, 248, 0.07) !important;
}

.warranty-msg-content {
    padding: 14px 16px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    background: rgba(11, 18, 38, 0.35) !important;
}

/* ============================================================================
 * MODALS & DIALOGS
 * ============================================================================ */

.modal {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(4, 8, 16, 0.75) !important;
    backdrop-filter: blur(14px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
    display: grid !important;
    place-items: center !important;
    z-index: 10000 !important;
    padding: 16px !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease-smooth), visibility 0.25s var(--ease-smooth);
}

.modal.show, .modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: radial-gradient(130% 120% at 50% -10%, rgba(56, 189, 248, 0.05) 0%, rgba(99, 102, 241, 0.03) 45%, rgba(11, 17, 33, 0.96) 90%) !important;
    border: 1px solid rgba(56, 189, 248, 0.18) !important;
    border-radius: 20px !important;
    box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.75), 
                inset 0 1px 1px 0 rgba(255, 255, 255, 0.1), 
                0 0 25px 1px rgba(56, 189, 248, 0.14), 
                0 0 50px 3px rgba(99, 102, 241, 0.1), 
                0 0 75px 1px rgba(168, 85, 247, 0.06) !important;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 24px !important;
    box-sizing: border-box !important;
    transform: scale(0.96) translateY(8px) !important;
    transition: transform 0.28s var(--ease-smooth), opacity 0.24s ease !important;
    opacity: 0 !important;
    position: relative !important;
}

.modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(56, 189, 248, 0.35) 30%, rgba(168, 85, 247, 0.45) 50%, rgba(56, 189, 248, 0.35) 70%, transparent 100%);
    pointer-events: none;
    border-radius: 9999px;
    opacity: 0.45;
    filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.4));
}

.modal.show .modal-content, .modal.active .modal-content {
    transform: scale(1) translateY(0) !important;
    opacity: 1 !important;
}

.modal-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    margin-bottom: 16px !important;
}

.modal-head h3 {
    margin: 0 !important;
    font-size: 16px !important;
    color: #ffffff !important;
}

/* ============================================================================
 * TOAST NOTIFICATIONS
 * ============================================================================ */

.toast-stack {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 99999;
    pointer-events: none;
}

.app-toast {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 12px;
    padding: 12px 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), var(--glow-cyan);
    color: #ffffff;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    pointer-events: auto;
    animation: fadeInFast 0.25s ease;
    min-width: 240px;
    max-width: 380px;
    backdrop-filter: blur(16px);
}

.app-toast.success {
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 12px rgba(16, 185, 129, 0.18);
}

.app-toast.error {
    border-color: rgba(244, 63, 94, 0.45);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 12px rgba(244, 63, 94, 0.18);
}

.app-toast.hide {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* ============================================================================
 * ORDER CENTER ENHANCED 3-COLUMN COMPACT FILTERS
 * ============================================================================ */

.order-filters-card {
    padding: 16px 20px !important;
    background: radial-gradient(130% 120% at 50% -10%, rgba(56, 189, 248, 0.035) 0%, rgba(99, 102, 241, 0.02) 40%, rgba(15, 23, 42, 0.88) 85%) !important;
    border: 1px solid rgba(56, 189, 248, 0.12) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    position: relative !important;
    transition: border-color 0.35s var(--ease-smooth), box-shadow 0.35s var(--ease-smooth) !important;
}

.order-filters-card:hover {
    border-color: rgba(56, 189, 248, 0.28) !important;
    box-shadow: var(--shadow-hover) !important;
}

.order-filters-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(56, 189, 248, 0.25) 25%, rgba(168, 85, 247, 0.35) 50%, rgba(56, 189, 248, 0.25) 75%, transparent 100%);
    pointer-events: none;
    border-radius: 9999px;
    opacity: 0.35;
    filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.25));
    transition: opacity 0.35s var(--ease-smooth), filter 0.35s var(--ease-smooth);
}

.order-filters-card:hover::before {
    opacity: 0.55;
    filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.45));
}

.order-filters-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    flex-wrap: wrap !important;
}

.order-filters-title {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #f8fafc !important;
}

.order-filters-icon {
    font-size: 16px !important;
    color: #38bdf8 !important;
}

.order-filters-badge {
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 3px 10px !important;
    border-radius: 999px !important;
    background: rgba(56, 189, 248, 0.12) !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
    color: #38bdf8 !important;
}

.order-filters-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.order-filters-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px 18px !important;
}

.order-filter-col {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    min-width: 0 !important;
}

.order-filter-field {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    min-width: 0 !important;
}

.order-filter-field label {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    user-select: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.order-filter-field label .filter-icon {
    font-size: 13px !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}

.order-filter-field select,
.order-filter-field input[type="text"],
.order-filter-field input[type="date"],
.order-filter-field input[type="number"] {
    width: 100% !important;
    height: 38px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #f8fafc !important;
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid rgba(56, 189, 248, 0.18) !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}

.order-filter-field select:hover,
.order-filter-field input:hover {
    border-color: rgba(56, 189, 248, 0.4) !important;
    background: rgba(15, 23, 42, 0.9) !important;
}

.order-filter-field select:focus,
.order-filter-field input:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15) !important;
    background: rgba(15, 23, 42, 0.95) !important;
}

.order-date-range {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
}

.order-date-range input[type="date"] {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 0 8px !important;
    font-size: 12px !important;
    text-align: center !important;
}

.order-date-range .date-sep {
    font-size: 13px !important;
    color: #64748b !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
}

/* Responsive breakpoint for Order Filters */
@media (max-width: 960px) {
    .order-filters-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 640px) {
    .order-filters-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================================================
 * PROMINENT ORDER COUNT BADGE & SEAMLESS HIDDEN SCROLLBAR
 * ============================================================================ */

.orders-list-heading {
    margin-bottom: 12px !important;
}

.orders-list-heading h2 {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 0 !important;
}

.order-count-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 3px 14px !important;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: #38bdf8 !important;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(14, 165, 233, 0.12)) !important;
    border: 1px solid rgba(56, 189, 248, 0.5) !important;
    border-radius: 999px !important;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    letter-spacing: 0.3px !important;
    margin-left: 6px !important;
    vertical-align: middle !important;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.4) !important;
    transition: all 0.2s ease !important;
}

.order-count-badge:hover {
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(56, 189, 248, 0.8) !important;
}

/* Seamless hidden scrollbar (operates in background) */
.order-card-list,
.orders-list-card,
.orders-list-card .order-card-list {
    scrollbar-width: none !important;      /* Firefox */
    -ms-overflow-style: none !important;     /* IE and Edge */
}

.order-card-list::-webkit-scrollbar,
.orders-list-card::-webkit-scrollbar,
.orders-list-card .order-card-list::-webkit-scrollbar {
    display: none !important;              /* Chrome, Safari, Opera */
    width: 0 !important;
    height: 0 !important;
}

/* Desktop typography boost */
@media (min-width: 960px) {
    body {
        font-size: 14px !important;
        line-height: 1.55 !important;
    }
    
    h1 { font-size: 22px !important; }
    h2 { font-size: 17px !important; }
    h3 { font-size: 15px !important; }
}


/* GALAXY THEME MODAL SAFETY */
.modal:not(.show):not(.active) {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
    z-index: -9999 !important;
}
