/* ─── VONA SAAS ADMIN THEME DESIGN SYSTEM ──────────────────────────────────── */
:root {
    /* Main Dark Color Palette (Midnight SaaS) */
    --bg-main: #090d16;
    --bg-surface: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.85);
    --bg-card-hover: rgba(30, 41, 59, 0.95);
    --bg-input: rgba(15, 23, 42, 0.9);
    --bg-glass: rgba(15, 23, 42, 0.75);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.16);
    --border-color-active: rgba(99, 102, 241, 0.5);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-purple: #818cf8;
    --accent-indigo: #6366f1;
    --accent-emerald: #10b981;
    --accent-cyan: #06b6d4;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --accent-purple-glow: rgba(129, 140, 248, 0.25);
    
    /* Brand Colors */
    --color-netflix: #ef4444;
    --color-netflix-glow: rgba(239, 68, 68, 0.18);
    --color-prime: #0ea5e9;
    --color-prime-glow: rgba(14, 165, 233, 0.18);
    --color-hbo: #a855f7;
    --color-hbo-glow: rgba(168, 85, 247, 0.18);
    --color-opplex: #f97316;
    --color-opplex-glow: rgba(249, 115, 22, 0.18);
    --color-nord: #2563eb;
    --color-nord-glow: rgba(37, 99, 235, 0.18);
    --color-pia: #10b981;
    --color-pia-glow: rgba(16, 185, 129, 0.18);
    --color-chatgpt: #0d9488;
    --color-chatgpt-glow: rgba(13, 148, 136, 0.18);
    --color-capcut: #ec4899;
    --color-capcut-glow: rgba(236, 72, 153, 0.18);
    --color-canva: #06b6d4;
    --color-canva-glow: rgba(6, 182, 212, 0.18);
    --color-zee5: #eab308;
    --color-zee5-glow: rgba(234, 179, 8, 0.18);
    
    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;
    
    --font-main: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
}

/* Light Theme Variables (Vona Pristine Light) */
[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.9);
    
    --border-color: #e2e8f0;
    --border-color-hover: #cbd5e1;
    --border-color-active: rgba(99, 102, 241, 0.6);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --shadow-premium: 0 10px 30px -10px rgba(15, 23, 42, 0.1);
    --shadow-card: 0 4px 12px rgba(15, 23, 42, 0.05);
}

/* Slide Switch Styles */
.switch input:checked + .slider {
    background-color: #25D366 !important;
}
.switch input:not(:checked) + .slider {
    background-color: #ef4444 !important;
}
.switch .slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
.switch input:not(:checked) + .slider:before {
    transform: translateX(0px);
}
.switch input:checked + .slider:before {
    transform: translateX(16px);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 5% 5%, rgba(147, 51, 234, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 95% 95%, rgba(79, 70, 229, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(6, 9, 18, 1) 0%, rgba(2, 3, 6, 1) 100%);
    background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* ─── APP SHELL & LAYOUTS ────────────────────────────────────────────────── */
#app {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.hidden {
    display: none !important;
}

/* Glassmorphism Wrapper */
.glass-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-premium), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    width: 100%;
    max-width: 1600px;
    padding: 30px;
    margin: 0 auto;
    transition: var(--transition-smooth);
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── AUTH LOGIN SCREEN ──────────────────────────────────────────────────── */
.login-card {
    max-width: 440px;
    padding: 50px 40px;
    text-align: center;
    border-radius: 28px;
    background: rgba(15, 18, 30, 0.8);
}

.site-logo {
    display: block;
    object-fit: cover;
    flex: 0 0 auto;
    border: 1px solid rgba(251, 113, 133, 0.28);
    background: #050608;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34), 0 0 0 4px rgba(251, 113, 133, 0.04);
}

.login-logo {
    width: 116px;
    height: 116px;
    margin: 0 auto 18px;
    border-radius: 20px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.login-header h1 {
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 30%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 35px;
}

.form-group {
    margin-bottom: 24px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 20px var(--accent-purple-glow);
    background: rgba(255, 255, 255, 0.02);
}

.select-input {
    width: 100%;
    padding: 14px 40px 14px 18px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary) !important;
    font-family: var(--font-main);
    font-size: 0.95rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a855f7'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 16px;
    transition: var(--transition-smooth);
}

.select-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 20px var(--accent-purple-glow);
    background-color: rgba(18, 22, 35, 0.95);
}

.select-input option, select option {
    background-color: #0c0f1a !important;
    color: #f8fafc !important;
    font-size: 0.95rem;
    padding: 14px !important;
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(168, 85, 247, 0.5);
    filter: brightness(1.1);
}

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

/* ─── VONA SAAS TOP HEADER BAR ───────────────────────────────────────────── */
.dashboard-layout {
    width: 100%;
}

.dash-header {
    height: 70px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.header-left-cluster {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.brand-section h1 {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.1;
    margin: 0;
}

.brand-section h1 span {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
    color: var(--accent-purple);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
    border: 1px solid rgba(129, 140, 248, 0.3);
}

.brand-kicker {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: var(--text-muted);
    border-left: 1px solid var(--border-color);
    padding-left: 18px;
    margin-left: 4px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.breadcrumb-separator {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.breadcrumb-active {
    color: var(--text-primary);
    font-weight: 700;
}

/* Center Cluster Command Search */
.header-center-cluster {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.header-search-bar {
    width: 100%;
    height: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.header-search-bar:hover {
    border-color: var(--accent-indigo);
    background: var(--bg-card-hover);
    box-shadow: 0 0 12px var(--accent-purple-glow);
}

.search-icon {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-right: 8px;
}

.search-placeholder {
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 500;
    flex: 1;
    text-align: left;
}

.search-kbd {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2px 7px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    font-family: monospace;
}

/* Right Cluster Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    box-shadow: var(--shadow-card);
}

.bot-toggle-info {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.icon-button {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-card);
}

.icon-button:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-color-hover);
    transform: translateY(-1px);
}

.admin-profile-button {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 4px 14px 4px 4px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-card);
}

.admin-profile-button:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-1px);
}

.admin-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--accent-purple-glow);
}

.admin-profile-copy {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.admin-profile-copy strong {
    font-size: 0.84rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.admin-profile-copy small {
    font-size: 0.68rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.profile-chevron {
    font-size: 0.72rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.admin-profile-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    width: 240px;
    box-shadow: var(--shadow-premium);
    z-index: 200;
    backdrop-filter: blur(16px);
}

.admin-menu-user-details {
    padding: 8px 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

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

.stat-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.5);
}

.stat-card:focus-visible {
    outline: 2px solid var(--console-cyan, #67e8f9);
    outline-offset: 3px;
}

.iptv-credit-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 18px 20px;
    border: 1px solid rgba(103, 232, 249, 0.16);
    border-radius: 14px;
    background: linear-gradient(110deg, rgba(14, 165, 233, 0.08), rgba(147, 51, 234, 0.06));
}

.iptv-credit-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: #67e8f9;
    background: rgba(14, 165, 233, 0.14);
    font-size: 1.15rem;
}

.iptv-credit-eyebrow,
.iptv-credit-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.iptv-credit-copy h3 {
    margin: 2px 0 3px;
    color: var(--text-primary);
    font-size: 1rem;
}

.iptv-credit-copy p {
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.iptv-credit-value-wrap {
    min-width: 145px;
    text-align: right;
}

.iptv-credit-value-wrap strong {
    display: block;
    margin: 2px 0;
    color: #b7f7ff;
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
}

.iptv-credit-value-wrap small {
    color: var(--text-muted);
    font-size: 0.68rem;
}

@media (max-width: 600px) {
    .iptv-credit-summary {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
        gap: 12px;
    }

    .iptv-credit-value-wrap {
        grid-column: 1 / -1;
        min-width: 0;
        padding-top: 10px;
        border-top: 1px solid var(--border-color);
        text-align: left;
    }
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-info .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.stat-info .stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 2px;
}

/* Brand specific card highlights */
.netflix-card .stat-icon { background: var(--color-netflix-glow); color: var(--color-netflix); }
.netflix-card:hover { border-color: rgba(239, 68, 68, 0.35); box-shadow: 0 0 20px rgba(239, 68, 68, 0.08); }

.hbo-card .stat-icon { background: var(--color-hbo-glow); color: var(--color-hbo); }
.hbo-card:hover { border-color: rgba(168, 85, 247, 0.35); box-shadow: 0 0 20px rgba(168, 85, 247, 0.08); }

.prime-card .stat-icon { background: var(--color-prime-glow); color: var(--color-prime); }
.prime-card:hover { border-color: rgba(14, 165, 233, 0.35); box-shadow: 0 0 20px rgba(14, 165, 233, 0.08); }

.opplex-card .stat-icon { background: var(--color-opplex-glow); color: var(--color-opplex); }
.opplex-card:hover { border-color: rgba(249, 115, 22, 0.35); box-shadow: 0 0 20px rgba(249, 115, 22, 0.08); }

.nord-card .stat-icon { background: var(--color-nord-glow); color: var(--color-nord); }
.nord-card:hover { border-color: rgba(37, 99, 235, 0.35); box-shadow: 0 0 20px rgba(37, 99, 235, 0.08); }

.pia-card .stat-icon { background: var(--color-pia-glow); color: var(--color-pia); }
.pia-card:hover { border-color: rgba(16, 185, 129, 0.35); box-shadow: 0 0 20px rgba(16, 185, 129, 0.08); }

.chatgpt-card .stat-icon { background: var(--color-chatgpt-glow); color: var(--color-chatgpt); }
.chatgpt-card:hover { border-color: rgba(13, 148, 136, 0.35); box-shadow: 0 0 20px rgba(13, 148, 136, 0.08); }

.capcut-card .stat-icon { background: var(--color-capcut-glow); color: var(--color-capcut); }
.capcut-card:hover { border-color: rgba(236, 72, 153, 0.35); box-shadow: 0 0 20px rgba(236, 72, 153, 0.08); }

.canva-card .stat-icon { background: var(--color-canva-glow); color: var(--color-canva); }
.canva-card:hover { border-color: rgba(6, 182, 212, 0.35); box-shadow: 0 0 20px rgba(6, 182, 212, 0.08); }

.zee5-card .stat-icon { background: var(--color-zee5-glow); color: var(--color-zee5); }
.zee5-card:hover { border-color: rgba(234, 179, 8, 0.35); box-shadow: 0 0 20px rgba(234, 179, 8, 0.08); }

.total-card .stat-icon { background: rgba(147, 51, 234, 0.15); color: var(--accent-purple); }
.total-card:hover { border-color: var(--border-color-active); box-shadow: 0 0 20px rgba(147, 51, 234, 0.1); }

/* ─── SIDEBAR & PANEL SWITCHING LAYOUT ───────────────────────────────────── */
.console-body {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    width: 100%;
    align-items: stretch;
    justify-content: flex-start;
}

.console-sidebar {
    width: 260px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 12px;
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 86px;
    max-height: calc(100vh - 105px);
    overflow-y: auto;
    scrollbar-width: thin;
}

.sidebar-group-title {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 14px 12px 6px;
    display: block;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.sidebar-btn i {
    font-size: 0.95rem;
    width: 20px;
    text-align: center;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.sidebar-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.04);
    transform: translateX(2px);
}

.sidebar-btn:hover i {
    color: var(--console-cyan, #67e8f9);
}

.sidebar-btn.active {
    color: var(--text-primary);
    background: rgba(103, 232, 249, 0.09);
    border-color: rgba(103, 232, 249, 0.22);
    font-weight: 700;
}

.sidebar-btn.active i {
    color: var(--console-cyan, #67e8f9);
}

.sidebar-btn.active::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 8px;
    bottom: 8px;
    width: 4px;
    background: var(--console-cyan, #67e8f9);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--console-cyan, #67e8f9);
}

.console-content {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
}

.console-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

.console-panel.hidden {
    display: none !important;
}

/* ─── STACKED INTERFACE WITH FORM PANELS ─────────────────────────── */
.main-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-panel, .list-panel, .summary-card, .console-widget {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
}

.form-panel h2, .list-panel h2, .summary-card h2, .console-widget h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#stock-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    align-items: end;
}

#stock-form .form-group {
    margin-bottom: 0;
}

/* Stock List Panel & Tabs */
.panel-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.tab-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent-purple);
    font-weight: 700;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -13px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 10px 10px 0 0;
    box-shadow: 0 0 10px var(--accent-purple);
}

/* ─── DATA TABLE & CONTENT ───────────────────────────────────────────────── */
.clean-card-panel,
.list-panel,
.form-panel,
.summary-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
}

.clean-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--border-color);
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.clean-card-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.table-wrapper,
.clean-card-table-wrapper {
    overflow-x: auto;
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
}

.stock-table, .data-table, .clean-card-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.stock-table th, .data-table th, .clean-card-table th {
    padding: 12px 18px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.stock-table td, .data-table td, .clean-card-table td {
    padding: 14px 18px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.stock-table tbody tr, .data-table tbody tr, .clean-card-table tbody tr {
    transition: var(--transition-smooth);
}

.stock-table tbody tr:hover, .data-table tbody tr:hover, .clean-card-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.stock-table tbody tr:last-child td, .data-table tbody tr:last-child td, .clean-card-table tbody tr:last-child td {
    border-bottom: 1px dashed var(--border-color);
}

.clean-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-top: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    max-width: 100%;
    text-overflow: ellipsis;
    overflow: hidden;
    vertical-align: middle;
}

.badge-netflix { background: var(--color-netflix-glow); color: var(--color-netflix); border: 1px solid rgba(239, 68, 68, 0.25); }
.badge-prime { background: var(--color-prime-glow); color: var(--color-prime); border: 1px solid rgba(14, 165, 233, 0.25); }
.badge-hbo { background: var(--color-hbo-glow); color: var(--color-hbo); border: 1px solid rgba(168, 85, 247, 0.25); }
.badge-opplex { background: var(--color-opplex-glow); color: var(--color-opplex); border: 1px solid rgba(249, 115, 22, 0.25); }
.badge-nord { background: var(--color-nord-glow); color: var(--color-nord); border: 1px solid rgba(37, 99, 235, 0.25); }
.badge-pia { background: var(--color-pia-glow); color: var(--color-pia); border: 1px solid rgba(16, 185, 129, 0.25); }
.badge-chatgpt { background: var(--color-chatgpt-glow); color: var(--color-chatgpt); border: 1px solid rgba(13, 148, 136, 0.25); }

.badge-available { background: rgba(16, 185, 129, 0.08); color: var(--color-success); border: 1px solid rgba(16, 185, 129, 0.15); }
.badge-sold { background: rgba(239, 68, 68, 0.08); color: var(--color-danger); border: 1px solid rgba(239, 68, 68, 0.15); }

.code-font {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Actions Column */
.actions-cell {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.05);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
    border-color: rgba(239, 68, 68, 0.25);
}

.btn-edit:hover {
    background: rgba(147, 51, 234, 0.15);
    color: var(--accent-purple);
    border-color: rgba(147, 51, 234, 0.25);
}

.btn-toggle-sold:hover {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
    border-color: rgba(245, 158, 11, 0.25);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ─── TOAST NOTIFICATIONS ────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 24px;
    bottom: auto;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.toast {
    background: rgba(13, 16, 27, 0.95);
    border-left: 4px solid var(--accent-purple);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    padding: 16px 24px;
    border-radius: 12px;
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    min-width: 300px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: var(--transition-smooth);
}

.toast.success { border-left-color: var(--color-success); }
.toast.error { border-left-color: var(--color-danger); }
.toast.warning { border-left-color: var(--color-warning); }

.toast button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition-smooth);
    margin-left: 15px;
}

.toast button:hover {
    color: var(--text-primary);
}

/* ─── ANIMATIONS ─────────────────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ─── SALES DASHBOARD HEADER BANNER ──────────────────────────────────────── */
.sales-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.sales-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition-smooth);
}

.sales-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

.sales-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.today-sales .sales-icon {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}
.today-sales:hover {
    border-color: rgba(16, 185, 129, 0.3);
}

.month-sales .sales-icon {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}
.month-sales:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.total-stock-card .sales-icon {
    background: rgba(168, 85, 247, 0.12);
    color: #a855f7;
}
.total-stock-card:hover {
    border-color: rgba(168, 85, 247, 0.3);
}

.sales-info h3 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.sales-info h2, .sales-info .sales-value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 4px;
    color: #ffffff;
}

/* ─── RESPONSIVE DESIGN & MEDIA QUERIES ──────────────────────────────────── */

/* Tablets and Medium Screens (max-width: 1024px) */
@media (max-width: 1024px) {
    .glass-container {
        padding: 30px;
    }
}

/* Tablets and Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
    #app {
        padding: 12px;
    }
    
    .glass-container {
        padding: 24px;
        border-radius: 20px;
    }
    
    .dash-header {
        margin-bottom: 25px;
        padding-bottom: 15px;
    }
    
    .brand-section h1 {
        font-size: 1.4rem;
    }
    
    .sales-banner {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .sales-card {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
        gap: 15px;
        margin-bottom: 25px;
    }
    
    /* Layout Main Grid */
    .main-grid {
        gap: 20px;
    }
    
    .form-panel, 
    .list-panel, 
    .recent-orders-panel {
        padding: 20px !important;
        border-radius: 16px;
    }
    
    /* Tables sizing */
    .stock-table th, .stock-table td {
        padding: 12px 14px;
        font-size: 0.85rem;
    }
}

/* Mobile Phones (max-width: 576px) */
@media (max-width: 576px) {
    #app {
        padding: 8px;
    }
    
    .glass-container {
        padding: 18px;
        border-radius: 16px;
    }
    
    .dash-header {
        flex-direction: column;
        gap: 14px;
        align-items: stretch;
        text-align: center;
    }
    
    .brand-section h1 {
        justify-content: center;
        font-size: 1.3rem;
    }
    
    .btn-logout {
        width: 100%;
        justify-content: center;
    }
    
    /* Grid adjustments */
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 10px;
    }
    
    .stat-card {
        padding: 14px 12px;
        gap: 10px;
        border-radius: 12px;
    }
    
    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        border-radius: 10px;
    }
    
    .stat-info .stat-value {
        font-size: 1.25rem;
    }
    
    /* Forms inside grids stacking */
    #stock-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-input, 
    .select-input {
        padding: 12px 14px;
        font-size: 0.9rem;
    }
    
    /* Scrollable Tab Panels */
    .panel-tabs {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        margin-bottom: 12px;
    }
    
    .panel-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab-btn {
        flex-shrink: 0;
        font-size: 0.85rem;
        padding: 6px 14px;
    }
}

/* Sidebar responsive adjustments */
@media (max-width: 992px) {
    .console-body {
        flex-direction: column;
        gap: 24px;
    }
    .console-sidebar {
        width: 100%;
        flex-direction: row;
        border: none;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        padding: 0 0 15px 0;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
    }
    .console-sidebar::-webkit-scrollbar {
        display: none;
    }
    .sidebar-btn {
        flex-shrink: 0;
        padding: 10px 16px;
        font-size: 0.85rem;
        border-radius: 10px;
    }
    .sidebar-btn:hover {
        transform: none;
    }
    .sidebar-btn.active {
        border-left: 1px solid rgba(147, 51, 234, 0.35);
        border-bottom: 3px solid var(--accent-purple);
        border-radius: 8px 8px 0 0;
    }
}

/* Multi-profile Screens Manager Layout styles */
#single-profile-fields {
    display: contents;
}
.profiles-wrapper {
    background: rgba(255, 255, 255, 0.015);
    border: 1px dashed var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
    width: 100%;
    grid-column: 1 / -1;
}
.profiles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    width: 100%;
}
.profiles-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.profile-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    width: 100%;
    animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.profile-row:last-child {
    margin-bottom: 0;
}
.profile-row-num {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 24px;
    text-align: center;
}
.profile-row input {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    padding: 12px 14px !important;
    border-radius: 10px !important;
    font-size: 0.9rem !important;
    margin: 0 !important;
}
.profile-row input:focus {
    border-color: var(--accent-purple) !important;
    box-shadow: 0 0 10px var(--accent-purple-glow) !important;
}
.btn-delete-row {
    background: rgba(239, 68, 68, 0.08) !important;
    border: 1px solid rgba(239, 68, 68, 0.15) !important;
    color: var(--color-danger) !important;
    cursor: pointer;
    padding: 12px !important;
    border-radius: 10px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px !important;
    width: 44px !important;
    transition: var(--transition-smooth);
}
.btn-delete-row:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: var(--color-danger) !important;
    transform: scale(1.05);
}

/* Custom Messages Responsiveness */
.messages-layout {
    display: flex;
    gap: 24px;
    min-height: 550px;
    height: calc(100vh - 280px);
}
.messages-sidebar {
    width: 340px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}
.messages-editor-panel {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .messages-layout {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }
    .messages-sidebar {
        width: 100%;
        height: 250px;
        flex-shrink: 0;
    }
    .messages-editor-panel {
        width: 100%;
        height: auto;
        min-height: 350px;
    }
}

/* Today's Sales Clickable styles */
.today-sales {
    cursor: pointer;
    position: relative;
    user-select: none;
}

.today-sales:hover {
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.15) !important;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay:not(.hidden) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-content {
    max-width: 850px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: auto !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    padding: 24px !important;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: var(--radius-lg) !important;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.modal-header h2 {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    line-height: 1;
}

.btn-close-modal:hover {
    color: var(--color-danger);
    transform: scale(1.1);
}

/* --- 2026 Interactive Restyle Layer ------------------------------------- */
:root {
    --surface-0: rgba(7, 10, 18, 0.92);
    --surface-1: rgba(17, 24, 39, 0.78);
    --surface-2: rgba(30, 41, 59, 0.58);
    --stroke-soft: rgba(148, 163, 184, 0.16);
    --stroke-bright: rgba(226, 232, 240, 0.26);
    --accent-primary: #22d3ee;
    --accent-secondary: #a3e635;
    --accent-warm: #f59e0b;
    --accent-rose: #fb7185;
    --focus-ring: rgba(34, 211, 238, 0.28);
    --premium-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
    --lift-shadow: 0 22px 70px rgba(2, 6, 23, 0.56);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #05070d;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.032) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.028) 1px, transparent 1px),
        linear-gradient(135deg, #05070d 0%, #0b1220 42%, #06141a 72%, #090b12 100%);
    background-size: 42px 42px, 42px 42px, auto;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.55;
    background:
        linear-gradient(115deg, transparent 0%, rgba(34, 211, 238, 0.08) 28%, transparent 48%),
        linear-gradient(250deg, transparent 10%, rgba(163, 230, 53, 0.065) 38%, transparent 58%),
        linear-gradient(0deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0));
    animation: ambientSweep 18s ease-in-out infinite alternate;
}

.glass-container,
.form-panel,
.list-panel,
.messages-sidebar,
.messages-editor-panel,
.profiles-wrapper,
.card,
.glass-card,
.recent-orders-panel {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
        var(--surface-1) !important;
    border-color: var(--stroke-soft) !important;
    box-shadow: var(--premium-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(22px) saturate(130%);
}

.glass-container {
    border-radius: 18px;
}

.dashboard-layout {
    max-width: 1480px;
}

.dash-header {
    position: sticky;
    top: 14px;
    z-index: 20;
    margin: -14px -10px 28px;
    padding: 16px 18px;
    border: 1px solid var(--stroke-soft);
    border-radius: 16px;
    background: rgba(7, 10, 18, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
}

.brand-section h1 {
    letter-spacing: 0;
}

.brand-section h1 span,
.login-header h1,
.tab-btn.active,
.sidebar-btn.active i {
    background: linear-gradient(90deg, #67e8f9, #a3e635, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-card {
    position: relative;
    overflow: hidden;
    transform-origin: center;
}

.login-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.6), rgba(163, 230, 53, 0.32), rgba(251, 113, 133, 0.24));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.console-sidebar {
    position: sticky;
    top: 106px;
    max-height: calc(100vh - 126px);
    overflow-y: auto;
}

.sidebar-btn {
    position: relative;
    overflow: hidden;
}

.sidebar-btn::after {
    content: '';
    position: absolute;
    inset: 8px auto 8px 8px;
    width: 3px;
    border-radius: 999px;
    background: transparent;
    transition: var(--transition-smooth);
}

.sidebar-btn:hover::after {
    background: rgba(34, 211, 238, 0.45);
}

.sidebar-btn.active {
    background:
        linear-gradient(90deg, rgba(34, 211, 238, 0.18), rgba(163, 230, 53, 0.07), transparent) !important;
    border-color: rgba(34, 211, 238, 0.28) !important;
    border-left-color: var(--accent-primary) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 12px 28px rgba(34, 211, 238, 0.09);
}

.sidebar-btn.active::after {
    background: var(--accent-secondary);
    box-shadow: 0 0 18px rgba(163, 230, 53, 0.48);
}

.console-panel {
    animation: panelEnter 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-panel,
.list-panel,
.sales-card,
.stat-card,
.modal-content,
.messages-sidebar,
.messages-editor-panel {
    position: relative;
    overflow: hidden;
}

.form-panel::before,
.list-panel::before,
.sales-card::before,
.stat-card::before,
.messages-sidebar::before,
.messages-editor-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.105), transparent);
    transform: translateX(-120%);
    transition: opacity 0.25s ease;
}

.form-panel:hover::before,
.list-panel:hover::before,
.sales-card:hover::before,
.stat-card:hover::before,
.messages-sidebar:hover::before,
.messages-editor-panel:hover::before {
    opacity: 1;
    animation: sheen 1.15s ease;
}

.stat-card,
.sales-card {
    transform-style: preserve-3d;
    will-change: transform;
}

.stat-card:hover,
.sales-card:hover,
.list-panel:hover,
.form-panel:hover {
    transform: translateY(-5px);
    border-color: var(--stroke-bright) !important;
    box-shadow: var(--lift-shadow), 0 0 0 1px rgba(34, 211, 238, 0.08);
}

.sales-card {
    border-radius: 14px;
}

.stat-icon,
.sales-icon {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 10px 24px rgba(0,0,0,0.24);
}

.form-input,
.select-input,
textarea {
    border-color: rgba(148, 163, 184, 0.18) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.form-input:hover,
.select-input:hover,
textarea:hover {
    border-color: rgba(34, 211, 238, 0.34) !important;
}

.form-input:focus,
.select-input:focus,
textarea:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 4px var(--focus-ring), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.btn-primary,
.btn-logout,
.btn-icon,
button {
    position: relative;
    isolation: isolate;
}

.btn-primary {
    background: linear-gradient(135deg, #06b6d4, #22c55e 56%, #f59e0b) !important;
    color: #041016;
    box-shadow: 0 12px 28px rgba(34, 211, 238, 0.22), inset 0 1px 0 rgba(255,255,255,0.35);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.28), 0 0 0 1px rgba(255,255,255,0.2);
}

.btn-primary:active,
.btn-icon:active,
.sidebar-btn:active {
    transform: translateY(1px) scale(0.99);
}

.btn-ripple {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.55);
    transform: translate(-50%, -50%) scale(0);
    animation: ripplePop 0.62s ease-out forwards;
    z-index: -1;
}

.table-wrapper {
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.stock-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
}

.stock-table tbody tr {
    animation: rowIn 0.34s ease both;
}

.stock-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.075), rgba(163, 230, 53, 0.032), transparent);
    box-shadow: inset 3px 0 0 var(--accent-primary);
}

.badge {
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.toast-container {
    top: 24px;
    bottom: auto;
}

.toast {
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.105), rgba(255,255,255,0.035)),
        rgba(7, 10, 18, 0.92);
    box-shadow: 0 20px 60px rgba(0,0,0,0.38);
    animation: toastFloatIn 0.48s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success {
    border-left-color: var(--accent-secondary);
}

.toast.error {
    border-left-color: var(--accent-rose);
}

.toast.warning {
    border-left-color: var(--accent-warm);
}

.modal-overlay {
    background:
        linear-gradient(rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.86)),
        rgba(0, 0, 0, 0.68);
}

.modal-content {
    border-radius: 18px !important;
    animation: modalSpring 0.48s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.modal-header h2 {
    letter-spacing: 0;
}

.btn-close-modal {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255,255,255,0.045);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-close-modal:hover {
    background: rgba(251, 113, 133, 0.15);
}

.panel-header {
    padding: 20px 22px;
    border: 1px solid var(--stroke-soft);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(163, 230, 53, 0.04)),
        rgba(255,255,255,0.018);
}

.panel-header h2 {
    margin: 0 0 6px;
    letter-spacing: 0;
}

.panel-header p {
    margin: 0;
    color: var(--text-secondary);
}

.ui-booting * {
    transition: none !important;
}

