:root {
    /* Desert-bazaar theme for the admin panel: adobe/mudbrick
       terracotta, pomegranate red, tilework turquoise, desert-night
       backdrop. Same variable names as before so every existing component
       re-themes automatically — only the hues moved from generic tech
       purple/pink/orange to colors literal to the theme's own materials. */
    --bg-0: #14100f;
    --bg-1: #1e1512;
    --bg-2: #2a1a16;
    --glass: rgba(42, 26, 22, 0.5);
    --glass-strong: rgba(36, 22, 18, 0.72);
    --glass-soft: rgba(255, 244, 230, 0.055);
    --stroke: rgba(255, 244, 230, 0.12);
    --stroke-strong: rgba(201, 123, 74, 0.42);
    --text: #f3ece0;
    --muted: #b8a594;
    --cyan: #4fa69a;
    --sky: #e8896b;
    --violet: #d98f5f;
    --magenta: #b23a48;
    --emerald: #3fa88f;
    --rose: #e15c5c;
    --amber: #e0a458;
    --copper: #c97b4a;
    --purple: #6b4a42;
    --pink: #e8896b;
    --adobe: #c97b4a;
    --pomegranate: #b23a48;
    --turquoise: #2f8f82;
    --sand: #e4c9a3;
    --saffron: #e0a458;
    --radius: 18px;
    --radius-sm: 13px;
    --sidebar: 88px;
    --sidebar-expanded: 244px;
    --topbar: 68px;
    --font: 'YekanBakhFa', sans-serif;
    --font-display: 'Abar', 'YekanBakhFa', sans-serif;
    --blur: blur(9px) saturate(1.08);
    --shadow: 0 3px 14px rgba(6, 4, 14, 0.26), 0 0 0 1px rgba(255,255,255,0.06);
    --accent-text: linear-gradient(90deg, #f3ece0, #e4c9a3);
    --accent: linear-gradient(135deg, #c97b4a 0%, #b23a48 55%, #e0a458 125%);
    --accent-solid: #c97b4a;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
    --gauge-hole: rgba(10, 14, 28, 0.92);
    --gauge-track: rgba(255, 255, 255, 0.08);
    --panel-sunken: rgba(0, 0, 0, 0.18);
    --chrome-bg: rgba(12, 10, 22, 0.72);
    --chrome-bg-soft: rgba(16, 12, 28, 0.55);
}



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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.7;
    background:
        radial-gradient(920px 520px at 100% -10%, rgba(201, 123, 74, 0.14), transparent 55%),
        radial-gradient(780px 460px at -8% 105%, rgba(178, 58, 72, 0.08), transparent 52%),
        radial-gradient(640px 380px at 55% 40%, rgba(47, 143, 130, 0.06), transparent 60%),
        linear-gradient(165deg, var(--bg-0), var(--bg-1) 48%, var(--bg-2));
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .25s ease, color .25s ease;
}

a { color: var(--pink); text-decoration: none; transition: color .15s; }
a:hover { color: var(--pomegranate); }

.glass-panel,
.stat-card,
.form-card,
.detail-card,
.table-wrap,
.login-card,
.monitor-card,
.metric-card,
.gauge-card {
    background: var(--glass-strong);
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
}

/* ——— Sidebar ——— */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: var(--sidebar-expanded);
    height: 100vh;
    padding: 1rem 0.7rem 0.85rem;
    display: flex;
    flex-direction: column;
    z-index: 100;
    border-radius: 0 0 0 28px;
    border-left: 1px solid var(--stroke);
    background: var(--chrome-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0.55rem 1rem;
    border-bottom: 1px solid var(--stroke);
    margin-bottom: 0.75rem;
}

.brand-mark {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 14px;
    display: block;
    background: var(--accent);
    box-shadow: 0 8px 22px rgba(236, 72, 153, 0.35);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 1rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-text small { color: var(--muted); font-size: 0.72rem; }

.nav-list { list-style: none; flex: 1; overflow-y: auto; padding: 0.25rem 0; }
.nav-list::-webkit-scrollbar { width: 4px; }
.nav-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }

.nav-section {
    padding: 0.85rem 0.75rem 0.35rem;
    font-size: 0.68rem;
    color: var(--muted);
    letter-spacing: 0.08em;
}

.sidebar li a,
.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.7rem;
    margin: 0.18rem 0;
    color: var(--muted);
    border-radius: 16px;
    border: 1px solid transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
    position: relative;
}

.sidebar li a:hover {
    color: var(--text);
    background: var(--glass-soft);
    border-color: var(--stroke);
}

.sidebar li a.active {
    color: #fff;
    background: var(--accent);
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(201, 123, 74, 0.35);
}

.nav-badge {
    margin-right: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #b23a48, #e0a458);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-grid;
    place-items: center;
    box-shadow: 0 4px 12px rgba(178, 58, 72, 0.4);
}

.nav-ico { width: 24px; height: 24px; display: grid; place-items: center; flex-shrink: 0; }
.ico { width: 21px; height: 21px; display: block; }
.metric-icon .ico, .qa-ico .ico { width: 22px; height: 22px; }
.sidebar li a.active .ico-live,
.sidebar li a:hover .ico-live { animation: icoBlink 1.4s ease-in-out infinite; }
.sidebar li a.active .ico-blink,
.sidebar li a:hover .ico-blink { animation: icoBlink 1.6s ease-in-out infinite; }
.sidebar li a.active .ico-nudge,
.sidebar li a:hover .ico-nudge { animation: icoNudge 1.8s ease-in-out infinite; }
.sidebar li a.active .ico-wave,
.sidebar li a:hover .ico-wave { stroke-dasharray: 40; animation: dashMove 2s linear infinite; }

@keyframes icoBlink { 0%,100%{opacity:1} 50%{opacity:.4} }
@keyframes icoNudge { 0%,100%{transform:translate(0,0)} 50%{transform:translate(1.5px,-1px)} }
@keyframes dashMove { to { stroke-dashoffset: -80; } }

.logout-form { padding: 0.75rem 0.25rem 0.25rem; border-top: 1px solid var(--stroke); }
.logout-btn { width: 100%; cursor: pointer; font-family: inherit; background: transparent; }

.nav-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 120;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--stroke);
    background: var(--glass-strong);
    color: var(--text);
}