.is-revealed {
    animation: revealUp 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.active-pulse {
    animation: softPulse 1.9s ease-in-out infinite;
}

@keyframes ambientSweep {
    from { transform: translate3d(-1.5%, -1%, 0); filter: saturate(105%); }
    to { transform: translate3d(1.5%, 1%, 0); filter: saturate(130%); }
}

@keyframes panelEnter {
    from { opacity: 0; transform: translateY(14px) scale(0.99); filter: blur(5px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes sheen {
    from { transform: translateX(-120%); }
    to { transform: translateX(120%); }
}

@keyframes ripplePop {
    to { transform: translate(-50%, -50%) scale(18); opacity: 0; }
}

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

@keyframes toastFloatIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalSpring {
    from { opacity: 0; transform: translateY(18px) scale(0.95); filter: blur(6px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

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

@keyframes softPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(34, 211, 238, 0); }
    50% { box-shadow: 0 0 24px rgba(34, 211, 238, 0.22); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

/* --- Sales amount privacy controls ------------------------------------- */
.sensitive-sales-card {
    position: relative;
    padding-right: 54px;
}

.sensitive-sales-card .sales-info {
    min-width: 0;
}

.sensitive-sales-mask {
    display: none;
    letter-spacing: 0.06em;
}

.sensitive-sales-card.is-value-hidden .sensitive-sales-content {
    display: none;
}

.sensitive-sales-card.is-value-hidden .sensitive-sales-mask {
    display: inline;
}

.sales-privacy-toggle {
    position: absolute;
    top: 11px;
    right: 11px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(125, 211, 252, 0.14);
    border-radius: 8px;
    background: rgba(4, 12, 20, 0.68);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.72rem;
    transition: color 180ms ease-out, border-color 180ms ease-out, background-color 180ms ease-out, transform 180ms ease-out;
}

.sales-privacy-toggle:hover {
    border-color: rgba(103, 232, 249, 0.38);
    background: rgba(34, 211, 238, 0.1);
    color: var(--console-cyan, #67e8f9);
    transform: translateY(-1px);
}

.sales-privacy-toggle:focus-visible {
    outline: 2px solid var(--console-cyan, #67e8f9);
    outline-offset: 2px;
}

.sales-privacy-toggle[aria-pressed="true"] {
    color: var(--console-amber, #fbbf24);
    border-color: rgba(251, 191, 36, 0.3);
}

@media (max-width: 480px) {
    .sensitive-sales-card {
        padding-right: 43px;
    }

    .sales-privacy-toggle {
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
        border-radius: 7px;
    }

    .sensitive-sales-mask {
        font-size: 0.94rem;
        letter-spacing: 0.03em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sales-privacy-toggle {
        transition: none;
    }
}

/* --- Buying guide cards ------------------------------------------------ */
#buying-guides-grid:not(.is-ready) > .glass-container {
    display: none !important;
}

#buying-guides-grid:not(.is-ready)::before {
    content: "Loading updated buying guides...";
    grid-column: 1 / -1;
    padding: 24px;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-align: center;
}

.buying-guide-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.015);
    transition: border-color 180ms ease-out, background-color 180ms ease-out, transform 180ms ease-out;
}

.buying-guide-card:hover {
    border-color: rgba(103, 232, 249, 0.24);
    background: rgba(255, 255, 255, 0.025);
    transform: translateY(-2px);
}

.buying-guide-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.buying-guide-card-header h3 {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.25;
}

.buying-guide-card-header h3 span {
    overflow-wrap: anywhere;
}

.buying-guide-copy-button {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-secondary);
    cursor: pointer;
}

.buying-guide-copy-button:hover {
    border-color: var(--console-cyan, #67e8f9);
    color: var(--console-cyan, #67e8f9);
}

.buying-guide-copy-button:focus-visible {
    outline: 2px solid var(--console-cyan, #67e8f9);
    outline-offset: 2px;
}

.buying-guide-content {
    max-width: 100%;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.8rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

@media (max-width: 600px) {
    .buying-guide-card {
        padding: 14px;
    }

    .buying-guide-card:hover {
        transform: none;
    }

    .buying-guide-content {
        font-size: 0.78rem;
        line-height: 1.5;
    }
}

@media (prefers-reduced-motion: reduce) {
    .buying-guide-card {
        transition: none;
    }
}

@media (max-width: 992px) {
    .dash-header,
    .console-sidebar {
        position: static;
        max-height: none;
    }
}

@media (max-width: 576px) {
    .toast-container {
        left: 12px;
        right: 12px;
        top: 12px;
    }

    .toast {
        min-width: 0;
        width: 100%;
    }
}

/* --- Modern command-console skin --------------------------------------- */
:root {
    --console-surface: rgba(8, 14, 23, 0.92);
    --console-surface-soft: rgba(12, 22, 34, 0.78);
    --console-line: rgba(125, 211, 252, 0.16);
    --console-cyan: #67e8f9;
    --console-lime: #bef264;
    --console-amber: #fbbf24;
    --console-pink: #fb7185;
    --console-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

body {
    background-color: #05090f;
    background-image:
        linear-gradient(rgba(103, 232, 249, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(103, 232, 249, 0.025) 1px, transparent 1px),
        radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.13), transparent 28%),
        radial-gradient(circle at 88% 78%, rgba(251, 191, 36, 0.08), transparent 26%),
        linear-gradient(135deg, #05090f 0%, #08131e 48%, #0b111a 100%);
    background-size: 32px 32px, 32px 32px, auto, auto, auto;
}

.dashboard-layout {
    background: linear-gradient(145deg, rgba(10, 20, 31, 0.97), rgba(5, 10, 17, 0.94));
    border: 1px solid var(--console-line);
    box-shadow: var(--console-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dash-header {
    border-bottom: 1px solid var(--console-line);
    padding-bottom: 22px;
    margin-bottom: 26px;
}

.brand-section h1 {
    color: #f8fafc;
    text-shadow: 0 0 22px rgba(103, 232, 249, 0.18);
}

.brand-section h1::first-letter {
    color: var(--console-cyan);
}

.brand-section h1 span {
    background: linear-gradient(90deg, var(--console-cyan), var(--console-lime), var(--console-amber));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.console-body {
    gap: 26px;
}

.console-sidebar {
    background: linear-gradient(180deg, rgba(9, 21, 33, 0.95), rgba(6, 13, 22, 0.85));
    border-color: var(--console-line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 42px rgba(0, 0, 0, 0.24);
}

.sidebar-btn {
    border-radius: 10px;
    color: #8fa9b9;
}

.sidebar-btn:hover {
    color: #e6fbff;
    background: rgba(103, 232, 249, 0.06);
    border-color: rgba(103, 232, 249, 0.18);
}

.sidebar-btn:hover i,
.sidebar-btn.active i {
    color: var(--console-cyan);
}

.sidebar-btn.active {
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.18), rgba(190, 242, 100, 0.07), transparent) !important;
    border-color: rgba(103, 232, 249, 0.28) !important;
    border-left-color: var(--console-lime) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 14px 30px rgba(34, 211, 238, 0.1);
    text-shadow: 0 0 12px rgba(103, 232, 249, 0.35);
}

.console-panel > .panel-header,
.panel-header {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(190, 242, 100, 0.04) 56%, rgba(251, 191, 36, 0.035));
    border-color: var(--console-line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.console-panel > .panel-header h2,
.panel-header h2 {
    color: #f1fbff;
}

.form-panel,
.list-panel,
.glass-card,
.messages-sidebar,
.messages-editor-panel {
    background: linear-gradient(145deg, rgba(13, 27, 41, 0.82), rgba(7, 14, 23, 0.86));
    border-color: var(--console-line);
    box-shadow: var(--console-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.form-panel h2,
.list-panel h2,
.list-panel h3 {
    color: #e8f8fc;
}

.form-panel h2::before {
    background: linear-gradient(180deg, var(--console-cyan), var(--console-lime));
}

.form-input,
.select-input,
textarea {
    background: rgba(4, 10, 17, 0.72) !important;
    border-color: rgba(125, 211, 252, 0.18) !important;
    color: #ecfeff !important;
}

.form-input::placeholder,
textarea::placeholder,
.searchable-select-input::placeholder {
    color: #668091;
}

.form-input:focus,
.select-input:focus,
textarea:focus,
.searchable-select-input:focus {
    border-color: var(--console-cyan) !important;
    box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.12), 0 0 24px rgba(34, 211, 238, 0.12) !important;
}

.btn-primary {
    background: linear-gradient(135deg, #22d3ee 0%, #34d399 52%, #fbbf24 100%) !important;
    color: #041016 !important;
    box-shadow: 0 14px 30px rgba(34, 211, 238, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-primary:hover {
    box-shadow: 0 18px 44px rgba(34, 211, 238, 0.27), 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.stock-table th {
    color: #8dd8e9;
    background: rgba(7, 22, 33, 0.96);
    border-bottom-color: var(--console-line);
}

.stock-table td {
    border-bottom-color: rgba(125, 211, 252, 0.1);
}

.stock-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.09), rgba(190, 242, 100, 0.035), transparent);
    box-shadow: inset 3px 0 0 var(--console-cyan);
}

.panel-tabs {
    border-bottom-color: var(--console-line);
}

.tab-btn.active {
    color: var(--console-cyan);
    text-shadow: 0 0 12px rgba(103, 232, 249, 0.28);
}

.tab-btn.active::after {
    background: linear-gradient(90deg, var(--console-cyan), var(--console-lime));
    box-shadow: 0 0 14px rgba(103, 232, 249, 0.55);
}

#broadcast-reseller-status {
    background: linear-gradient(145deg, rgba(6, 25, 36, 0.94), rgba(8, 16, 27, 0.95)) !important;
    border: 1px solid var(--console-line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 46px rgba(0, 0, 0, 0.24);
}

#broadcast-reseller-status-text {
    color: var(--console-cyan) !important;
}

#broadcast-reseller-bar {
    background: linear-gradient(90deg, var(--console-cyan), var(--console-lime), var(--console-amber)) !important;
    box-shadow: 0 0 18px rgba(103, 232, 249, 0.38);
}

#broadcast-reseller-log {
    background: #03070c !important;
    border: 1px solid rgba(103, 232, 249, 0.14);
    color: #a7f3d0 !important;
    box-shadow: inset 0 0 24px rgba(34, 211, 238, 0.04);
}

#broadcast-reseller-log > div {
    padding: 7px 9px;
    border-bottom: 1px solid rgba(125, 211, 252, 0.08);
}

#broadcast-reseller-log > div::before {
    content: '›';
    color: var(--console-amber);
    margin-right: 8px;
}

/* Searchable stock service picker */
.form-panel:has(.searchable-select.is-open),
.form-panel.select-menu-open {
    position: relative !important;
    z-index: 10000 !important;
    overflow: visible !important;
}

.searchable-select {
    position: relative;
    width: 100%;
}

.searchable-select-control {
    display: flex;
    align-items: center;
    position: relative;
    min-height: 48px;
    border: 1px solid rgba(125, 211, 252, 0.18);
    border-radius: 12px;
    background: rgba(4, 10, 17, 0.72);
    transition: var(--transition-smooth);
}

.searchable-select.is-open .searchable-select-control,
.searchable-select-control:focus-within {
    border-color: var(--console-cyan);
    box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.12), 0 0 26px rgba(34, 211, 238, 0.12);
}

.searchable-select-icon {
    position: absolute;
    left: 15px;
    color: var(--console-cyan);
    pointer-events: none;
    font-size: 0.88rem;
}

.searchable-select-input {
    width: 100%;
    min-height: 46px;
    padding: 11px 44px 11px 42px;
    border: 0 !important;
    outline: 0;
    background: transparent !important;
    color: #e6fbff;
    font: inherit;
}

.searchable-select-input.has-selection {
    font-weight: 650;
}

.searchable-select-toggle {
    width: 44px;
    align-self: stretch;
    flex-shrink: 0;
    border: 0;
    border-left: 1px solid rgba(125, 211, 252, 0.12);
    background: transparent;
    color: #91aebb;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.searchable-select-toggle:hover,
.searchable-select.is-open .searchable-select-toggle {
    color: var(--console-lime);
    background: rgba(190, 242, 100, 0.06);
}

.searchable-select.is-open .searchable-select-toggle i {
    transform: rotate(180deg);
}

.searchable-select-toggle i {
    transition: transform 0.22s ease;
}

.searchable-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.searchable-select-menu {
    position: absolute;
    z-index: 99999 !important;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    max-height: 330px;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    padding: 8px;
    border: 1px solid rgba(103, 232, 249, 0.24);
    border-radius: 14px;
    background: rgba(5, 13, 22, 0.98);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.52), 0 0 0 1px rgba(190, 242, 100, 0.04);
    backdrop-filter: blur(18px);
    animation: pickerDrop 0.2s ease-out;
}

.searchable-select-menu[hidden] {
    display: none;
}

.searchable-select-option {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #dff7fb;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.searchable-select-option:hover,
.searchable-select-option.is-selected {
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.14), rgba(190, 242, 100, 0.06));
    border-color: rgba(103, 232, 249, 0.2);
}

.searchable-select-option-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: var(--console-cyan);
    background: rgba(34, 211, 238, 0.1);
}

.searchable-select-option-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.searchable-select-option-copy strong {
    overflow: hidden;
    color: #effcff;
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.searchable-select-option-copy small {
    overflow: hidden;
    color: #7192a1;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.searchable-select-option-price {
    color: var(--console-lime);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.searchable-select-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 24px 12px;
    color: #7192a1;
    font-size: 0.82rem;
}

@keyframes pickerDrop {
    from { opacity: 0; transform: translateY(-6px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 700px) {
    .searchable-select-menu {
        max-height: 260px;
    }

    .searchable-select-option {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .searchable-select-option-price {
        grid-column: 2;
    }
}

/* --- Header, sidebar states, and responsive navigation ------------------ */
.dashboard-layout {
    align-self: flex-start;
}

.dash-header {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 18px;
}

.header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
}

.hamburger-btn.mobile-nav-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.15rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 2;
}

.hamburger-btn.mobile-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--accent-purple);
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px var(--accent-purple-glow);
}

.header-brand-block.centered-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    margin: 0 auto;
}

.header-top-spacer {
    width: 40px;
}

.header-bottom-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.07);
    width: 100%;
}

.header-brand-block,
.header-actions,
.admin-profile-button,
.header-action-button,
.sidebar-heading {
    display: flex;
    align-items: center;
}

.header-brand-block {
    min-width: 0;
    gap: 12px;
}

.brand-kicker,
.header-context-label,
.sidebar-heading-kicker {
    color: #7393a2;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.brand-kicker {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 4px;
}

.live-dot,
.notification-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--console-lime);
    box-shadow: 0 0 12px rgba(190, 242, 100, 0.85);
}

.brand-section h1 {
    margin: 0;
    font-size: clamp(1.1rem, 2vw, 1.55rem);
}

.header-context {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 130px;
}

.header-context strong {
    color: #e9fbff;
    font-size: 0.95rem;
}

.header-actions {
    justify-content: flex-end;
    gap: 9px;
}

.icon-button,
.header-action-button,
.admin-profile-button {
    border: 1px solid rgba(125, 211, 252, 0.16);
    background: rgba(6, 17, 27, 0.72);
    color: #a8c1cb;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.icon-button {
    position: relative;
    width: 42px;
    height: 42px;
    justify-content: center;
    border-radius: 11px;
}

.icon-button:hover,
.header-action-button:hover,
.admin-profile-button:hover {
    color: var(--console-cyan);
    border-color: rgba(103, 232, 249, 0.36);
    background: rgba(34, 211, 238, 0.08);
    transform: translateY(-1px);
}

.header-action-button {
    gap: 10px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 11px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
}

.header-action-button kbd {
    padding: 2px 5px;
    border: 1px solid rgba(125, 211, 252, 0.18);
    border-radius: 5px;
    color: #7192a1;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.62rem;
}

.notification-dot {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 5px;
    height: 5px;
}

.admin-menu {
    position: relative;
}

.admin-profile-button {
    gap: 9px;
    min-height: 42px;
    padding: 4px 9px 4px 5px;
    border-radius: 12px;
    font: inherit;
}

.admin-avatar {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    color: #06202a;
    background: linear-gradient(145deg, var(--console-cyan), var(--console-lime));
    font-weight: 900;
}

.admin-profile-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.admin-profile-copy strong {
    color: #e9fbff;
    font-size: 0.78rem;
}

.admin-profile-copy small {
    color: #7393a2;
    font-size: 0.64rem;
}

.admin-profile-button > i {
    color: #7192a1;
    font-size: 0.68rem;
}

.admin-profile-menu {
    position: absolute;
    z-index: 80;
    top: calc(100% + 10px);
    right: 0;
    width: 210px;
    padding: 8px;
    border: 1px solid rgba(103, 232, 249, 0.22);
    border-radius: 13px;
    background: rgba(5, 13, 22, 0.98);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.46);
    animation: pickerDrop 0.18s ease-out;
}

.admin-profile-menu[hidden] {
    display: none;
}

.admin-menu-heading {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 10px 11px;
    border-bottom: 1px solid rgba(125, 211, 252, 0.1);
    color: #8fa9b9;
    font-size: 0.7rem;
}

.admin-menu-logout {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 9px;
    margin-top: 6px;
    padding: 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #fda4af;
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: left;
}

.admin-menu-logout:hover {
    background: rgba(251, 113, 133, 0.1);
    color: #fecdd3;
}

.mobile-nav-toggle {
    display: none;
}

.sidebar-heading {
    justify-content: space-between;
    min-height: 30px;
    padding: 0 3px 7px;
    border-bottom: 1px solid rgba(125, 211, 252, 0.1);
}

.sidebar-collapse-toggle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 0.75rem;
}

.mobile-nav-backdrop {
    display: none;
}

body.sidebar-collapsed .console-sidebar {
    width: 82px;
    padding-inline: 12px;
}

body.sidebar-collapsed .sidebar-heading {
    justify-content: center;
}

body.sidebar-collapsed .sidebar-heading-kicker,
body.sidebar-collapsed .sidebar-btn span {
    display: none;
}

body.sidebar-collapsed .sidebar-btn {
    justify-content: center;
    padding-inline: 0;
}

body.sidebar-collapsed .sidebar-btn i {
    margin: 0;
}

body.sidebar-collapsed .sidebar-btn::before {
    content: none;
}

body.sidebar-collapsed .sidebar-btn:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 110;
    left: calc(100% + 12px);
    top: 50%;
    width: max-content;
    max-width: 190px;
    padding: 7px 9px;
    border: 1px solid rgba(103, 232, 249, 0.22);
    border-radius: 8px;
    background: rgba(5, 13, 22, 0.98);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.38);
    color: #dff7fb;
    font-size: 0.72rem;
    font-weight: 700;
    pointer-events: none;
    transform: translateY(-50%);
}

@media (max-width: 1120px) {
    .dash-header {
        grid-template-columns: minmax(220px, 1fr) auto;
    }

    .header-context {
        display: none;
    }
}

@media (max-width: 820px) {
    #app {
        align-items: flex-start;
        padding: 10px;
    }

    .glass-container {
        padding: 20px;
        border-radius: 18px;
    }

    .dashboard-layout {
        overflow: visible;
    }

    .dash-header {
        grid-template-columns: 1fr auto;
        gap: 12px;
    }

    .header-actions {
        gap: 6px;
    }

    .header-action-button {
        width: 42px;
        padding: 0;
        justify-content: center;
    }

    .header-action-button span,
    .header-action-button kbd {
        display: none;
    }

    .mobile-nav-toggle {
        display: inline-flex;
    }

    .console-body {
        display: block;
    }

    .console-sidebar {
        position: fixed;
        z-index: 100;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(286px, 86vw);
        max-height: none;
        padding: 24px 16px;
        border-radius: 0 18px 18px 0;
        transform: translateX(-105%);
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    }

    body.mobile-nav-open .console-sidebar {
        transform: translateX(0);
        z-index: 1000000 !important;
    }

    body.mobile-nav-open #mobile-nav-backdrop,
    body.mobile-nav-open .mobile-nav-backdrop {
        display: block !important;
        position: fixed !important;
        z-index: 999999 !important;
        top: 0 !important;
        left: min(286px, 86vw) !important;
        right: 0 !important;
        bottom: 0 !important;
        width: auto !important;
        height: 100vh !important;
        background: rgba(1, 6, 12, 0.68) !important;
        backdrop-filter: blur(4px);
        pointer-events: auto !important;
        cursor: pointer !important;
    }

    #mobile-nav-backdrop[hidden],
    .mobile-nav-backdrop[hidden] {
        display: none !important;
    }

    body.sidebar-collapsed .console-sidebar {
        width: min(286px, 86vw);
        padding-inline: 16px;
    }

    body.sidebar-collapsed .sidebar-heading {
        justify-content: space-between;
    }

    body.sidebar-collapsed .sidebar-heading-kicker,
    body.sidebar-collapsed .sidebar-btn span {
        display: inline;
    }

    body.sidebar-collapsed .sidebar-btn {
        justify-content: flex-start;
        padding-inline: 18px;
    }

    .main-grid,
    #stock-form {
        grid-template-columns: 1fr;
    }
}

body.console-refresh #section-payments .payment-log-actions .payment-view-button,
body.console-refresh #section-payments td > .payment-view-button {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 10px !important;
  white-space: nowrap !important;
}

/* Payment log viewer actions match the compact Admin Alerts visual language. */
body.console-refresh #section-payments .payment-log-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
body.console-refresh #section-payments .payment-view-button {
  min-width: 0;
  min-height: 32px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid;
  border-radius: 6px;
  box-sizing: border-box;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.1;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}
body.console-refresh #section-payments .payment-view-button:hover { transform: translateY(-1px); }
body.console-refresh #section-payments .payment-view-button:active { transform: translateY(0); }
body.console-refresh #section-payments .payment-view-button i {
  flex: 0 0 12px;
  width: 12px;
  margin: 0;
  font-size: 11px;
  line-height: 1;
  text-align: center;
}
body.console-refresh #section-payments .payment-view-receipt {
  border-color: rgba(34, 197, 94, .38);
  background: rgba(34, 197, 94, .1);
  color: #16a34a;
}
body.console-refresh #section-payments .payment-view-receipt:hover,
body.console-refresh #section-payments .payment-view-receipt:focus-visible {
  border-color: rgba(34, 197, 94, .62);
  background: rgba(34, 197, 94, .16);
}
body.console-refresh #section-payments .payment-view-message {
  border-color: rgba(6, 182, 212, .38);
  background: rgba(6, 182, 212, .1);
  color: #0891b2;
}
body.console-refresh #section-payments .payment-view-message:hover,
body.console-refresh #section-payments .payment-view-message:focus-visible {
  border-color: rgba(6, 182, 212, .62);
  background: rgba(6, 182, 212, .16);
}
[data-theme="dark"] body.console-refresh #section-payments .payment-view-receipt { color: #4ade80; }
[data-theme="dark"] body.console-refresh #section-payments .payment-view-message { color: #67e8f9; }

@media (max-width: 1100px) {
  body.console-refresh #section-payments .payment-log-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.console-refresh #section-payments .payment-log-actions .payment-view-button {
    width: 100%;
    max-width: none;
  }
  body.console-refresh #section-payments td > .payment-view-button { width: 100%; }
}

@media (max-width: 480px) {
    .admin-profile-copy,
    .admin-profile-button > i {
        display: none;
    }

    .admin-profile-button {
        padding-right: 5px;
    }

    .brand-section h1 {
        font-size: 1rem;
    }

    .brand-kicker {
        font-size: 0.58rem;
    }
}

/* --- Stock manager controls and credential presentation ---------------- */
.required-mark {
    color: var(--console-pink);
}

.field-helper {
    display: block;
    margin: -5px 0 8px;
    color: #70909f;
    font-size: 0.72rem;
}

.filter-controls {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(125, 211, 252, 0.1);
}

.stock-filter-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    color: #7fa0ae;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}

.filter-clear-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 9px;
    border: 1px solid rgba(125, 211, 252, 0.14);
    border-radius: 8px;
    background: rgba(103, 232, 249, 0.035);
    color: #8fb1bf;
    cursor: pointer;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    transition: var(--transition-smooth);
}

.filter-clear-button:hover {
    border-color: rgba(103, 232, 249, 0.34);
    color: var(--console-cyan);
    background: rgba(103, 232, 249, 0.08);
}

.stock-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding-top: 18px;
}

.stock-pagination[hidden] {
    display: none;
}

.stock-page-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(125, 211, 252, 0.18);
    border-radius: 8px;
    background: rgba(103, 232, 249, 0.05);
    color: var(--text-primary);
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    transition: var(--transition-smooth);
}

.stock-page-button:hover:not(:disabled) {
    border-color: rgba(103, 232, 249, 0.4);
    background: rgba(103, 232, 249, 0.1);
    color: var(--console-cyan);
    transform: translateY(-1px);
}

.stock-page-button:disabled {
    cursor: not-allowed;
}

.stock-page-status {
    min-width: 96px;
    color: #8fb1bf;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    text-align: center;
}

.credentials-stack {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
    color: #d9f5fa;
    font-size: 0.78rem;
}

.credential-line {
    display: flex;
    align-items: center;
    min-height: 25px;
    gap: 6px;
}

.credential-label {
    color: #7895a3;
    flex: 0 0 auto;
}

.secret-value {
    min-width: 70px;
    color: #e7fcff;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.08em;
}

.secret-value.is-revealed {
    letter-spacing: 0;
}

.credential-action {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: #7895a3;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.credential-action:hover,
.credential-action:focus-visible {
    border-color: rgba(103, 232, 249, 0.22);
    background: rgba(103, 232, 249, 0.08);
    color: var(--console-cyan);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--console-cyan);
    outline-offset: 2px;
}

button:disabled {
    cursor: wait;
    filter: saturate(0.6);
    opacity: 0.62;
}

@media (max-width: 820px) {
    .stock-filter-meta {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
    }

    .stock-pagination {
        justify-content: space-between;
    }
}

@media (max-width: 420px) {
    .stock-page-button {
        width: 44px;
        padding: 0;
    }

    .stock-page-button span {
        display: none;
    }
}

/* --- Final responsive pass --------------------------------------------- */
html,
body {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

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

#app,
.glass-container,
.dashboard-layout,
.console-body,
.console-content,
.console-panel,
.main-grid,
.form-panel,
.list-panel {
    min-width: 0;
    max-width: 100%;
}

#app {
    width: 100%;
}

img,
video,
canvas {
    max-width: 100%;
}

.console-content {
    overflow: visible;
}

.form-panel,
.list-panel,
.recent-orders-panel,
.messages-sidebar,
.messages-editor-panel {
    overflow: hidden;
}

@media (max-width: 820px) {
    body.mobile-nav-open {
        overflow: hidden;
    }

    #app {
        align-items: flex-start;
        padding: 8px;
    }

    .glass-container {
        width: 100%;
        padding: 16px;
        border-radius: 16px;
    }

    .dashboard-layout {
        overflow: visible;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .dash-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        text-align: left;
    }

    .header-brand-block,
    .brand-section,
    .header-actions,
    .console-content,
    .stat-info,
    .sales-info {
        min-width: 0;
    }

    .brand-section h1 {
        display: block;
        min-width: 0;
        max-width: 100%;
        font-size: clamp(0.78rem, 3.2vw, 1.15rem);
        line-height: 1.15;
        white-space: nowrap;
    }

    .brand-section h1 span {
        font-size: 0.8em;
        margin-left: 4px;
        display: inline-block;
    }

    .brand-kicker {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header-actions {
        flex-shrink: 0;
        gap: 6px;
    }

    .header-action-button,
    .icon-button,
    .admin-profile-button,
    .mobile-nav-toggle {
        min-width: 40px;
        min-height: 40px;
    }

    .console-body {
        display: block;
    }

    .console-sidebar {
        position: fixed;
        z-index: 100;
        inset: 0 auto 0 0;
        width: min(286px, 86vw);
        height: 100dvh;
        max-height: none;
        padding: 22px 16px;
        display: flex;
        flex-direction: column;
        background: #05080e;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
        border-right: 1px solid rgba(125, 211, 252, 0.15);
        white-space: normal;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        touch-action: pan-y;
        border-radius: 0 18px 18px 0;
        transform: translateX(-105%);
        visibility: hidden;
        pointer-events: none;
        gap: 8px;
    }

    body.mobile-nav-open .console-sidebar {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-nav-backdrop {
        pointer-events: none;
        touch-action: none;
    }

    body.mobile-nav-open .mobile-nav-backdrop {
        pointer-events: auto;
    }

    body.sidebar-collapsed .console-sidebar {
        width: min(286px, 86vw);
        padding-inline: 16px;
    }

    body.sidebar-collapsed .sidebar-heading-kicker,
    body.sidebar-collapsed .sidebar-btn span {
        display: inline;
    }

    body.sidebar-collapsed .sidebar-btn {
        justify-content: flex-start;
        padding-inline: 18px;
    }

    .console-panel {
        gap: 18px;
    }

    .sales-banner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 20px !important;
    }

    .sales-card {
        min-width: 0;
        padding: 14px;
        gap: 10px;
    }

    .sales-card.total-stock-card {
        grid-column: auto !important;
        gap: 10px !important;
    }

    .sales-info,
    .sales-value,
    .sales-label,
    .stat-label,
    .stat-value {
        overflow-wrap: anywhere;
    }

    .sales-value {
        font-size: 1.15rem;
    }

    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)) !important;
        gap: 10px !important;
        overflow: visible !important;
        padding-bottom: 0 !important;
        scroll-snap-type: none;
    }

    .stat-card {
        width: auto;
        min-width: 0 !important;
        padding: 14px 12px;
        gap: 10px;
        align-items: flex-start;
        margin-bottom: 0 !important;
    }
    .stat-info .stat-label {
        line-height: 1.2;
    }

    .main-grid {
        gap: 16px;
    }

    .form-panel,
    .list-panel,
    .recent-orders-panel {
        padding: 16px !important;
        border-radius: 14px;
    }

    #stock-form {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .table-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .stock-table {
        min-width: 650px;
    }

    .filter-controls {
        min-width: 0;
        flex-wrap: wrap;
        gap: 10px;
    }

    .filter-controls > * {
        min-width: 0;
    }

    .stock-filter-meta {
        flex-wrap: wrap;
        row-gap: 8px;
        white-space: normal;
    }

    .messages-layout {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    #app {
        padding: 6px;
    }

    .glass-container {
        padding: 14px;
        border-radius: 14px;
    }

    .dash-header {
        gap: 8px;
    }

    .header-actions {
        gap: 4px;
    }

    .header-action-button,
    .icon-button,
    .admin-profile-button,
    .mobile-nav-toggle {
        width: 38px;
        min-width: 38px;
        height: 38px;
        min-height: 38px;
        padding: 0;
    }

    .brand-section h1 {
        font-size: clamp(0.72rem, 3.6vw, 0.92rem);
        white-space: nowrap;
    }
    .header-brand-block {
        gap: 6px !important;
    }

    .brand-section h1 span {
        font-size: 0.74em;
    }

    .login-logo {
        width: 92px;
        height: 92px;
        margin-bottom: 14px;
        border-radius: 16px;
    }

    .brand-logo {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .sales-banner {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .sales-card.total-stock-card {
        grid-column: auto !important;
    }

    .searchable-select-menu {
        left: -2px;
        right: -2px;
        max-height: min(280px, 48vh);
    }

    .form-input,
    .select-input,
    .searchable-select-input,
    textarea {
        min-height: 44px;
    }

    .filter-clear-button {
        min-height: 40px;
    }
}

@media (max-width: 350px) {


    .brand-section h1 {
        font-size: 0.88rem;
    }

    .brand-section h1 span {
        display: none;
    }

    .glass-container {
        padding-inline: 12px;
    }

    .login-logo {
        width: 82px;
        height: 82px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .console-sidebar,
    .searchable-select-menu,
    .admin-profile-menu {
        transition: none;
        animation: none;
    }
}

/* --- Theme presets ------------------------------------------------------- */
body[data-theme="violet"] {
    --theme-page: #030206;
    --theme-panel: rgba(10, 7, 18, 0.97);
    --theme-panel-soft: rgba(15, 10, 28, 0.92);
    --theme-accent: #c4b5fd;
    --theme-accent-2: #f0abfc;
    --theme-accent-3: #fb7185;
    --console-cyan: var(--theme-accent);
    --console-lime: var(--theme-accent-2);
    --console-amber: var(--theme-accent-3);
    --console-line: rgba(196, 181, 253, 0.2);
    --theme-button-bg: rgba(196, 181, 253, 0.08);
    --theme-button-bg-hover: rgba(196, 181, 253, 0.14);
    --accent-purple: #a78bfa;
    --accent-indigo: #818cf8;
    --accent-gradient: linear-gradient(135deg, #a78bfa, #f0abfc);
    background-color: var(--theme-page);
    background-image:
        linear-gradient(rgba(196, 181, 253, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(196, 181, 253, 0.035) 1px, transparent 1px),
        linear-gradient(135deg, #030206 0%, #0c0818 52%, #080511 100%);
}

body[data-theme="mint"] {
    --theme-page: #010404;
    --theme-panel: rgba(4, 13, 12, 0.97);
    --theme-panel-soft: rgba(6, 20, 18, 0.92);
    --theme-accent: #5eead4;
    --theme-accent-2: #bef264;
    --theme-accent-3: #fdba74;
    --console-cyan: var(--theme-accent);
    --console-lime: var(--theme-accent-2);
    --console-amber: var(--theme-accent-3);
    --console-line: rgba(94, 234, 212, 0.2);
    --theme-button-bg: rgba(94, 234, 212, 0.08);
    --theme-button-bg-hover: rgba(94, 234, 212, 0.14);
    --accent-purple: #14b8a6;
    --accent-indigo: #0ea5e9;
    --accent-gradient: linear-gradient(135deg, #2dd4bf, #bef264);
    background-color: var(--theme-page);
    background-image:
        linear-gradient(rgba(94, 234, 212, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(94, 234, 212, 0.035) 1px, transparent 1px),
        linear-gradient(135deg, #010404 0%, #051413 52%, #030e0c 100%);
}

body[data-theme="violet"] .dashboard-layout,
body[data-theme="mint"] .dashboard-layout {
    background: linear-gradient(145deg, var(--theme-panel), rgba(5, 10, 17, 0.94));
    border-color: var(--console-line);
}

body[data-theme="violet"] .console-sidebar,
body[data-theme="mint"] .console-sidebar,
body[data-theme="violet"] .form-panel,
body[data-theme="mint"] .form-panel,
body[data-theme="violet"] .list-panel,
body[data-theme="mint"] .list-panel,
body[data-theme="violet"] .messages-sidebar,
body[data-theme="mint"] .messages-sidebar,
body[data-theme="violet"] .messages-editor-panel,
body[data-theme="mint"] .messages-editor-panel {
    background: linear-gradient(145deg, var(--theme-panel-soft), rgba(5, 12, 18, 0.9));
    border-color: var(--console-line);
}

body[data-theme="violet"] .sidebar-btn.active {
    background: linear-gradient(90deg, rgba(196, 181, 253, 0.18), rgba(240, 171, 252, 0.08), transparent) !important;
    border-color: var(--console-line) !important;
    border-left-color: var(--console-lime) !important;
}

body[data-theme="mint"] .sidebar-btn.active {
    background: linear-gradient(90deg, rgba(94, 234, 212, 0.18), rgba(190, 242, 100, 0.08), transparent) !important;
    border-color: var(--console-line) !important;
    border-left-color: var(--console-lime) !important;
}

body[data-theme="violet"] .btn-primary,
body[data-theme="mint"] .btn-primary,
body[data-theme="violet"] .brand-section h1 span,
body[data-theme="mint"] .brand-section h1 span {
    background: linear-gradient(135deg, var(--console-cyan), var(--console-lime), var(--console-amber)) !important;
}

body[data-theme="violet"] .stock-table th,
body[data-theme="mint"] .stock-table th {
    background: var(--theme-panel);
    border-bottom-color: var(--console-line);
}

.overview-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
    margin-bottom: -4px;
}

.overview-toolbar-copy {
    min-width: 0;
}

.overview-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--console-cyan);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.overview-toolbar h2 {
    color: #f1fbff;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    line-height: 1.1;
}

.overview-toolbar p {
    margin-top: 5px;
    color: #7895a3;
    font-size: 0.82rem;
}

.theme-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    flex: 0 0 auto;
    padding: 0 13px;
    border: 1px solid var(--console-line);
    border-radius: 10px;
    background: var(--theme-button-bg, rgba(103, 232, 249, 0.08));
    color: #dff7fb;
    cursor: pointer;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 750;
    transition: var(--transition-smooth);
}

.theme-toggle-button:hover {
    transform: translateY(-1px);
    border-color: var(--console-cyan);
    background: var(--theme-button-bg-hover, rgba(103, 232, 249, 0.14));
    color: #ffffff;
}

.theme-toggle-button:active {
    transform: translateY(0);
}

.theme-toggle-button i {
    color: var(--console-amber);
}

@media (max-width: 480px) {
    .overview-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .theme-toggle-button {
        align-self: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .theme-toggle-button {
        transition: none;
    }
}

/* --- Phone-first inventory and utility layouts ------------------------- */
@media (max-width: 600px) {
    .guide-grid,
    .command-guide-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 10px !important;
    }

    .guide-grid > *,
    .command-guide-grid > * {
        min-width: 0;
        max-width: 100%;
    }

    .guide-grid pre,
    .command-guide-grid pre {
        max-width: 100%;
        overflow-wrap: anywhere;
        white-space: pre-wrap;
    }

    .product-field-options {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .product-field-options label {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .totp-actions,
    .whatsapp-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px !important;
    }

    .totp-actions button,
    .whatsapp-actions button {
        width: 100%;
        min-width: 0;
    }

    .stock-filter-tabs {
        width: 100%;
        margin-right: 0;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .stock-filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .stock-brand-filter,
    .stock-search-control {
        width: 100%;
        max-width: none !important;
        min-width: 0 !important;
        flex: 1 1 100%;
    }

    .stock-brand-filter label {
        flex: 0 0 auto;
    }

    .stock-brand-filter .select-input {
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
    }

    .stock-search-control > div {
        width: 100% !important;
    }

    .stock-search-control .form-input {
        min-height: 42px;
    }

    /* Turn the main inventory table into readable, tappable cards. */
    #stock-table {
        display: block;
        width: 100%;
        min-width: 0;
    }

    #stock-table thead {
        display: none;
    }

    #stock-table tbody {
        display: grid;
        gap: 8px;
    }

    #stock-table tbody tr {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
        padding: 8px 12px;
        border: 1px solid var(--console-line);
        border-radius: 11px;
        background: rgba(4, 10, 17, 0.72);
    }

    #stock-table tbody tr:hover {
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    }

    #stock-table tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        min-width: 0;
        padding: 5px 0;
        border-bottom: 1px dashed rgba(125, 211, 252, 0.08);
        word-break: break-word;
        overflow-wrap: break-word;
        font-size: 0.8rem;
    }

    #stock-table tbody td::before {
        color: #7895a3;
        content: '';
        font-size: 0.65rem;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        flex-shrink: 0;
    }

    #stock-table tbody td:nth-child(1)::before { content: 'Service'; }
    #stock-table tbody td:nth-child(2)::before { content: 'Account'; }
    #stock-table tbody td:nth-child(3)::before { content: 'Credentials'; }
    #stock-table tbody td:nth-child(4)::before { content: 'Status'; }
    #stock-table tbody td:nth-child(5)::before { content: 'Sold'; }
    #stock-table tbody td:nth-child(6)::before { content: 'Remaining'; }
    #stock-table tbody td:nth-child(7)::before { content: 'Actions'; }

    #stock-table tbody td:last-child {
        border-bottom: 0;
        padding-bottom: 2px;
        justify-content: flex-start;
        flex-direction: column;
        align-items: flex-start;
    }

    #stock-table .credentials-stack {
        min-width: 0;
        text-align: right;
    }

    #stock-table .actions-cell {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 2px;
    }

    #stock-table .actions-cell .btn-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    /* Keep the compact overview activity feed readable without a wide scroll. */
    .recent-orders-panel .table-wrapper {
        overflow: visible;
    }

    .recent-orders-panel .stock-table {
        display: block;
        min-width: 0;
    }

    .recent-orders-panel .stock-table thead {
        display: none;
    }

    .recent-orders-panel .stock-table tbody {
        display: grid;
        gap: 10px;
    }

    .recent-orders-panel .stock-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        padding: 10px 12px;
        border: 1px solid rgba(125, 211, 252, 0.12);
        border-radius: 12px;
        background: rgba(4, 10, 17, 0.42);
    }

    .recent-orders-panel .stock-table tbody td {
        display: grid;
        grid-template-columns: 74px minmax(0, 1fr);
        gap: 8px;
        min-width: 0;
        padding: 7px 0;
        border-bottom: 1px solid rgba(125, 211, 252, 0.08);
        overflow-wrap: anywhere;
    }

    .recent-orders-panel .stock-table tbody td::before {
        color: #7895a3;
        content: '';
        font-size: 0.66rem;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .recent-orders-panel .stock-table tbody td:nth-child(1)::before { content: 'Service'; }
    .recent-orders-panel .stock-table tbody td:nth-child(2)::before { content: 'Email'; }
    .recent-orders-panel .stock-table tbody td:nth-child(3)::before { content: 'Customer'; }
    .recent-orders-panel .stock-table tbody td:nth-child(4)::before { content: 'Price'; }
    .recent-orders-panel .stock-table tbody td:nth-child(5)::before { content: 'Sold at'; }

    .recent-orders-panel .stock-table tbody td:last-child {
        border-bottom: 0;
    }

    .modal-content {
        max-height: calc(100vh - 20px);
        overflow-y: auto;
        padding: 18px !important;
    }

    .modal-header {
        gap: 10px;
    }

    .modal-header h2 {
        min-width: 0;
        overflow-wrap: anywhere;
        font-size: 1.08rem;
    }

    .messages-sidebar {
        height: 210px;
    }

    .messages-editor-panel {
        min-height: 300px;
        padding: 16px;
    }

    .panel-header {
        padding: 16px;
    }

    .panel-header h2 {
        font-size: 1.15rem;
        line-height: 1.25;
    }

    .panel-header p {
        font-size: 0.8rem;
        line-height: 1.45;
    }
}


/* --- Light and Dark Mode Presets ----------------------------------------- */
body[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.82);
    --bg-card-hover: rgba(255, 255, 255, 0.96);
    --bg-input: #ffffff;
    --border-color: rgba(15, 23, 42, 0.08);
    --border-color-active: rgba(147, 51, 234, 0.6);
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --console-cyan: #3b82f6;
    --console-lime: #10b981;
    --console-amber: #f59e0b;
    --console-line: rgba(15, 23, 42, 0.08);
    --theme-button-bg: rgba(15, 23, 42, 0.05);
    --theme-button-bg-hover: rgba(15, 23, 42, 0.1);
    --accent-purple: #7c3aed;
    --accent-indigo: #4f46e5;
    --accent-gradient: linear-gradient(135deg, #7c3aed, #4f46e5);
    
    background-color: var(--bg-main);
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.02) 1px, transparent 1px),
        radial-gradient(circle at 5% 5%, rgba(124, 58, 237, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 95% 95%, rgba(79, 70, 229, 0.05) 0%, transparent 45%) !important;
    color: var(--text-primary);
}

body[data-theme="light"] .dashboard-layout,
body[data-theme="light"] .console-sidebar,
body[data-theme="light"] .form-panel,
body[data-theme="light"] .list-panel,
body[data-theme="light"] .messages-sidebar,
body[data-theme="light"] .messages-editor-panel,
body[data-theme="light"] .stat-card,
body[data-theme="light"] .sales-card,
body[data-theme="light"] .recent-orders-panel {
    background: rgba(255, 255, 255, 0.88) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05) !important;
}

body[data-theme="light"] .stock-table th {
    background: rgba(15, 23, 42, 0.04) !important;
    color: #0f172a !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

body[data-theme="light"] .stock-table td {
    border-bottom: 1px solid rgba(15, 23, 42, 0.05) !important;
    color: #334155 !important;
}

body[data-theme="light"] .sidebar-btn {
    color: #475569 !important;
}

body[data-theme="light"] .sidebar-btn:hover {
    color: #7c3aed !important;
    background: rgba(124, 58, 237, 0.08) !important;
}

body[data-theme="light"] .sidebar-btn.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #7c3aed, #4f46e5) !important;
}

body[data-theme="light"] .form-input,
body[data-theme="light"] .form-select,
body[data-theme="light"] .form-textarea {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #0f172a !important;
}

body[data-theme="light"] .form-input:focus,
body[data-theme="light"] .form-select:focus,
body[data-theme="light"] .form-textarea:focus {
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15) !important;
}

body[data-theme="light"] .brand-section h1 {
    color: #0f172a !important;
}

body[data-theme="light"] .brand-section h1 span {
    color: #7c3aed !important;
}

body[data-theme="light"] .header-context strong {
    color: #0f172a !important;
}

body[data-theme="light"] .icon-button,
body[data-theme="light"] .header-action-button,
body[data-theme="light"] .admin-profile-button {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #475569 !important;
}

body[data-theme="light"] .icon-button:hover,
body[data-theme="light"] .header-action-button:hover,
body[data-theme="light"] .admin-profile-button:hover {
    background: rgba(124, 58, 237, 0.06) !important;
    color: #7c3aed !important;
    border-color: rgba(124, 58, 237, 0.3) !important;
}

body[data-theme="light"] .mobile-nav-backdrop {
    background: rgba(15, 23, 42, 0.4) !important;
}

/* --- Pure Dark Theme preset --- */
body[data-theme="dark"] {
    --bg-main: #000000;
    --bg-card: rgba(6, 6, 6, 0.98);
    --bg-card-hover: rgba(12, 12, 12, 0.99);
    --bg-input: #050505;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-color-active: rgba(232, 121, 249, 0.5);
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --text-muted: #737373;
    --console-cyan: #e879f9;
    --console-lime: #a3e635;
    --console-amber: #fb923c;
    --console-line: rgba(255, 255, 255, 0.06);
    --theme-button-bg: rgba(255, 255, 255, 0.04);
    --theme-button-bg-hover: rgba(255, 255, 255, 0.08);
    --accent-purple: #d946ef;
    --accent-indigo: #6366f1;
    --accent-gradient: linear-gradient(135deg, #d946ef, #6366f1);
    
    background-color: var(--bg-main);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.008) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.008) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(15, 10, 20, 1) 0%, #000000 100%) !important;
    color: var(--text-primary);
}

body[data-theme="dark"] .dashboard-layout,
body[data-theme="dark"] .console-sidebar,
body[data-theme="dark"] .form-panel,
body[data-theme="dark"] .list-panel,
body[data-theme="dark"] .messages-sidebar,
body[data-theme="dark"] .messages-editor-panel,
body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .sales-card,
body[data-theme="dark"] .recent-orders-panel {
    background: rgba(6, 6, 6, 0.98) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.95) !important;
}

body[data-theme="dark"] .stock-table th {
    background: rgba(12, 12, 12, 0.98) !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body[data-theme="dark"] .stock-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    color: #d4d4d4 !important;
}

body[data-theme="dark"] .sidebar-btn {
    color: #a3a3a3 !important;
}

body[data-theme="dark"] .sidebar-btn:hover {
    color: #e879f9 !important;
    background: rgba(232, 121, 249, 0.08) !important;
}

body[data-theme="dark"] .sidebar-btn.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #d946ef, #6366f1) !important;
}

body[data-theme="dark"] .form-input,
body[data-theme="dark"] .form-select,
body[data-theme="dark"] .form-textarea {
    background: #080808 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

body[data-theme="dark"] .form-input:focus,
body[data-theme="dark"] .form-select:focus,
body[data-theme="dark"] .form-textarea:focus {
    border-color: #d946ef !important;
    box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.15) !important;
}

body[data-theme="dark"] .icon-button,
body[data-theme="dark"] .header-action-button,
body[data-theme="dark"] .admin-profile-button {
    background: #080808 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #a3a3a3 !important;
}

body[data-theme="dark"] .icon-button:hover,
body[data-theme="dark"] .header-action-button:hover,
body[data-theme="dark"] .admin-profile-button:hover {
    background: rgba(217, 70, 239, 0.06) !important;
    color: #e879f9 !important;
    border-color: rgba(217, 70, 239, 0.3) !important;
}

body[data-theme="dark"] .mobile-nav-backdrop {
    background: rgba(0, 0, 0, 0.85) !important;
}

@media (max-width: 820px) {
    .sales-card.sensitive-sales-card {
        padding-right: 46px !important;
    }
}

@media (max-width: 480px) {
    .sales-card.sensitive-sales-card {
        padding-right: 42px !important;
    }
}

/* --- Final header refinement ------------------------------------------- */
.dash-header {
    position: relative;
    min-height: 76px;
    padding: 2px 2px 4px;
}

.header-brand-block {
    gap: 14px;
}

.brand-section h1 {
    letter-spacing: -0.025em;
    line-height: 1.08;
}

.header-context {
    padding-inline: 10px;
    border-left: 1px solid rgba(125, 211, 252, 0.12);
}

.header-actions {
    gap: 10px;
}