/* ——— Topbar ——— */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: var(--topbar);
    margin: -0.25rem 0 1.25rem;
    padding: 0.65rem 1rem;
    border-radius: 22px;
    border: 1px solid var(--stroke);
    background: var(--chrome-bg-soft);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow);
}
.topbar-title {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 0 1 auto;
}
.topbar-title strong {
    font-size: 0.98rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar-title small { color: var(--muted); font-size: 0.72rem; }
.topbar-search {
    flex: 1;
    max-width: 420px;
    margin: 0 auto;
    position: relative;
}
.topbar-search input {
    width: 100%;
    border: 1px solid var(--stroke);
    background: rgba(8, 6, 16, 0.65);
    color: var(--text);
    border-radius: 999px;
    padding: 0.7rem 1rem 0.7rem 2.6rem;
    font-family: inherit;
    font-size: 0.88rem;
}
.topbar-search input::placeholder { color: var(--muted); }
.topbar-search input:focus {
    outline: none;
    border-color: rgba(201, 123, 74, 0.55);
    box-shadow: 0 0 0 3px rgba(201, 123, 74, 0.18);
}
.topbar-search .search-ico {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: 0.65;
    pointer-events: none;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-right: auto;
}
.topbar-bell {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: default;
}
.topbar-bell .ping {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.25rem 0.45rem 0.25rem 0.25rem;
}
.topbar-user .avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent);
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 8px 20px rgba(236, 72, 153, 0.35);
}
.topbar-user .meta { display: flex; flex-direction: column; line-height: 1.25; }
.topbar-user .meta strong { font-size: 0.88rem; }
.topbar-user .meta small { color: var(--muted); font-size: 0.72rem; }

main { position: relative; z-index: 1; padding: 1.15rem 1.35rem 2.5rem; }
main.with-sidebar { margin-right: var(--sidebar-expanded); }

h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; letter-spacing: -0.02em; }
h2 { font-size: 1.12rem; margin: 1.35rem 0 0.9rem; color: var(--text); font-weight: 700; }
h3 { font-size: 0.98rem; color: var(--text); margin-bottom: 0.7rem; }

.page-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; }
.page-header h1 { margin-bottom: 0; }