.header-action-button,
.admin-profile-button,
.icon-button {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

@media (max-width: 600px) {
    .dash-header {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "brand"
            "context"
            "actions";
        align-items: stretch;
        gap: 12px;
        min-height: 0;
        padding: 0;
    }

    .header-brand-block {
        grid-area: brand;
        width: 100%;
        gap: 9px;
    }

    .header-context {
        grid-area: context;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-width: 0;
        padding: 10px 0 0;
        border-top: 1px solid rgba(125, 211, 252, 0.12);
        border-left: 0;
    }

    .header-context-label {
        font-size: 0.62rem;
    }

    .header-context strong {
        min-width: 0;
        max-width: 68%;
        overflow: hidden;
        color: #e9fbff;
        font-size: 0.82rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header-actions {
        grid-area: actions;
        justify-content: flex-end;
        width: 100%;
        padding-top: 2px;
    }

    .brand-section {
        min-width: 0;
    }

    .brand-section h1 {
        max-width: 100%;
        overflow: hidden;
        font-size: clamp(1rem, 5.6vw, 1.35rem);
        line-height: 1.1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .brand-section h1 span {
        margin-left: 5px;
        font-size: 0.72em;
    }

    .brand-kicker {
        margin-bottom: 5px;
        font-size: 0.61rem;
    }

    .header-action-button,
    .icon-button,
    .admin-profile-button,
    .mobile-nav-toggle {
        width: 42px;
        min-width: 42px;
        height: 42px;
        min-height: 42px;
    }
}

@media (max-width: 360px) {
    .dash-header {
        gap: 10px;
    }

    .brand-section h1 {
        font-size: 0.98rem;
    }

    .brand-section h1 span {
        margin-left: 3px;
        font-size: 0.68em;
    }

    .header-action-button,
    .icon-button,
    .admin-profile-button,
    .mobile-nav-toggle {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .header-action-button,
    .admin-profile-button,
    .icon-button {
        transition: none;
    }
}
/* Guidance and analytics states */
.guidance-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 132px;
}

.guidance-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.guidance-badge-configured {
    border-color: rgba(56, 189, 248, 0.24);
    background: rgba(14, 165, 233, 0.12);
    color: #7dd3fc;
}

.guidance-badge-missing {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-secondary);
}

.analytics-chart-frame {
    position: relative;
    display: flex;
    width: 100%;
    height: 260px;
    min-width: 0;
    align-items: center;
    justify-content: center;
}

.analytics-chart-frame canvas {
    max-width: 100%;
}

.chart-state {
    display: grid;
    position: absolute;
    inset: 0;
    place-items: center;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.5;
    text-align: center;
}

.chart-state-error {
    color: #fca5a5;
}

@media (max-width: 600px) {
    .analytics-chart-frame {
        height: 230px;
    }

    .guidance-badges {
        min-width: 0;
    }
}
/* Responsive containment for dense console sections */
@media (max-width: 820px) {
    #section-services .main-grid,
    #section-guides .main-grid,
    #section-stock .main-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    #buying-guides-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .overview-toolbar,
    .iptv-credit-summary,
    .filter-controls,
    .product-field-options {
        min-width: 0;
        max-width: 100%;
    }

    .modal-content {
        max-height: calc(100dvh - 24px);
        overflow: auto;
    }

    .buying-guide-card,
    .buying-guide-content {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

@media (max-width: 350px) {
    .stats-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}
@media (max-width: 576px) {
    .toast-container {
        top: max(12px, env(safe-area-inset-top));
        right: 12px;
        bottom: auto;
        left: 12px;
        pointer-events: none;
    }

    .toast {
        pointer-events: auto;
    }
}
@media (max-width: 480px) {
    .sales-banner {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .sales-banner .sales-card {
        min-height: 82px;
    }

    .sales-banner .sales-value {
        white-space: nowrap;
    }
}

/* ─── MINIMAL & BRILLIANT CLEAN HEADER ─── */
.dash-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 20px !important;
    background: rgba(18, 18, 26, 0.75) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    margin-bottom: 20px !important;
    gap: 16px !important;
    flex-direction: row !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.header-left-cluster {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.header-brand-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-brand-block .brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.header-brand-block h1 {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.header-brand-block .brand-kicker {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.header-context {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
}

.header-context-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.header-context strong {
    color: #60a5fa;
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.bot-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .dash-header {
        padding: 10px 14px !important;
        gap: 10px !important;
    }
    .header-left-cluster {
        gap: 10px;
    }
    .header-brand-block .brand-kicker {
        display: none;
    }
    .header-brand-block h1 {
        font-size: 0.95rem;
    }
    .header-context {
        padding: 2px 8px;
        font-size: 0.78rem;
    }
}

/* ─── MODERN REDESIGN OVERHAUL & ORDERS PAGE STYLES ────────────────────── */

/* Sidebar Grouping & Search */
.sidebar-group-title {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin: 16px 12px 6px 12px;
    display: block;
}

.sidebar-search-wrapper {
    padding: 0 10px 10px 10px;
    position: relative;
}

.sidebar-search-input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.8rem;
    outline: none;
    transition: var(--transition-smooth);
}

.sidebar-search-input:focus {
    border-color: var(--accent-purple);
    background: rgba(0, 0, 0, 0.5);
}

.sidebar-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.75rem;
    pointer-events: none;
}

.sidebar-user-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-user-info {
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.sidebar-user-role {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Filter Pills Strip */
.filter-pills-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-pill-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-pill-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.filter-pill-btn.active {
    background: var(--accent-gradient);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

/* Console Layout Grid with Optional Right Panel */
.console-grid-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
}

@media (max-width: 1200px) {
    .console-grid-layout {
        grid-template-columns: 1fr;
    }
}

/* Right Side Contextual Summary Panel */
.console-right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.summary-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
}

.summary-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.summary-card-title {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.donut-gauge-box {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 10px auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut-center-info {
    position: absolute;
    text-align: center;
}

.donut-center-val {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-primary);
}

.donut-center-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.top-seller-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.top-seller-item:last-child {
    border-bottom: none;
}

.top-seller-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-seller-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.top-seller-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.top-seller-sales {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--color-success);
}

/* Floating Batch Action Bar */
.floating-batch-bar {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 30px;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 20px rgba(168, 85, 247, 0.2);
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.floating-batch-bar.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.batch-count-badge {
    background: var(--accent-gradient);
    color: white;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 12px;
}

.batch-action-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 6px;
}

.batch-action-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.batch-action-btn.danger {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.batch-action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.4);
}

/* Quick Order Detail Drawer / Popover Overlay */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    display: none;
    transition: opacity 0.3s ease;
}

.drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
    display: block;
}

.order-detail-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background: #0f172a;
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.drawer-backdrop.active .order-detail-drawer {
    transform: translateX(0);
}

.drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
}

.drawer-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.drawer-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.drawer-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.drawer-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.drawer-section-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
}

.drawer-section-title {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.drawer-customer-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.drawer-customer-detail {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.drawer-footer {
    padding: 18px 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Order Row Interactive Click */
.order-row-clickable {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.order-row-clickable:hover {
    background-color: rgba(168, 85, 247, 0.08) !important;
}

/* ─── LIGHT MODE OVERRIDES FOR NEW COMPONENTS ──────────────────────────── */
body[data-theme="light"] .summary-card,
body[data-theme="light"] .drawer-section-card {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04) !important;
}

body[data-theme="light"] .summary-card-title,
body[data-theme="light"] .drawer-title,
body[data-theme="light"] .drawer-customer-name,
body[data-theme="light"] .top-seller-name {
    color: #0f172a !important;
}

body[data-theme="light"] .filter-pill-btn {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #334155 !important;
}

body[data-theme="light"] .filter-pill-btn:hover {
    background: rgba(124, 58, 237, 0.08) !important;
    color: #7c3aed !important;
}

body[data-theme="light"] .filter-pill-btn.active {
    background: linear-gradient(135deg, #7c3aed, #4f46e5) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

body[data-theme="light"] .order-detail-drawer {
    background: #ffffff !important;
    border-left-color: rgba(15, 23, 42, 0.12) !important;
}

body[data-theme="light"] .drawer-header,
body[data-theme="light"] .drawer-footer {
    background: #f8fafc !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

body[data-theme="light"] .sidebar-search-input {
    background: rgba(15, 23, 42, 0.04) !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #0f172a !important;
}

body[data-theme="light"] .sidebar-search-input:focus {
    background: #ffffff !important;
    border-color: #7c3aed !important;
}

body[data-theme="light"] .sidebar-group-title {
    color: #64748b !important;
}

body[data-theme="light"] .sidebar-user-footer {
    border-top-color: rgba(15, 23, 42, 0.1) !important;
}

body[data-theme="light"] .sidebar-user-name {
    color: #0f172a !important;
}

/* ─── FULL MOBILE RESPONSIVENESS OVERHAUL ───────────────────────────────── */
@media (max-width: 1024px) {
    .console-grid-layout {
        grid-template-columns: 1fr !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

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

@media (max-width: 768px) {
    #app {
        padding: 10px !important;
    }

    .glass-container {
        padding: 16px !important;
        border-radius: 16px !important;
    }

    .sales-banner {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

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

    .filter-pills-strip {
        gap: 6px !important;
    }

    .filter-pill-btn {
        padding: 5px 10px !important;
        font-size: 0.76rem !important;
    }

    .floating-batch-bar {
        width: 94vw !important;
        padding: 8px 14px !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        border-radius: 20px !important;
    }

    .order-detail-drawer {
        max-width: 100vw !important;
    }

    .table-container,
    .table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .stock-table th,
    .stock-table td,
    .data-table th,
    .data-table td {
        padding: 8px 10px !important;
        font-size: 0.78rem !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 480px) {
    .sales-banner {
        grid-template-columns: 1fr !important;
    }

    .header-actions {
        gap: 6px !important;
    }

    .header-action-button span {
        display: none !important;
    }
}

/* Ensure modal content fits viewport under all conditions */
.modal-content,
#sales-modal .modal-content {
    width: min(calc(100vw - 24px), 850px) !important;
    max-width: min(calc(100vw - 24px), 850px) !important;
    box-sizing: border-box !important;
    margin: auto !important;
}

/* ─── SELLZY SLEEK USER DIRECTORY & AVATAR BADGES ────────────────────────── */
.user-avatar-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--console-cyan, #67e8f9), var(--accent-purple, #8b5cf6));
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(103, 232, 249, 0.25);
    flex-shrink: 0;
}

.user-identity-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-identity-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-identity-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.88rem;
}

.user-identity-email {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-family: var(--font-mono, monospace);
}

.stats-grid-sleek {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .stats-grid-sleek {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Unified console theme. Existing component selectors retain their behavior. */
/* Report controls and stock use the same neutral workspace surfaces. */
body.console-refresh {
    --bg-main: #f5f5f7;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #637381;
    --border-color: rgba(145, 158, 171, 0.24);
    --accent-purple: #35353b;
    --accent-indigo: #44444c;
    --accent-cyan: #35353b;
    --accent-color: #35353b;
    --console-cyan: #35353b;
    --accent-amber: #b78103;
    --color-success: #35353b;
    --color-warning: #b78103;
    --color-danger: #cb0233;
    --font-main: 'Public Sans', sans-serif;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --shadow-card: none;
    --shadow-glow: none;
    --console-sidebar-width: 280px;
    background: var(--bg-main) !important;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
}
body.console-refresh[data-theme="dark"] {
    --bg-main: #1a1a1f;
    --bg-surface: #242429;
    --bg-card: #242429;
    --bg-input: #2d2d34;
    --text-primary: #f4f4f5;
    --text-secondary: #d0d0d6;
    --text-muted: #a1a1aa;
    --border-color: #3f3f46;
    --accent-purple: #d1d1d7;
    --accent-indigo: #d1d1d7;
    --accent-cyan: #d1d1d7;
    --color-success: #d1d1d7;
    --color-warning: #ffe16a;
}
body.console-refresh *, body.console-refresh *::before, body.console-refresh *::after {
    letter-spacing: 0 !important;
}
body.console-refresh #app { padding: 0 !important; display: block; max-width: none; }
body.console-refresh #dashboard-view {
    padding: 0 !important; margin: 0; width: 100%; max-width: none;
    border: 0; border-radius: 0 !important; box-shadow: none !important;
    background: var(--bg-main) !important; backdrop-filter: none; overflow: visible;
}
body.console-refresh .dashboard-layout::before,
body.console-refresh .dashboard-layout::after,
body.console-refresh .stat-card::before,
body.console-refresh .sales-card::before,
body.console-refresh .btn-ripple { display: none !important; }
body.console-refresh .dash-header {
    position: sticky; top: 0; z-index: 40; min-height: 76px;
    margin: 0 0 0 var(--console-sidebar-width); padding: 14px 32px;
    display: flex; flex-wrap: nowrap; gap: 24px; align-items: center;
    border: 0; border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface) !important; border-radius: 0 !important; box-shadow: none;
    width: calc(100% - var(--console-sidebar-width)) !important;
    padding: 14px 32px !important; margin-bottom: 0 !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    border: 0 !important; border-bottom: 1px solid var(--border-color) !important;
}
body.console-refresh .header-brand-block { display: none; }
body.console-refresh .header-left-cluster { min-width: 0; gap: 14px; flex: 0 1 auto; }
body.console-refresh .header-breadcrumb { display: flex; border: 0; padding: 0; white-space: nowrap; }
body.console-refresh .breadcrumb-active { color: var(--text-primary); font-size: 14px; }
body.console-refresh .breadcrumb-item { color: var(--text-muted); font-size: 13px; }
body.console-refresh .header-center-cluster { flex: 1; min-width: 0; max-width: 330px; margin-left: auto; }
body.console-refresh .header-search-bar {
    border: 0; background: transparent; padding: 8px 0; box-shadow: none;
    color: var(--text-muted); min-width: 0; width: 100%; border-radius: 6px;
}
body.console-refresh .search-kbd { display: none; }
body.console-refresh .header-actions { gap: 10px; margin-left: auto; flex-wrap: nowrap; width: auto; }
body.console-refresh .admin-profile-button { border: 0 !important; background: transparent !important; box-shadow: none; padding: 0; gap: 10px; }
body.console-refresh .admin-avatar, body.console-refresh .user-avatar-badge {
    background: #e9e9ef !important; color: #44444c; box-shadow: none;
}
body.console-refresh .admin-profile-copy { display: flex; }
body.console-refresh .admin-profile-copy strong { font-size: 13px; font-weight: 600; }
body.console-refresh .bot-toggle-wrapper { background: transparent; border: 0; padding: 0; }
body.console-refresh .bot-toggle-info strong { font-size: 12px; }
body.console-refresh .switch { width: 32px; height: 18px; }
body.console-refresh .slider:before { width: 12px; height: 12px; bottom: 3px; left: 3px; }
body.console-refresh input:checked + .slider { background: #35353b; }
body.console-refresh input:checked + .slider:before { transform: translateX(14px); }
body.console-refresh .console-body { display: block; margin: 0; gap: 0; }
body.console-refresh .console-sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 50;
    width: var(--console-sidebar-width); height: 100dvh; max-height: none;
    padding: 0 16px 16px; margin: 0; border: 0; border-radius: 0;
    background: #242429 !important; box-shadow: none !important;
    display: flex; flex-direction: column; gap: 0; overflow: auto;
    color: #ffffff; transform: none; visibility: visible;
}
body.console-refresh .sidebar-brand {
    display: flex; gap: 10px; align-items: center; min-height: 76px;
    padding: 12px 2px; flex-shrink: 0; border-bottom: 1px solid #ffffff20;
}
body.console-refresh .sidebar-brand img { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
body.console-refresh .sidebar-brand strong { font: 700 17px 'DM Sans', sans-serif; color: #ffffff; white-space: nowrap; }
body.console-refresh .sidebar-brand span { display: block; color: #b5b5bf; margin-top: 4px; font-size: 11px; }
body.console-refresh .sidebar-heading { margin: 14px 0 8px; padding: 0 10px; }
body.console-refresh .sidebar-heading-kicker { color: #b5b5bf; font-size: 11px; font-weight: 500; }
body.console-refresh .sidebar-collapse-toggle { color: #d4d4dc !important; background: transparent !important; border: 0 !important; width: 28px; height: 28px; min-height: 28px; }
body.console-refresh .sidebar-search-wrapper { margin: 0 0 14px; }
body.console-refresh .sidebar-search-input {
    background: #ffffff09 !important; border-color: #ffffff26 !important;
    color: #ffffff !important; height: 36px; border-radius: 6px;
}
body.console-refresh .sidebar-search-input::placeholder { color: #b5b5bf; }
body.console-refresh .sidebar-search-icon { color: #b5b5bf; }
body.console-refresh .sidebar-group-title {
    color: #ffe16a !important; margin: 22px 12px 10px; font-size: 10px; font-weight: 600;
}
body.console-refresh .sidebar-btn {
    border: 0 !important; margin: 3px 0; padding: 10px 14px;
    min-height: 40px; width: 100%; display: flex; align-items: center;
    text-align: left; gap: 12px; border-radius: 6px; background: transparent !important;
    color: #e6e6eb !important; box-shadow: none !important; font-size: 13px; font-weight: 500;
}
body.console-refresh .sidebar-btn i { color: inherit !important; font-size: 16px; width: 20px; text-align: center; }
body.console-refresh .sidebar-btn.active { background: #44444c !important; color: #ffffff !important; }
body.console-refresh .sidebar-btn:hover { background: #ffffff0c !important; transform: none; }
body.console-refresh .sidebar-btn.active::after { display: none; }
body.console-refresh .sidebar-user-footer { margin-top: 24px; border-color: #ffffff20 !important; padding: 18px 10px 0; }
body.console-refresh .sidebar-user-name { color: #ffffff !important; }
body.console-refresh .sidebar-user-role { color: #b5b5bf; }
body.console-refresh .console-content { margin-left: var(--console-sidebar-width); padding: 28px 32px 48px; width: auto; }
body.console-refresh .console-panel { min-width: 0; gap: 24px; }
body.console-refresh .overview-toolbar { margin-bottom: 24px; gap: 16px; align-items: center; justify-content: space-between; }
body.console-refresh .overview-toolbar .btn-primary { width: auto; flex-shrink: 0; }
body.console-refresh .overview-toolbar-copy h2 { font: 700 24px/1.3 'DM Sans', sans-serif; color: var(--text-primary); margin: 0; }
body.console-refresh .overview-eyebrow, body.console-refresh .overview-toolbar-copy > p { display: none; }
body.console-refresh h1, body.console-refresh h2, body.console-refresh h3 { font-family: 'DM Sans', sans-serif; }
body.console-refresh .form-panel h2, body.console-refresh .list-panel h2 { font-size: 18px; font-weight: 700; color: var(--text-primary); background: none; -webkit-text-fill-color: var(--text-primary); }
body.console-refresh .sales-banner { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
body.console-refresh .sales-card {
    padding: 20px !important; min-height: 138px; gap: 12px; align-items: flex-start;
    flex-direction: column; border: 0 !important; border-radius: 8px;
    background: #e5e5ec !important; color: #212529; box-shadow: none !important;
    transform: none !important; overflow: hidden;
}
body.console-refresh .sales-card:nth-child(2) { background: #fff3aa !important; }
body.console-refresh .sales-card:nth-child(3) { background: #ffd9bd !important; }
body.console-refresh .sales-card:nth-child(4) { background: #ffe6f5 !important; }
body.console-refresh .sales-card:nth-child(5) { background: #c7ddfa !important; }
body.console-refresh .sales-card .sales-icon { display: none; }
body.console-refresh .sales-info { width: 100%; min-width: 0; }
body.console-refresh .sales-label, body.console-refresh .sales-info h3 { color: #495057 !important; font-size: 12px; font-weight: 600; margin: 0 0 12px; }
body.console-refresh .sales-value, body.console-refresh .sales-info h2 { color: #212529 !important; font-size: 23px; font-weight: 700; line-height: 1.25; margin: 0; white-space: nowrap; }
body.console-refresh .sales-info p, body.console-refresh .sales-card small { color: #495057 !important; font-size: 11px; }
body.console-refresh .sales-privacy-toggle { background: #ffffff70 !important; color: #495057 !important; border: 0; width: 26px; height: 26px; min-width: 26px; }
body.console-refresh .sales-privacy-mask { color: #212529 !important; }
body.console-refresh .iptv-credit-summary {
    background: transparent; border: 0; border-bottom: 1px solid var(--border-color);
    box-shadow: none; border-radius: 0; margin: 0 0 24px; padding: 0 0 20px;
}
body.console-refresh .iptv-credit-icon { background: #e9e9ef; color: #44444c; border-radius: 6px; }
body.console-refresh .iptv-credit-copy p, body.console-refresh .iptv-credit-eyebrow { display: none; }
body.console-refresh .iptv-credit-copy h3 { font-size: 14px; }
body.console-refresh #iptv-credit-value { font-size: 18px; color: var(--text-primary); }
body.console-refresh .stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
body.console-refresh .stat-card {
    padding: 18px !important; min-height: 100px; background: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important; border-radius: 8px;
    box-shadow: none !important; transform: none !important; overflow: hidden;
}
body.console-refresh .stat-card:hover { border-color: #35353b !important; }
body.console-refresh .stat-card h3 { font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
body.console-refresh .stat-card h2, body.console-refresh .stat-value { font-size: 24px; color: var(--text-primary); }
body.console-refresh .stat-icon { box-shadow: none; width: 38px; height: 38px; border-radius: 8px; font-size: 18px; }
body.console-refresh .main-grid { gap: 24px !important; }
body.console-refresh .form-panel, body.console-refresh .list-panel,
body.console-refresh .recent-orders-panel, body.console-refresh .summary-card,
body.console-refresh .messages-sidebar, body.console-refresh .messages-editor-panel {
    background: var(--bg-surface) !important; border: 0 !important; border-radius: 0 !important;
    box-shadow: none !important; padding: 24px !important; min-width: 0;
}
body.console-refresh #section-overview .main-grid { grid-template-columns: 1fr !important; }
body.console-refresh .recent-orders-panel { padding: 0 !important; }
body.console-refresh .recent-orders-panel > div:first-child { padding: 20px 24px; margin: 0 !important; }
body.console-refresh .recent-orders-panel .table-wrapper { max-height: none !important; }
body.console-refresh #section-overview .summary-card { border-top: 1px solid var(--border-color) !important; }
body.console-refresh #section-orders .console-grid-layout { display: flex; flex-direction: column; gap: 24px; }
body.console-refresh #section-orders .list-panel { padding: 0 !important; }
body.console-refresh #section-orders .list-panel > div:first-child { padding: 22px 24px; margin: 0 !important; }
body.console-refresh #section-orders .console-right-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
body.console-refresh .filter-pills-strip { gap: 0; border-bottom: 1px solid var(--border-color); margin: 0; padding: 0; background: var(--bg-surface); overflow-x: auto; flex-wrap: nowrap; }
body.console-refresh .filter-pills-strip .filter-pill-btn, body.console-refresh .tab-btn {
    border: 0 !important; border-bottom: 2px solid transparent !important;
    border-radius: 0 !important; padding: 15px 20px; background: transparent !important;
    color: var(--text-secondary) !important; font-weight: 500; box-shadow: none;
}
body.console-refresh .filter-pills-strip .filter-pill-btn.active, body.console-refresh .tab-btn.active {
    border-bottom-color: #35353b !important; color: var(--accent-purple) !important;
}
body.console-refresh .filter-pills-strip .filter-pill-btn i { display: none; }
body.console-refresh .panel-tabs { border-bottom: 1px solid var(--border-color); padding: 0; background: transparent; border-radius: 0; gap: 0; }
body.console-refresh .table-wrapper, body.console-refresh .table-container {
    border: 0; border-radius: 0; background: transparent; box-shadow: none;
    width: 100%; max-width: 100%; overflow-x: auto; margin: 0;
}
body.console-refresh table.stock-table, body.console-refresh table.data-table {
    border-collapse: collapse; border-spacing: 0; width: 100%; margin: 0;
    background: var(--bg-surface); font-family: 'Public Sans', sans-serif;
    table-layout: auto;
}
body.console-refresh .stock-table th, body.console-refresh .data-table th {
    height: auto; padding: 12px !important; background: var(--bg-surface) !important;
    color: var(--text-primary) !important; font-size: 14px !important; font-weight: 600;
    text-align: left; text-transform: none; white-space: nowrap;
    border: 0 !important; border-bottom: 1px solid var(--border-color) !important;
    box-shadow: none; position: static;
}
body.console-refresh .stock-table td, body.console-refresh .data-table td {
    padding: 16px 12px !important; font-size: 14px !important; font-weight: 400;
    color: var(--text-secondary) !important; border: 0 !important;
    border-bottom: 1px solid var(--border-color) !important; vertical-align: middle;
    background: transparent !important; box-shadow: none !important;
}
body.console-refresh .stock-table th:first-child, body.console-refresh .stock-table td:first-child,
body.console-refresh .data-table th:first-child, body.console-refresh .data-table td:first-child { padding-left: 20px !important; }
body.console-refresh .stock-table th:last-child, body.console-refresh .stock-table td:last-child,
body.console-refresh .data-table th:last-child, body.console-refresh .data-table td:last-child { padding-right: 20px !important; }
body.console-refresh tbody tr { transform: none !important; animation: none !important; background: transparent !important; }
body.console-refresh tbody tr:hover { background: var(--bg-main) !important; }
body.console-refresh .stock-table tr:last-child td, body.console-refresh .data-table tr:last-child td { border-bottom: 0 !important; }
body.console-refresh .orders-ledger-table { min-width: 960px; }
body.console-refresh .orders-ledger-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: #35353b; cursor: pointer; }
body.console-refresh .order-reference, body.console-refresh .order-date, body.console-refresh .order-amount { white-space: nowrap; }
body.console-refresh .order-reference { font-weight: 500 !important; }
body.console-refresh .order-service { min-width: 145px; }
body.console-refresh .order-customer-name { color: var(--text-primary); font-weight: 500; font-size: 13px; }
body.console-refresh .order-customer-phone { margin-top: 4px; color: var(--text-muted); font-size: 11px; }
body.console-refresh .order-channel { font-size: 12px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
body.console-refresh .badge {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    padding: 3px 8px !important; min-height: 22px; line-height: 16px; border-radius: 20px;
    font-size: 12px !important; font-weight: 500 !important; box-shadow: none; border: 0 !important;
}
body.console-refresh .status-success, body.console-refresh .badge-available { background: #00ab5529 !important; color: #44444c !important; }
body.console-refresh .status-pending { background: #ffc10729 !important; color: #b78103 !important; }
body.console-refresh .status-danger, body.console-refresh .badge-sold { background: #ff484229 !important; color: #ae013c !important; }
body.console-refresh .table-pagination, body.console-refresh .stock-pagination {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    border-top: 1px solid var(--border-color); padding: 16px 24px; color: var(--text-muted); font-size: 12px;
}
body.console-refresh .stock-pagination[hidden] { display: none; }
body.console-refresh .table-pagination > div { display: flex; align-items: center; gap: 8px; }
body.console-refresh #orders-page-label { padding: 7px 12px; border-radius: 20px; background: #e9e9ef; color: #44444c; }
body.console-refresh button, body.console-refresh input, body.console-refresh select, body.console-refresh textarea { font-family: inherit; }
body.console-refresh button { transition: background-color .15s, color .15s; }
body.console-refresh button:hover { transform: none; }
body.console-refresh .btn-primary {
    background: #35353b !important; color: #ffffff !important; border: 1px solid #35353b;
    border-radius: 6px !important; box-shadow: none !important; padding: 10px 16px;
    font-size: 13px; font-weight: 600; min-height: 38px;
}
body.console-refresh .btn-primary:hover { background: #44444c !important; }
body.console-refresh .icon-button, body.console-refresh .btn-icon {
    background: transparent !important; border: 0 !important; color: var(--text-secondary) !important;
    width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 7px;
    border-radius: 6px; box-shadow: none !important; flex-shrink: 0;
}
body.console-refresh .icon-button:hover, body.console-refresh .btn-icon:hover { background: var(--bg-main) !important; color: var(--accent-purple) !important; }
body.console-refresh button:disabled { opacity: .4; cursor: not-allowed; }
body.console-refresh :focus-visible { outline: 2px solid #35353b; outline-offset: 3px; }
body.console-refresh .filter-pill-btn, body.console-refresh .stock-page-button {
    background: var(--bg-surface) !important; color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important; border-radius: 6px !important;
    box-shadow: none; font-weight: 500;
}
body.console-refresh .form-input, body.console-refresh .form-select, body.console-refresh .form-textarea,
body.console-refresh .select-input, body.console-refresh .searchable-select-control,
body.console-refresh input:not([type="checkbox"]):not([type="radio"]), body.console-refresh textarea, body.console-refresh select {
    background: var(--bg-input) !important; color: var(--text-primary) !important;
    border-color: var(--border-color) !important; border-radius: 6px !important;
    font-size: 13px; box-shadow: none !important; max-width: 100%;
}
body.console-refresh .form-group label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
body.console-refresh .form-group { margin-bottom: 18px; }
body.console-refresh .searchable-select-menu, body.console-refresh .admin-profile-menu {
    background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 8px;
    box-shadow: 0 12px 30px #161c241a;
}
body.console-refresh .form-panel { align-self: start; }
body.console-refresh .modal-content, body.console-refresh .order-detail-drawer {
    background: var(--bg-surface) !important; color: var(--text-primary); border-radius: 8px !important;
    box-shadow: 0 12px 60px #161c2433;
}
body.console-refresh .drawer-section-card { padding: 18px 0; border: 0; border-bottom: 1px solid var(--border-color); border-radius: 0; background: transparent !important; box-shadow: none !important; }
body.console-refresh .drawer-header, body.console-refresh .drawer-footer { background: var(--bg-surface) !important; border-color: var(--border-color); }
body.console-refresh .floating-batch-bar { background: #242429; border-radius: 8px; box-shadow: 0 8px 24px #161c2426; }
body.console-refresh .login-card { background: var(--bg-surface); max-width: 400px; margin: 12vh auto; padding: 32px; border-radius: 8px; border: 1px solid var(--border-color); box-shadow: none; }
body.console-refresh .login-header h1 { background: none; -webkit-text-fill-color: var(--text-primary); font-size: 22px; }
body.console-refresh .login-header p { font-size: 13px; }
body.console-refresh .is-revealed { animation: none; }
body.console-refresh .mobile-nav-toggle { display: none; }
body.console-refresh.sidebar-collapsed { --console-sidebar-width: 80px; }
body.console-refresh.sidebar-collapsed .sidebar-brand > div,
body.console-refresh.sidebar-collapsed .sidebar-search-wrapper,
body.console-refresh.sidebar-collapsed .sidebar-group-title,
body.console-refresh.sidebar-collapsed .sidebar-user-footer { display: none; }
body.console-refresh.sidebar-collapsed .sidebar-brand { justify-content: center; }
body.console-refresh.sidebar-collapsed .console-sidebar { padding-inline: 12px; }
body.console-refresh.sidebar-collapsed .sidebar-btn { justify-content: center; padding-inline: 10px; }
body.console-refresh.sidebar-collapsed .sidebar-heading { padding: 0; justify-content: center; }
@media (max-width: 1280px) {
    body.console-refresh .dash-header { padding-inline: 24px; gap: 12px; }
    body.console-refresh .header-center-cluster { max-width: 200px; }
    body.console-refresh .search-placeholder { font-size: 12px; }
    body.console-refresh .bot-toggle-info { display: none; }
    body.console-refresh .console-content { padding: 24px; }
    body.console-refresh .sales-banner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    body.console-refresh .admin-profile-copy { display: none; }
}
@media (max-width: 1024px) {
    body.console-refresh .header-center-cluster { display: none; }
    body.console-refresh .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    body.console-refresh .sales-banner { gap: 12px; }
    body.console-refresh .sales-card { padding: 16px !important; }
    body.console-refresh .sales-value { font-size: 21px; }
    body.console-refresh #section-orders .console-right-panel { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    body.console-refresh .dash-header { margin-left: 0; padding: 12px 16px !important; min-height: 64px; gap: 8px !important; width: 100% !important; }
    body.console-refresh .mobile-nav-toggle { display: inline-flex; }
    body.console-refresh .header-breadcrumb .breadcrumb-item,
    body.console-refresh .breadcrumb-separator { display: none; }
    body.console-refresh .console-content { margin-left: 0; padding: 22px 16px; }
    body.console-refresh .console-sidebar, body.console-refresh.sidebar-collapsed .console-sidebar {
        width: min(280px, 86vw); padding: 0 16px 16px;
        transform: translateX(-105%); visibility: hidden; pointer-events: none; z-index: 100;
    }
    body.console-refresh.mobile-nav-open .console-sidebar { transform: none; visibility: visible; pointer-events: auto; }
    body.console-refresh .mobile-nav-backdrop { background: #161c2466 !important; backdrop-filter: none; }
    body.console-refresh.sidebar-collapsed .sidebar-brand > div { display: block; }
    body.console-refresh.sidebar-collapsed .sidebar-brand { justify-content: flex-start; }
    body.console-refresh.sidebar-collapsed .sidebar-group-title,
    body.console-refresh.sidebar-collapsed .sidebar-search-wrapper,
    body.console-refresh.sidebar-collapsed .sidebar-user-footer { display: block; }
    body.console-refresh.sidebar-collapsed .sidebar-btn { justify-content: flex-start; }
    body.console-refresh .sales-banner { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    body.console-refresh .sales-card { min-height: 124px; }
    body.console-refresh .sales-value { font-size: 20px; }
    body.console-refresh .overview-toolbar-copy h2 { font-size: 22px; }
    body.console-refresh .main-grid { grid-template-columns: 1fr !important; }
    body.console-refresh .form-panel, body.console-refresh .list-panel { padding: 18px !important; }
    body.console-refresh .filter-pills-strip .filter-pill-btn { white-space: nowrap; padding: 14px; }
    body.console-refresh #section-orders .list-panel > div:first-child { padding: 18px; }
    body.console-refresh .table-pagination { padding: 14px 16px; }
    body.console-refresh .iptv-credit-summary { flex-wrap: wrap; }
    body.console-refresh .iptv-credit-value-wrap { margin-left: 0; }
}
@media (max-width: 480px) {
    body.console-refresh .dash-header { padding: 10px 12px !important; }
    body.console-refresh .header-actions { gap: 2px !important; }
    body.console-refresh .bot-toggle-wrapper { display: none; }
    body.console-refresh .profile-chevron { display: none; }
    body.console-refresh .admin-avatar { width: 30px; height: 30px; }
    body.console-refresh .sales-banner { grid-template-columns: 1fr !important; }
    body.console-refresh .sales-card { min-height: 110px; }
    body.console-refresh .sales-value { font-size: 24px; }
    body.console-refresh .stats-grid { gap: 10px !important; }
    body.console-refresh .stat-card { padding: 14px !important; }
    body.console-refresh .stat-icon { width: 30px; height: 30px; font-size: 15px; }
    body.console-refresh .stat-card h3 { font-size: 12px; }
    body.console-refresh .overview-toolbar { flex-wrap: wrap; }
    body.console-refresh .table-pagination { font-size: 11px; gap: 4px; }
}
@media (max-width: 349px) {
    body.console-refresh .stats-grid { grid-template-columns: 1fr !important; }
    body.console-refresh #notifications-btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    body.console-refresh *, body.console-refresh *::before, body.console-refresh *::after {
        transition: none !important; animation: none !important;
    }
}
body.console-refresh .preview-indicator {
    display: inline-block; background: #fff7cd; color: #805c00;
    padding: 4px 8px; border-radius: 4px; font-size: 11px; margin-left: 10px;
}
body.console-refresh .sidebar-search-input {
    background: #ffffff09 !important; border-color: #ffffff26 !important; color: #ffffff !important;
}
body.console-refresh .admin-profile-copy strong { color: var(--text-primary); }
body.console-refresh .admin-profile-copy small { color: var(--text-muted); }
body.console-refresh .switch { display: inline-block; position: relative; flex-shrink: 0; }
body.console-refresh .switch input { position: absolute; opacity: 0; width: 100%; height: 100%; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
body.console-refresh .switch .slider { position: absolute; inset: 0; background: #919eab; border-radius: 20px; }
body.console-refresh .switch .slider::before { content: ''; position: absolute; background: #ffffff; border-radius: 50%; }
body.console-refresh .switch input:focus-visible + .slider { outline: 2px solid #35353b; outline-offset: 3px; }
body.console-refresh .hamburger-btn.mobile-nav-toggle { display: none !important; }
body.console-refresh .stock-table .user-identity-name { font-size: 13px; font-weight: 500; }
body.console-refresh .summary-card-title { color: var(--text-primary) !important; text-transform: none; font-weight: 600; }
@media (max-width: 820px) {
    body.console-refresh .hamburger-btn.mobile-nav-toggle { display: inline-flex !important; }
}
body.console-refresh #section-stock .main-grid { display: flex; flex-direction: column; gap: 20px; }
body.console-refresh .stock-create-panel { background: var(--bg-surface); border-bottom: 1px solid var(--border-color); }
body.console-refresh .stock-create-panel summary {
    padding: 16px 24px; color: var(--accent-purple); font-weight: 600; cursor: pointer; list-style: none;
}
body.console-refresh .stock-create-panel summary::-webkit-details-marker { display: none; }
body.console-refresh .stock-create-panel summary i { margin-right: 8px; }
body.console-refresh .stock-create-panel[open] summary { border-bottom: 1px solid var(--border-color); }
body.console-refresh .stock-create-panel #stock-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; }
body.console-refresh .stock-create-panel #stock-form > button { align-self: end; margin-bottom: 18px; }
body.console-refresh .stock-create-panel #single-profile-fields { display: contents; }
body.console-refresh .stock-create-panel #profiles-section { grid-column: 1 / -1; }
body.console-refresh .guidance-badge-configured { color: #44444c; background: #e9e9ef; border: 0; }
body.console-refresh .code-font, body.console-refresh .credential-label, body.console-refresh .field-helper { color: var(--text-secondary); }
body.console-refresh .stock-table .badge { text-transform: none; }
.web-user-password-display { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.web-user-password-eye { width: 28px; height: 28px; min-width: 28px; padding: 0; }
body.console-refresh .stat-card h3 { text-transform: none; }
@media (max-width: 820px) {
    body.console-refresh .stock-create-panel #stock-form { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    body.console-refresh .preview-indicator { margin-left: 4px; font-size: 10px; padding: 3px 5px; }
    body.console-refresh .header-breadcrumb { gap: 4px; }
    body.console-refresh .breadcrumb-active { max-width: 112px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
}
body.console-refresh .panel-header {
    padding: 0 !important; margin-bottom: 0 !important; border: 0 !important; border-radius: 0;
    background: transparent !important; box-shadow: none;
}
body.console-refresh .overview-toolbar { flex-direction: row !important; text-align: left; }
body.console-refresh .overview-toolbar-copy { text-align: left; }
body.console-refresh .order-breakdown-chart { position: absolute; inset: 0; border-radius: 50%; }
body.console-refresh .order-breakdown-chart::after { content: ''; position: absolute; inset: 12px; background: var(--bg-surface); border-radius: 50%; }
body.console-refresh .summary-card .donut-gauge-box { width: 140px; height: 140px; margin: 18px auto; }
body.console-refresh .top-seller-icon { background: #e9e9ef; color: #44444c; }
body.console-refresh .donut-center-info { z-index: 1; }
body.console-refresh .panel-header h2 {
    font: 700 24px/1.3 'DM Sans', sans-serif; color: var(--text-primary) !important;
    background: none; -webkit-text-fill-color: var(--text-primary);
}
body.console-refresh .panel-header > p { display: none; }
body.console-refresh .clean-card-panel {
    padding: 0 !important; border: 0 !important; border-radius: 0 !important;
    background: var(--bg-surface) !important; box-shadow: none !important;
}
body.console-refresh .clean-card-header { padding: 20px 24px; margin: 0; border-bottom: 0; gap: 16px; flex-wrap: wrap; }
body.console-refresh .clean-card-title { color: var(--text-primary) !important; font-size: 17px; font-weight: 600; }
body.console-refresh .clean-card-footer { padding: 16px 24px; border-top: 1px solid var(--border-color); }
body.console-refresh .customer-table-tools { display: flex; align-items: center; gap: 8px; }
body.console-refresh #customer-directory-search { padding: 10px 12px; border: 1px solid var(--border-color); width: 260px; }
body.console-refresh #section-customer-management > section { order: 3; margin: 0 !important; }
body.console-refresh #section-customer-management > .customer-link-code-panel { order: 1; }
body.console-refresh #section-customer-management > .password-reset-widget { order: 2; }
body.console-refresh #section-customer-management > .stats-grid-sleek { order: 3; }
body.console-refresh #section-customer-management > .linked-customers-widget { order: 4; }
body.console-refresh #section-customer-management > .stats-grid-sleek { margin-bottom: 0; }
body.console-refresh .linked-customers-widget .table-wrapper { max-height: none !important; }
body.console-refresh tr[hidden] { display: none !important; }
body.console-refresh #section-customer-management > section:not(.linked-customers-widget) {
    background: transparent !important; border: 0 !important; border-top: 1px solid var(--border-color) !important;
    border-radius: 0 !important; padding: 24px 0 !important;
}
body.console-refresh #section-customer-management > section:not(.linked-customers-widget) .clean-card-header { padding: 0 0 20px; }
body.console-refresh #section-customer-management h3 { font-size: 17px !important; color: var(--text-primary) !important; }
body.console-refresh #section-customer-management section p { display: none; }
body.console-refresh #section-customer-management form { margin-top: 16px !important; }
body.console-refresh #section-customer-management button[type="submit"] {
    background: #35353b !important; border-radius: 6px !important; font-size: 13px; font-weight: 600 !important;
}
body.console-refresh #section-customer-management td a { color: var(--accent-purple) !important; font-weight: 500 !important; font-family: inherit !important; }
body.console-refresh #section-customer-management td button { background: transparent !important; color: var(--text-secondary) !important; border-color: var(--border-color) !important; font-weight: 500 !important; }
body.console-refresh #section-customer-management td .badge { color: #44444c !important; background: #00ab5529 !important; }
body.console-refresh .stats-grid-sleek .stat-card { align-items: center; gap: 12px; }
body.console-refresh .stats-grid-sleek .stat-value { font-size: 22px; font-weight: 700; }
body.console-refresh .console-panel > div[style*="background:"] {
    background: var(--bg-surface) !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
}
body.console-refresh .console-panel > div[style*="background:"] h2,
body.console-refresh .console-panel > div[style*="background:"] h3 { color: var(--text-primary) !important; font-size: 20px !important; }
body.console-refresh .buying-guide-card { border-radius: 8px !important; background: var(--bg-surface) !important; box-shadow: none !important; }
body.console-refresh .toast { background: var(--bg-surface); color: var(--text-primary); border-radius: 8px; border: 1px solid var(--border-color); box-shadow: 0 6px 18px #161c241a; }
body.console-refresh .toast-container { top: 88px; }
body.console-refresh .sidebar-search-wrapper .sidebar-search-input { background: #ffffff09 !important; border-color: #ffffff26 !important; color: #ffffff !important; }
body.console-refresh .console-sidebar .sidebar-btn.active i { color: inherit !important; }
body.console-refresh .overview-toolbar { margin-bottom: 0 !important; }
body.console-refresh .sales-banner, body.console-refresh .stats-grid { margin-bottom: 0; }
body.console-refresh .iptv-credit-summary { margin-bottom: 0; }
body.console-refresh[data-theme="dark"] .status-success,
body.console-refresh[data-theme="dark"] .badge-available,
body.console-refresh[data-theme="dark"] #section-customer-management td .badge { color: #d1d1d7 !important; background: #00ab5529 !important; }
body.console-refresh[data-theme="dark"] .status-pending { color: #ffe16a !important; }
body.console-refresh[data-theme="dark"] .status-danger,
body.console-refresh[data-theme="dark"] .badge-sold { color: #ff9aa1 !important; }
@media (max-width: 820px) {
    body.console-refresh .clean-card-header { padding: 18px; }
    body.console-refresh .customer-table-tools { width: 100%; }
    body.console-refresh #customer-directory-search { flex: 1; min-width: 0; width: auto; }
    body.console-refresh .console-panel > section form { min-width: 0; }
}
body.console-refresh .console-panel > :is(.verify-payment-widget, .console-otp-widget, .wallet-adjust-widget, .announcement-control-widget) {
    background: var(--bg-surface) !important; border: 0 !important; border-radius: 0 !important;
    margin: 0 !important; padding: 24px !important; box-shadow: none;
}
body.console-refresh :is(.console-otp-widget, .wallet-adjust-widget, .announcement-control-widget) h3 { color: var(--text-primary) !important; font-size: 18px !important; }
body.console-refresh :is(.console-otp-widget, .wallet-adjust-widget, .announcement-control-widget) p { display: none; }
body.console-refresh :is(.console-otp-widget, .wallet-adjust-widget, .announcement-control-widget) form { margin-top: 14px !important; }
body.console-refresh :is(.verify-payment-widget, .console-otp-widget, .wallet-adjust-widget, .announcement-control-widget) button[type="submit"] { background: #35353b !important; border-radius: 6px !important; }
body.console-refresh .verify-payment-widget .clean-card-header { padding: 0 0 20px; }
body.console-refresh .otp-fetch-form { display: grid; grid-template-columns: minmax(150px, 220px) minmax(200px, 1fr) auto; gap: 20px; align-items: end; padding: 24px 0; border-bottom: 1px solid var(--border-color); }
body.console-refresh .otp-field { display: grid; gap: 8px; min-width: 0; }
body.console-refresh .otp-field label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
body.console-refresh .otp-field input, body.console-refresh .otp-field select { width: 100%; min-width: 0; height: 44px; margin: 0; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-surface); color: var(--text-primary); font: inherit; }
body.console-refresh #admin-otp-submit { height: 44px; min-width: 142px; margin: 0; border-radius: 6px; background: #35353b; }
body.console-refresh .otp-fetch-status { min-height: 24px; margin: 0; font-size: 14px; color: var(--text-secondary); overflow-wrap: anywhere; }
body.console-refresh .otp-fetch-status[data-state="error"] { color: #cc3a4a; }
body.console-refresh .otp-result { width: 100%; max-width: 680px; padding: 24px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-surface); }
body.console-refresh #section-otp-fetcher [hidden] { display: none !important; }
body.console-refresh .otp-result-heading { display: flex; align-items: center; gap: 14px; min-width: 0; }
body.console-refresh .otp-result-heading > div { min-width: 0; flex: 1; }
body.console-refresh .otp-result-heading h3 { font-size: 18px; margin: 0 0 4px; }
body.console-refresh .otp-result-heading p { font-size: 14px; margin: 0; color: var(--text-secondary); overflow-wrap: anywhere; }
body.console-refresh .otp-result-icon { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 6px; background: #e9e9ef; color: #44444c; font-size: 20px; }
body.console-refresh .otp-code-row { display: flex; gap: 20px; align-items: center; min-height: 80px; }
body.console-refresh #admin-otp-code { font-family: ui-monospace, monospace; font-size: 32px; font-weight: 600; letter-spacing: 0; user-select: all; }
body.console-refresh .otp-open-link { display: inline-flex; align-items: center; gap: 10px; margin: 24px 0 8px; background: #35353b; border-radius: 6px; text-decoration: none; padding: 12px 18px; }
body.console-refresh .otp-result-time { font-size: 13px; color: var(--text-secondary); margin: 8px 0 0; }
body.console-refresh #section-otp-fetcher button:disabled { opacity: .6; cursor: not-allowed; }
@media (max-width: 820px) {
    body.console-refresh .otp-fetch-form { grid-template-columns: 1fr; gap: 16px; }
    body.console-refresh #admin-otp-submit { width: 100%; }
    body.console-refresh .otp-result { padding: 18px; }
    body.console-refresh .otp-result-heading { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
    body.console-refresh .otp-result-heading .badge { grid-column: 2; justify-self: start; margin-left: 0; }
}
body.console-refresh #section-wallets .form-panel > .glass-container { border: 0; box-shadow: none; border-radius: 0; background: transparent; padding: 0 !important; text-align: left !important; }
@media (max-width: 820px) {
    body.console-refresh .console-panel > :is(.verify-payment-widget, .console-otp-widget, .wallet-adjust-widget, .announcement-control-widget) { padding: 18px !important; }
}
/* Charcoal workspace and reporting surfaces. */
body.console-refresh .tab-btn.active, body.console-refresh .sidebar-btn.active i { -webkit-text-fill-color: currentColor; background-clip: border-box; }
body.console-refresh .sidebar-btn.active i { background: none !important; }
body.console-refresh[data-theme="dark"] input[type="month"], body.console-refresh[data-theme="dark"] input[type="date"] { color-scheme: dark; }
body.console-refresh[data-theme="dark"] [data-trend="up"] { color: #9cbafd !important; }
body.console-refresh[data-theme="dark"] [data-trend="down"] { color: #f09fac !important; }
body.console-refresh .tab-btn.active::after { display: none; }
body.console-refresh .secret-value { color: var(--text-primary); }
body.console-refresh .credential-label { color: var(--text-muted); }
body.console-refresh::before, body.console-refresh::after { display: none !important; }
body.console-refresh .sidebar-group-title { color: #b5b5bf !important; }
body.console-refresh .sidebar-btn.active { background: #414149 !important; border-left: 3px solid #a7b9e8 !important; }
body.console-refresh .sidebar-brand span, body.console-refresh .sidebar-heading-kicker { color: #b5b5bf; }
body.console-refresh .sales-card { background: #e5e5ec !important; }
body.console-refresh .sales-card:nth-child(2) { background: #e7ecf7 !important; }
body.console-refresh .sales-card:nth-child(3) { background: #f4ead5 !important; }
body.console-refresh .sales-card:nth-child(4) { background: #f3e5ed !important; }
body.console-refresh .sales-card:nth-child(5) { background: #e6e9ee !important; }
body.console-refresh .row-number, body.console-refresh .row-number-heading { width: 46px; min-width: 46px; text-align: right !important; color: var(--text-muted) !important; font-variant-numeric: tabular-nums; }
body.console-refresh .console-content { position: relative; z-index: 1; }
body.console-refresh .dash-header { position: relative; z-index: 60; }
body.console-refresh .searchable-select-menu { z-index: 30; }
body.console-refresh .admin-profile-menu { z-index: 70; }
body.console-refresh .modal-overlay { z-index: 200; }
body.console-refresh .toast-container { z-index: 300; }
body.console-refresh #section-stock > .main-grid { display: flex; flex-direction: column; }
body.console-refresh #section-stock .list-panel, body.console-refresh .stock-create-panel { width: 100%; min-width: 0; }
body.console-refresh #section-stock .list-panel { padding: 0 !important; }
body.console-refresh #section-stock .filter-controls { padding: 0 0 12px; }
body.console-refresh #stock-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; align-items: start; }
body.console-refresh #stock-form .form-group { margin: 0; min-width: 0; }
body.console-refresh #stock-form .field-helper { display: none; }
body.console-refresh #stock-form input, body.console-refresh #stock-form .searchable-select-control { margin-bottom: 0; min-height: 40px; }
body.console-refresh #single-profile-fields:not([style*="none"]) { display: contents !important; }
body.console-refresh #profiles-section, body.console-refresh #is-international-group, body.console-refresh #update-matching-group { grid-column: 1 / -1; }
body.console-refresh #stock-form > button { width: auto; align-self: end; }
body.console-refresh #stock-table { min-width: 1510px; table-layout: fixed; }
body.console-refresh #stock-table th, body.console-refresh #stock-table td { padding: 12px !important; font-size: 13px !important; }
body.console-refresh #stock-table th:nth-child(2) { width: 220px; }
body.console-refresh #stock-table th:nth-child(3) { width: 250px; }
body.console-refresh #stock-table th:nth-child(4) { width: 255px; }
body.console-refresh #stock-table th:nth-child(5) { width: 105px; }
body.console-refresh #stock-table th:nth-child(6) { width: 115px; }
body.console-refresh #stock-table th:nth-child(7) { width: 230px; }
body.console-refresh #stock-table th:nth-child(8) { width: 150px; }
body.console-refresh #stock-table th:last-child { width: 160px; }
body.console-refresh #stock-table td .badge { white-space: normal; text-align: left; justify-content: flex-start; }
body.console-refresh #stock-table .credentials-stack { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
body.console-refresh #stock-table td:last-child > div { display: flex !important; flex-wrap: nowrap; width: auto !important; gap: 2px !important; }
body.console-refresh .stock-sale-price, body.console-refresh .report-money { white-space: nowrap; font-variant-numeric: tabular-nums; }
body.console-refresh .report-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
body.console-refresh .report-toolbar h2 { font-size: 24px; margin: 0; }
body.console-refresh .report-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
body.console-refresh .report-controls label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
body.console-refresh .report-controls input, body.console-refresh .report-controls select { height: 40px; padding: 8px 10px; margin: 0; border: 1px solid var(--border-color); min-width: 145px; }
body.console-refresh .report-controls > button { margin-bottom: 3px; }
body.console-refresh .report-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-surface); }
body.console-refresh .report-metrics > div { padding: 24px; min-width: 0; border-right: 1px solid var(--border-color); }
body.console-refresh .report-metrics > div:last-child { border: 0; }
body.console-refresh .report-metrics span { display: block; font-size: 12px; color: var(--text-secondary); }
body.console-refresh .report-metrics strong { display: block; margin-top: 12px; font-size: 24px; line-height: 1.3; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
body.console-refresh .report-metrics small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 10px; }
body.console-refresh .report-context { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--text-muted); font-size: 12px; padding: 20px 0; }
body.console-refresh #analytics-results[hidden] { display: none; }
body.console-refresh .analytics-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 24px; }
body.console-refresh .report-chart { min-width: 0; padding: 22px 0; border-top: 1px solid var(--border-color); }
body.console-refresh .report-chart-wide { grid-column: 1 / -1; }
body.console-refresh .report-chart h3, body.console-refresh .report-services h3 { font-size: 17px; margin: 0 0 20px; }
body.console-refresh .report-canvas { height: 280px; width: 100%; position: relative; }
body.console-refresh .report-chart-wide .report-canvas { height: 310px; }
body.console-refresh .report-chart-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
body.console-refresh .report-chart-heading h3 { margin: 0; }
body.console-refresh .report-segmented { display: flex; border: 1px solid var(--border-color); padding: 3px; border-radius: 6px; }
body.console-refresh .report-segmented button { border: 0; background: transparent; color: var(--text-secondary); padding: 7px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; }
body.console-refresh .report-segmented button.active { background: #414149; color: #fff; }
body.console-refresh .report-channel { padding: 18px 0; border-bottom: 1px solid var(--border-color); }
body.console-refresh .report-channel > div { display: flex; align-items: center; gap: 10px; font-size: 13px; }
body.console-refresh .report-channel > div span:last-child { margin-left: auto; color: var(--text-muted); font-size: 12px; }
body.console-refresh .report-channel progress { width: 100%; height: 7px; margin: 16px 0; }
body.console-refresh progress { appearance: none; border: 0; background: var(--border-color); border-radius: 3px; overflow: hidden; }
body.console-refresh progress::-webkit-progress-bar { background: var(--border-color); }
body.console-refresh progress::-webkit-progress-value { background: #4777d1; }
body.console-refresh .report-channel:nth-child(2) progress::-webkit-progress-value { background: #d29634; }
body.console-refresh .report-share { display: flex; gap: 10px; align-items: center; }
body.console-refresh .report-share progress { height: 6px; width: 100px; }
body.console-refresh [data-trend="up"] { color: #3960a0 !important; }
body.console-refresh [data-trend="down"] { color: #b94a58 !important; }
body.console-refresh .report-services { padding: 24px 0; border-top: 1px solid var(--border-color); }
body.console-refresh .report-services table { min-width: 800px; }
body.console-refresh .report-daily-details { border-top: 1px solid var(--border-color); padding-top: 18px; }
body.console-refresh .report-daily-details summary { cursor: pointer; font-size: 14px; padding-bottom: 18px; }
body.console-refresh .report-daily-details table { min-width: 620px; }
body.console-refresh .report-state { color: var(--text-muted); font-size: 13px; margin: 0; }
body.console-refresh .report-state:empty { display: none; }
body.console-refresh .report-table-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
body.console-refresh .report-table-toolbar input { height: 40px; border: 1px solid var(--border-color); padding: 10px 12px; flex: 1; min-width: 220px; margin: 0; }
body.console-refresh .report-table-toolbar span { font-size: 12px; color: var(--text-muted); }
body.console-refresh .daily-sales-table { min-width: 1040px; table-layout: fixed; }
body.console-refresh .daily-sales-table th,
body.console-refresh .daily-sales-table td { padding: 8px 9px !important; vertical-align: middle; font-size: 11.5px; }
body.console-refresh .daily-sales-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: #44444c; }
.negative-wallet-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.negative-bill-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 6px 10px; border: 1px solid #86efac; border-radius: 6px; background: #f0fdf4; color: #15803d; font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.negative-bill-button:hover { border-color: #22c55e; background: #dcfce7; }
.negative-bill-button:disabled { cursor: not-allowed; opacity: 0.5; }
body.console-refresh .report-ref { font-size: 12px !important; max-width: 210px; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
    body.console-refresh .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.console-refresh .report-metrics > div { border-bottom: 1px solid var(--border-color); }
    body.console-refresh .report-metrics > div:nth-child(2) { border-right: 0; }
    body.console-refresh .report-metrics > div:nth-child(3) { border-bottom: 0; }
    body.console-refresh #stock-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    body.console-refresh input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    body.console-refresh textarea,
    body.console-refresh select { font-size: 16px !important; }
    .negative-wallet-actions { justify-content: flex-start; }
    body.console-refresh .analytics-layout { grid-template-columns: minmax(0, 1fr); }
    body.console-refresh .report-controls { width: 100%; }
    body.console-refresh .report-controls label { flex: 1; min-width: 125px; }
    body.console-refresh .report-controls input, body.console-refresh .report-controls select { width: 100%; min-width: 0; }
    body.console-refresh .report-metrics > div { padding: 18px; }
    body.console-refresh .report-metrics strong { font-size: 21px; }
    body.console-refresh .report-context { flex-direction: column; }
}
@media (max-width: 480px) {
    body.console-refresh #stock-form { grid-template-columns: minmax(0, 1fr); }
    body.console-refresh .report-controls { gap: 12px 8px; }
    body.console-refresh .report-table-toolbar input { min-width: 0; width: 100%; flex-basis: 100%; }
    body.console-refresh .report-metrics strong { font-size: 20px; }
    body.console-refresh .report-metrics > div { padding: 16px 12px; }
}

/* Custom bot messages workspace */
.messages-workspace {
    min-width: 0;
}

.messages-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.messages-page-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 6px;
}

.messages-page-header p {
    margin: 0;
    color: var(--text-secondary);
    max-width: 720px;
}

.messages-eyebrow {
    color: var(--accent-primary);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.messages-count-badge {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid rgba(16, 185, 129, 0.32);
    border-radius: 7px;
    background: rgba(16, 185, 129, 0.09);
    color: #34d399;
    font-size: 0.78rem;
    font-weight: 800;
}

.messages-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(190px, 240px) 42px;
    gap: 10px;
    align-items: end;
    margin-bottom: 12px;
}

.messages-search {
    min-width: 0;
    height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-secondary);
}

.messages-search:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.messages-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    padding: 0;
    background: transparent;
    color: var(--text-primary);
}

.messages-category-filter {
    display: grid;
    gap: 4px;
}

.messages-category-filter span {
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.messages-category-filter select {
    height: 42px;
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    padding: 0 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.messages-refresh-btn {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
}

body.console-refresh .messages-layout,
.messages-layout {
    display: grid;
    grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
    gap: 12px;
    height: auto;
    min-height: 580px;
}

body.console-refresh .messages-sidebar,
.messages-sidebar,
body.console-refresh .messages-editor-panel,
.messages-editor-panel {
    width: auto;
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    box-sizing: border-box;
}

body.console-refresh .messages-sidebar,
.messages-sidebar {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    max-height: 680px;
}

.messages-sidebar-heading {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.messages-sidebar-heading small {
    color: var(--text-secondary);
    font-size: 0.72rem;
    text-transform: none;
}

.messages-keys-list {
    min-height: 0;
    padding: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.message-key-group + .message-key-group {
    margin-top: 12px;
}

.message-key-group h4 {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    margin: 0 4px 5px;
    color: var(--text-secondary);
    font-size: 0.69rem;
    font-weight: 800;
    text-transform: uppercase;
}

.message-key-group h4 small {
    min-width: 20px;
    text-align: right;
}

.message-key-button {
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 2px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}

.message-key-button:hover {
    background: rgba(148, 163, 184, 0.09);
}

.message-key-button.is-active {
    border-color: rgba(37, 99, 235, 0.38);
    background: rgba(37, 99, 235, 0.12);
}

.message-key-button span,
.message-key-button small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-key-button span {
    font-size: 0.82rem;
    font-weight: 700;
}

.message-key-button small {
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 0.66rem;
}

body.console-refresh .messages-editor-panel,
.messages-editor-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    overflow: visible;
}

.message-editor-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.message-editor-heading h3 {
    margin: 6px 0 4px;
    color: var(--text-primary);
    font-size: 1.12rem;
}

.message-editor-heading p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.45;
}

.message-category-pill {
    display: inline-block;
    padding: 4px 7px;
    border-radius: 5px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--accent-primary);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.message-key-code {
    max-width: 44%;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-secondary);
    font-size: 0.68rem;
    overflow-wrap: anywhere;
}

.message-placeholders {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 10px 11px;
    border-left: 3px solid #f59e0b;
    background: rgba(245, 158, 11, 0.08);
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.message-placeholders[hidden] {
    display: none;
}

.message-placeholders code {
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(245, 158, 11, 0.14);
    color: var(--text-primary);
}

.message-editor-field {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.message-editor-label-row,
.message-editor-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.message-editor-label-row {
    margin-bottom: 7px;
    font-size: 0.78rem;
    font-weight: 700;
}

.message-editor-label-row span,
#message-save-status {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
}

#message-save-status.is-dirty {
    color: #f59e0b;
}

#message-editor-textarea {
    width: 100%;
    min-height: 380px;
    flex: 1;
    box-sizing: border-box;
    resize: vertical;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    padding: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.86rem;
    line-height: 1.55;
}

#message-editor-textarea:focus {
    outline: 0;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.11);
}

.messages-list-empty {
    min-height: 180px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    color: var(--text-secondary);
    text-align: center;
}

.messages-list-empty strong {
    color: var(--text-primary);
}

@media (max-width: 820px) {
    .messages-page-header,
    .message-editor-heading {
        flex-direction: column;
    }

    .messages-toolbar {
        grid-template-columns: minmax(0, 1fr) 42px;
    }

    .messages-search {
        grid-column: 1 / -1;
    }

    body.console-refresh .messages-layout,
    .messages-layout {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    body.console-refresh .messages-sidebar,
    .messages-sidebar {
        width: 100%;
        max-height: 300px;
    }

    body.console-refresh .messages-editor-panel,
    .messages-editor-panel {
        width: 100%;
        min-height: 480px;
        padding: 14px;
    }

    .message-key-code {
        max-width: 100%;
    }

    #message-editor-textarea {
        min-height: 320px;
    }
}

@media (max-width: 480px) {
    .messages-count-badge {
        align-self: flex-start;
    }

    .messages-category-filter select {
        width: 100%;
    }

    .message-editor-actions {
        align-items: stretch;
        flex-direction: column;
    }

    #save-message-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Keep mobile inventory compact; horizontal movement stays inside the table. */
@media (max-width: 820px) {
    body.console-refresh #section-stock .table-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: auto !important;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
    }

    body.console-refresh #stock-table {
        display: table !important;
        width: 1120px !important;
        min-width: 1120px !important;
        table-layout: fixed;
    }

    body.console-refresh #stock-table thead { display: table-header-group !important; }
    body.console-refresh #stock-table tbody { display: table-row-group !important; }

    body.console-refresh #stock-table tbody tr {
        display: table-row !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body.console-refresh #stock-table tbody td {
        display: table-cell !important;
        min-width: 0;
        padding: 9px 10px !important;
        border-bottom: 1px solid var(--border-color) !important;
        font-size: 12px !important;
        vertical-align: middle;
        overflow-wrap: anywhere;
    }

    body.console-refresh #stock-table tbody td::before {
        display: none !important;
        content: none !important;
    }

    body.console-refresh #stock-table tbody td:last-child {
        padding: 7px 8px !important;
        border-bottom: 1px solid var(--border-color) !important;
    }

    body.console-refresh #stock-table .credentials-stack {
        display: flex !important;
        align-items: center;
        flex-wrap: wrap;
        gap: 3px 8px;
        text-align: left;
    }

    body.console-refresh #stock-table td:last-child > div {
        display: flex !important;
        flex-flow: row nowrap !important;
        align-items: center !important;
        gap: 1px !important;
        margin: 0 !important;
    }

    body.console-refresh #stock-table .actions-cell .btn-icon,
    body.console-refresh #stock-table td:last-child .btn-icon {
        width: 30px;
        min-width: 30px;
        height: 30px;
        min-height: 30px;
        padding: 6px;
        font-size: 12px;
    }

    body.console-refresh #stock-table th,
    body.console-refresh #stock-table td { white-space: normal; }
    body.console-refresh #stock-table th:nth-child(2) { width: 150px; }
    body.console-refresh #stock-table th:nth-child(3) { width: 185px; }
    body.console-refresh #stock-table th:nth-child(4) { width: 195px; }
    body.console-refresh #stock-table th:nth-child(5) { width: 84px; }
    body.console-refresh #stock-table th:nth-child(6) { width: 88px; }
    body.console-refresh #stock-table th:nth-child(7) { width: 170px; }
    body.console-refresh #stock-table th:nth-child(8) { width: 110px; }
    body.console-refresh #stock-table th:last-child { width: 132px; }
}

/* Give charcoal controls enough contrast to remain visible in every panel. */
body.console-refresh[data-theme="dark"] .btn-primary,
body.console-refresh[data-theme="dark"] #admin-otp-submit,
body.console-refresh[data-theme="dark"] .otp-open-link,
body.console-refresh[data-theme="dark"] :is(.verify-payment-widget, .console-otp-widget, .wallet-adjust-widget, .announcement-control-widget) button[type="submit"],
body.console-refresh[data-theme="dark"] #section-customer-management button[type="submit"] {
    background: #f1f1f4 !important;
    border-color: #f1f1f4 !important;
    color: #202026 !important;
}

body.console-refresh[data-theme="dark"] .btn-primary:hover,
body.console-refresh[data-theme="dark"] #admin-otp-submit:hover,
body.console-refresh[data-theme="dark"] .otp-open-link:hover {
    background: #d9d9df !important;
    border-color: #d9d9df !important;
}

body.console-refresh[data-theme="dark"] :is(.icon-button, .btn-icon, .header-action-button, .theme-toggle-button, .stock-page-button, .filter-pill-btn) {
    border-color: #555560 !important;
    color: #f1f1f4 !important;
}

body.console-refresh[data-theme="dark"] :is(.icon-button, .header-action-button, .theme-toggle-button, .stock-page-button, .filter-pill-btn):hover {
    background: #373740 !important;
    border-color: #777784 !important;
    color: #ffffff !important;
}

body.console-refresh[data-theme="dark"] .theme-toggle-button {
    background: #303038 !important;
    border: 1px solid #62626e !important;
}

body.console-refresh[data-theme="dark"] :focus-visible {
    outline-color: #a7b9e8;
}
.customer-control-tabs {
    display: flex;
    gap: 8px;
    padding: 14px 18px 0;
    overflow-x: auto;
}

.customer-control-tab {
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    cursor: pointer;
}

.customer-control-tab.active {
    border-color: var(--accent-color, #14b8a6);
    color: var(--text-primary);
    background: rgba(20, 184, 166, .14);
}

.customer-control-form {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) minmax(130px, 1fr) auto auto;
    align-items: end;
    gap: 12px;
    padding: 18px;
}

.customer-control-notify {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    color: var(--text-secondary);
    font-size: .82rem;
}

@media (max-width: 760px) {
    .customer-control-form { grid-template-columns: 1fr; }
    .customer-control-form .btn-primary { width: 100%; justify-content: center; }
}

.command-management-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.command-loading-state {
    grid-column: 1 / -1;
    padding: 24px;
    color: var(--text-secondary);
}

.command-panel {
    min-width: 0;
    overflow: hidden;
    border-radius: 8px;
}

.command-panel-header {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.command-panel-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--accent-color, #14b8a6);
    background: rgba(20, 184, 166, .12);
    border: 1px solid rgba(20, 184, 166, .25);
}

.command-panel-title h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: .96rem;
}

.command-panel-title p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: .76rem;
    line-height: 1.45;
}

.command-active-count {
    white-space: nowrap;
    padding: 4px 7px;
    border-radius: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: .7rem;
    font-weight: 700;
}

.command-syntax-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: .72rem;
}

.command-syntax-row code {
    margin-left: 3px;
    color: var(--text-primary);
    font-family: var(--font-mono, monospace);
}

.command-action-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(130px, auto);
    gap: 10px;
    align-items: end;
    padding: 14px 16px;
}

.command-customer-field,
.command-extra-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.command-customer-field > span,
.command-extra-field > span {
    color: var(--text-secondary);
    font-size: .72rem;
    font-weight: 700;
}

.command-identity-input {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 6px;
    align-items: center;
}

.command-identity-input .icon-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
}

.command-notify-field {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    color: var(--text-secondary);
    font-size: .74rem;
}

.command-delivery-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    min-width: 0;
}

.command-action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.command-action-buttons .btn-primary,
.command-action-buttons .btn-secondary {
    min-height: 36px;
    padding: 7px 10px;
    white-space: nowrap;
}

.command-customer-list {
    max-height: 260px;
    overflow: auto;
    border-top: 1px solid var(--border-color);
}

.command-customer-list .stock-table {
    min-width: 520px;
}

.command-customer-list th,
.command-customer-list td {
    padding: 9px 10px;
    font-size: .74rem;
}

.command-empty-state {
    padding: 18px !important;
    text-align: center;
    color: var(--text-secondary);
}

.command-remove-customer {
    color: #ef4444;
}

.command-direct-note {
    margin: 0;
    padding: 11px 16px 14px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: .72rem;
    line-height: 1.5;
}

.command-panel[data-command="send"] {
    border-top: 3px solid var(--accent-primary);
}

.command-panel[data-command="send"] .command-panel-icon {
    color: var(--accent-primary);
    background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
    border-color: color-mix(in srgb, var(--accent-primary) 28%, transparent);
}

@media (max-width: 1080px) {
    .command-management-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .command-panel-header { grid-template-columns: 34px minmax(0, 1fr); }
    .command-panel-icon { width: 34px; height: 34px; }
    .command-active-count { grid-column: 2; justify-self: start; }
    .command-action-form { grid-template-columns: 1fr; }
    .command-action-buttons { justify-content: stretch; }
    .command-action-buttons button { flex: 1; }
}
.table-date-divider td {
    padding: 9px 12px !important;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    border-top: 1px solid var(--border-color);
}
.payment-log-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 180px; }
.web-user-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 24px 18px;
}
.web-user-filter-bar button {
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-weight: 700;
    cursor: pointer;
}
.web-user-filter-bar button.active {
    border-color: #16a34a;
    background: rgba(34, 197, 94, .12);
    color: #15803d;
}
.payment-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 20px;
}
.payment-summary-card {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-surface);
}
.payment-summary-card span { display: block; color: var(--text-secondary); font-size: .78rem; font-weight: 700; }
.payment-summary-card strong { display: block; margin-top: 7px; color: var(--text-primary); font-size: 1.3rem; }
.payment-summary-card.verified { border-left: 4px solid #0ea5e9; }
.payment-summary-card.credited { border-left: 4px solid #22c55e; }
@media (max-width: 900px) { .payment-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .payment-summary-grid { grid-template-columns: 1fr; } }

/* Keep the mobile drawer edge opaque and make its scrollbar part of the sidebar. */
body.console-refresh .console-sidebar {
    box-sizing: border-box;
    background-clip: border-box;
    scrollbar-color: #686870 #242429;
    scrollbar-width: thin;
}
body.console-refresh .console-sidebar::-webkit-scrollbar { width: 8px; }
body.console-refresh .console-sidebar::-webkit-scrollbar-track { background: #242429; }
body.console-refresh .console-sidebar::-webkit-scrollbar-thumb {
    border: 2px solid #242429;
    border-radius: 8px;
    background: #686870;
}

/* Consistent page tools and responsive management workspaces. */
body.console-refresh .section-local-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 40px;
    margin-bottom: -4px;
}
body.console-refresh .section-local-refresh {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    color: var(--text-secondary) !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
}
body.console-refresh .section-local-refresh.is-refreshing i { animation: spin .7s linear infinite; }
body.console-refresh .section-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
body.console-refresh .section-title-row > :is(h2, h3) {
    min-width: 0;
    margin-block: 0;
}
body.console-refresh .section-title-row > .section-local-refresh {
    width: 30px;
    min-width: 30px;
    height: 30px;
    margin-left: 0;
    padding: 0;
    border-color: var(--border-color) !important;
    background: var(--bg-surface) !important;
}
body.console-refresh .admin-search-control {
    position: relative;
    display: flex;
    align-items: center;
    width: min(380px, 42vw);
    min-width: 260px;
}
body.console-refresh .admin-search-control > i {
    position: absolute;
    left: 13px;
    z-index: 1;
    color: var(--text-muted);
    pointer-events: none;
}
body.console-refresh .admin-search-control input {
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 9px 36px 9px 38px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text-primary);
    font: inherit;
}
body.console-refresh .admin-search-control input:focus {
    outline: 2px solid color-mix(in srgb, var(--accent-purple) 32%, transparent);
    outline-offset: 1px;
    border-color: var(--accent-purple);
}
body.console-refresh .table-result-count {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
body.console-refresh .web-user-list-header { align-items: center; }
body.console-refresh .web-user-table-tools { margin-left: auto; }

body.console-refresh .services-page-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}
body.console-refresh .services-page-heading h2 { margin: 0; font-size: 24px; }
body.console-refresh .services-count { color: var(--text-muted); font-size: 12px; }
body.console-refresh .services-workspace { display: flex; flex-direction: column; gap: 24px !important; }
body.console-refresh .service-editor-disclosure {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-surface);
}
body.console-refresh .service-editor-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 0 20px;
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
body.console-refresh .service-editor-disclosure > summary::-webkit-details-marker { display: none; }
body.console-refresh .service-editor-disclosure[open] > summary { border-bottom: 1px solid var(--border-color); }
body.console-refresh .service-editor-disclosure[open] > summary > i:last-child { transform: rotate(180deg); }
body.console-refresh .service-editor-panel { padding: 24px !important; }
body.console-refresh .services-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 22px;
    align-items: start;
}
body.console-refresh .services-form-grid > .form-group { min-width: 0; margin: 0; }
body.console-refresh .services-form-grid :is(input, select, textarea) { width: 100%; max-width: 100%; }
body.console-refresh .services-form-grid .service-wide-field,
body.console-refresh .services-form-grid .service-image-field,
body.console-refresh .services-form-grid .service-save-button { grid-column: 1 / -1; }
body.console-refresh .services-form-grid .service-save-button { width: auto; justify-self: start; min-width: 180px; }
body.console-refresh .services-list-panel { padding: 0 !important; overflow: hidden; }
body.console-refresh .services-list-panel > div:first-child { padding: 20px 24px 0; }
body.console-refresh .services-table { min-width: 1120px; }

body.console-refresh :is(#section-store-sale, #section-mailbox, #section-otp) > .main-grid,
body.console-refresh #section-mailbox > .main-grid,
body.console-refresh #section-otp > .main-grid {
    display: grid;
    grid-template-columns: minmax(320px, .85fr) minmax(0, 1.4fr);
    align-items: start;
    gap: 24px !important;
}
body.console-refresh #section-store-sale > .form-panel { width: 100%; }
body.console-refresh #section-store-sale form > div[style*="grid-template-columns"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
body.console-refresh :is(#section-mailbox, #section-otp) .form-panel,
body.console-refresh :is(#section-mailbox, #section-otp) .list-panel { min-width: 0; }
body.console-refresh :is(#section-mailbox, #section-otp) .stock-table { min-width: 620px; }
body.console-refresh #central-active-status {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
}
body.console-refresh #central-active-status .code-font,
body.console-refresh #otp-email-list .code-font {
    color: var(--text-primary) !important;
    background: color-mix(in srgb, var(--accent-purple) 10%, var(--bg-input));
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 7px;
    overflow-wrap: anywhere;
}
body.console-refresh #otp-email-list strong { color: var(--text-primary); overflow-wrap: anywhere; }
body.console-refresh .admin-inline-copy-tools {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 7px;
    vertical-align: middle;
}
body.console-refresh .admin-inline-copy {
    width: 26px;
    min-width: 26px;
    height: 26px;
    padding: 0;
    color: var(--text-muted) !important;
    background: transparent !important;
    border: 1px solid transparent !important;
}
body.console-refresh .admin-inline-copy:hover {
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
    background: var(--bg-input) !important;
}
body.console-refresh .daily-service-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 210px;
}
body.console-refresh .daily-delivery-copy {
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
}

@media (max-width: 1100px) {
    body.console-refresh .services-form-grid,
    body.console-refresh #section-store-sale form > div[style*="grid-template-columns"],
    body.console-refresh #section-mailbox > .main-grid,
    body.console-refresh #section-otp > .main-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 620px) {
    body.console-refresh .section-local-toolbar { min-height: 36px; }
    body.console-refresh .section-title-row > .section-local-refresh {
        width: 28px;
        min-width: 28px;
        height: 28px;
        margin-left: 0;
    }
    body.console-refresh .web-user-list-header { align-items: stretch; }
    body.console-refresh .web-user-table-tools { margin-left: 0; flex-wrap: wrap; }
    body.console-refresh .admin-search-control { width: 100%; min-width: 0; }
    body.console-refresh .table-result-count { width: 100%; }
    body.console-refresh .services-form-grid { grid-template-columns: minmax(0, 1fr); }
    body.console-refresh .services-form-grid .service-wide-field,
    body.console-refresh .services-form-grid .service-image-field,
    body.console-refresh .services-form-grid .service-save-button { grid-column: auto; }
    body.console-refresh .services-form-grid .service-save-button { width: 100%; }
    body.console-refresh .service-editor-panel { padding: 18px !important; }
    body.console-refresh #section-store-sale form > div[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 820px) {
    body.console-refresh.mobile-nav-open #mobile-nav-backdrop,
    body.console-refresh.mobile-nav-open .mobile-nav-backdrop {
        inset: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        background: rgba(22, 28, 36, .72) !important;
    }
    body.console-refresh.mobile-nav-open .console-sidebar {
        border-right: 0 !important;
        border-radius: 0 !important;
        box-shadow: 12px 0 28px rgba(0, 0, 0, .32) !important;
    }
}
.payment-log-actions button { padding: 5px 8px; font-size: 0.72rem; white-space: nowrap; }
.payment-disapprove-btn { border-color: rgba(239, 68, 68, 0.45) !important; color: #dc2626 !important; }
.payment-disapprove-btn:hover,
.payment-disapprove-btn:focus-visible { background: rgba(239, 68, 68, 0.1) !important; }
.payment-source-tag { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 6px; border-radius: 5px; color: #fff; font-size: 0.72rem; font-weight: 900; }
.payment-source-tag.source-a { background: #7c3aed; }
.payment-source-tag.source-b { background: #15803d; }
.payment-source-tag.source-w { background: #0369a1; }
.drawer-credential-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border-color); }
.drawer-credential-row:last-child { border-bottom: 0; }
.drawer-credential-row pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: inherit; font: inherit; }
.drawer-credential-row button { padding: 5px 8px; font-size: 0.72rem; }
.activation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 250px;
}

.activation-actions button {
    padding: 6px 9px;
    font-size: 0.74rem;
    white-space: nowrap;
}
.activation-order-ref { display: block; margin-top: 4px; color: var(--text-muted); white-space: nowrap; }
#section-activations .table-container { width: 100%; max-width: 100%; overflow-x: auto; }
#section-activations .stock-table { min-width: 1080px; }

.customer-link-code-panel {
    width: 100%;
    min-width: 0;
}

.customer-link-code-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
}

.customer-link-code-form .form-group { margin: 0; min-width: 0; }
.customer-link-code-form .form-input { margin: 0; width: 100%; }
.customer-link-code-form .btn-primary { min-height: 40px; white-space: nowrap; }
.customer-link-code-panel .form-alert { padding: 0 18px 18px; }

body.console-refresh #section-promos,
body.console-refresh #section-promos > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
body.console-refresh #section-promos .list-panel { padding: 0 !important; overflow: hidden; }
body.console-refresh #section-promos .list-panel > div:first-child { padding: 20px 24px 0; }
body.console-refresh #section-promos .list-panel > div:last-child { width: 100%; max-width: 100%; overflow-x: auto !important; }
body.console-refresh #section-promos .data-table { min-width: 860px; }

@media (max-width: 820px) {
    .customer-link-code-form { grid-template-columns: 1fr; }
    .customer-link-code-form .btn-primary { width: 100%; }
}

@media (max-width: 720px) {
    .activation-actions { min-width: 190px; }
}
/* WhatsApp connection workspace */
.wa-connect-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.wa-connect-heading h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.35rem;
}

.wa-connect-heading p {
    margin: 5px 0 0;
    color: var(--text-secondary);
    font-size: .88rem;
}

.wa-live-status {
    display: grid;
    grid-template-columns: 10px auto;
    align-items: center;
    gap: 3px 8px;
    min-width: 170px;
}

#wa-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    grid-row: 1 / span 2;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .12);
}

#wa-status-text {
    color: var(--text-primary);
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
}

#wa-last-checked {
    color: var(--text-secondary);
    font-size: .7rem;
}

.wa-link-shell {
    width: min(100%, 980px);
    margin: 0 auto;
    overflow: hidden;
    background: #131716;
    border: 1px solid #2b312f;
    border-radius: 8px;
    color: #f7faf9;
}

.wa-link-stage {
    min-height: 430px;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(300px, .85fr);
    align-items: center;
    gap: 54px;
    padding: 48px 58px 30px;
}

.wa-link-copy {
    min-width: 0;
}

.wa-link-eyebrow {
    display: block;
    margin-bottom: 10px;
    color: #9aa5a1;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.wa-link-copy h3 {
    margin: 0 0 28px;
    color: #fff;
    font-size: 1.55rem;
    letter-spacing: 0;
}

.wa-link-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 20px;
}

.wa-link-steps li {
    display: grid;
    grid-template-columns: 22px minmax(0, auto) 18px;
    align-items: start;
    justify-content: start;
    gap: 10px;
    position: relative;
}

.wa-link-steps li:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 23px;
    width: 1px;
    height: 22px;
    background: #46504c;
}

.wa-link-steps li > span {
    width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: #f8faf9;
    color: #131716;
    font-size: .72rem;
    font-weight: 800;
}

.wa-link-steps p {
    max-width: 315px;
    margin: 0;
    color: #f1f5f3;
    font-size: .92rem;
    line-height: 1.45;
}

.wa-link-steps .fa-whatsapp {
    color: #25d366;
    margin-top: 2px;
}

.wa-link-note {
    display: flex;
    gap: 9px;
    max-width: 410px;
    margin: 30px 0 0;
    color: #8e9b96;
    font-size: .74rem;
    line-height: 1.5;
}

.wa-link-note i {
    margin-top: 2px;
    color: #25d366;
}

.wa-link-visual {
    min-height: 300px;
    display: grid;
    place-items: center;
}

#wa-qr-container {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.wa-qr-frame {
    position: relative;
    padding: 8px;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .26);
}

#wa-qr-code {
    width: 240px;
    height: 240px;
    display: grid;
    place-items: center;
    background: #fff;
}

#wa-qr-code img {
    width: 240px !important;
    height: 240px !important;
    border-radius: 2px !important;
}

.wa-qr-mark {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 5px solid #fff;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    font-size: 1.55rem;
}

#wa-qr-container small {
    color: #94a19c;
    font-size: .72rem;
    text-align: center;
}

#wa-loading-container {
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
}

#wa-loading-container p {
    margin: 0;
    color: #9aa5a1;
    font-size: .82rem;
}

.wa-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #33403b;
    border-top-color: #25d366;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#wa-connected-info {
    display: none;
    max-width: 300px;
    justify-items: center;
    text-align: center;
}

#wa-connected-info > span {
    color: #25d366;
    font-size: 3rem;
}

#wa-connected-info h3 {
    margin: 12px 0 5px;
    color: #fff;
    font-size: 1.1rem;
}

#wa-connected-info p {
    margin: 0;
    color: #9aa5a1;
    font-size: .82rem;
    line-height: 1.5;
}

.wa-pairing-toggle {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 58px;
    border: 0;
    border-top: 1px solid #262c2a;
    background: transparent;
    color: #25d366;
    font: inherit;
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
}

.wa-pairing-toggle:hover,
.wa-pairing-toggle:focus-visible {
    background: #18201d;
    outline: none;
}

#wa-pairing-container {
    display: none;
    grid-template-columns: minmax(180px, .8fr) minmax(300px, 1.2fr);
    gap: 20px 32px;
    padding: 24px 58px;
    border-top: 1px solid #262c2a;
    background: #101412;
}

#wa-pairing-container h4 {
    margin: 0 0 5px;
    color: #fff;
    font-size: .95rem;
}

#wa-pairing-container p {
    margin: 0;
    color: #8e9b96;
    font-size: .76rem;
}

.wa-pairing-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

#wa-pairing-phone {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #36403c;
    border-radius: 6px;
    background: #171c1a;
    color: #fff;
}

#wa-pairing-code-display {
    display: none;
    grid-column: 2;
    place-items: center;
    min-height: 52px;
    border: 1px dashed #25d366;
    border-radius: 6px;
    color: #37df78;
    font-family: monospace;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 4px;
}

.wa-link-shell .whatsapp-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid #262c2a;
    background: #0f1311;
}

.wa-link-shell .whatsapp-actions .btn {
    flex: 0 0 auto;
}

@media (max-width: 760px) {
    .wa-connect-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .wa-link-stage {
        grid-template-columns: 1fr;
        gap: 34px;
        padding: 32px 22px 24px;
    }

    .wa-link-copy h3 {
        font-size: 1.3rem;
    }

    .wa-link-visual {
        min-height: 275px;
    }

    #wa-qr-code,
    #wa-qr-code img {
        width: min(240px, 70vw) !important;
        height: min(240px, 70vw) !important;
    }

    .wa-pairing-toggle {
        justify-content: center;
        padding: 0 20px;
    }

    #wa-pairing-container {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    #wa-pairing-code-display {
        grid-column: 1;
    }

    .wa-link-shell .whatsapp-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .wa-link-shell .whatsapp-actions .btn {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .wa-link-stage {
        padding-inline: 16px;
    }

    .wa-pairing-form,
    .wa-link-shell .whatsapp-actions {
        grid-template-columns: 1fr;
    }
}
.website-broadcasts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.website-broadcast-form { min-width: 0; padding: 24px 0; border-top: 1px solid var(--border-color); }
.website-broadcast-form h3 { margin: 0 0 18px; }
.website-broadcast-form label { display: block; margin-bottom: 8px; }
.website-broadcast-form textarea { width: 100%; box-sizing: border-box; min-height: 160px; padding: 12px; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-secondary, #fff); color: var(--text-primary); font: inherit; resize: vertical; margin-bottom: 12px; }
.website-broadcast-form [role=status] { overflow-wrap: anywhere; }
@media (max-width: 760px) { .website-broadcasts { grid-template-columns: minmax(0, 1fr); gap: 12px; } }

.negative-wallet-panel {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid rgba(248, 113, 113, .45);
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    background: rgba(127, 29, 29, .08);
}
.wallet-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}
.wallet-list-heading h3 { margin: 0; }
.wallet-search-control {
    position: relative;
    display: block;
    width: min(360px, 100%);
}
.wallet-search-control i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}
.wallet-search-control input {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px 9px 36px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-surface);
    color: var(--text-primary);
    box-sizing: border-box;
}
.negative-wallet-controls {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 14px;
    flex: 1 1 420px;
}
.negative-wallet-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.negative-wallet-heading h2 { margin: 2px 0 5px; }
.negative-wallet-heading p { margin: 0; color: var(--text-secondary); font-size: .84rem; }
.negative-wallet-eyebrow { color: #f87171; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.negative-wallet-summary { display: grid; gap: 3px; min-width: 150px; text-align: right; }
.negative-wallet-summary span { color: var(--text-secondary); font-size: .78rem; }
.negative-wallet-summary strong { color: #f87171; font-size: 1.1rem; }

/* Admin operations polish: compact desktop tables and theme-aware summaries. */
body.console-refresh #section-orders .console-right-panel {
    order: -1;
}
body.console-refresh #section-orders .summary-card {
    min-height: 0;
    padding: 18px;
}
body.console-refresh .summary-loading-state {
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: .8rem;
}
body.console-refresh #stock-table {
    width: 1240px;
    min-width: 1240px;
    table-layout: fixed;
}
body.console-refresh #stock-table th,
body.console-refresh #stock-table td {
    padding: 7px 7px !important;
    vertical-align: middle;
}
body.console-refresh #stock-table .credentials-stack {
    flex-direction: row;
    gap: 3px 8px;
    min-width: 0;
}
body.console-refresh #stock-table th:nth-child(1) { width: 44px; }
body.console-refresh #stock-table th:nth-child(2) { width: 125px; }
body.console-refresh #stock-table th:nth-child(3) { width: 150px; }
body.console-refresh #stock-table th:nth-child(4) { width: 180px; }
body.console-refresh #stock-table th:nth-child(5) { width: 75px; }
body.console-refresh #stock-table th:nth-child(6) { width: 75px; }
body.console-refresh #stock-table th:nth-child(7) { width: 65px; }
body.console-refresh #stock-table th:nth-child(8) { width: 130px; }
body.console-refresh #stock-table th:nth-child(9) { width: 85px; }
body.console-refresh #stock-table th:nth-child(10) { width: 105px; }
body.console-refresh #stock-table th:nth-child(11) { width: 100px; }
body.console-refresh #stock-table th:nth-child(12) { width: 106px; }
body.console-refresh #stock-table td:nth-child(10) .badge {
    max-width: 100%;
    white-space: normal;
    line-height: 1.25;
}
body.console-refresh #stock-table td:nth-child(3) strong,
body.console-refresh #stock-table .credential-line,
body.console-refresh #stock-table .stock-sold-date {
    white-space: nowrap;
}
body.console-refresh #stock-table td:nth-child(3) strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.console-refresh #stock-table .credential-line {
    min-width: 0;
}
body.console-refresh #stock-table .stock-status-short {
    display: inline-grid;
    place-items: center;
    width: 24px;
    min-width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 5px;
    color: #fff;
    font-size: .72rem;
    font-weight: 900;
}
body.console-refresh #stock-table .stock-status-short.badge-sold { background: #dc2626; }
body.console-refresh #stock-table .stock-status-short.badge-available { background: #059669; }
body.console-refresh #stock-table .stock-customer {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
}
body.console-refresh #stock-table .stock-customer strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .78rem;
}
.admin-wa-number {
    color: #16a34a;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.admin-wa-number:hover,
.admin-wa-number:focus-visible { text-decoration: underline; }
body.console-refresh #stock-table .stock-row-actions {
    display: grid !important;
    grid-template-columns: repeat(2, 28px) !important;
    gap: 4px !important;
    align-items: center;
    justify-content: center;
    width: 60px !important;
    margin: 0 auto !important;
}
.daily-service-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    white-space: nowrap;
}
.daily-service-row > strong {
    flex: 0 1 auto;
    min-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.daily-account-list {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
}
.daily-account-line {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    color: var(--text-muted);
}
.daily-account-line > span {
    overflow: hidden;
    text-overflow: ellipsis;
}
.daily-account-line b {
    padding: 2px 5px;
    border-radius: 4px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 9px;
}
.daily-service-row .daily-delivery-copy { flex: 0 0 28px; margin-left: auto; }
body.console-refresh #stock-table .stock-added-date {
    display: flex;
    flex-direction: column;
    gap: 2px;
    white-space: nowrap;
}
body.console-refresh #stock-table .stock-added-date strong {
    color: var(--text-primary);
    font-size: .76rem;
}
body.console-refresh #stock-table .stock-added-date small {
    color: var(--text-muted);
    font-size: .68rem;
}
body.console-refresh .wallet-summary-panel {
    padding: 22px !important;
    align-self: start;
}
body.console-refresh .wallet-total-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 86px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-primary);
    border-radius: 8px;
    background: var(--bg-input);
}
body.console-refresh .wallet-total-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 7px;
    background: color-mix(in srgb, var(--accent-primary) 14%, var(--bg-surface));
    color: var(--accent-primary);
}
body.console-refresh .wallet-total-label {
    color: var(--text-secondary);
    font-size: .78rem;
    font-weight: 700;
}
body.console-refresh .wallet-total-value {
    margin-top: 3px;
    color: var(--text-primary);
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
body.console-refresh .payment-source-tag {
    margin: 0 0 0 7px;
    vertical-align: middle;
}
body.console-refresh .daily-refund-button {
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
    color: #dc2626;
    border-color: color-mix(in srgb, #dc2626 36%, var(--border-color));
}
body.console-refresh .daily-refund-button:hover,
body.console-refresh .daily-refund-button:focus-visible {
    background: color-mix(in srgb, #dc2626 10%, var(--bg-surface));
}

@media (max-width: 820px) {
    /* Inventory and daily sales become compact information cards on phones. */
    body.console-refresh #section-stock .table-wrapper,
    body.console-refresh #section-today-sales .table-wrapper {
        overflow: visible !important;
    }
    body.console-refresh #stock-table,
    body.console-refresh .daily-sales-table {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }
    body.console-refresh #stock-table thead,
    body.console-refresh .daily-sales-table thead {
        display: none !important;
    }
    body.console-refresh #stock-table tbody,
    body.console-refresh .daily-sales-table tbody {
        display: grid !important;
        gap: 10px;
    }
    body.console-refresh #stock-table tbody tr,
    body.console-refresh .daily-sales-table tbody tr {
        position: relative;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
        padding: 8px !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 8px !important;
        background: var(--bg-surface) !important;
        box-shadow: 0 4px 14px rgba(15, 23, 42, .05) !important;
    }
    body.console-refresh #stock-table tbody td,
    body.console-refresh .daily-sales-table tbody td {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        padding: 5px 7px !important;
        border: 0 !important;
        font-size: 12px !important;
        overflow-wrap: anywhere;
    }
    body.console-refresh #stock-table tbody td { padding-block: 4px !important; }
    body.console-refresh #stock-table tbody td::before,
    body.console-refresh .daily-sales-table tbody td::before {
        display: block !important;
        margin-bottom: 2px;
        color: var(--text-muted);
        font-size: 9px;
        font-weight: 800;
        letter-spacing: .04em;
        line-height: 1.1;
        text-transform: uppercase;
    }
    body.console-refresh #stock-table tbody td:nth-child(1) { display: none !important; }
    body.console-refresh #stock-table tbody td:nth-child(2)::before { content: 'Service'; }
    body.console-refresh #stock-table tbody td:nth-child(3)::before { content: 'Account'; }
    body.console-refresh #stock-table tbody td:nth-child(4)::before { content: 'Credentials'; }
    body.console-refresh #stock-table tbody td:nth-child(5)::before { content: 'Status'; }
    body.console-refresh #stock-table tbody td:nth-child(6)::before { content: 'Sold price'; }
    body.console-refresh #stock-table tbody td:nth-child(7)::before { content: 'Source'; }
    body.console-refresh #stock-table tbody td:nth-child(8)::before { content: 'Customer'; }
    body.console-refresh #stock-table tbody td:nth-child(9)::before { content: 'Sold at'; }
    body.console-refresh #stock-table tbody td:nth-child(10)::before { content: 'Remaining'; }
    body.console-refresh #stock-table tbody td:nth-child(11)::before { content: 'Date added'; }
    body.console-refresh #stock-table tbody td:nth-child(12)::before { content: 'Actions'; }
    body.console-refresh #stock-table tbody td:nth-child(4),
    body.console-refresh #stock-table tbody td:nth-child(8) {
        grid-column: 1 / -1;
    }
    body.console-refresh #stock-table .stock-added-date small {
        display: none;
    }
    body.console-refresh #stock-table tbody td:nth-child(12) > div {
        width: 60px !important;
        gap: 5px !important;
        margin: 0 auto !important;
    }
    body.console-refresh #stock-table .credentials-stack {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 4px 12px;
        min-width: 0;
    }
    body.console-refresh #stock-table .credential-line { min-height: 20px; }
    body.console-refresh #stock-table .btn-icon {
        width: 28px !important;
        min-width: 28px !important;
        height: 28px !important;
    }
    body.console-refresh #stock-table tbody td:nth-child(12) > div {
        display: grid !important;
        grid-template-columns: repeat(2, 28px) !important;
        gap: 3px !important;
    }

    body.console-refresh .daily-sales-table tbody td:nth-child(1) { display: none !important; }
    body.console-refresh .daily-sales-table tbody td:nth-child(2) {
        position: absolute;
        top: 12px;
        left: 10px;
        z-index: 1;
        padding: 0 !important;
    }
    body.console-refresh .daily-sales-table tbody td:nth-child(2)::before,
    body.console-refresh .daily-sales-table tbody td:nth-child(11)::before { display: none !important; }
    body.console-refresh .daily-sales-table tbody td:nth-child(3) {
        grid-column: 1 / -1;
        padding-left: 32px !important;
        padding-right: 42px !important;
        font-weight: 800;
    }
    body.console-refresh .daily-sales-table tbody td:nth-child(3)::before { content: 'Reference'; }
    body.console-refresh .daily-sales-table tbody td:nth-child(4) { grid-column: 1 / -1; }
    body.console-refresh .daily-sales-table tbody td:nth-child(4)::before { content: 'Service / account'; }
    body.console-refresh .daily-sales-table tbody td:nth-child(5)::before { content: 'Customer'; }
    body.console-refresh .daily-sales-table tbody td:nth-child(6)::before { content: 'Source'; }
    body.console-refresh .daily-sales-table tbody td:nth-child(7)::before { content: 'IDs'; }
    body.console-refresh .daily-sales-table tbody td:nth-child(8)::before { content: 'Sold price'; }
    body.console-refresh .daily-sales-table tbody td:nth-child(9)::before { content: 'Time'; }
    body.console-refresh .daily-sales-table tbody td:nth-child(10)::before { content: 'Status'; }
    body.console-refresh .daily-sales-table tbody td:nth-child(11) {
        position: absolute;
        top: 10px;
        right: 10px;
        padding: 0 !important;
    }
    body.console-refresh .daily-sales-table .daily-service-heading {
        min-width: 0;
    }
    body.console-refresh .daily-sales-table .daily-service-row {
        align-items: flex-start;
        flex-wrap: wrap;
        white-space: normal;
    }
    body.console-refresh .daily-sales-table .daily-account-list {
        flex: 1 1 150px;
        flex-wrap: wrap;
    }

    /* Alerts keep every column, but their scroll stays inside a compact surface. */
    body.console-refresh #section-admin-alerts .table-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: auto !important;
        overscroll-behavior-inline: contain;
        touch-action: pan-x pan-y;
        -webkit-overflow-scrolling: touch;
    }
    body.console-refresh .admin-alerts-table {
        display: table !important;
        width: 700px !important;
        min-width: 700px !important;
        table-layout: fixed;
    }
    body.console-refresh .admin-alerts-table thead { display: table-header-group !important; }
    body.console-refresh .admin-alerts-table tbody { display: table-row-group !important; }
    body.console-refresh .admin-alerts-table tr { display: table-row !important; }
    body.console-refresh .admin-alerts-table th,
    body.console-refresh .admin-alerts-table td { display: table-cell !important; }
    body.console-refresh .admin-alerts-table td::before { display: none !important; content: none !important; }
    body.console-refresh .admin-alerts-table th,
    body.console-refresh .admin-alerts-table td {
        padding: 8px 9px !important;
        font-size: 11px !important;
        line-height: 1.3;
    }
    body.console-refresh .admin-alerts-table th:nth-child(1) { width: 120px; }
    body.console-refresh .admin-alerts-table th:nth-child(2) { width: 130px; }
    body.console-refresh .admin-alerts-table th:nth-child(3) { width: 340px; }
    body.console-refresh .admin-alerts-table th:nth-child(4) { width: 100px; }
    body.console-refresh .wallet-total-card { min-height: 76px; }
}

.request-scope-tabs {
    display: inline-flex;
    gap: 5px;
    margin: 0 0 14px;
    padding: 4px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-input);
}
.request-scope-tabs .filter-tab {
    min-height: 34px;
    padding: 7px 12px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 700;
    cursor: pointer;
}
.request-scope-tabs .filter-tab.active {
    background: var(--accent-primary);
    color: #fff;
}
.request-scope-tabs .filter-tab span {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    margin-left: 5px;
    padding: 0 5px;
    border-radius: 10px;
    background: color-mix(in srgb, currentColor 14%, transparent);
    font-size: .7rem;
}

@media (max-width: 820px) {
    body.console-refresh #section-activations .table-container,
    body.console-refresh #section-replacements .list-panel > div {
        overflow: visible !important;
    }
    body.console-refresh #activations-table,
    body.console-refresh #replacements-table {
        display: block;
        width: 100% !important;
        min-width: 0 !important;
    }
    body.console-refresh #activations-table thead,
    body.console-refresh #replacements-table thead { display: none; }
    body.console-refresh #activations-table tbody,
    body.console-refresh #replacements-table tbody {
        display: grid;
        gap: 10px;
    }
    body.console-refresh #activations-table tbody tr,
    body.console-refresh #replacements-table tbody tr {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 9px !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 8px;
        background: var(--bg-surface);
        box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
    }
    body.console-refresh #activations-table tbody td,
    body.console-refresh #replacements-table tbody td {
        display: block !important;
        min-width: 0;
        padding: 5px 7px !important;
        border: 0 !important;
        overflow-wrap: anywhere;
        font-size: 12px;
    }
    body.console-refresh #activations-table tbody td::before,
    body.console-refresh #replacements-table tbody td::before {
        display: block;
        margin-bottom: 2px;
        color: var(--text-muted);
        font-size: 9px;
        font-weight: 800;
        text-transform: uppercase;
    }
    body.console-refresh #activations-table tbody td:nth-child(1),
    body.console-refresh #replacements-table tbody td:nth-child(1) { display: none !important; }
    body.console-refresh #activations-table tbody td:nth-child(2)::before { content: 'Order / service'; }
    body.console-refresh #activations-table tbody td:nth-child(3)::before { content: 'Email'; }
    body.console-refresh #activations-table tbody td:nth-child(4)::before { content: 'Phone'; }
    body.console-refresh #activations-table tbody td:nth-child(5)::before { content: 'Source'; }
    body.console-refresh #activations-table tbody td:nth-child(6)::before { content: 'Time'; }
    body.console-refresh #activations-table tbody td:nth-child(7)::before { content: 'Date'; }
    body.console-refresh #activations-table tbody td:nth-child(8)::before { content: 'Charge'; }
    body.console-refresh #activations-table tbody td:nth-child(9)::before { content: 'Status'; }
    body.console-refresh #activations-table tbody td:nth-child(10)::before { content: 'Actions'; }
    body.console-refresh #activations-table tbody td:nth-child(2),
    body.console-refresh #activations-table tbody td:nth-child(9),
    body.console-refresh #activations-table tbody td:nth-child(10) { grid-column: 1 / -1; }
    body.console-refresh #activations-table .activation-actions {
        min-width: 0;
        width: 100%;
    }
    body.console-refresh #replacements-table tbody td:nth-child(2)::before { content: 'Status'; }
    body.console-refresh #replacements-table tbody td:nth-child(3)::before { content: 'Service'; }
    body.console-refresh #replacements-table tbody td:nth-child(4)::before { content: 'Credentials'; }
    body.console-refresh #replacements-table tbody td:nth-child(5)::before { content: 'Customer'; }
    body.console-refresh #replacements-table tbody td:nth-child(6)::before { content: 'Reported'; }
    body.console-refresh #replacements-table tbody td:nth-child(7)::before { content: 'Purchased'; }
    body.console-refresh #replacements-table tbody td:nth-child(8)::before { content: 'Actions'; }
    body.console-refresh #replacements-table tbody td:nth-child(4),
    body.console-refresh #replacements-table tbody td:nth-child(5),
    body.console-refresh #replacements-table tbody td:nth-child(8) { grid-column: 1 / -1; }
    body.console-refresh #replacements-table .actions-cell { justify-content: flex-start !important; }
    .request-scope-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; box-sizing: border-box; }
}
.negative-wallet-table td { vertical-align: middle; }
.tutorial-manager-heading,
.tutorial-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.tutorial-manager-heading { margin-bottom: 18px; }
.tutorial-manager-heading h2,
.tutorial-list-header h3 { margin: 3px 0 5px; }
.tutorial-manager-heading p,
.tutorial-list-header p { margin: 0; color: var(--text-secondary); font-size: .84rem; }
.tutorial-add-form {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.4fr) auto;
    align-items: end;
    gap: 14px;
}
.tutorial-add-form .form-group { margin: 0; }
.tutorial-add-form .btn-primary { min-height: 42px; }
.tutorial-list-panel { margin-top: 18px; }
.tutorial-admin-list { display: grid; gap: 10px; margin-top: 16px; }
.tutorial-admin-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-input);
}
.tutorial-admin-row > img {
    width: 150px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 5px;
    background: #090b10;
}
.tutorial-admin-fields { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(260px, 1.2fr); gap: 10px; }
.tutorial-admin-fields label { color: var(--text-secondary); font-size: .72rem; font-weight: 700; }
.tutorial-admin-fields .form-input { margin-top: 4px; min-height: 38px; }
.tutorial-empty-state { min-height: 190px; }
@media (max-width: 820px) {
    .tutorial-manager-heading,
    .tutorial-list-header { align-items: flex-start; }
    .tutorial-add-form { grid-template-columns: 1fr; }
    .tutorial-add-form .btn-primary { width: 100%; }
    .tutorial-admin-row { grid-template-columns: 92px minmax(0, 1fr) 30px; gap: 9px; padding: 8px; }
    .tutorial-admin-row > img { width: 92px; }
    .tutorial-admin-fields { grid-template-columns: 1fr; gap: 6px; }
    .tutorial-admin-fields .form-input { font-size: 12px; }
}
.negative-wallet-email { overflow-wrap: anywhere; }
.negative-balance-badge { display: inline-flex; padding: 5px 9px; border-radius: 6px; background: rgba(239, 68, 68, .14); color: #f87171; font-weight: 800; }
@media (max-width: 700px) {
    .negative-wallet-panel { padding: 14px; }
    .negative-wallet-heading { align-items: flex-start; flex-direction: column; }
    .negative-wallet-controls { width: 100%; align-items: stretch; flex-direction: column; }
    .negative-wallet-summary { text-align: left; }
    .wallet-list-heading { align-items: stretch; flex-direction: column; }
    .wallet-search-control { width: 100%; }
}


/* Admin list clarity, alert inbox, and compact responsive data cards. */
body.console-refresh .table-wrapper,
body.console-refresh .table-container {
    max-width: 100%;
    overflow-x: auto;
}
body.console-refresh .stock-table,
body.console-refresh .data-table {
    border-collapse: separate;
    border-spacing: 0;
}
body.console-refresh .stock-table :is(th, td),
body.console-refresh .data-table :is(th, td) {
    min-width: 0;
    vertical-align: middle;
}
.admin-wa-number {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}
body.console-refresh #stock-table .stock-customer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 2px;
    white-space: normal;
}
body.console-refresh #stock-table .stock-customer .admin-wa-number {
    width: fit-content;
    max-width: 100%;
    font-size: .69rem;
}
body.console-refresh td .admin-wa-number {
    overflow-wrap: normal;
    word-break: normal;
}
body.console-refresh #central-active-status {
    min-height: 94px;
    padding: 16px !important;
    border-left: 4px solid var(--accent-primary) !important;
    background: var(--bg-input) !important;
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text-primary) 5%, transparent);
}
.central-mailbox-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    min-width: 0;
}
.central-mailbox-details {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--text-primary);
}
.central-mailbox-details > small {
    color: var(--text-muted);
    font-size: .67rem;
    font-weight: 800;
    text-transform: uppercase;
}
.central-mailbox-email {
    color: var(--text-primary);
    font-size: .95rem;
    overflow-wrap: anywhere;
}
.central-mailbox-password {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: .76rem;
}
.admin-list-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(100%, 320px);
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-input);
    color: var(--text-muted);
}
.admin-list-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: .8rem;
}
.auto-admin-list-search { margin: 0 0 10px; }
.admin-alerts-panel {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}
.admin-alert-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 180px));
    gap: 10px;
    padding: 14px 18px 4px;
}
.admin-alert-summary-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 60px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}
.admin-alert-summary-card:hover { border-color: var(--accent-primary); }
.admin-alert-summary-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
}
.admin-alert-summary-card.otp .admin-alert-summary-icon {
    color: #9333ea;
    background: color-mix(in srgb, #a855f7 14%, var(--bg-surface));
}
.admin-alert-summary-card.stock .admin-alert-summary-icon {
    color: #dc2626;
    background: color-mix(in srgb, #ef4444 14%, var(--bg-surface));
}
.admin-alert-summary-card > span:last-child { display: grid; }
.admin-alert-summary-card strong { color: var(--text-primary); font-size: 1rem; }
.admin-alert-summary-card small { color: var(--text-secondary); font-size: .72rem; }
.admin-alert-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px dashed var(--border-color);
}
.admin-alert-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.usage-label-select[value="1 user / 1 device"] { border-color: #ef4444; color: #b91c1c; background: #fff1f2; }
.usage-label-select[value="Full account"] { border-color: #22c55e; color: #15803d; background: #f0fdf4; }
body.console-refresh #section-admin-alerts .clean-card-header,
body.console-refresh #section-admin-alerts .clean-card-footer {
    padding-inline: 18px;
}

/* Dense operational tables: preserve every field without page-level overflow. */
.activation-customer-identity {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.activation-customer-identity > * { overflow-wrap: anywhere; }

body.console-refresh #section-payments .table-container {
  width: 100%;
  overflow: hidden;
}
body.console-refresh #section-payments .payments-log-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
body.console-refresh #section-payments .payments-log-table th,
body.console-refresh #section-payments .payments-log-table td {
  padding: 8px 6px !important;
  font-size: 10.5px !important;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
body.console-refresh #section-payments .payments-log-table th:nth-child(1) { width: 46px; }
body.console-refresh #section-payments .payments-log-table th:nth-child(2) { width: 10%; }
body.console-refresh #section-payments .payments-log-table th:nth-child(3) { width: 13%; }
body.console-refresh #section-payments .payments-log-table th:nth-child(4) { width: 11%; }
body.console-refresh #section-payments .payments-log-table th:nth-child(5) { width: 9%; }
body.console-refresh #section-payments .payments-log-table th:nth-child(6) { width: 10%; }
body.console-refresh #section-payments .payments-log-table th:nth-child(7) { width: 8%; }
body.console-refresh #section-payments .payments-log-table th:nth-child(8) { width: 10%; }
body.console-refresh #section-payments .payments-log-table th:nth-child(9) { width: 13%; }
body.console-refresh #section-payments .payments-log-table th:nth-child(10) { width: 12%; }
body.console-refresh #section-payments .payment-log-actions { min-width: 0; }
body.console-refresh #section-payments .payment-log-actions button {
  max-width: 100%;
  white-space: normal !important;
}

body.console-refresh #section-replacements .wa-monitor-header {
  padding: 12px 14px;
  margin-bottom: 12px;
}
body.console-refresh #section-replacements .wa-monitor-header h2 { font-size: 1rem !important; }
body.console-refresh #section-replacements .wa-monitor-header p { font-size: .72rem !important; }
body.console-refresh #section-replacements .list-panel { padding: 10px !important; }
body.console-refresh #replacements-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed;
}
body.console-refresh #replacements-table th,
body.console-refresh #replacements-table td {
  padding: 7px 6px !important;
  font-size: 10.5px !important;
  line-height: 1.28;
  overflow-wrap: anywhere;
}
body.console-refresh #replacements-table th:nth-child(1) { width: 92px; }
body.console-refresh #replacements-table th:nth-child(2) { width: 12%; }
body.console-refresh #replacements-table th:nth-child(3) { width: 23%; }
body.console-refresh #replacements-table th:nth-child(4) { width: 22%; }
body.console-refresh #replacements-table th:nth-child(5),
body.console-refresh #replacements-table th:nth-child(6) { width: 11%; }
body.console-refresh #replacements-table th:nth-child(7) { width: 116px; }
body.console-refresh #replacements-table .badge {
  min-height: 19px;
  padding: 2px 5px !important;
  font-size: 9px !important;
}
body.console-refresh #replacements-table .actions-cell {
  display: grid !important;
  grid-template-columns: repeat(4, 24px);
  gap: 3px !important;
}
body.console-refresh #replacements-table .btn-icon {
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
}