.alert {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    animation: toastIn .35s ease;
}
.alert-success { background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.35); color: #6ee7b7; }
.alert-error { background: rgba(251, 113, 133, 0.12); border: 1px solid rgba(251, 113, 133, 0.35); color: #fda4af; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }

.stat-card, .metric-card, .monitor-card, .gauge-card, .form-card, .detail-card, .table-wrap, .login-card {
    border-radius: var(--radius);
}

.stat-card { padding: 1.15rem 1.2rem; transition: transform .2s ease, border-color .2s; }
.stat-card:hover { transform: translateY(-2px); border-color: var(--stroke-strong); }
.stat-card.highlight { border-color: rgba(236, 72, 153, 0.4); }
.stat-label { display: block; font-size: 0.82rem; color: var(--muted); }
.stat-value { display: block; font-size: 1.7rem; font-weight: 800; margin-top: 0.2rem; color: var(--sand); }
.stat-sub { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 0.25rem; }

.stat-card.status-ok { border-color: rgba(52, 211, 153, 0.4); }
.stat-card.status-degraded { border-color: rgba(251, 191, 36, 0.4); }
.stat-card.status-down { border-color: rgba(251, 113, 133, 0.45); }

/* Dashboard layout */
.dash-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.25rem;
    align-items: start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.dash-main,
.side-rail {
    min-width: 0;
    max-width: 100%;
}

.dash-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.dash-hero .eyebrow {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.dash-hero h1 {
    margin: 0;
    font-size: clamp(1.55rem, 4vw, 2.05rem);
    background: linear-gradient(105deg, #fff 15%, #e879f9 48%, #fb923c 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Full-bleed city hero like reference */
.dash-banner {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    min-height: 168px;
    margin-bottom: 1.1rem;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    isolation: isolate;
}
.dash-banner-motif {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-left: 2rem;
    overflow: hidden;
    background:
        radial-gradient(60% 140% at 88% 20%, rgba(224,164,88,.16), transparent 60%),
        linear-gradient(100deg, var(--bg-0) 8%, var(--bg-1) 55%, var(--bg-2) 100%);
    color: var(--adobe);
    opacity: .8;
}
.dash-banner-copy {
    position: relative;
    z-index: 1;
    padding: 1.6rem 1.5rem;
    max-width: 36rem;
}
.dash-banner-eyebrow {
    display: inline-block;
    color: var(--saffron);
    font-size: .82rem;
    margin-bottom: .5rem;
}
.dash-banner-copy h2 {
    margin: 0 0 0.45rem;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--text);
    font-weight: 800;
    line-height: 1.35;
}
.dash-banner-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}
.quick-action {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.05rem;
    border-radius: 20px;
    border: 1px solid var(--stroke);
    background: var(--glass-strong);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    color: inherit;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.quick-action:hover {
    transform: translateY(-2px);
    border-color: rgba(178, 58, 72, 0.35);
    box-shadow: 0 14px 30px rgba(178, 58, 72, 0.18);
    color: inherit;
}
.quick-action .qa-ico {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #fff;
}
.quick-action .qa-ico.purple { background: linear-gradient(135deg, #8b5cf6, #a855f7); }
.quick-action .qa-ico.orange { background: linear-gradient(135deg, #f97316, #fb923c); }
.quick-action .qa-ico.pink { background: linear-gradient(135deg, #ec4899, #f472b6); }
.quick-action strong { display: block; font-size: 0.95rem; }
.quick-action small { color: var(--muted); font-size: 0.75rem; }

.live-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(15, 10, 28, 0.45);
    color: var(--muted);
    font-size: 0.8rem;
}
.live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 10px var(--emerald);
    animation: icoBlink 1.2s ease-in-out infinite;
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.metric-card {
    padding: 1rem 1.1rem 0.85rem;
    position: relative;
    overflow: hidden;
}
.metric-card::after {
    content: '';
    position: absolute;
    inset: auto -20% -40% 40%;
    height: 120%;
    background: radial-gradient(circle, rgba(178,58,72,.08), transparent 65%);
    pointer-events: none;
}
.metric-card:nth-child(2)::after { background: radial-gradient(circle, rgba(224,164,88,.08), transparent 65%); }
.metric-card:nth-child(3)::after { background: radial-gradient(circle, rgba(47,143,130,.08), transparent 65%); }
.metric-card:nth-child(4)::after { background: radial-gradient(circle, rgba(244,114,182,.08), transparent 65%); }
.metric-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.35rem; }
.metric-icon {
    width: 40px; height: 40px; border-radius: 14px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, rgba(201,123,74,.65), rgba(178,58,72,.55));
    border: 1px solid rgba(255,255,255,.12);
    color: #fff;
}
.metric-card:nth-child(2) .metric-icon { background: linear-gradient(135deg, rgba(224,164,88,.7), rgba(201,123,74,.55)); }
.metric-card:nth-child(3) .metric-icon { background: linear-gradient(135deg, rgba(47,143,130,.65), rgba(79,166,154,.5)); }
.metric-card:nth-child(4) .metric-icon { background: linear-gradient(135deg, rgba(178,58,72,.65), rgba(224,164,88,.45)); }
.metric-delta {
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid transparent;
}
.metric-delta.up { color: #6ee7b7; background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.25); }
.metric-delta.down { color: #fda4af; background: rgba(251,113,133,.12); border-color: rgba(251,113,133,.25); }
.metric-delta.flat { color: var(--muted); background: rgba(255,255,255,.04); border-color: var(--stroke); }

.spark-wrap {
    width: 100%;
    height: 58px;
    margin-top: 0.55rem;
    position: relative;
}
.spark {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.monitor-card { padding: 1.15rem 1.25rem 1rem; margin-bottom: 1.25rem; min-width: 0; max-width: 100%; overflow: visible; }
.monitor-card > .table-wrap {
    /* allow horizontal swipe even when parent has glass/clip styles */
    margin-inline: -0.25rem;
    padding-inline: 0.25rem;
}
.monitor-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; gap: 0.75rem; flex-wrap: wrap; }
.monitor-head > div { min-width: 0; flex: 1 1 auto; }

.chart-wrap { position: relative; height: 280px; width: 100%; max-width: 100%; min-width: 0; overflow: hidden; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; max-width: 100%; display: block; }

.side-rail { display: flex; flex-direction: column; gap: 1rem; }
.rail-profile {
    padding: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.rail-profile .brand-mark { width: 48px; height: 48px; border-radius: 14px; }
.rail-ready { background: linear-gradient(160deg, rgba(201,123,74,.14), rgba(178,58,72,.12)); }
.rail-deco { width: 100%; height: auto; display: block; margin-bottom: .65rem; }
.rail-profile strong { display: block; }
.rail-profile span { color: var(--muted); font-size: 0.8rem; }

.progress-list { display: flex; flex-direction: column; gap: 0.85rem; }
.progress-row { display: flex; flex-direction: column; gap: 0.35rem; }
.progress-row .pr-top { display: flex; justify-content: space-between; font-size: 0.82rem; }
.progress-row .pr-top span { color: var(--muted); }
.progress-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
}
.progress-fill.orange { background: linear-gradient(90deg, #f97316, #fb923c); }
.progress-fill.pink { background: linear-gradient(90deg, #ec4899, #f472b6); }
.progress-fill.gold { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.fav-list { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.fav-list li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--stroke);
    font-size: 0.85rem;
}
.fav-list .fav-dot {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.fav-list .count { margin-right: auto; color: var(--muted); font-weight: 700; }

.gauge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.gauge-card { padding: 0.9rem; text-align: center; }
.gauge {
    --val: 70;
    width: 92px; height: 92px; margin: 0 auto 0.45rem;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, var(--gauge-hole) 58%, transparent 59%),
        conic-gradient(from 210deg, var(--g1, #c084fc) calc(var(--val) * 1%), var(--gauge-track) 0);
    display: grid; place-items: center;
    position: relative;
    animation: gaugeIn .8s ease;
}
.gauge span { font-weight: 800; font-size: 1rem; }
.gauge-card small { color: var(--muted); font-size: 0.75rem; }
@keyframes gaugeIn { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

.health-list { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.health-item {
    display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
    padding: 0.55rem 0.7rem;
    border-radius: 14px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--stroke);
    font-size: 0.82rem;
}
.health-item .dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.dot.ok { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.dot.degraded { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.dot.down, .dot.unknown { background: var(--rose); box-shadow: 0 0 8px var(--rose); }

.channel-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,.04);
}
.chip.on { border-color: rgba(52,211,153,.35); color: #6ee7b7; }
.chip.off { border-color: rgba(251,113,133,.3); color: #fda4af; }
.chip.flat { color: var(--muted); }

/* Server monitor */
.server-monitor { margin-bottom: 1.25rem; }
.server-monitor-desc {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
}
.server-uptime {
    display: inline-block;
    margin-right: 0;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.03);
    font-size: 0.75rem;
}
.server-meta { display: flex; gap: 0.45rem; flex-wrap: wrap; align-items: center; }
.server-rings {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 0.85rem 0 1.1rem;
}
.server-ring-card {
    position: relative;
    display: grid;
    place-items: center;
    padding: 0.75rem 0.5rem 0.9rem;
    border-radius: 18px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.03);
    min-height: 168px;
}
.server-ring {
    width: 118px;
    height: 118px;
    display: block;
}
.server-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    text-align: center;
    padding: 0 0.6rem;
}
.server-ring-label strong {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.1;
}
.server-ring-label small {
    color: var(--muted);
    font-size: 0.72rem;
    margin-top: 0.25rem;
    max-width: 9.5rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.server-charts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    min-width: 0;
}
.server-chart-panel {
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: var(--panel-sunken);
    padding: 0.7rem 0.75rem 0.55rem;
    min-width: 0;
    overflow: hidden;
}
.server-chart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    color: var(--muted);
}
.server-chart-wrap {
    height: 96px;
    width: 100%;
}
.server-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

@media (max-width: 1100px) {
    .server-rings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .server-charts { grid-template-columns: 1fr; }
    .dash-shell { grid-template-columns: 1fr; }
    .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quick-actions { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .server-rings { grid-template-columns: 1fr 1fr; gap: 0.55rem; }
    .server-ring { width: 100px; height: 100px; }
    .server-ring-card { min-height: 148px; padding: 0.55rem 0.35rem 0.7rem; }
    .server-ring-label strong { font-size: 1.05rem; }
    .server-ring-label small { font-size: 0.62rem; max-width: 100%; }
}

.ai-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.ai-chart-wrap {
    height: 220px;
    margin-top: 0.75rem;
    width: 100%;
    min-width: 0;
    position: relative;
}
.ai-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Tables — scroll container must be bounded so touch pan-x works on mobile */
.table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    position: relative;
}
.table-wrap table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
}
table {
    width: 100%;
    border-collapse: collapse;
}
.table-scroll-hint {
    display: none;
    color: var(--muted);
    font-size: 0.75rem;
    margin: 0 0 0.4rem;
    padding: 0 0.15rem;
}
@media (max-width: 860px) {
    .table-scroll-hint { display: block; }
}
th, td { padding: 0.8rem 1rem; text-align: right; border-bottom: 1px solid var(--stroke); white-space: nowrap; }
th { background: rgba(0,0,0,0.22); color: var(--muted); font-weight: 600; font-size: 0.85rem; }
td.empty, .empty { white-space: normal; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }
.empty { text-align: center; color: var(--muted); padding: 2rem !important; white-space: normal; }

.badge { display: inline-block; padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-pending, .badge-queued { background: rgba(251, 191, 36, 0.16); color: #fbbf24; }
.badge-approved, .badge-ok, .badge-published { background: rgba(52, 211, 153, 0.16); color: #6ee7b7; }
.badge-rejected, .badge-down, .badge-failed { background: rgba(251, 113, 133, 0.16); color: #fda4af; }
.badge-draft, .badge-none { background: rgba(148, 163, 184, 0.14); color: var(--muted); }
.badge-degraded, .badge-publishing { background: rgba(56, 189, 248, 0.16); color: #7dd3fc; }

.btn, .btn-glass {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: 14px;
    border: 1px solid var(--stroke);
    background: rgba(30, 21, 18, 0.55);
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: background 0.15s, transform 0.15s;
}
.btn:hover, .btn-glass:hover { background: rgba(255,255,255,.08); transform: translateY(-1px); }
.btn-primary { background: var(--accent); border-color: transparent; color: #fff; box-shadow: 0 3px 12px rgba(178, 58, 72, .28); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-success { background: rgba(16, 185, 129, 0.85); border-color: transparent; color: #fff; }
.btn-danger { background: rgba(244, 63, 94, 0.85); border-color: transparent; color: #fff; }
.btn-warning { background: rgba(245, 158, 11, 0.85); border-color: transparent; color: #fff; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.btn-block { width: 100%; }

.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-btn { padding: 0.45rem 0.85rem; border-radius: 999px; border: 1px solid var(--stroke); color: var(--muted); font-size: 0.85rem; background: rgba(30, 21, 18, 0.45); }
.filter-btn.active, .filter-btn:hover { background: var(--accent); border-color: transparent; color: #fff; }

.form-card, .detail-card { padding: 1.5rem; max-width: 960px; margin-bottom: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; color: var(--muted); font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: rgba(20, 14, 12, 0.65);
    border: 1px solid var(--stroke);
    border-radius: 14px;
    color: var(--text);
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: rgba(201, 123, 74, 0.5);
    box-shadow: 0 0 0 3px rgba(201, 123, 74, 0.15);
}
.form-group.checkbox label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.form-group.checkbox input { width: auto; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem 1rem; }
.form-hint { color: var(--muted); font-size: 0.82rem; margin-top: 0.35rem; line-height: 1.6; }
td.actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }

.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; position: relative; z-index: 1; }
.login-card { padding: 2.4rem; width: 100%; max-width: 420px; text-align: center; }
.login-card h1 { text-align: center; margin-bottom: 0.25rem; background: linear-gradient(90deg,#fff,#f0abfc,#e9d5ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-card .subtitle { text-align: center; color: var(--muted); margin-bottom: 1.5rem; }
.login-card .form-group { text-align: right; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.detail-card h3 { margin-bottom: 1rem; color: var(--text); }
.detail-card dl { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1rem; }
.detail-card dt { color: var(--muted); }
.description { white-space: pre-wrap; line-height: 1.8; }
.description.muted { color: var(--muted); font-size: 0.9rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag { background: rgba(7, 10, 20, 0.65); padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.85rem; border: 1px solid var(--stroke); }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
.media-grid img { width: 100%; height: 120px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--stroke); }

.actions-bar { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-start; margin: 1.5rem 0; }
.reject-form { display: flex; gap: 0.5rem; flex: 1; min-width: 240px; }
.reject-form input { flex: 1; padding: 0.55rem 0.75rem; background: rgba(7,10,20,.65); border: 1px solid var(--stroke); border-radius: 14px; color: var(--text); font-family: inherit; }

.inline-form { display: inline; }
.search-form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.search-form input, .search-form select { padding: 0.45rem 0.65rem; background: rgba(7,10,20,.65); border: 1px solid var(--stroke); border-radius: 14px; color: var(--text); font-family: inherit; }

.pagination { display: flex; gap: 0.5rem; align-items: center; justify-content: center; margin-top: 1.5rem; }
.pagination .page { padding: 0.4rem 0.8rem; border: 1px solid var(--stroke); border-radius: 12px; color: var(--muted); background: rgba(30, 21, 18, 0.45); }
.pagination .page.disabled { opacity: 0.5; }
.pagination .page-info { color: var(--muted); font-size: 0.85rem; }

.ai-result-box {
    background: rgba(7, 10, 20, 0.65);
    border: 1px solid rgba(129, 140, 248, 0.3);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    white-space: pre-wrap;
    line-height: 1.9;
    margin-top: 1rem;
}

code { background: rgba(7, 10, 20, 0.65); padding: 0.15rem 0.4rem; border-radius: 6px; font-size: 0.85rem; }

@media (max-width: 1180px) {
    .dash-shell { grid-template-columns: 1fr; }
    .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quick-actions { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .nav-toggle { display: grid; place-items: center; }
    .sidebar {
        transform: translateX(110%);
        transition: transform .28s ease;
        width: min(88vw, 300px);
        border-radius: 24px 0 0 24px;
        padding-top: calc(1rem + var(--safe-top));
        padding-bottom: calc(1rem + var(--safe-bottom));
        box-shadow: -12px 0 36px rgba(0,0,0,.4);
    }
    .sidebar.open { transform: translateX(0); }
    main.with-sidebar {
        margin-right: 0;
        padding: calc(4.25rem + var(--safe-top)) 0.9rem calc(1.5rem + var(--safe-bottom));
    }
    .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
    .topbar {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    .topbar-search { order: 3; max-width: none; width: 100%; margin: 0; }
    .topbar-actions { margin-right: 0; }
    .topbar-title strong { font-size: 0.88rem; }
    .dash-banner { min-height: 140px; }
    .dash-banner-copy { padding: 1.2rem 1.1rem; }
}

/* ——— Manual post / announcement composer ——— */
.manual-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(180px, 280px);
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.15rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
}
.manual-hero-copy { min-width: 0; }
.manual-hero-copy h1 {
    margin: 0.15rem 0 0.45rem;
    font-size: 1.55rem;
    background: linear-gradient(100deg, #fff, #f0abfc, #e9d5ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.manual-hero-media {
    width: 100%;
    height: 120px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--stroke);
    background: rgba(0,0,0,0.25);
}
.manual-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    animation: heroFloat 5s ease-in-out infinite;
}
@keyframes heroFloat {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.guide-rail {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
}
.guide-step {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.03);
    transition: all .3s ease;
}
.guide-step small { display: block; color: var(--muted); font-size: 0.72rem; }
.guide-num {
    width: 28px; height: 28px; border-radius: 10px;
    display: grid; place-items: center;
    background: rgba(255,255,255,0.06);
    font-weight: 800; font-size: 0.85rem;
}
.guide-step.is-active {
    border-color: rgba(201,123,74,0.45);
    background: linear-gradient(135deg, rgba(201,123,74,0.14), rgba(178,58,72,0.16));
    box-shadow: 0 10px 28px rgba(178,58,72,0.18);
    transform: translateY(-2px);
}
.guide-step.is-active .guide-num {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: #fff;
}

.manual-steps-banner {
    width: 100%;
    height: 88px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid var(--stroke);
    background: rgba(0,0,0,0.2);
}
.manual-steps-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    opacity: 0.95;
}

.manual-section { animation: sectionIn .45s ease both; }
.manual-section:nth-of-type(1) { animation-delay: .05s; }
.manual-section:nth-of-type(2) { animation-delay: .1s; }
.manual-section:nth-of-type(3) { animation-delay: .15s; }
.manual-section:nth-of-type(4) { animation-delay: .2s; }
@keyframes sectionIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.ai-orbit {
    position: relative;
    height: 48px;
    margin: 0.5rem 0 1rem;
}
.ai-orbit span {
    position: absolute;
    width: 12px; height: 12px; border-radius: 50%;
    background: #c084fc;
    animation: orbitSpin 1.4s linear infinite;
}
.ai-orbit span:nth-child(1) { left: 40%; animation-delay: 0s; background: #c084fc; }
.ai-orbit span:nth-child(2) { left: 48%; animation-delay: .2s; background: #a78bfa; }
.ai-orbit span:nth-child(3) { left: 56%; animation-delay: .4s; background: #34d399; }
@keyframes orbitSpin {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    50% { transform: translateY(-14px) scale(1.2); opacity: .7; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.upload-zone {
    display: block;
    border: 1.5px dashed rgba(236,72,153,0.45);
    border-radius: 18px;
    padding: 1.4rem;
    text-align: center;
    cursor: pointer;
    background: rgba(255,255,255,0.02);
    transition: all .25s ease;
}
.upload-zone input { display: none; }
.upload-zone:hover, .upload-zone.is-drag {
    border-color: #c084fc;
    background: rgba(192,132,252,0.08);
    transform: scale(1.01);
}
.upload-zone-inner strong { display: block; margin-bottom: 0.25rem; }
.upload-zone-inner small { color: var(--muted); }

.media-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.65rem;
    margin-top: 0.85rem;
}
.media-preview-item {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--stroke);
    background: rgba(0,0,0,0.25);
    animation: sectionIn .35s ease;
}
.media-preview-item img { width: 100%; height: 90px; object-fit: cover; display: block; }
.media-preview-item .media-preview-kind {
    display: grid;
    place-items: center;
    height: 90px;
    color: var(--muted);
    font-size: 0.85rem;
}
.media-preview-item small {
    display: block; padding: 0.35rem 0.45rem; font-size: 0.7rem; color: var(--muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.media-remove {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 999px;
    background: rgba(30, 21, 18, 0.82);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 2;
    transition: background .15s ease, transform .15s ease;
}
.media-remove:hover {
    background: #ef4444;
    transform: scale(1.06);
}

.channel-pick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
}
.channel-pick {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.85rem;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    transition: all .2s ease;
}
.channel-pick:has(input:checked) {
    border-color: rgba(52,211,153,0.45);
    background: rgba(52,211,153,0.1);
    box-shadow: 0 8px 22px rgba(52,211,153,0.12);
}
.channel-pick input { margin-top: 0.2rem; }
.channel-pick-body strong { display: block; }
.channel-pick-body small { color: var(--muted); font-size: 0.75rem; }

.publish-modes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}
.mode-card {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    padding: 0.9rem;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    transition: all .2s ease;
}
.mode-card:has(input:checked) {
    border-color: rgba(236,72,153,0.5);
    background: linear-gradient(135deg, rgba(192,132,252,0.1), rgba(236,72,153,0.14));
}
.mode-card strong { display: block; font-size: 0.9rem; }
.mode-card small { color: var(--muted); font-size: 0.75rem; }

.sticky-actions {
    position: sticky;
    bottom: 0.75rem;
    z-index: 20;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    background: rgba(10,14,28,0.94);
    border: 1px solid var(--stroke);
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .manual-hero, .guide-rail, .publish-modes { grid-template-columns: 1fr; }
    .manual-hero-media { height: 100px; max-width: 100%; }
    .manual-steps-banner { height: 72px; }
}

/* Mobile nav overlay */
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 14, 0.55);
    z-index: 90;
}
.nav-backdrop.show { display: block; }

.nav-toggle {
    display: none;
    place-items: center;
    position: fixed;
    top: calc(0.85rem + var(--safe-top));
    left: 0.85rem;
    z-index: 120;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1px solid var(--stroke);
    background: var(--glass-strong);
    color: var(--text);
    box-shadow: var(--shadow);
    font-size: 1.15rem;
}

/* Login polish */
.page-login main { padding: 1rem; }
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    z-index: 1;
    padding: 1rem;
}
.login-card {
    padding: clamp(1.5rem, 4vw, 2.5rem);
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
    border: 1px solid rgba(45, 212, 191, 0.22);
}
.login-card .brand-mark {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 18px;
}
.login-card h1 {
    text-align: center; margin-bottom: 0.25rem;
    background: linear-gradient(95deg, #fff, #c084fc, #f472b6, #f59e0b);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-card .subtitle { text-align: center; color: var(--muted); margin-bottom: 1.5rem; font-size: 0.92rem; }
.login-card .form-group { text-align: right; }
.login-meta {
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.login-meta span {
    font-size: 0.72rem;
    color: var(--muted);
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.03);
}

/* ——— Responsive ——— */
@media (max-width: 1180px) {
    .dash-shell { grid-template-columns: 1fr; }
    .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .nav-toggle { display: grid; }
    .sidebar {
        transform: translateX(110%);
        transition: transform .28s ease;
        width: min(88vw, 300px);
        border-radius: 24px 0 0 24px;
        padding-top: calc(1rem + var(--safe-top));
        padding-bottom: calc(1rem + var(--safe-bottom));
        box-shadow: -12px 0 36px rgba(0,0,0,.4);
    }
    .sidebar.open { transform: translateX(0); }
    main.with-sidebar {
        margin-right: 0;
        padding: calc(4.25rem + var(--safe-top)) 0.9rem calc(1.5rem + var(--safe-bottom));
    }
    .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
    .gauge-grid { grid-template-columns: 1fr 1fr; }
    .chart-wrap { height: 200px; }
    .page-header { align-items: flex-start; }
    h1 { font-size: 1.35rem; }
    .form-card, .detail-card, .monitor-card, .table-wrap {
        padding: 1rem;
        border-radius: 16px;
    }
    th, td { padding: 0.7rem 0.65rem; font-size: 0.86rem; }
    .actions-bar { flex-direction: column; }
    .reject-form { width: 100%; min-width: 0; }
    .btn, .btn-glass { min-height: 44px; }
    .sticky-actions {
        bottom: calc(0.5rem + var(--safe-bottom));
        justify-content: stretch;
        flex-wrap: wrap;
        backdrop-filter: none;
        background: rgba(10,14,28,0.95);
    }
    .sticky-actions .btn { flex: 1 1 auto; }
    .channel-pick-grid { grid-template-columns: 1fr; }
    .brand-text small { display: none; }
    .live-chip { font-size: 0.74rem; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.65rem; }
    .stat-value { font-size: 1.35rem; }
    .gauge-grid { grid-template-columns: 1fr; }
    .media-grid { grid-template-columns: 1fr 1fr; }
    .login-card { padding: 1.35rem 1.1rem; }
    .filters { gap: 0.35rem; }
    .filter-btn { font-size: 0.78rem; padding: 0.4rem 0.7rem; }
}

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

/* ——— Mobile polish + PWA install banner ——— */
.pwa-install-banner {
    position: fixed;
    z-index: 200;
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(0.75rem + var(--safe-bottom));
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity .28s ease, transform .28s ease;
}
.pwa-install-banner.show {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}
.pwa-install-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem 0.85rem;
    align-items: center;
    padding: 0.9rem 0.95rem;
    border-radius: 18px;
    border: 1px solid rgba(201, 123, 74, 0.35);
    background: rgba(20, 16, 15, 0.94);
    box-shadow: 0 18px 40px rgba(0,0,0,.45);
    backdrop-filter: blur(16px);
}
.pwa-install-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(201,123,74,.95), rgba(178,58,72,.9) 55%, rgba(224,164,88,.85)),
        #140f0d;
    box-shadow: 0 8px 18px rgba(178, 58, 72, 0.28);
}
.pwa-install-copy { grid-column: 2; min-width: 0; }
.pwa-install-copy strong { display: block; font-size: 0.95rem; margin-bottom: 0.15rem; }
.pwa-install-copy p { margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.55; }
.pwa-install-ios.pulse { color: #e0a458; }
.pwa-install-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.5rem;
}
.pwa-install-actions .btn { flex: 1; }

@media (max-width: 860px) {
    html, body {
        max-width: 100vw;
        overflow-x: clip; /* clip (not hidden) so nested table swipe still works on iOS */
    }
    main.with-sidebar {
        max-width: 100%;
        overflow-x: clip;
    }

    .nav-toggle {
        top: calc(0.75rem + var(--safe-top));
        left: max(0.75rem, env(safe-area-inset-left, 0px));
        width: 46px;
        height: 46px;
        font-size: 1.15rem;
    }

    .topbar {
        margin-top: 0.25rem;
        padding-inline-start: 3.4rem; /* room for hamburger on the left in RTL main */
    }
    .topbar-title small { display: none; }
    .topbar-user .meta { display: none; }
    .topbar-bell { display: none; }

    .form-card,
    .detail-card,
    .monitor-card,
    .table-wrap,
    .login-card {
        max-width: 100% !important;
        width: 100%;
    }

    .form-group input,
    .form-group select,
    .form-group textarea,
    .topbar-search input,
    input[type="text"],
    input[type="password"],
    input[type="number"],
    input[type="url"],
    input[type="search"],
    textarea,
    select {
        font-size: 16px !important; /* prevent iOS zoom */
        max-width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
    }
    .stat-card .stat-value { font-size: 1.05rem; word-break: break-word; }

    .table-wrap {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto !important;
        overflow-y: hidden;
        max-width: 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        margin-inline: 0;
        padding-bottom: 0.35rem;
        /* visible cue that content scrolls sideways */
        background:
            linear-gradient(to left, rgba(14,12,24,0.95), transparent 28px) right / 28px 100% no-repeat,
            linear-gradient(to right, rgba(14,12,24,0.95), transparent 28px) left / 28px 100% no-repeat,
            var(--glass-strong, rgba(18, 14, 30, 0.55));
        background-attachment: local, local, scroll;
        border-radius: 12px;
    }
    .table-wrap table {
        width: max-content !important;
        min-width: 640px;
        max-width: none;
    }
    /* Don't force ALL page tables — only those in scroll wraps */
    .table-wrap th,
    .table-wrap td {
        white-space: nowrap;
    }
    .monitor-card,
    .form-card,
    .detail-card {
        overflow: visible !important;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .page-header .btn,
    .page-header a.btn { width: 100%; justify-content: center; }

    .inline-form,
    form.inline-form {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
    }

    main.with-sidebar {
        padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
        padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
    }

    /* Soften heavy glass effects on small screens */
    #particles-js { opacity: 0.35; }
    .glass-orb { opacity: 0.45; }

    .tags { gap: 0.4rem; }
    .tag { font-size: 0.82rem; }

    pre, code { word-break: break-word; white-space: pre-wrap; }

    /* ——— Monitoring / dashboard ——— */
    .dash-shell {
        grid-template-columns: 1fr !important;
        gap: 0.85rem;
        width: 100%;
    }
    .dash-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
        margin-bottom: 0.9rem;
    }
    .dash-hero h1 { font-size: 1.35rem; }
    .live-chip {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        border-radius: 14px;
        padding: 0.5rem 0.75rem;
    }

    .metric-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.6rem;
    }
    .metric-card {
        padding: 0.8rem 0.75rem 0.65rem;
        min-width: 0;
    }
    .metric-top { flex-wrap: wrap; gap: 0.35rem; }
    .metric-delta {
        max-width: 100%;
        white-space: normal;
        line-height: 1.3;
        font-size: 0.68rem;
    }
    .metric-card .stat-value { font-size: 1.25rem; }
    .spark-wrap { height: 44px; margin-top: 0.35rem; }

    .quick-actions {
        grid-template-columns: 1fr !important;
        gap: 0.55rem;
    }
    .quick-action { padding: 0.85rem 0.9rem; }

    .server-monitor .monitor-head {
        flex-direction: column;
        align-items: stretch;
    }
    .server-meta { width: 100%; }
    .server-uptime {
        display: block;
        margin: 0.35rem 0 0;
        width: fit-content;
    }
    .server-rings {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.5rem;
        margin: 0.65rem 0 0.85rem;
    }
    .server-ring-card {
        min-height: 132px;
        padding: 0.45rem 0.25rem 0.6rem;
    }
    .server-ring {
        width: min(96px, 42vw);
        height: min(96px, 42vw);
        max-width: 100%;
    }
    .server-ring-label strong { font-size: 0.98rem; }
    .server-ring-label small {
        font-size: 0.6rem;
        max-width: 100%;
        padding: 0 0.2rem;
    }
    .server-charts {
        grid-template-columns: 1fr !important;
        gap: 0.55rem;
    }
    .server-chart-wrap { height: 110px; }

    .chart-wrap { height: 190px !important; }
    .gauge { width: 78px; height: 78px; }
    .gauge span { font-size: 0.9rem; }

    .health-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    .health-item .description { width: 100%; }

    .side-rail { gap: 0.75rem; }
    .rail-profile { padding: 0.9rem; }

    /* Telegram / WG monitoring cards */
    #wgStats.stats-grid,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    #wgStats .stat-value { font-size: 0.95rem; line-height: 1.25; }

    /* AI usage charts */
    #aiUsageRoot .stats-grid {
        grid-template-columns: 1fr !important;
    }
    #aiUsageRoot .stat-card[style*="min-height"] {
        min-height: 0 !important;
    }
    #aiUsageRoot .stat-card > div[style*="height:220px"] {
        height: 180px !important;
    }
    .ai-chart-grid {
        grid-template-columns: 1fr !important;
    }
    .ai-chart-wrap {
        height: 180px;
        margin-top: 0.75rem;
        width: 100%;
        min-width: 0;
        position: relative;
    }
    .ai-chart-wrap canvas {
        width: 100% !important;
        height: 100% !important;
    }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-sub { font-size: 0.75rem; }
    h2 { font-size: 1.02rem; }
    .pwa-install-card { padding: 0.85rem; }

    .metric-row {
        grid-template-columns: 1fr !important;
    }
    .metric-card .stat-value { font-size: 1.45rem; }

    .server-rings {
        grid-template-columns: 1fr 1fr !important;
    }
    .server-ring {
        width: 88px;
        height: 88px;
    }
    .server-ring-card { min-height: 124px; }

    .gauge-grid { grid-template-columns: 1fr 1fr; }
    .chart-wrap { height: 170px !important; }

    #wgStats.stats-grid {
        grid-template-columns: 1fr;
    }

    .dash-banner-copy h2 { font-size: 1.1rem; }
    .dash-banner-copy p { font-size: 0.82rem; }
}

/* Standalone PWA: hide browser chrome leftovers */
@media (display-mode: standalone) {
    .pwa-install-banner { display: none !important; }
    body.is-authed { padding-top: var(--safe-top); }
}

/* Profile photo zoom (bot users) */
.avatar-zoom-btn {
    display: inline-flex;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    border-radius: 50%;
    line-height: 0;
    vertical-align: middle;
}
.avatar-zoom-btn:focus-visible {
    outline: 2px solid var(--violet);
    outline-offset: 2px;
}
.avatar-zoom-thumb {
    display: block;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 1px var(--stroke);
    transition: transform .15s ease, box-shadow .15s ease;
}
.avatar-zoom-thumb--sm { width: 40px; height: 40px; }
.avatar-zoom-thumb--lg { width: 72px; height: 72px; }
.avatar-zoom-btn:hover .avatar-zoom-thumb {
    transform: scale(1.06);
    box-shadow: 0 0 0 2px var(--stroke-strong);
}

body.photo-zoom-open { overflow: hidden; }

.photo-zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}
.photo-zoom-overlay[hidden] { display: none !important; }

.photo-zoom-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(4, 3, 10, 0.82);
    backdrop-filter: blur(10px);
    cursor: zoom-out;
}

.photo-zoom-dialog {
    position: relative;
    z-index: 1;
    max-width: min(92vw, 720px);
    max-height: min(88vh, 720px);
    padding: 0.65rem;
    border-radius: 22px;
    background: var(--glass-strong);
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
}

.photo-zoom-image {
    display: block;
    width: min(84vw, 640px);
    height: min(78vh, 640px);
    max-width: 100%;
    object-fit: contain;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.25);
}

.photo-zoom-close {
    position: absolute;
    top: 0.35rem;
    left: 0.35rem;
    z-index: 2;
    width: 2.1rem;
    height: 2.1rem;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}
.photo-zoom-close:hover { background: rgba(236, 72, 153, 0.85); }


/* Ranking badge tiers — shared between the rankings leaderboard page and
   the bot-user detail page. */
.tier-chip { display: inline-block; padding: .25rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.tier-new { background: rgba(148, 163, 184, .14); color: var(--muted); }
.tier-bronze { background: rgba(217, 119, 6, .16); color: #fbbf7a; }
.tier-silver { background: rgba(203, 213, 225, .16); color: #e2e8f0; }
.tier-gold { background: rgba(250, 204, 21, .16); color: #fde047; }
.tier-vip { background: linear-gradient(135deg, rgba(178,58,72,.28), rgba(224,164,88,.28)); color: #f6dfc4; }
.tier-diamond { background: linear-gradient(135deg, rgba(47,143,130,.28), rgba(228,201,163,.28)); color: #dff5f0; }
.tier-clean { background: rgba(52, 211, 153, .16); color: #6ee7b7; }
.tier-caution { background: rgba(251, 191, 36, .16); color: #fbbf24; }
.tier-warning { background: rgba(251, 146, 60, .18); color: #fdba74; }
.tier-critical { background: rgba(251, 113, 133, .18); color: #fda4af; }

/* Field help tooltip — CSS-only, hover + focus (tap-to-focus works on
   touch), no JS. See resources/views/admin/partials/help-tip.blade.php */
.help-tip { position: relative; display: inline-flex; vertical-align: middle; margin-inline-start: .35rem; }
.help-tip-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--glass-soft); border: 1px solid var(--stroke);
    color: var(--muted); font-size: .68rem; line-height: 1; cursor: help;
    user-select: none;
}
.help-tip-bubble {
    position: absolute; top: 100%; right: 0; margin-top: 8px;
    width: 220px; max-width: 78vw;
    padding: .55rem .7rem;
    background: var(--glass-strong); border: 1px solid var(--stroke-strong);
    border-radius: 10px; box-shadow: var(--shadow);
    font-size: .78rem; line-height: 1.7; font-weight: 400; color: var(--text);
    text-align: right; white-space: normal;
    opacity: 0; visibility: hidden; pointer-events: none; z-index: 999;
    transition: opacity .15s ease;
}
.help-tip:hover .help-tip-bubble,
.help-tip:focus .help-tip-bubble,
.help-tip:focus-within .help-tip-bubble {
    opacity: 1; visibility: visible; pointer-events: auto;
}

/* Escape hatch: several cards/wrappers clip overflow (for scroll or rounded
   corners), which was cutting the tooltip bubble off. Allow overflow only
   while a tooltip inside is actually open. */
.metric-card:has(.help-tip:hover),
.metric-card:has(.help-tip:focus-within),
.stat-card:has(.help-tip:hover),
.stat-card:has(.help-tip:focus-within),
.detail-card:has(.help-tip:hover),
.detail-card:has(.help-tip:focus-within),
.monitor-card:has(.help-tip:hover),
.monitor-card:has(.help-tip:focus-within),
.form-card:has(.help-tip:hover),
.form-card:has(.help-tip:focus-within),
.table-wrap:has(.help-tip:hover),
.table-wrap:has(.help-tip:focus-within) {
    overflow: visible !important;
}
.table-wrap:has(.help-tip:hover) table,
.table-wrap:has(.help-tip:focus-within) table {
    overflow: visible;
}

/* Help mode — panel-wide toggle for the (?) field tooltips, controlled by
   BotConfig `help_mode_enabled` + the topbar button below. */
body.help-mode-off .help-tip { display: none; }

.help-mode-toggle {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--stroke); background: var(--glass-soft);
    color: var(--muted); font-size: .95rem; font-weight: 700;
    cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.help-mode-toggle:hover { color: var(--text); border-color: var(--stroke-strong); }
.help-mode-toggle.is-on {
    background: var(--accent); border-color: transparent; color: #fff;
    box-shadow: 0 6px 16px rgba(178, 58, 72, .3);
}

/* Sidebar accordion groups — collapses related pages under one header
   (details/summary, CSS-only, no JS). Leaf links inside .nav-group ul
   already inherit .sidebar li a's hover/active styling via the existing
   descendant selector, so only the group header + nesting need new rules. */
.nav-group { border: none; }
.nav-group > summary {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.7rem;
    margin: 0.18rem 0;
    color: var(--muted);
    border-radius: 16px;
    border: 1px solid transparent;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.nav-group > summary::-webkit-details-marker,
.nav-group > summary::marker { display: none; content: ''; }
.nav-group > summary:hover { color: var(--text); background: var(--glass-soft); border-color: var(--stroke); }
.nav-group > summary.active { color: var(--text); }
.nav-chevron { margin-right: auto; display: inline-flex; width: 15px; height: 15px; opacity: .55; transition: transform .2s ease; }
.nav-chevron .ico { width: 15px; height: 15px; stroke-width: 2.2; }
.nav-group[open] > summary .nav-chevron { transform: rotate(180deg); }
.nav-group > summary .nav-badge { margin-right: 0; }
.nav-group[open] > summary .nav-badge { margin-left: .3rem; }

.nav-group ul {
    list-style: none;
    margin: 0.1rem 0 0.3rem 0.6rem;
    padding-right: 0.65rem;
    border-right: 1px solid var(--stroke);
    display: flex;
    flex-direction: column;
}
.nav-group ul li a { padding: 0.46rem 0.65rem; font-size: 0.87rem; }

/* Reusable page-level tabs — for pages that merge two closely-related
   settings screens into one (e.g. morning quotes + calendar). CSS-only
   show/hide is toggled by a tiny inline script per page (see
   admin/settings/morning.blade.php for the reference implementation). */
.page-tabs { display: flex; gap: .4rem; background: var(--glass-soft); border: 1px solid var(--stroke); border-radius: 999px; padding: .3rem; }
.page-tab-btn { border: none; background: transparent; color: var(--muted); font-family: inherit; font-size: .88rem; padding: .55rem 1.1rem; border-radius: 999px; cursor: pointer; transition: color .15s, background .15s; white-space: nowrap; }
.page-tab-btn:hover { color: var(--text); }
.page-tab-btn.active { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(178,58,72,.25); }
.page-tab-panel { display: none; }
.page-tab-panel.active { display: block; }
@media (max-width: 640px) {
    .page-tabs { width: 100%; overflow-x: auto; }
}



/* Signature motif — 8-point شمسه rosette, used once on login + once on the
   dashboard hero. Deliberately quiet: low opacity, no fill, currentColor. */

.font-display { font-family: var(--font-display); }


/* Light-theme badge contrast fix — same pill shapes, darker/more saturated
   colors so status labels stay legible on the cream light background
   (the default rule above was tuned for the dark theme only). */


/* Light-theme fix for ranking tier-chip badges — same pastel-on-pastel
   contrast issue as the status badges above. */

/* Login page tab switcher (password / OTP) — mirrors .page-tabs pattern */
.login-tabs {
    display: flex;
    gap: .4rem;
    background: var(--glass-soft);
    border: 1px solid var(--stroke);
    border-radius: 999px;
    padding: .3rem;
    margin-bottom: 1.4rem;
}
.login-tab {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: .88rem;
    padding: .55rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: color .15s, background .15s;
}
.login-tab:hover { color: var(--text); }
.login-tab.active { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(178,58,72,.28); }

/* ——— Shared polish (2026-09): checkboxes inside .form-group must not stretch like text inputs;
       .lead = readable intro paragraph (unlike .description it does not preserve template whitespace) ——— */
.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: 1.15rem;
    height: 1.15rem;
    padding: 0;
    flex: none;
    accent-color: var(--violet);
    vertical-align: middle;
    cursor: pointer;
}
.form-group label.tag {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0;
    padding: 0.4rem 0.95rem;
    color: var(--text);
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.form-group label.tag:hover { border-color: var(--stroke-strong); }
.form-group label.tag:has(input:checked) { border-color: var(--stroke-strong); background: rgba(201, 123, 74, 0.12); }
.lead { color: var(--muted); font-size: 0.92rem; line-height: 1.95; max-width: 74ch; }

/* ——— Accessibility floor: visible keyboard focus everywhere, comfortable touch targets on phones ——— */
a:focus-visible, button:focus-visible, .btn:focus-visible, summary:focus-visible,
select:focus-visible, .page-tab-btn:focus-visible, .help-tip:focus-visible {
    outline: 2px solid var(--sand);
    outline-offset: 2px;
}
.btn .ico { width: 1em; height: 1em; margin-inline-end: 0.4em; vertical-align: -0.14em; }
@media (max-width: 720px) {
    .btn-sm { min-height: 42px; padding: 0.5rem 0.95rem; font-size: 0.88rem; }
    .form-group label.tag, .ig-check { min-height: 42px; }
}

/* ——— Illustrated panel objects (generated with GPT Image, /images/panel/*.webp) ——— */
.page-head-main { display: flex; align-items: center; gap: 1.1rem; min-width: 0; }
.page-art {
    flex: none;
    width: 92px;
    height: 92px;
    object-fit: contain;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.42));
}
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.35rem; padding: 2.2rem 1rem 2rem; }
.empty-state img { width: 148px; height: auto; margin-bottom: 0.4rem; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.45)); }
.empty-state h3 { margin: 0; font-size: 1.05rem; }
.empty-state p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.9; max-width: 48ch; }
@media (max-width: 720px) {
    .page-art { width: 64px; height: 64px; }
    .empty-state img { width: 120px; }
}

/* ——— Page-title artwork: <body data-art="…"> (set by App\Support\PanelArt) draws a 3D object beside .page-header ——— */
body[data-art="stats"] { --panel-art: url('/images/panel/stats.webp'); }
body[data-art="cards"] { --panel-art: url('/images/panel/cards.webp'); }
body[data-art="users"] { --panel-art: url('/images/panel/users.webp'); }
body[data-art="wallet"] { --panel-art: url('/images/panel/wallet.webp'); }
body[data-art="ai"] { --panel-art: url('/images/panel/ai.webp'); }
body[data-art="channels"] { --panel-art: url('/images/panel/channels.webp'); }
body[data-art="notifications"] { --panel-art: url('/images/panel/notifications.webp'); }
body[data-art="schedule"] { --panel-art: url('/images/panel/schedule.webp'); }
body[data-art="download"] { --panel-art: url('/images/panel/download.webp'); }
body[data-art="settings"] { --panel-art: url('/images/panel/settings.webp'); }
body[data-art] .page-header:not(:has(.page-head-main)) {
    position: relative;
    padding-inline-start: 108px;
    min-height: 88px;
}
body[data-art] .page-header:not(:has(.page-head-main))::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    width: 88px;
    height: 88px;
    transform: translateY(-50%);
    background: var(--panel-art) center / contain no-repeat;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.42));
    pointer-events: none;
}
td.has-art { text-align: center; padding: 1.8rem 1rem; color: var(--muted); }
.empty-mini { display: block; margin: 0 auto 0.6rem; width: 110px; height: auto; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.4)); }
@media (max-width: 720px) {
    body[data-art] .page-header:not(:has(.page-head-main)) { padding-inline-start: 74px; min-height: 60px; }
    body[data-art] .page-header:not(:has(.page-head-main))::before { width: 60px; height: 60px; }
}

/* Dashboard banner artwork (<img class="dash-banner-art"> inside .dash-banner) */
.dash-banner-art {
    position: absolute;
    left: 1.6rem;
    top: 50%;
    z-index: 1;
    width: 150px;
    height: auto;
    transform: translateY(-50%);
    filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.45));
    pointer-events: none;
}
@media (max-width: 720px) { .dash-banner-art { display: none; } }