body.console-refresh #buying-guides-grid { display: block; }
.buying-guide-section + .buying-guide-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}
.buying-guide-section-heading { margin-bottom: 11px; }
.buying-guide-section-heading h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1rem;
}
.buying-guide-section-heading p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: .73rem;
}
.buying-guide-section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1100px) {
  body.console-refresh #section-payments .table-container { overflow: visible; }
  body.console-refresh #section-payments .payments-log-table {
    display: block;
    width: 100% !important;
  }
  body.console-refresh #section-payments .payments-log-table thead { display: none; }
  body.console-refresh #section-payments .payments-log-table tbody {
    display: grid;
    gap: 8px;
  }
  body.console-refresh #section-payments .payments-log-table tbody tr:not(.table-date-divider) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 7px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 7px;
    background: var(--bg-surface) !important;
  }
  body.console-refresh #section-payments .payments-log-table tbody td {
    display: block !important;
    min-width: 0;
    padding: 4px 6px !important;
    border: 0 !important;
  }
  body.console-refresh #section-payments .payments-log-table tbody td::before {
    display: block;
    margin-bottom: 2px;
    color: var(--text-muted);
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
  }
  body.console-refresh #section-payments .payments-log-table td:nth-child(1)::before { content: 'Source'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(2)::before { content: 'Customer'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(3)::before { content: 'Customer email'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(4)::before { content: 'Phone / WhatsApp'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(5)::before { content: 'Paid amount'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(6)::before { content: 'Order ref'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(7)::before { content: 'Time'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(8)::before { content: 'Status'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(9)::before { content: 'Receipt'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(10)::before { content: 'Action'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(2),
  body.console-refresh #section-payments .payments-log-table td:nth-child(3),
  body.console-refresh #section-payments .payments-log-table td:nth-child(9),
  body.console-refresh #section-payments .payments-log-table td:nth-child(10) { grid-column: 1 / -1; }
  body.console-refresh #section-payments .payments-log-table .table-date-divider {
    display: block !important;
    padding: 5px 2px;
  }
  body.console-refresh #section-payments .payments-log-table .table-date-divider td::before { display: none; }
  .buying-guide-section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  body.console-refresh #activations-table tbody td:nth-child(1),
  body.console-refresh #replacements-table tbody td:nth-child(1) { display: block !important; }
  body.console-refresh #activations-table tbody td:nth-child(1)::before { content: 'Order / service'; }
  body.console-refresh #activations-table tbody td:nth-child(2)::before { content: 'Activation email'; }
  body.console-refresh #activations-table tbody td:nth-child(3)::before { content: 'Customer email / phone'; }
  body.console-refresh #activations-table tbody td:nth-child(4)::before { content: 'Source'; }
  body.console-refresh #activations-table tbody td:nth-child(5)::before { content: 'Time'; }
  body.console-refresh #activations-table tbody td:nth-child(6)::before { content: 'Date'; }
  body.console-refresh #activations-table tbody td:nth-child(7)::before { content: 'Charge'; }
  body.console-refresh #activations-table tbody td:nth-child(8)::before { content: 'Status'; }
  body.console-refresh #activations-table tbody td:nth-child(9)::before { content: 'Actions'; }
  body.console-refresh #activations-table tbody td:nth-child(1),
  body.console-refresh #activations-table tbody td:nth-child(3),
  body.console-refresh #activations-table tbody td:nth-child(8),
  body.console-refresh #activations-table tbody td:nth-child(9) { grid-column: 1 / -1; }

  body.console-refresh #section-replacements .wa-monitor-header { padding: 9px; }
  body.console-refresh #section-replacements .wa-monitor-header > div:first-child > div:first-child { width: 34px !important; height: 34px !important; }
  body.console-refresh #section-replacements .wa-monitor-header h2 { font-size: .86rem !important; }
  body.console-refresh #section-replacements .wa-monitor-header p { font-size: .64rem !important; }
  body.console-refresh #section-replacements .filter-tab { padding: 5px 7px !important; font-size: .66rem !important; }
  body.console-refresh #replacements-table tbody { gap: 7px; }
  body.console-refresh #replacements-table tbody tr { padding: 6px !important; }
  body.console-refresh #replacements-table tbody td { padding: 3px 5px !important; font-size: 10px !important; }
  body.console-refresh #replacements-table tbody td::before { font-size: 8px; }
  body.console-refresh #replacements-table tbody td:nth-child(1)::before { content: 'Status'; }
  body.console-refresh #replacements-table tbody td:nth-child(2)::before { content: 'Service'; }
  body.console-refresh #replacements-table tbody td:nth-child(3)::before { content: 'Credentials'; }
  body.console-refresh #replacements-table tbody td:nth-child(4)::before { content: 'Customer'; }
  body.console-refresh #replacements-table tbody td:nth-child(5)::before { content: 'Reported'; }
  body.console-refresh #replacements-table tbody td:nth-child(6)::before { content: 'Purchased'; }
  body.console-refresh #replacements-table tbody td:nth-child(7)::before { content: 'Actions'; }
  body.console-refresh #replacements-table tbody td:nth-child(3),
  body.console-refresh #replacements-table tbody td:nth-child(4),
  body.console-refresh #replacements-table tbody td:nth-child(7) { grid-column: 1 / -1; }
  body.console-refresh #replacements-table .actions-cell { justify-content: start !important; }
  .buying-guide-section-grid { grid-template-columns: minmax(0, 1fr); }
}
body.console-refresh .command-extra-field small {
    color: var(--text-muted);
    font-weight: 500;
}
@media (max-width: 820px) {
    body.console-refresh :is(#stock-table, .daily-sales-table, #activations-table, #replacements-table) tbody {
        gap: 12px !important;
    }
    body.console-refresh :is(#stock-table, .daily-sales-table, #activations-table, #replacements-table) tbody tr {
        overflow: hidden;
        padding: 0 !important;
        border-top: 3px solid var(--accent-primary) !important;
        box-shadow: 0 7px 20px color-mix(in srgb, #0f172a 9%, transparent) !important;
    }
    body.console-refresh :is(#stock-table, .daily-sales-table, #activations-table, #replacements-table) tbody td {
        min-height: 36px;
        padding: 7px 9px !important;
        border-bottom: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent) !important;
        color: var(--text-primary);
    }
    body.console-refresh :is(#stock-table, .daily-sales-table, #activations-table, #replacements-table) tbody td::before {
        color: var(--accent-primary) !important;
        letter-spacing: 0 !important;
    }
    body.console-refresh :is(#stock-table, .daily-sales-table, #activations-table, #replacements-table) tbody td:nth-last-child(-n+2) {
        border-bottom: 0 !important;
    }
    body.console-refresh #stock-table .stock-customer { gap: 3px; }
    .admin-alert-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 12px 12px 2px;
    }
    .admin-alert-toolbar {
        display: grid;
        padding: 10px 12px;
    }
    .admin-alert-search { width: 100%; box-sizing: border-box; }
    .admin-alert-filter-row { width: 100%; }
    body.console-refresh #section-admin-alerts .clean-card-header {
        display: grid !important;
        align-items: start !important;
        padding: 14px 12px !important;
    }
    body.console-refresh #section-admin-alerts .clean-card-header > div:last-child {
        width: 100%;
        display: grid !important;
        grid-template-columns: 1fr 1fr;
    }
    body.console-refresh #section-admin-alerts .clean-card-header button {
        justify-content: center;
        min-width: 0;
        padding-inline: 8px !important;
    }
    body.console-refresh #section-admin-alerts .table-wrapper {
        border-top: 1px solid var(--border-color);
    }
    .auto-admin-list-search { width: 100%; box-sizing: border-box; }
    .central-mailbox-card { align-items: flex-start; }
}

#stock-table .stock-row-actions { display: grid !important; grid-template-columns: repeat(2, 28px) !important; }

body.console-refresh #stock-table td:last-child > div.stock-row-actions { display: grid !important; grid-template-columns: repeat(2, 28px) !important; }

body.console-refresh #section-mailbox .list-panel > h3 { color: var(--text-primary) !important; }

@media (max-width: 820px) {
    body.console-refresh #stock-table tbody td:nth-child(2) > div,
    body.console-refresh #stock-table tbody td:nth-child(3) > div {
        min-width: 0;
        flex-wrap: nowrap !important;
        overflow: hidden;
    }
    body.console-refresh #stock-table tbody td:nth-child(2) .badge,
    body.console-refresh #stock-table tbody td:nth-child(3) strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

#stock-table .stock-priority-label { margin-top: 3px; color: var(--accent-primary); font-size: 9px; font-weight: 800; }

/* Analytics, compact cards and stock entry refinements. */
body.console-refresh .profiles-wrapper {
    padding: 12px;
    margin: 0;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-surface);
    box-shadow: none;
}
body.console-refresh .profiles-header { margin-bottom: 9px; padding-bottom: 8px; }
body.console-refresh .profile-row { display: grid; grid-template-columns: 26px minmax(0, 2fr) minmax(120px, 1fr) 34px; gap: 7px; margin: 0 0 7px; }
body.console-refresh .profile-row input { width: 100% !important; min-height: 36px !important; padding: 7px 9px !important; border-radius: 5px !important; }
body.console-refresh .profile-row .btn-delete-row { width: 34px !important; height: 34px !important; padding: 0 !important; border-radius: 5px !important; }
.stock-checkbox-group { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-content: center; gap: 2px 8px; min-height: 40px; }
.stock-checkbox-group input { grid-row: 1 / 3; align-self: center; width: 16px !important; min-height: 16px !important; margin: 0; }
.stock-checkbox-group label { margin: 0; font-size: 12px; font-weight: 700; }
.stock-checkbox-group span { color: var(--text-muted); font-size: 10px; }
.stock-bulk-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.stock-bulk-actions > span { color: var(--text-muted); font-size: 11px; }
#stock-table .stock-select-cell { text-align: center; }
#stock-table .stock-row-select, #stock-select-all { width: 15px; height: 15px; accent-color: var(--accent-primary); }
.analytics-insights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
.analytics-insight { min-width: 0; padding: 12px 14px; border-left: 3px solid var(--accent-primary); background: var(--bg-input); }
.analytics-insight span { display: block; color: var(--text-muted); font-size: 10px; text-transform: uppercase; }
.analytics-insight strong { display: block; margin-top: 4px; overflow: hidden; color: var(--text-primary); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.report-canvas canvas { display: block; width: 100% !important; height: 100% !important; }
@media (max-width: 820px) {
    body.console-refresh :is(#stock-table, .daily-sales-table, #activations-table, #replacements-table) tbody { gap: 7px !important; }
    body.console-refresh :is(#stock-table, .daily-sales-table, #activations-table, #replacements-table) tbody tr { border-top-width: 2px !important; box-shadow: 0 3px 10px color-mix(in srgb, #0f172a 7%, transparent) !important; }
    body.console-refresh :is(#stock-table, .daily-sales-table, #activations-table, #replacements-table) tbody td { min-height: 28px; padding: 4px 7px !important; font-size: 11px !important; }
    body.console-refresh :is(#stock-table, .daily-sales-table, #activations-table, #replacements-table) tbody td::before { margin-bottom: 1px; font-size: 8px; }
    body.console-refresh #stock-table tbody td:nth-child(1) { display: block !important; grid-column: 1 / -1; min-height: 22px; }
    body.console-refresh #stock-table tbody td:nth-child(1)::before { content: 'Select'; }
    body.console-refresh .profile-row { grid-template-columns: 22px minmax(0, 1fr) 70px 30px; gap: 5px; }
    body.console-refresh .profile-row input { min-height: 32px !important; padding: 5px 7px !important; }
    body.console-refresh .profile-row .btn-delete-row { width: 30px !important; height: 30px !important; }
    .analytics-insights { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .stock-bulk-actions { width: 100%; justify-content: space-between; }
}

/* Dynamic product copy editor, wallet visibility and compact order actions. */
.product-page-content-section { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-input); }
.product-features-heading, .wallet-list-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.product-features-editor { display: grid; gap: 7px; }
.product-feature-editor-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 34px; align-items: center; gap: 7px; }
.product-feature-editor-row .form-input { min-width: 0; margin: 0; }
.feature-grip { color: var(--text-muted); text-align: center; }
.compact-button { min-height: 32px; padding: 6px 10px; }
.wallet-range-filter { width: 170px; min-width: 150px; margin: 0; }
body.console-refresh .negative-wallet-panel { display: block !important; visibility: visible !important; color: var(--text-primary); background: color-mix(in srgb, #ef4444 7%, var(--bg-surface)); }
.order-row-actions { display: grid; grid-template-columns: repeat(2, 32px); justify-content: end; gap: 5px; }
.order-refund-button { color: #dc2626; }
body.console-refresh #main-orders-tbody td { font-size: .76rem; line-height: 1.3; padding-block: 9px; }
body.console-refresh #main-orders-tbody .order-customer-name,
body.console-refresh #main-orders-tbody .order-service { font-size: .76rem; }
@media (max-width: 700px) {
  .wallet-list-controls { align-items: stretch; flex-direction: column; width: 100%; }
  .wallet-range-filter { width: 100%; }
}

/* Negative wallet list: remove the inherited desktop flex height and keep every field visible on phones. */
@media (max-width: 700px) {
  body.console-refresh .negative-wallet-panel {
    margin-top: 12px;
    padding: 11px;
  }
  body.console-refresh .negative-wallet-heading {
    align-items: stretch;
    gap: 12px;
    margin-bottom: 12px;
  }
  body.console-refresh .negative-wallet-heading > div:first-child { width: 100%; }
  body.console-refresh .negative-wallet-heading h2 { font-size: 17px; }
  body.console-refresh .negative-wallet-heading p { font-size: 11px; line-height: 1.45; }
  body.console-refresh .negative-wallet-controls {
    flex: 0 0 auto;
    width: 100%;
    gap: 8px;
  }
  body.console-refresh .negative-wallet-summary {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  body.console-refresh .negative-wallet-summary strong { font-size: 14px; }
  body.console-refresh .negative-wallet-panel > .table-wrapper { overflow: visible; }
  body.console-refresh .negative-wallet-table {
    display: block;
    width: 100%;
    min-width: 0;
  }
  body.console-refresh .negative-wallet-table thead { display: none; }
  body.console-refresh .negative-wallet-table tbody {
    display: grid;
    gap: 8px;
  }
  body.console-refresh .negative-wallet-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 10px;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-left: 3px solid #ef4444;
    border-radius: 7px;
    background: var(--bg-surface);
    box-sizing: border-box;
  }
  body.console-refresh .negative-wallet-table tbody td {
    display: block;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    font-size: 11px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-align: left !important;
  }
  body.console-refresh .negative-wallet-table tbody td::before {
    display: block;
    margin-bottom: 2px;
    color: var(--text-muted);
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
  }
  body.console-refresh .negative-wallet-table tbody td:nth-child(1) { display: none; }
  body.console-refresh .negative-wallet-table tbody td:nth-child(1)::before { display: none; content: none; }
  body.console-refresh .negative-wallet-table tbody td:nth-child(2) { grid-column: 1; grid-row: 1; font-size: 12px; }
  body.console-refresh .negative-wallet-table tbody td:nth-child(3) { grid-column: 1 / -1; grid-row: 2; }
  body.console-refresh .negative-wallet-table tbody td:nth-child(3)::before { content: 'Email'; }
  body.console-refresh .negative-wallet-table tbody td:nth-child(4) { grid-column: 1; grid-row: 3; }
  body.console-refresh .negative-wallet-table tbody td:nth-child(4)::before { content: 'Phone'; }
  body.console-refresh .negative-wallet-table tbody td:nth-child(5) { grid-column: 2; grid-row: 1; align-self: start; }
  body.console-refresh .negative-wallet-table tbody td:nth-child(6) { grid-column: 2; grid-row: 3; }
  body.console-refresh .negative-wallet-table tbody td:nth-child(6)::before { content: 'Overdraft'; }
  body.console-refresh .negative-wallet-table tbody td:nth-child(7) { grid-column: 1 / -1; grid-row: 4; }
  body.console-refresh .negative-wallet-table .negative-wallet-actions { justify-content: flex-start; }
  body.console-refresh .negative-balance-badge { padding: 4px 7px; font-size: 10px; white-space: nowrap; }
}

.product-page-content-section .service-section-heading > div { display: grid; gap: 3px; }
.product-page-content-section .service-section-heading .service-field-help { display: block; }


/* Final compact inventory-card overrides. */
@media (max-width: 820px) {
    body.console-refresh #stock-table tbody tr {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0 !important;
        padding: 7px 9px !important;
        border-radius: 7px !important;
    }
    body.console-refresh #stock-table tbody td:nth-child(1) {
        position: absolute;
        z-index: 2;
        top: 7px;
        right: 7px;
        display: block !important;
        width: 18px !important;
        min-height: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }
    body.console-refresh #stock-table tbody td:nth-child(1)::before { display: none !important; content: none; }
    body.console-refresh #stock-table tbody td {
        display: grid !important;
        grid-template-columns: 58px minmax(0, 1fr);
        align-items: start;
        min-height: 0 !important;
        padding: 2px !important;
        border-bottom: 1px solid var(--border-color) !important;
        font-size: 10.5px !important;
        line-height: 1.15;
    }
    body.console-refresh #stock-table tbody td::before {
        margin: 1px 6px 0 0 !important;
        font-size: 7.5px !important;
        letter-spacing: .03em;
    }
    body.console-refresh #stock-table tbody td:nth-child(2) { padding-right: 30px !important; }
    body.console-refresh #stock-table tbody td:nth-child(4),
    body.console-refresh #stock-table tbody td:nth-child(12) { grid-column: 1 / -1 !important; }
    body.console-refresh #stock-table tbody td:nth-child(12) { border-bottom: 0 !important; }
    body.console-refresh #stock-table tbody td:nth-child(12) > div {
        width: auto !important;
        margin: 0 !important;
        grid-template-columns: repeat(4, 24px) !important;
    }
    body.console-refresh #stock-table .btn-icon {
        width: 24px !important;
        min-width: 24px !important;
        height: 24px !important;
    }
    body.console-refresh #stock-table .badge { font-size: 9px !important; }
    body.console-refresh #stock-table .credentials-stack { gap: 2px !important; }
    body.console-refresh #stock-table .credential-line { min-height: 16px; font-size: 10px; }
    body.console-refresh #stock-table .stock-customer { gap: 1px; line-height: 1.1; }
    body.console-refresh #stock-table .stock-customer strong { font-size: 10px; }
    body.console-refresh #stock-table .stock-customer .admin-wa-number { font-size: 9px; }
}


/* The desktop stock table remains unchanged; this duplicate presentation is mobile-only. */
#stock-table .stock-mobile-card-cell { display: none !important; }
#replacements-table .replacement-mobile-card-cell { display: none !important; }

@media (max-width: 820px) {
    body.console-refresh #stock-table tbody tr {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        border: 0 !important;
        border-radius: 15px !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    body.console-refresh #stock-table tbody td:not(.stock-mobile-card-cell) { display: none !important; }
    body.console-refresh #stock-table tbody .stock-mobile-card-cell {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        border: 0 !important;
    }
    .stock-mobile-card {
        width: 100%;
        min-width: 0;
        overflow: hidden;
        border: 1px solid var(--border-color);
        border-radius: 15px;
        background: var(--bg-surface);
        box-shadow: 0 7px 20px color-mix(in srgb, #0f172a 8%, transparent);
    }
    .stock-mobile-header {
        display: grid;
        grid-template-columns: 22px minmax(0, 1fr) auto;
        align-items: start;
        gap: 7px;
        padding: 10px 11px 8px;
        border-bottom: 1px solid var(--border-color);
    }
    .stock-mobile-select { display: grid; place-items: center; width: 22px; height: 22px; margin: 0; }
    .stock-mobile-select input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent-primary); }
    .stock-mobile-identity { display: grid; gap: 6px; min-width: 0; }
    .stock-mobile-identity > strong {
        overflow: hidden;
        color: var(--text-primary);
        font-size: 13px;
        line-height: 1.3;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .stock-mobile-identity > div { display: flex; flex-wrap: wrap; gap: 5px; }
    .stock-mobile-category,
    .stock-mobile-international,
    .stock-mobile-status {
        display: inline-flex;
        align-items: center;
        min-height: 19px;
        padding: 2px 6px;
        border: 1px solid var(--border-color);
        border-radius: 999px;
        font-size: 8px;
        font-weight: 800;
        line-height: 1;
        text-transform: uppercase;
    }
    .stock-mobile-category { color: var(--accent-primary); background: color-mix(in srgb, var(--accent-primary) 8%, var(--bg-surface)); }
    .stock-mobile-international { color: #c2410c; background: #fff7ed; border-color: #fed7aa; }
    .stock-mobile-status.is-sold { color: #dc2626; background: #fef2f2; border-color: #fecaca; }
    .stock-mobile-status.is-available { color: #078058; background: #ecfdf5; border-color: #a7f3d0; }
    [data-theme="dark"] .stock-mobile-international { color: #fdba74; background: #431407; border-color: #9a3412; }
    [data-theme="dark"] .stock-mobile-status.is-sold { color: #fca5a5; background: #450a0a; border-color: #991b1b; }
    [data-theme="dark"] .stock-mobile-status.is-available { color: #6ee7b7; background: #022c22; border-color: #065f46; }

    .stock-mobile-primary { display: grid; gap: 0; padding: 2px 11px; }
    .stock-mobile-field {
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 7px;
        min-width: 0;
        padding: 5px 0;
        border-bottom: 1px solid color-mix(in srgb, var(--border-color) 72%, transparent);
    }
    .stock-mobile-field:last-child { border-bottom: 0; }
    .stock-mobile-field > span,
    .stock-mobile-metrics span,
    .stock-mobile-detail-grid > div > span {
        color: var(--text-muted);
        font-size: 8px;
        font-weight: 800;
        line-height: 1.3;
        text-transform: uppercase;
    }
    .stock-mobile-field > div,
    .stock-mobile-field > strong {
        min-width: 0;
        color: var(--text-primary);
        font-size: 11px;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }
    .stock-mobile-account > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 7px; }
    .stock-mobile-account a { min-width: 0; color: var(--accent-primary); overflow-wrap: anywhere; }
    .stock-mobile-copy { flex: 0 0 27px; width: 27px; height: 27px; padding: 0; border: 1px solid var(--border-color); border-radius: 6px; color: var(--text-secondary); background: var(--bg-input); }
    .stock-mobile-primary .credentials-stack { gap: 1px !important; }
    .stock-mobile-primary .credential-line { min-height: 15px; font-size: 9.5px; }

    .stock-mobile-metrics {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        padding: 7px 11px;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        background: var(--bg-input);
    }
    .stock-mobile-metrics > div { display: grid; gap: 4px; min-width: 0; }
    .stock-mobile-metrics strong { min-width: 0; color: var(--text-primary); font-size: 10px; overflow-wrap: anywhere; }
    .stock-mobile-metrics .badge { width: max-content; max-width: 100%; font-size: 8px !important; }

    .stock-mobile-details { border-bottom: 1px solid var(--border-color); }
    .stock-mobile-details > summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 32px;
        padding: 6px 11px;
        color: var(--text-secondary);
        font-size: 10px;
        font-weight: 700;
        cursor: pointer;
        list-style: none;
    }
    .stock-mobile-details > summary::-webkit-details-marker { display: none; }
    .stock-mobile-details > summary i { transition: transform 150ms ease; }
    .stock-mobile-details[open] > summary i { transform: rotate(180deg); }
    .stock-mobile-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 11px 9px; }
    .stock-mobile-detail-grid > div { display: grid; gap: 3px; min-width: 0; color: var(--text-primary); font-size: 10px; overflow-wrap: anywhere; }
    .stock-mobile-detail-grid code { font-size: 9px; overflow-wrap: anywhere; }
    .stock-mobile-detail-grid .stock-added-date { display: grid; gap: 1px; }

    .stock-mobile-actions {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 5px;
        padding: 8px 9px 9px;
    }
    .stock-mobile-actions button {
        display: grid;
        place-items: center;
        gap: 3px;
        min-width: 0;
        min-height: 40px;
        padding: 4px 2px;
        border: 1px solid var(--border-color);
        border-radius: 7px;
        background: var(--bg-input);
        color: var(--text-primary);
        cursor: pointer;
    }
    .stock-mobile-actions button i { font-size: 12px; }
    .stock-mobile-actions button span { font-size: 8px; font-weight: 700; }
    .stock-mobile-actions button.is-danger { color: #dc2626; }
}

/* Responsive admin inbox and single-socket WhatsApp monitor */
body.console-refresh #section-admin-alerts,
body.console-refresh #section-whatsapp { width: 100%; max-width: none; min-width: 0; }
body.console-refresh #section-admin-alerts .clean-card { width: 100%; max-width: none; box-sizing: border-box; }
body.console-refresh #section-admin-alerts .admin-alert-toolbar { min-width: 0; }
body.console-refresh #section-admin-alerts .alert-filter-pills { overflow-x: auto; scrollbar-width: thin; }
.wa-monitor-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px; padding:16px; margin-bottom:12px; border:1px solid var(--border-color); background:var(--bg-surface); }
.wa-monitor-shell { display:grid; grid-template-columns:minmax(260px, 32%) minmax(0, 1fr); min-height:clamp(520px, 68vh, 760px); border:1px solid var(--border-color); overflow:hidden; background:var(--bg-surface); }
.wa-chat-sidebar { display:flex; flex-direction:column; min-width:0; border-right:1px solid var(--border-color); background:var(--bg-surface); }
.wa-chat-viewport { display:flex; flex-direction:column; min-width:0; background:color-mix(in srgb, #efeae2 75%, var(--bg-surface)); }
.wa-chat-header { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:64px; padding:10px 14px; border-bottom:1px solid var(--border-color); background:var(--bg-surface); }
.wa-mobile-back { display:none; width:36px; height:36px; border:0; background:transparent; color:var(--text-primary); cursor:pointer; }
#wa-message-stream { background-color:#efeae2 !important; background-image:radial-gradient(rgba(17,27,33,.045) 1px, transparent 1px) !important; background-size:18px 18px !important; }
[data-theme="dark"] #wa-message-stream { background-color:#0b141a !important; }
@media (max-width: 720px) {
  body.console-refresh #section-admin-alerts .clean-card-header { align-items:flex-start; }
  body.console-refresh #section-admin-alerts .clean-card-header > div:last-child { width:100%; display:grid !important; grid-template-columns:1fr 1fr; }
  body.console-refresh #section-admin-alerts .clean-card-header button { min-width:0; justify-content:center; }
  body.console-refresh #section-admin-alerts .admin-alert-toolbar { display:grid !important; grid-template-columns:1fr; }
  body.console-refresh #section-admin-alerts .table-wrapper { width:100%; overflow-x:auto; }
  .wa-monitor-header { padding:12px; }
  .wa-monitor-shell { display:block; min-height:calc(100dvh - 190px); }
  .wa-chat-sidebar, .wa-chat-viewport { height:calc(100dvh - 190px); border:0; }
  .wa-chat-viewport { display:none; }
  #section-whatsapp.wa-chat-open .wa-chat-sidebar { display:none; }
  #section-whatsapp.wa-chat-open .wa-chat-viewport { display:flex; }
  .wa-mobile-back { display:inline-grid; place-items:center; flex:0 0 auto; }
  #wa-message-stream { padding:10px !important; }
}


/* Compact media and buying-guide managers */
body.console-refresh #section-store-tutorials {
    width: min(100%, 1180px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
body.console-refresh #section-store-tutorials.hidden { display: none; }
body.console-refresh #section-store-tutorials .tutorial-manager-heading {
    grid-column: 1 / -1;
    margin: 0;
    padding: 18px 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
}
body.console-refresh #section-store-tutorials .tutorial-add-panel,
body.console-refresh #section-store-tutorials .tutorial-list-panel {
    min-width: 0;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
}
body.console-refresh #section-store-tutorials .tutorial-add-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}
body.console-refresh #section-store-tutorials .tutorial-add-form .btn-primary {
    width: 100%;
    justify-content: center;
}
body.console-refresh #section-store-tutorials .tutorial-list-header {
    align-items: flex-start;
}
body.console-refresh #section-store-tutorials .tutorial-list-header h3,
body.console-refresh #section-store-tutorials .tutorial-manager-heading h2 {
    color: var(--text-primary);
}
body.console-refresh #section-store-tutorials .tutorial-list-header .btn-primary {
    flex: 0 0 auto;
    width: auto;
    min-width: 136px;
}
body.console-refresh #section-store-tutorials .tutorial-empty-state {
    min-height: 140px;
    padding: 24px;
    color: var(--text-secondary);
}
body.console-refresh #section-store-tutorials .tutorial-empty-state h3 {
    color: var(--text-primary);
}
body.console-refresh .guide-manager-grid {
    display: block !important;
    width: min(100%, 1180px);
    margin: 0 auto !important;
}
body.console-refresh .guide-manager-panel {
    padding: 20px;
}
body.console-refresh .guide-manager-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
body.console-refresh .guide-manager-heading h2 {
    margin: 3px 0 5px;
    color: var(--text-primary);
}
body.console-refresh .guide-manager-heading p {
    max-width: 720px;
    margin: 0;
    color: var(--text-secondary);
    font-size: .82rem;
}
body.console-refresh #buying-guides-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
body.console-refresh #buying-guides-grid:not(.is-ready)::before { display: none; }
body.console-refresh .guide-empty-state { min-height: 150px; padding: 24px; }

@media (max-width: 980px) {
    body.console-refresh #section-store-tutorials {
        grid-template-columns: minmax(0, 1fr);
    }
    body.console-refresh #section-store-tutorials .tutorial-manager-heading { grid-column: 1; }
    body.console-refresh #buying-guides-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    body.console-refresh #section-store-tutorials { gap: 10px; }
    body.console-refresh #section-store-tutorials .tutorial-manager-heading,
    body.console-refresh #section-store-tutorials .tutorial-add-panel,
    body.console-refresh #section-store-tutorials .tutorial-list-panel,
    body.console-refresh .guide-manager-panel { padding: 14px; }
    body.console-refresh #section-store-tutorials .tutorial-manager-heading,
    body.console-refresh #section-store-tutorials .tutorial-list-header,
    body.console-refresh .guide-manager-heading { flex-direction: column; }
    body.console-refresh #section-store-tutorials .tutorial-list-header .btn-primary { width: 100%; }
    body.console-refresh #buying-guides-grid { grid-template-columns: minmax(0, 1fr) !important; }
}

body.console-refresh #section-store-tutorials .field-helper {
    display: block;
    margin-top: 12px;
    color: var(--text-secondary);
    line-height: 1.55;
}


/* Final admin density and layout corrections */
body.console-refresh .search-icon { font-size: .72rem; margin-right: 6px; }
body.console-refresh #section-stock .list-panel { width: 100%; max-width: none; margin-inline: 0; }
body.console-refresh #section-stock .filter-controls { width: 100%; box-sizing: border-box; }
body.console-refresh #stock-table { width: 100%; min-width: 0; max-width: none; margin-inline: 0; table-layout: fixed; }
body.console-refresh #section-stock .table-wrapper { width: 100%; max-width: none; box-sizing: border-box; }
body.console-refresh #stock-table th,
body.console-refresh #stock-table td { padding: 10px 7px !important; font-size: 12px !important; overflow-wrap: anywhere; }
body.console-refresh #stock-table th:nth-child(1) { width: 38px; }
body.console-refresh #stock-table th:nth-child(2) { width: 12%; }
body.console-refresh #stock-table th:nth-child(3) { width: 13%; }
body.console-refresh #stock-table th:nth-child(4) { width: 17%; }
body.console-refresh #stock-table th:nth-child(5) { width: 6%; }
body.console-refresh #stock-table th:nth-child(6) { width: 7%; }
body.console-refresh #stock-table th:nth-child(7) { width: 7%; }
body.console-refresh #stock-table th:nth-child(8) { width: 11%; }
body.console-refresh #stock-table th:nth-child(9) { width: 8%; }
body.console-refresh #stock-table th:nth-child(10) { width: 8%; }
body.console-refresh #stock-table th:nth-child(11) { width: 9%; }
body.console-refresh #stock-table th:nth-child(12) { width: 82px; }
.customer-access-tools { display: grid; gap: 18px; }
.customer-access-tools .password-reset-widget { margin: 0 !important; }
body.console-refresh .services-table th:last-child { width: 76px; }
body.console-refresh .services-table td:last-child { padding-inline: 7px !important; }
body.console-refresh .services-table .actions-cell { display: grid; grid-template-columns: repeat(2, 30px); justify-content: center; gap: 5px; min-width: 65px; }
body.console-refresh .services-table .actions-cell .btn-icon { width: 30px; min-width: 30px; height: 30px; border-radius: 6px; }
body.console-refresh .services-table .actions-cell .btn-icon span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
body.console-refresh #section-wallets > .main-grid { grid-template-columns: minmax(0, 1fr) !important; }
body.console-refresh #section-wallets .wallet-summary-panel,
body.console-refresh #section-wallets .main-grid > .list-panel { width: 100%; max-width: none; box-sizing: border-box; }
body.console-refresh #section-wallets .wallet-total-card { width: 100%; box-sizing: border-box; }
@media (max-width: 820px) {
  body.console-refresh #section-stock .list-panel { max-width: none; }
  body.console-refresh #stock-table { min-width: 0; max-width: none; }
  body.console-refresh .wallet-summary-panel { padding: 14px !important; }
  body.console-refresh .wallet-total-card { min-height: 72px; padding: 12px; }
}
.addon-options-editor { display: grid; gap: 8px; margin-top: 8px; }
.addon-option-editor-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(145px, .8fr) 90px minmax(180px, 1.2fr) 38px; gap: 8px; align-items: center; }
@media (max-width: 820px) { .addon-option-editor-row { grid-template-columns: 1fr 1fr; } .addon-option-editor-row .addon-option-prompt { grid-column: 1 / -1; } }

/* Admin alerts: dense desktop surface and a true no-scroll phone table. */
body.console-refresh #section-admin-alerts {
  width: 100%;
  min-width: 0;
}
body.console-refresh #section-admin-alerts .admin-alerts-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  height: calc(100dvh - 190px);
  min-height: 520px;
}
body.console-refresh #section-admin-alerts .clean-card-header {
  flex: 0 0 auto;
  padding: 15px 18px !important;
}
body.console-refresh #section-admin-alerts .clean-card-header h2 {
  font-size: 1.05rem !important;
  line-height: 1.25;
}
body.console-refresh #section-admin-alerts .clean-card-header p {
  font-size: .74rem !important;
  line-height: 1.35;
}
body.console-refresh #section-admin-alerts .clean-card-header button,
body.console-refresh #section-admin-alerts .alert-filter-pill {
  font-size: .7rem !important;
}
body.console-refresh #section-admin-alerts .admin-alert-toolbar {
  flex: 0 0 auto;
  padding: 9px 18px;
}
body.console-refresh #section-admin-alerts .admin-alert-search {
  min-height: 34px;
}
body.console-refresh #section-admin-alerts .admin-alert-search input {
  font-size: .72rem;
}
body.console-refresh #section-admin-alerts .table-wrapper {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}
body.console-refresh #section-admin-alerts .admin-alerts-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed;
}
body.console-refresh #section-admin-alerts .admin-alerts-table th,
body.console-refresh #section-admin-alerts .admin-alerts-table td {
  padding: 7px 10px !important;
  font-size: 10.5px !important;
  line-height: 1.25;
}
body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(1) { width: 42px; }
body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(2) { width: 14%; }
body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(3) { width: 10%; }
body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(4) { width: auto; }
body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(5) { width: 180px; }
body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(4) > div {
  font-size: 10.5px !important;
  overflow-wrap: anywhere;
}
body.console-refresh #section-admin-alerts .clean-card-footer {
  flex: 0 0 auto;
  padding-block: 11px;
  font-size: .68rem;
}

@media (max-width: 820px) {
  body.console-refresh #section-admin-alerts .admin-alerts-panel {
    height: auto;
    min-height: 0;
  }
  body.console-refresh #section-admin-alerts .clean-card-header {
    gap: 9px !important;
    padding: 11px 9px !important;
  }
  body.console-refresh #section-admin-alerts .clean-card-header h2 {
    gap: 6px !important;
    font-size: .9rem !important;
  }
  body.console-refresh #section-admin-alerts .clean-card-header p {
    margin-top: 2px !important;
    font-size: .65rem !important;
  }
  body.console-refresh #section-admin-alerts .clean-card-header button {
    min-height: 31px;
    padding: 5px 6px !important;
    font-size: .64rem !important;
  }
  body.console-refresh #section-admin-alerts .admin-alert-toolbar {
    gap: 7px;
    padding: 8px 9px;
  }
  body.console-refresh #section-admin-alerts .admin-alert-filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 5px;
    overflow: visible;
  }
  body.console-refresh #section-admin-alerts .alert-filter-pill {
    width: 100%;
    min-width: 0;
    padding: 5px 4px !important;
    font-size: .62rem !important;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.console-refresh #section-admin-alerts .table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    touch-action: pan-y;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table {
    display: table !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table th,
  body.console-refresh #section-admin-alerts .admin-alerts-table td {
    display: table-cell !important;
    height: auto;
    padding: 6px 3px !important;
    font-size: 9px !important;
    vertical-align: middle;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table tr {
    display: table-row !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(1) { width: 7%; }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(2) { width: 17%; }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(3) { width: 15%; }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(4) { width: 42%; }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(5) { width: 19%; }
  body.console-refresh #section-admin-alerts .admin-alerts-table td::before {
    display: none !important;
    content: none !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(2) {
    white-space: nowrap;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(2) .badge {
    width: 24px;
    min-width: 24px;
    height: 24px;
    padding: 0 !important;
    justify-content: center;
    overflow: hidden;
    font-size: 0 !important;
    vertical-align: middle;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(2) .badge i {
    margin: 0 !important;
    font-size: 9px !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table .payment-source-tag {
    margin: 0 2px 0 0;
    padding: 2px 4px;
    font-size: 8px;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(3) {
    font-size: 8.5px !important;
    white-space: nowrap;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(4) > div {
    display: -webkit-box;
    overflow: hidden;
    font-size: 9px !important;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(4) span[title="Unread"] {
    width: 5px !important;
    height: 5px !important;
    margin-right: 3px !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(5) > div {
    display: grid !important;
    grid-template-columns: repeat(2, 26px);
    justify-content: end !important;
    gap: 3px !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(5) button {
    width: 26px;
    min-width: 26px;
    height: 26px;
    padding: 0 !important;
    justify-content: center;
    overflow: hidden;
    font-size: 0 !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(5) button i {
    margin: 0 !important;
    font-size: 9px !important;
  }
  body.console-refresh #section-admin-alerts .table-date-divider td {
    padding: 5px 7px !important;
    font-size: 8.5px !important;
  }
  body.console-refresh #section-admin-alerts .clean-card-footer {
    padding: 7px 9px;
    font-size: .62rem;
  }
}

/* Last-mile overrides for the grouped guides and compact operation cards. */
body.console-refresh #buying-guides-grid {
  display: block !important;
}
body.console-refresh .buying-guide-section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1100px) {
  body.console-refresh .buying-guide-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  body.console-refresh #activations-table tbody td:nth-child(1),
  body.console-refresh #replacements-table tbody td:nth-child(1) {
    display: block !important;
  }
  body.console-refresh #activations-table tbody td:nth-child(1)::before { content: 'Order / service'; }
  body.console-refresh #activations-table tbody td:nth-child(2)::before { content: 'Activation email'; }
  body.console-refresh #activations-table tbody td:nth-child(3)::before { content: 'Customer email / phone'; }
  body.console-refresh #activations-table tbody td:nth-child(4)::before { content: 'Source'; }
  body.console-refresh #activations-table tbody td:nth-child(5)::before { content: 'Time'; }
  body.console-refresh #activations-table tbody td:nth-child(6)::before { content: 'Date'; }
  body.console-refresh #activations-table tbody td:nth-child(7)::before { content: 'Charge'; }
  body.console-refresh #activations-table tbody td:nth-child(8)::before { content: 'Status'; }
  body.console-refresh #activations-table tbody td:nth-child(9)::before { content: 'Actions'; }
  body.console-refresh #activations-table tbody td:nth-child(1),
  body.console-refresh #activations-table tbody td:nth-child(3),
  body.console-refresh #activations-table tbody td:nth-child(8),
  body.console-refresh #activations-table tbody td:nth-child(9) { grid-column: 1 / -1; }

  body.console-refresh #section-replacements .wa-monitor-header { padding: 9px; }
  body.console-refresh #section-replacements .wa-monitor-header h2 { font-size: .86rem !important; }
  body.console-refresh #section-replacements .wa-monitor-header p { font-size: .64rem !important; }
  body.console-refresh #section-replacements .filter-tab { padding: 5px 7px !important; font-size: .66rem !important; }
  body.console-refresh #replacements-table tbody { gap: 7px !important; }
  body.console-refresh #replacements-table tbody tr { padding: 6px !important; }
  body.console-refresh #replacements-table tbody td {
    display: block !important;
    min-height: 0 !important;
    padding: 3px 5px !important;
    font-size: 10px !important;
    line-height: 1.22;
  }
  body.console-refresh #replacements-table tbody td::before { font-size: 8px; }
  body.console-refresh #replacements-table tbody td:nth-child(1)::before { content: 'Status'; }
  body.console-refresh #replacements-table tbody td:nth-child(2)::before { content: 'Service'; }
  body.console-refresh #replacements-table tbody td:nth-child(3)::before { content: 'Credentials'; }
  body.console-refresh #replacements-table tbody td:nth-child(4)::before { content: 'Customer'; }
  body.console-refresh #replacements-table tbody td:nth-child(5)::before { content: 'Reported'; }
  body.console-refresh #replacements-table tbody td:nth-child(6)::before { content: 'Purchased'; }
  body.console-refresh #replacements-table tbody td:nth-child(7)::before { content: 'Actions'; }
  body.console-refresh #replacements-table tbody td:nth-child(3),
  body.console-refresh #replacements-table tbody td:nth-child(4),
  body.console-refresh #replacements-table tbody td:nth-child(7) { grid-column: 1 / -1; }
  body.console-refresh #replacements-table .actions-cell { justify-content: start !important; }

  body.console-refresh .buying-guide-section-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* console-tables.js prepends the # column; these positions include it. */
body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(1) { width: 38px; }
body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(2) { width: 42px; }
body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(3) { width: 14%; }
body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(4) { width: 10%; }
body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(5) { width: auto; }
body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(6) { width: 180px; }
body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(5) > div {
  font-size: 10.5px !important;
  overflow-wrap: anywhere;
}

body.console-refresh #section-payments .payments-log-table th:nth-child(1) { width: 38px; }
body.console-refresh #section-payments .payments-log-table th:nth-child(2) { width: 42px; }
body.console-refresh #section-payments .payments-log-table th:nth-child(3) { width: 9%; }
body.console-refresh #section-payments .payments-log-table th:nth-child(4) { width: 13%; }
body.console-refresh #section-payments .payments-log-table th:nth-child(5) { width: 11%; }
body.console-refresh #section-payments .payments-log-table th:nth-child(6) { width: 9%; }
body.console-refresh #section-payments .payments-log-table th:nth-child(7) { width: 10%; }
body.console-refresh #section-payments .payments-log-table th:nth-child(8) { width: 8%; }
body.console-refresh #section-payments .payments-log-table th:nth-child(9) { width: 10%; }
body.console-refresh #section-payments .payments-log-table th:nth-child(10) { width: 13%; }
body.console-refresh #section-payments .payments-log-table th:nth-child(11) { width: 12%; }

body.console-refresh #replacements-table th:nth-child(1) { width: 38px; }
body.console-refresh #replacements-table th:nth-child(2) { width: 92px; }
body.console-refresh #replacements-table th:nth-child(3) { width: 12%; }
body.console-refresh #replacements-table th:nth-child(4) { width: 23%; }
body.console-refresh #replacements-table th:nth-child(5) { width: 22%; }
body.console-refresh #replacements-table th:nth-child(6),
body.console-refresh #replacements-table th:nth-child(7) { width: 11%; }
body.console-refresh #replacements-table th:nth-child(8) { width: 116px; }

@media (max-width: 1100px) {
  body.console-refresh #section-payments .payments-log-table tbody td:nth-child(1) { display: none !important; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(2)::before { content: 'Source'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(3)::before { content: 'Customer'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(4)::before { content: 'Customer email'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(5)::before { content: 'Phone / WhatsApp'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(6)::before { content: 'Paid amount'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(7)::before { content: 'Order ref'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(8)::before { content: 'Time'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(9)::before { content: 'Status'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(10)::before { content: 'Receipt'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(11)::before { content: 'Action'; }
  body.console-refresh #section-payments .payments-log-table td:nth-child(3),
  body.console-refresh #section-payments .payments-log-table td:nth-child(4),
  body.console-refresh #section-payments .payments-log-table td:nth-child(10),
  body.console-refresh #section-payments .payments-log-table td:nth-child(11) { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(1) { width: 6%; }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(2) { width: 7%; }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(3) { width: 15%; }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(4) { width: 14%; }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(5) { width: 39%; }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(6) { width: 19%; }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(3) .badge {
    width: 24px;
    min-width: 24px;
    height: 24px;
    padding: 0 !important;
    overflow: hidden;
    font-size: 0 !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(3) .badge i { margin: 0 !important; font-size: 9px !important; }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(4) { font-size: 8.5px !important; white-space: nowrap; }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(5) > div {
    display: -webkit-box;
    overflow: hidden;
    font-size: 9px !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(6) > div {
    display: grid !important;
    grid-template-columns: repeat(2, 26px);
    justify-content: end !important;
    gap: 3px !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(6) button {
    width: 26px;
    min-width: 26px;
    height: 26px;
    padding: 0 !important;
    justify-content: center;
    overflow: hidden;
    font-size: 0 !important;
  }

  body.console-refresh #activations-table tbody td:nth-child(1),
  body.console-refresh #replacements-table tbody td:nth-child(1) { display: none !important; }
  body.console-refresh #activations-table tbody td:nth-child(2)::before { content: 'Order / service'; }
  body.console-refresh #activations-table tbody td:nth-child(3)::before { content: 'Activation email'; }
  body.console-refresh #activations-table tbody td:nth-child(4)::before { content: 'Customer email / phone'; }
  body.console-refresh #activations-table tbody td:nth-child(5)::before { content: 'Source'; }
  body.console-refresh #activations-table tbody td:nth-child(6)::before { content: 'Time'; }
  body.console-refresh #activations-table tbody td:nth-child(7)::before { content: 'Date'; }
  body.console-refresh #activations-table tbody td:nth-child(8)::before { content: 'Charge'; }
  body.console-refresh #activations-table tbody td:nth-child(9)::before { content: 'Status'; }
  body.console-refresh #activations-table tbody td:nth-child(10)::before { content: 'Actions'; }
  body.console-refresh #activations-table tbody td:nth-child(2),
  body.console-refresh #activations-table tbody td:nth-child(4),
  body.console-refresh #activations-table tbody td:nth-child(9),
  body.console-refresh #activations-table tbody td:nth-child(10) { grid-column: 1 / -1; }

  body.console-refresh #replacements-table tbody td:nth-child(2)::before { content: 'Status'; }
  body.console-refresh #replacements-table tbody td:nth-child(3)::before { content: 'Service'; }
  body.console-refresh #replacements-table tbody td:nth-child(4)::before { content: 'Credentials'; }
  body.console-refresh #replacements-table tbody td:nth-child(5)::before { content: 'Customer'; }
  body.console-refresh #replacements-table tbody td:nth-child(6)::before { content: 'Reported'; }
  body.console-refresh #replacements-table tbody td:nth-child(7)::before { content: 'Purchased'; }
  body.console-refresh #replacements-table tbody td:nth-child(8)::before { content: 'Actions'; }
  body.console-refresh #replacements-table tbody td:nth-child(4),
  body.console-refresh #replacements-table tbody td:nth-child(5),
  body.console-refresh #replacements-table tbody td:nth-child(8) { grid-column: 1 / -1; }

  body.console-refresh #replacements-table tbody td:nth-child(4),
  body.console-refresh #replacements-table tbody td:nth-child(5) {
    grid-column: auto !important;
    padding-block: 2px !important;
    font-size: 9.5px !important;
  }
  body.console-refresh #replacements-table tbody td:nth-child(4) br,
  body.console-refresh #replacements-table tbody td:nth-child(5) br { display: none; }
  body.console-refresh #replacements-table tbody td:nth-child(4) small,
  body.console-refresh #replacements-table tbody td:nth-child(5) small {
    display: block;
    margin-top: 2px;
    font-size: 9px;
    line-height: 1.18;
  }
  body.console-refresh #replacements-table tbody td:nth-child(8) { grid-column: 1 / -1; }
}

/* Keep phone alerts as compact rows while reserving real reading room for subjects. */
@media (max-width: 620px) {
  body.console-refresh #section-admin-alerts .admin-alerts-table,
  body.console-refresh #section-admin-alerts .admin-alerts-table thead,
  body.console-refresh #section-admin-alerts .admin-alerts-table tbody {
    display: block !important;
    width: 100% !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table thead tr,
  body.console-refresh #section-admin-alerts .admin-alerts-table tbody tr:not(.table-date-divider) {
    display: grid !important;
    grid-template-columns: 30px 30px 52px minmax(0, 1fr) 61px;
    width: 100%;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table tbody tr:not(.table-date-divider) {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    align-items: center;
    overflow: hidden;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table tbody tr:not(.table-date-divider) td {
    display: block !important;
    min-width: 0;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(1),
  body.console-refresh #section-admin-alerts .admin-alerts-table tbody tr:not(.table-date-divider) td:nth-child(1) {
    display: none !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(2) { width: 30px; }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(3) { width: 30px; }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(4) { width: 52px; }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(5) { width: auto; }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(6) { width: 61px; }
  body.console-refresh #section-admin-alerts .admin-alerts-table th,
  body.console-refresh #section-admin-alerts .admin-alerts-table td {
    padding: 6px 2px !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(2),
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(3) {
    overflow: hidden;
    color: transparent;
    font-size: 0 !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(2)::after,
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(3)::after {
    color: var(--text-muted);
    font-size: 7px;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(2)::after { content: 'SRC'; }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(3)::after { content: 'TYPE'; }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(4),
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(6) {
    font-size: 7px !important;
    overflow-wrap: anywhere;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(5) {
    padding-inline: 5px !important;
    font-size: 7.5px !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(5) {
    min-width: 0;
    padding-inline: 5px !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table .admin-alert-subject-preview {
    display: -webkit-box !important;
    max-width: none !important;
    overflow: hidden !important;
    white-space: normal !important;
    word-break: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
    font-size: 9px !important;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2 !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(6) > div {
    grid-template-columns: repeat(2, 26px) !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(6) button i {
    display: inline-block !important;
    margin: 0 !important;
    font-size: 9px !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table .table-date-divider td {
    display: block !important;
    width: 100%;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table .table-date-divider {
    display: block !important;
    width: 100%;
  }
}

/* Today's Sales stays a compact horizontal table on phones. */
@media (max-width: 620px) {
  body.console-refresh #section-today-sales .table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  body.console-refresh #section-today-sales .daily-sales-table {
    display: table !important;
    width: 100% !important;
    min-width: 980px !important;
    table-layout: fixed;
  }
  body.console-refresh #section-today-sales .daily-sales-table thead {
    display: table-header-group !important;
  }
  body.console-refresh #section-today-sales .daily-sales-table tbody {
    display: table-row-group !important;
  }
  body.console-refresh #section-today-sales .daily-sales-table tbody tr {
    position: static !important;
    display: table-row !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body.console-refresh #section-today-sales .daily-sales-table th,
  body.console-refresh #section-today-sales .daily-sales-table tbody td {
    position: static !important;
    display: table-cell !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 7px 6px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--border-color) !important;
    font-size: 10px !important;
    line-height: 1.35;
    overflow: hidden;
    overflow-wrap: normal;
    text-overflow: ellipsis;
    white-space: nowrap !important;
    word-break: normal;
    vertical-align: middle;
  }
  body.console-refresh #section-today-sales .daily-sales-table tbody td::before {
    display: none !important;
    content: none !important;
  }
  body.console-refresh #section-today-sales .daily-sales-table .daily-service-row,
  body.console-refresh #section-today-sales .daily-sales-table .daily-account-list {
    flex-wrap: nowrap;
  }
  body.console-refresh #section-today-sales .daily-sales-table .daily-refund-button {
    width: 28px;
    min-width: 28px;
    height: 28px;
  }
}

/* Keep the phone alert subject in its own readable column. */
@media (max-width: 620px) {
  body.console-refresh #section-admin-alerts .admin-alerts-table tbody tr:not(.table-date-divider) td:nth-child(5) > .admin-alert-subject-preview {
    display: block !important;
    width: 100% !important;
    max-height: 26px !important;
    margin: 0 !important;
    overflow: hidden !important;
    justify-content: initial !important;
    align-content: initial !important;
    text-align: left !important;
    white-space: normal !important;
    word-break: normal !important;
    font-size: 9px !important;
    line-height: 1.35 !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(6) {
    color: transparent !important;
    font-size: 0 !important;
    text-align: center !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(6)::after {
    content: 'ACT';
    color: var(--text-muted);
    font-size: 7px;
  }
}

/* Align the two phone alert actions and their different icon glyphs precisely. */
@media (max-width: 620px) {
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(6) > div {
    align-items: center !important;
    height: 26px;
    line-height: 1;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(6) button {
    display: grid !important;
    place-items: center !important;
    margin: 0 !important;
    border-width: 1px !important;
    box-sizing: border-box;
    line-height: 1 !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(6) button i {
    display: block !important;
    width: 12px;
    height: 12px;
    margin: 0 !important;
    line-height: 12px !important;
    text-align: center;
  }
}

/* Activation notes stay compact in the table and open in a focused detail view. */
.activation-status-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.activation-status-view {
  flex: 0 0 30px;
  width: 30px;
  min-width: 30px;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px;
  padding: 0;
  box-sizing: border-box;
}
.activation-status-modal-card { max-width: 560px; }
.activation-status-modal-card .modal-header h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
}
.activation-status-modal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.activation-status-modal-summary > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
}
.activation-status-modal-summary span,
.activation-status-message-label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.activation-status-modal-summary strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.activation-status-modal-message {
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  font: 13px/1.55 var(--font-main, sans-serif);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.activation-status-modal-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

/* The phone inbox uses its own compact rules; only enlarge desktop rows. */
@media (min-width: 821px) {
  body.console-refresh #section-admin-alerts .admin-alerts-table th,
  body.console-refresh #section-admin-alerts .admin-alerts-table td {
    padding: 9px 12px !important;
    font-size: 12px !important;
    line-height: 1.35;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table td:nth-child(5) > .admin-alert-subject-preview {
    font-size: 12px !important;
  }
  body.console-refresh #section-admin-alerts .admin-alerts-table th:nth-child(6) { width: 190px; }
}

@media (max-width: 620px) {
  .activation-status-modal-summary { grid-template-columns: 1fr; }
  .activation-status-modal-card { width: calc(100% - 24px); }
}

/* Pending activations use the original table on phones, contained in horizontal scroll. */
@media (max-width: 820px) {
  body.console-refresh #section-activations .table-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }
  body.console-refresh #section-activations #activations-table {
    display: table !important;
    width: 1260px !important;
    min-width: 1260px !important;
    table-layout: fixed;
  }
  body.console-refresh #section-activations #activations-table thead {
    display: table-header-group !important;
  }
  body.console-refresh #section-activations #activations-table tbody {
    display: table-row-group !important;
  }
  body.console-refresh #section-activations #activations-table thead tr,
  body.console-refresh #section-activations #activations-table tbody tr {
    display: table-row !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body.console-refresh #section-activations #activations-table th,
  body.console-refresh #section-activations #activations-table tbody td {
    position: static !important;
    display: table-cell !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 8px 9px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--border-color) !important;
    font-size: 11px !important;
    line-height: 1.35;
    overflow: hidden;
    overflow-wrap: normal;
    text-overflow: ellipsis;
    white-space: nowrap !important;
    word-break: normal;
    vertical-align: middle;
  }
  body.console-refresh #section-activations #activations-table tbody td::before {
    display: none !important;
    content: none !important;
  }
  body.console-refresh #section-activations #activations-table :is(th, td):nth-child(1) { width: 44px !important; }
  body.console-refresh #section-activations #activations-table :is(th, td):nth-child(2) { width: 160px !important; }
  body.console-refresh #section-activations #activations-table :is(th, td):nth-child(3) { width: 190px !important; }
  body.console-refresh #section-activations #activations-table :is(th, td):nth-child(4) { width: 220px !important; }
  body.console-refresh #section-activations #activations-table :is(th, td):nth-child(5) { width: 70px !important; }
  body.console-refresh #section-activations #activations-table :is(th, td):nth-child(6) { width: 80px !important; }
  body.console-refresh #section-activations #activations-table :is(th, td):nth-child(7) { width: 105px !important; }
  body.console-refresh #section-activations #activations-table :is(th, td):nth-child(8) { width: 90px !important; }
  body.console-refresh #section-activations #activations-table :is(th, td):nth-child(9) { width: 125px !important; }
  body.console-refresh #section-activations #activations-table :is(th, td):nth-child(10) { width: 176px !important; }
  body.console-refresh #section-activations .activation-customer-identity {
    align-items: flex-start;
    overflow: hidden;
  }
  body.console-refresh #section-activations .activation-actions {
    width: auto !important;
    min-width: 0 !important;
    flex-wrap: nowrap;
  }
}

@media (max-width: 820px) {
  body.console-refresh #replacements-table,
  body.console-refresh #replacements-table tbody { display: block !important; width: 100% !important; min-width: 0 !important; }
  body.console-refresh #replacements-table thead { display: none !important; }
  body.console-refresh #replacements-table tbody tr:has(.replacement-mobile-card-cell) {
    display: block !important; width: 100% !important; min-width: 0 !important;
    padding: 0 !important; margin: 0 0 12px !important; border: 0 !important;
    background: transparent !important; box-shadow: none !important;
  }
  body.console-refresh #replacements-table tbody tr:has(.replacement-mobile-card-cell) > td:not(.replacement-mobile-card-cell) { display: none !important; }
  body.console-refresh #replacements-table tbody td.replacement-mobile-card-cell {
    display: block !important; width: 100% !important; min-width: 0 !important;
    max-width: none !important; padding: 0 !important; border: 0 !important; white-space: normal !important;
  }
  body.console-refresh #replacements-table tbody td.replacement-mobile-card-cell::before { display: none !important; content: none !important; }
  .stock-mobile-card, .stock-mobile-card * { box-sizing: border-box; min-width: 0; }
  .stock-mobile-card {
    max-width: 100%; border-radius: 14px; border-color: color-mix(in srgb, var(--border-color) 82%, #94a3b8);
    box-shadow: 0 8px 22px color-mix(in srgb, #0f172a 9%, transparent);
  }
  .stock-mobile-header {
    grid-template-columns: 22px 36px minmax(0, 1fr) auto; align-items: start;
    gap: 9px; padding: 12px 13px; background: color-mix(in srgb, var(--bg-input) 48%, var(--bg-surface));
  }
  .replacement-mobile-card .stock-mobile-header { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .stock-mobile-service-icon {
    display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
    color: var(--accent-primary); background: color-mix(in srgb, var(--accent-primary) 10%, var(--bg-surface));
  }
  .stock-mobile-service-icon i { font-size: 14px; }
  .stock-mobile-select { margin-top: 4px; }
  .stock-mobile-identity { gap: 5px; }
  .stock-mobile-identity > strong {
    display: block; overflow: visible; color: var(--text-primary); font-size: 14px; font-weight: 750;
    line-height: 1.3; text-overflow: clip; white-space: normal; overflow-wrap: anywhere;
  }
  .stock-mobile-identity > div { align-items: center; gap: 4px; }
  .stock-mobile-category, .stock-mobile-international, .stock-mobile-status,
  .stock-mobile-priority, .stock-mobile-reported, .stock-mobile-promo {
    display: inline-flex; align-items: center; gap: 3px; min-height: 20px; max-width: 100%;
    padding: 3px 7px; border: 1px solid var(--border-color); border-radius: 999px;
    font-size: 8px; font-weight: 800; line-height: 1; text-transform: uppercase; overflow-wrap: anywhere;
  }
  .stock-mobile-status { align-self: start; margin-top: 1px; white-space: nowrap; }
  .stock-mobile-flags { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
  .stock-mobile-priority { color: #9a6700; background: #fffbeb; border-color: #fde68a; }
  .stock-mobile-reported { color: #dc2626; background: #fef2f2; border-color: #fecaca; }
  .stock-mobile-promo { color: #7c3aed; background: #f5f3ff; border-color: #ddd6fe; }
  [data-theme="dark"] .stock-mobile-priority { color: #fde68a; background: #422006; border-color: #854d0e; }
  [data-theme="dark"] .stock-mobile-reported { color: #fca5a5; background: #450a0a; border-color: #991b1b; }
  [data-theme="dark"] .stock-mobile-promo { color: #c4b5fd; background: #2e1065; border-color: #6d28d9; }
  .replacement-mobile-card .stock-mobile-header > div:last-child .badge,
  .replacement-mobile-card .stock-mobile-identity .badge { margin: 0 !important; font-size: 8px !important; white-space: nowrap; }

  .stock-mobile-primary { padding: 0 13px; }
  .stock-mobile-field {
    grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 9px;
    padding: 10px 0; border-bottom-color: color-mix(in srgb, var(--border-color) 72%, transparent);
  }
  .stock-mobile-field-icon {
    display: inline-grid !important; place-items: center; width: 30px; height: 30px; margin: 0 !important;
    border-radius: 8px; color: var(--text-secondary) !important; background: var(--bg-input);
    font-size: 11px !important; line-height: 1 !important;
  }
  .stock-mobile-field-body, .stock-mobile-account > .stock-mobile-field-body { display: grid; gap: 4px; }
  .stock-mobile-field-label {
    color: var(--text-muted); font-size: 8px; font-weight: 800; line-height: 1.2; text-transform: uppercase;
  }
  .stock-mobile-field-value {
    color: var(--text-primary); font-size: 11.5px; font-weight: 600; line-height: 1.4;
    overflow-wrap: anywhere; word-break: normal;
  }
  body.console-refresh #stock-table .stock-mobile-card :is(strong, a, code, .secret-value),
  body.console-refresh #replacements-table .stock-mobile-card :is(strong, a, code, .secret-value) {
    max-width: 100%; overflow: visible; text-overflow: clip; white-space: normal !important;
    overflow-wrap: anywhere !important; word-break: normal !important;
  }
  .stock-mobile-value-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
  .stock-mobile-value-row > :first-child { flex: 1 1 auto; overflow-wrap: anywhere; }
  .stock-mobile-inline-copy, .stock-mobile-copy {
    flex: 0 0 30px !important; width: 30px !important; min-width: 30px !important; height: 30px !important;
    border: 1px solid var(--border-color) !important; border-radius: 7px !important; background: var(--bg-input) !important;
    color: var(--text-secondary) !important;
  }
  .stock-mobile-primary .credentials-stack { display: grid; min-width: 0; gap: 5px !important; }
  .stock-mobile-primary .credential-line {
    display: grid; grid-template-columns: auto minmax(0, 1fr) 30px; align-items: center;
    min-height: 30px; gap: 6px; font-size: 10.5px; white-space: normal !important;
  }
  .stock-mobile-primary .credential-label { color: var(--text-muted); white-space: nowrap; }
  .stock-mobile-primary .secret-value { min-width: 0; color: var(--text-primary); letter-spacing: 0; overflow-wrap: anywhere; }
  .stock-mobile-plain-secret { font-family: inherit; }
  .stock-mobile-empty-value { color: var(--text-muted); font-weight: 500; }
  .stock-mobile-inline-notes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
  .stock-mobile-inline-notes > span { padding: 3px 6px; border-radius: 5px; color: #7c3aed; background: #f5f3ff; font-size: 9px; }
  [data-theme="dark"] .stock-mobile-inline-notes > span { color: #c4b5fd; background: #2e1065; }
  .stock-mobile-customer-value { display: grid; gap: 2px; font-weight: 500; }
  .stock-mobile-customer-copy { display: flex; gap: 5px; margin-top: 4px; }

  .stock-mobile-metrics { gap: 0; padding: 0 13px; background: color-mix(in srgb, var(--bg-input) 72%, var(--bg-surface)); }
  .stock-mobile-metrics > div { gap: 4px; padding: 10px 8px; border-right: 1px solid var(--border-color); }
  .stock-mobile-metrics > div:first-child { padding-left: 0; }
  .stock-mobile-metrics > div:last-child { padding-right: 0; border-right: 0; }
  .stock-mobile-metrics span { font-size: 8px; }
  .stock-mobile-metrics strong { font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
  .replacement-mobile-card .stock-mobile-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .stock-mobile-details > summary { min-height: 40px; padding: 8px 13px; font-size: 10.5px; }
  .stock-details-open { display: none; }
  .stock-mobile-details[open] .stock-details-closed { display: none; }
  .stock-mobile-details[open] .stock-details-open { display: inline; }
  .stock-mobile-detail-grid { gap: 0 12px; padding: 0 13px 10px; }
  .stock-mobile-detail-grid > div { gap: 4px; padding: 9px 0; border-top: 1px solid var(--border-color); font-size: 10.5px; line-height: 1.4; }
  .stock-mobile-detail-grid > div > span { font-size: 8px; }
  .stock-mobile-detail-grid code, .stock-mobile-detail-grid strong { font-size: 10.5px; overflow-wrap: anywhere; white-space: normal; }
  .stock-mobile-detail-grid .stock-added-date strong { font-size: 10.5px !important; }
  .stock-mobile-detail-wide { grid-column: 1 / -1; }

  .stock-mobile-actions { gap: 6px; padding: 10px 13px 12px; }
  body.console-refresh #stock-table .stock-mobile-actions button,
  body.console-refresh #replacements-table .replacement-mobile-card .stock-mobile-actions button {
    display: grid !important; place-items: center; width: 100% !important; min-width: 0 !important; max-width: none !important;
    height: 44px !important; min-height: 44px !important; padding: 5px 3px !important; gap: 3px;
    border: 1px solid var(--border-color) !important; border-radius: 8px !important; background: var(--bg-input) !important;
    color: var(--text-primary) !important;
  }
  body.console-refresh .stock-mobile-actions button:hover { border-color: color-mix(in srgb, var(--accent-primary) 48%, var(--border-color)) !important; }
  body.console-refresh .stock-mobile-actions button.is-danger { color: #dc2626 !important; background: #fff7f7 !important; border-color: #fecaca !important; }
  body.console-refresh[data-theme="dark"] .stock-mobile-actions button.is-danger { color: #fca5a5 !important; background: #2b1111 !important; border-color: #7f1d1d !important; }
  .stock-mobile-actions button i { font-size: 12px; }
  .stock-mobile-actions button span, .replacement-mobile-card .stock-mobile-actions button span { font-size: 8.5px; font-weight: 750; white-space: normal; line-height: 1.1; }
  .replacement-mobile-card .stock-mobile-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 390px) {
  .stock-mobile-actions { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .stock-mobile-actions > button { grid-column: span 2; }
  .stock-mobile-actions > button:nth-last-child(2), .stock-mobile-actions > button:last-child { grid-column: span 3; }
  .replacement-mobile-card .stock-mobile-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .replacement-mobile-card .stock-mobile-actions > button { grid-column: auto; }
}

@media (min-width: 600px) and (max-width: 820px) {
  .stock-mobile-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .stock-mobile-primary .stock-mobile-field:nth-child(odd) { padding-right: 16px; border-right: 1px solid var(--border-color); }
  .stock-mobile-primary .stock-mobile-field:nth-child(even) { padding-left: 0; }
  .stock-mobile-primary .stock-mobile-field:last-child:nth-child(odd) { grid-column: 1 / -1; padding-right: 0; border-right: 0; }
  .replacement-mobile-card .stock-mobile-primary .stock-mobile-field:last-child:nth-child(odd) { grid-column: auto; }
}

@media (max-width: 350px) {
  .stock-mobile-header { grid-template-columns: 20px 32px minmax(0, 1fr) auto; gap: 6px; padding-inline: 10px; }
  .replacement-mobile-card .stock-mobile-header { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .stock-mobile-service-icon { width: 32px; height: 32px; }
  .stock-mobile-identity > strong { font-size: 12.5px; }
  .stock-mobile-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stock-mobile-metrics > div:nth-child(2) { border-right: 0; }
  .stock-mobile-metrics > div:nth-child(3) { grid-column: 1 / -1; padding-left: 0; border-top: 1px solid var(--border-color); }
  .stock-mobile-detail-grid { grid-template-columns: 1fr; }
  .stock-mobile-detail-wide { grid-column: auto; }
}
