:root {
    --bg: #030e1a;
    --glow1: rgba(8,145,178,.20);
    --glow2: rgba(14,116,144,.15);
    --glow3: rgba(56,189,248,.12);
    --dot: rgba(255,255,255,.05);
    --card: rgba(6,26,44,.55);
    --card-strong: rgba(8,32,54,.78);
    --glass: rgba(255,255,255,.05);
    --glass-strong: rgba(255,255,255,.10);
    --line: rgba(255,255,255,.10);
    --line-strong: rgba(255,255,255,.20);
    --ink: #eaf7ff;
    --mut: #8fb3cc;
    --dim: #5f829e;
    --cyan: #38bdf8;
    --teal: #22d3ee;
    --green: #34d399;
    --amber: #fbbf24;
    --red: #f87171;
    --purple: #a78bfa;
    --btn-txt: #03121f;
    --shadow: 0 12px 40px rgba(0,0,0,.45);
    --shadow-lift: 0 30px 80px rgba(0,0,0,.6);
    --logo-bg: rgba(255,255,255,.92);
    --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix type='saturate' values='0'/></filter><rect width='120' height='120' filter='url(%23n)' opacity='0.05'/></svg>");
}
html[data-theme="light"] {
    --bg: #edf4fb;
    --glow1: rgba(14,116,144,.15);
    --glow2: rgba(2,132,199,.12);
    --glow3: rgba(56,189,248,.16);
    --dot: rgba(2,60,100,.08);
    --card: rgba(255,255,255,.74);
    --card-strong: rgba(255,255,255,.9);
    --glass: rgba(255,255,255,.55);
    --glass-strong: rgba(255,255,255,.85);
    --line: rgba(8,40,70,.12);
    --line-strong: rgba(8,40,70,.24);
    --ink: #0b2440;
    --mut: #41627d;
    --dim: #5f7f99;
    --cyan: #0284c7;
    --teal: #0e7490;
    --green: #059669;
    --amber: #b45309;
    --red: #dc2626;
    --purple: #7c3aed;
    --btn-txt: #ffffff;
    --shadow: 0 12px 40px rgba(9,40,70,.16);
    --shadow-lift: 0 30px 80px rgba(9,40,70,.26);
    --logo-bg: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: "Segoe UI", -apple-system, Arial, sans-serif;
    background: var(--bg); color: var(--ink);
    min-height: 100vh; overflow-x: hidden;
    transition: background .35s ease, color .35s ease;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(56,189,248,.35); color: #fff; }

.bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; transition: background .35s ease; background: var(--bg); }
.aurora { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; transition: background .35s ease; }
.aurora.a1 { width: 46vw; height: 46vw; left: -12vw; top: -16vw; background: radial-gradient(circle, var(--glow1), transparent 65%); animation: drift 22s ease-in-out infinite alternate; }
.aurora.a2 { width: 40vw; height: 40vw; right: -10vw; top: 6vw; background: radial-gradient(circle, var(--glow2), transparent 65%); animation: drift 26s ease-in-out infinite alternate-reverse; }
.aurora.a3 { width: 36vw; height: 36vw; left: 30vw; bottom: -18vw; background: radial-gradient(circle, var(--glow3), transparent 65%); animation: drift 30s ease-in-out infinite alternate; }
@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(4vw, -3vw) scale(1.15); }
}
.grid-overlay {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--dot) 1px, transparent 1px),
        linear-gradient(90deg, var(--dot) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(78% 68% at 50% 28%, #000 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(78% 68% at 50% 28%, #000 0%, transparent 100%);
}
.noise { position: absolute; inset: 0; background: var(--noise); pointer-events: none; opacity: .7; }

.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 1200;
    display: flex; flex-direction: column; gap: 4px;
    padding: 16px 14px;
    background: linear-gradient(160deg, var(--card-strong), var(--glass));
    backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-right: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.side-top { display: flex; align-items: center; gap: 8px; padding: 4px 4px 18px; }
.side-brand { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.side-brand img { height: 42px; border-radius: 10px; background: var(--logo-bg); padding: 3px; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.side-brand-text { display: flex; flex-direction: column; line-height: 1.18; min-width: 0; }
.side-brand-title { font-weight: 800; letter-spacing: .8px; font-size: 1rem; white-space: nowrap; }
.side-brand-sub { color: var(--mut); font-size: .62em; letter-spacing: .6px; white-space: nowrap; }
.side-toggle {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    display: grid; place-items: center;
    background: var(--glass); border: 1px solid var(--line); color: var(--ink);
    transition: background .15s, border-color .15s;
}
.side-toggle:hover { background: var(--glass-strong); border-color: var(--line-strong); }
.side-toggle svg { width: 18px; height: 18px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; padding-bottom: 10px; }
.side-label { color: var(--dim); font-size: .62em; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; padding: 12px 12px 6px; }
.side-nav a {
    display: flex; align-items: center; gap: 11px;
    color: var(--mut); font-weight: 700; font-size: .82em; letter-spacing: .2px;
    padding: 11px 12px; border-radius: 11px;
    transition: background .15s, color .15s;
}
.side-nav a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.side-nav a:hover { background: var(--glass-strong); color: var(--ink); }
.side-nav a.active { background: linear-gradient(120deg, rgba(56,189,248,.22), rgba(34,211,238,.08)); color: var(--cyan); border: 1px solid rgba(56,189,248,.3); }
.side-nav a.active svg { color: var(--cyan); }
.side-foot { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.side-foot a {
    display: flex; align-items: center; gap: 11px;
    color: var(--mut); font-weight: 700; font-size: .82em;
    padding: 10px 12px; border-radius: 11px; transition: background .15s, color .15s;
}
.side-foot a svg { width: 18px; height: 18px; }
.side-foot a:hover { background: var(--glass-strong); color: var(--ink); }
.side-foot a.logout { color: #fda4af; }
html[data-theme="light"] .side-foot a.logout { color: #e11d48; }

.sidebar-overlay {
    position: fixed; inset: 0; z-index: 1150; display: none;
    background: rgba(2,10,20,.55); backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

.content { margin-left: 260px; min-height: 100vh; display: flex; flex-direction: column; transition: margin .28s cubic-bezier(.2,.8,.2,1); }

.topbar {
    position: sticky; top: 14px; z-index: 1100;
    margin: 14px 24px 0;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    background: linear-gradient(120deg, var(--card-strong), var(--glass));
    backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
    border: 1px solid var(--line); border-radius: 16px;
    box-shadow: var(--shadow);
}
.menu-btn {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: var(--glass); border: 1px solid var(--line); color: var(--ink);
    transition: background .15s, border-color .15s;
}
.menu-btn:hover { background: var(--glass-strong); border-color: var(--line-strong); }
.menu-btn svg { width: 20px; height: 20px; }
body.sidebar-collapsed .sidebar { width: 78px; }
body.sidebar-collapsed .content { margin-left: 78px; }
body.sidebar-collapsed .side-brand-text,
body.sidebar-collapsed .side-label,
body.sidebar-collapsed .side-nav a span,
body.sidebar-collapsed .side-foot a span,
body.sidebar-collapsed .side-brand-sub { display: none; }
body.sidebar-collapsed .side-brand { justify-content: center; padding: 0; }
body.sidebar-collapsed .side-nav a,
body.sidebar-collapsed .side-foot a { justify-content: center; padding-left: 0; padding-right: 0; }
body.sidebar-collapsed .side-toggle svg { transform: rotate(180deg); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 40px; border-radius: 10px; background: var(--logo-bg); padding: 3px; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.brand-text { display: flex; flex-direction: column; line-height: 1.18; }
.brand-title { font-weight: 800; letter-spacing: .8px; font-size: 1.02em; }
.brand-sub { color: var(--mut); font-size: .68em; letter-spacing: .6px; }
.top-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.theme-btn {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: var(--glass); border: 1px solid var(--line); color: var(--ink);
    transition: background .15s, transform .15s, border-color .15s;
}
.theme-btn:hover { background: var(--glass-strong); transform: rotate(8deg); border-color: var(--line-strong); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .icon-sun { display: none; }
html[data-theme="dark"] .theme-btn .icon-sun { display: block; }
html[data-theme="dark"] .theme-btn .icon-moon { display: none; }
html[data-theme="light"] .theme-btn .icon-sun { display: none; }
html[data-theme="light"] .theme-btn .icon-moon { display: block; }

.profile-menu { position: relative; }
.profile-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 5px 10px 5px 5px; border-radius: 12px;
    background: var(--glass); border: 1px solid var(--line); color: var(--ink);
    transition: background .15s, border-color .15s;
}
.profile-btn:hover { background: var(--glass-strong); border-color: var(--line-strong); }
.profile-avatar {
    width: 34px; height: 34px; border-radius: 10px; object-fit: cover;
    background: var(--logo-bg);
}
.profile-btn .p-name { font-size: .82em; font-weight: 700; line-height: 1.1; text-align: left; }
.profile-btn .p-role { font-size: .66em; color: var(--mut); font-weight: 700; letter-spacing: .4px; text-transform: uppercase; text-align: left; }
.profile-btn .p-caret { color: var(--dim); }
.profile-btn .p-caret svg { width: 16px; height: 16px; }
.profile-drop {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
    padding: 8px; border-radius: 16px;
    background: linear-gradient(150deg, var(--card-strong), var(--glass));
    backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--line-strong); box-shadow: var(--shadow-lift);
    display: none;
}
.profile-drop.open { display: block; }
.profile-drop .pd-head { display: flex; align-items: center; gap: 12px; padding: 8px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.profile-drop .pd-head img { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; background: var(--logo-bg); }
.profile-drop .pd-name { font-weight: 800; font-size: .92em; }
.profile-drop .pd-sub { color: var(--mut); font-size: .7em; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
.profile-drop a {
    display: flex; align-items: center; gap: 11px;
    color: var(--mut); font-weight: 700; font-size: .84em;
    padding: 11px 12px; border-radius: 11px; transition: background .15s, color .15s;
}
.profile-drop a svg { width: 17px; height: 17px; }
.profile-drop a:hover { background: var(--glass-strong); color: var(--ink); }
.profile-drop a.logout { color: #fda4af; }
html[data-theme="light"] .profile-drop a.logout { color: #e11d48; }

.page { padding: 26px 24px 30px; flex: 1; }
.page-head { margin-bottom: 26px; }
.kicker {
    display: inline-flex; align-items: center; gap: 9px;
    color: var(--cyan); font-weight: 800; font-size: .68em;
    letter-spacing: 2.6px; text-transform: uppercase;
    background: var(--glass); border: 1px solid rgba(56,189,248,.35);
    padding: 7px 16px; border-radius: 999px;
    backdrop-filter: blur(8px);
}
.kicker .kdot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2s ease-out infinite; }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(52,211,153,.65); }
    70% { box-shadow: 0 0 0 9px rgba(52,211,153,0); }
    100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}
.page-head h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 800; letter-spacing: -.4px; margin-top: 16px; }
.page-head p { color: var(--mut); font-size: .92rem; line-height: 1.7; margin-top: 8px; }

.section-title { margin: 6px 0 16px; }
.section-title h2 { font-size: 1.18rem; font-weight: 800; color: var(--ink); }
.section-title p { color: var(--mut); font-size: .84rem; margin-top: 4px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat {
    position: relative; padding: 20px 20px; border-radius: 20px; overflow: hidden;
    border: 1px solid transparent;
    background:
        linear-gradient(150deg, var(--card-strong), var(--glass)) padding-box,
        linear-gradient(150deg, rgba(56,189,248,.45), rgba(34,211,238,.1) 45%, transparent) border-box;
    backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: var(--shadow);
    transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s;
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.stat .stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.stat .stat-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; }
.stat .stat-ico svg { width: 21px; height: 21px; }
.stat .stat-trend { font-size: .7em; font-weight: 800; letter-spacing: .4px; }
.stat .stat-trend.up { color: var(--green); }
.stat .stat-trend.down { color: var(--red); }
.stat b { display: block; font-size: 1.7rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.stat span { color: var(--mut); font-size: .7em; letter-spacing: 1px; text-transform: uppercase; font-weight: 800; }

.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-bottom: 24px; }
.chart-card {
    position: relative; padding: 20px 20px 14px; border-radius: 22px; overflow: hidden;
    border: 1px solid transparent;
    background:
        linear-gradient(var(--card-strong), var(--card-strong)) padding-box,
        linear-gradient(150deg, rgba(56,189,248,.5), rgba(34,211,238,.12) 45%, rgba(56,189,248,.05)) border-box;
    backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
    box-shadow: var(--shadow);
}
.chart-card h3 { font-size: .98rem; font-weight: 800; margin-bottom: 4px; }
.chart-card .chart-sub { color: var(--mut); font-size: .76rem; margin-bottom: 14px; }
.chart-card .chart-body { position: relative; height: 230px; }
.chart-card .chart-body.tall { height: 280px; }
.chart-card canvas { max-height: 100%; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.tile {
    position: relative; display: flex; flex-direction: column; gap: 14px;
    padding: 24px 22px; border-radius: 22px; overflow: hidden;
    border: 1px solid transparent;
    background:
        linear-gradient(var(--card), var(--card)) padding-box,
        linear-gradient(150deg, rgba(56,189,248,.5), rgba(34,211,238,.12) 45%, rgba(56,189,248,.05)) border-box;
    backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: var(--shadow);
    transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s;
}
.tile::before { content: ""; position: absolute; top: 0; left: 14%; right: 14%; height: 1.5px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent); opacity: 0; transition: opacity .25s; }
.tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.tile:hover::before { opacity: 1; }
.tile .ti {
    width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center;
    color: var(--cyan);
    background: radial-gradient(120% 120% at 30% 20%, rgba(56,189,248,.22), rgba(56,189,248,.06));
    border: 1px solid rgba(56,189,248,.32);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 8px 24px rgba(56,189,248,.15);
}
.tile .ti svg { width: 25px; height: 25px; }
.tile h3 { font-size: 1.08rem; font-weight: 800; }
.tile p { color: var(--mut); font-size: .85rem; line-height: 1.6; flex: 1; }
.tile .go { display: inline-flex; align-items: center; gap: 8px; color: var(--cyan); font-weight: 800; font-size: .82rem; letter-spacing: .3px; }
.tile .go svg { transition: transform .18s; }
.tile:hover .go svg { transform: translateX(4px); }

.table-card {
    position: relative; padding: 20px 22px; border-radius: 22px; overflow: hidden;
    border: 1px solid transparent;
    background:
        linear-gradient(var(--card-strong), var(--card-strong)) padding-box,
        linear-gradient(150deg, rgba(56,189,248,.5), rgba(34,211,238,.12) 45%, rgba(56,189,248,.05)) border-box;
    backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
    box-shadow: var(--shadow);
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 15px; text-align: left; font-size: .88rem; }
th { color: var(--cyan); font-weight: 800; font-size: .72em; letter-spacing: 1.2px; text-transform: uppercase; border-bottom: 1px solid var(--line-strong); }
td { color: var(--mut); border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--glass); }
td b { color: var(--ink); }
td small { color: var(--dim); }
td input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--cyan); cursor: pointer; }
.status-pill {
    display: inline-block; padding: 4px 12px; border-radius: 999px;
    font-size: .72em; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
    background: var(--glass); border: 1px solid var(--line-strong); color: var(--mut);
    white-space: nowrap;
}
.status-ready { color: var(--green); border-color: rgba(52,211,153,.45); }
.status-progress { color: var(--amber); border-color: rgba(251,191,36,.45); }
.status-done { color: var(--green); border-color: rgba(52,211,153,.45); }
.status-assigned { color: var(--cyan); border-color: rgba(56,189,248,.45); }
.status-open { color: var(--green); border-color: rgba(52,211,153,.45); }
.courier-tag { display: inline-block; padding: 3px 10px; border-radius: 8px; font-weight: 800; font-size: .74em; background: rgba(56,189,248,.12); color: var(--cyan); border: 1px solid rgba(56,189,248,.35); }
.time-tag { display: inline-block; padding: 3px 10px; border-radius: 8px; font-weight: 800; font-size: .74em; background: rgba(251,191,36,.10); color: var(--amber); border: 1px solid rgba(251,191,36,.35); }
tr.order-row { cursor: pointer; }
tr.order-row:hover { background: var(--glass); }
tr.detail-row td { background: var(--glass); }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 18px; padding: 8px 4px; }
.detail-item .dl { color: var(--dim); font-size: .66em; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.detail-item .dv { color: var(--ink); font-size: .9rem; margin-top: 3px; line-height: 1.4; }
.detail-item .dv small { color: var(--mut); }
.detail-actions { margin-top: 16px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.empty { text-align: center; padding: 40px 16px; color: var(--dim); font-size: .9rem; font-weight: 600; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 13px 24px; border-radius: 13px; border: none; cursor: pointer;
    font-weight: 800; font-size: .9rem; letter-spacing: .4px;
    background: linear-gradient(135deg, #0891b2, var(--cyan)); color: var(--btn-txt);
    box-shadow: 0 8px 26px rgba(56,189,248,.35);
    transition: transform .15s, box-shadow .2s, filter .15s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 12px 34px rgba(56,189,248,.45); }
.btn.ghost { background: var(--glass); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: none; }
.btn.ghost:hover { background: var(--glass-strong); }
.btn.danger { background: linear-gradient(135deg, #be123c, var(--red)); color: #fff; box-shadow: 0 8px 26px rgba(248,113,113,.3); }
.actions { display: flex; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.back-link { color: var(--mut); font-weight: 700; font-size: .86rem; transition: color .15s; }
.back-link:hover { color: var(--cyan); }

.assign-bar {
    display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
    padding: 18px 22px; margin-bottom: 20px; border-radius: 18px;
    background: linear-gradient(120deg, var(--card-strong), var(--glass));
    border: 1px solid var(--line);
}
.assign-bar .field { display: flex; flex-direction: column; gap: 7px; min-width: 240px; flex: 1; }
.assign-bar label { color: var(--mut); font-size: .72em; letter-spacing: 1.1px; text-transform: uppercase; font-weight: 800; }
.assign-bar .sel-count { color: var(--dim); font-size: .78em; font-weight: 700; padding-bottom: 12px; white-space: nowrap; }

.view-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }
.view-tabs a { padding: 9px 20px; border-radius: 999px; font-weight: 800; font-size: .78em; letter-spacing: .5px; text-transform: uppercase; color: var(--mut); background: var(--glass); border: 1px solid var(--line); transition: all .15s; }
.view-tabs a:hover { color: var(--ink); border-color: var(--line-strong); }
.view-tabs a.active { color: var(--btn-txt); background: linear-gradient(135deg, #0891b2, var(--cyan)); border-color: transparent; box-shadow: 0 6px 20px rgba(56,189,248,.3); }

.banner {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 22px; margin-bottom: 20px; border-radius: 14px;
    background: var(--glass); border: 1px solid var(--line);
    color: var(--mut); font-size: .86rem; text-align: center; flex-wrap: wrap;
}
.banner a { color: var(--cyan); font-weight: 800; }
.banner a:hover { text-decoration: underline; }

.row-assign { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 250px; }
.row-assign form { display: flex; align-items: center; gap: 8px; flex: 1; flex-wrap: wrap; }
.row-assign select {
    flex: 1; min-width: 120px; padding: 8px 10px; border-radius: 10px;
    font-size: .86rem; color: var(--ink); background: var(--glass);
    border: 1px solid var(--line-strong); outline: none;
    -webkit-appearance: none; appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
    background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
    background-size: 5px 5px; background-repeat: no-repeat;
    transition: border-color .15s, box-shadow .15s;
}
.row-assign select option { background: #0b2036; color: #eaf7ff; }
html[data-theme="light"] .row-assign select option { background: #ffffff; color: #0b2440; }
.row-assign select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(56,189,248,.18); }
.btn-sm {
    padding: 8px 14px; border-radius: 10px; border: none; cursor: pointer;
    font-weight: 800; font-size: .78em; letter-spacing: .4px; white-space: nowrap;
    background: linear-gradient(135deg, #0891b2, var(--cyan)); color: var(--btn-txt);
    box-shadow: 0 5px 16px rgba(56,189,248,.3);
    transition: transform .15s, filter .15s;
}
.btn-sm:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-sm.ghost { background: var(--glass); color: var(--mut); border: 1px solid var(--line-strong); box-shadow: none; }
.btn-sm.danger { background: rgba(248,113,113,.12); color: var(--red); border: 1px solid rgba(248,113,113,.35); box-shadow: none; }
.btn-sm.danger:hover { background: rgba(248,113,113,.24); filter: none; }
.btn-sm svg { vertical-align: middle; }

.form-card {
    position: relative; padding: 30px 30px 28px; border-radius: 24px; overflow: hidden;
    border: 1px solid transparent;
    background:
        linear-gradient(var(--card-strong), var(--card-strong)) padding-box,
        linear-gradient(150deg, rgba(56,189,248,.6), rgba(34,211,238,.12) 40%, rgba(56,189,248,.08) 70%, transparent 100%) border-box;
    backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
    box-shadow: var(--shadow);
}
.form-card h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: .2px; }
.form-card .desc { color: var(--mut); font-size: .9rem; line-height: 1.6; margin: 10px 0 24px; }
.form-wrap { max-width: 860px; margin: 0 auto; }
.form-wrap.narrow { max-width: 640px; }
.group-label {
    display: flex; align-items: center; gap: 12px; grid-column: 1 / -1;
    margin: 6px 0 2px; color: var(--cyan); font-weight: 800;
    font-size: .72em; letter-spacing: 1.8px; text-transform: uppercase;
}
.group-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--mut); font-size: .72em; letter-spacing: 1.1px; text-transform: uppercase; font-weight: 800; }
.field label a { color: var(--cyan); }
.field label a:hover { text-decoration: underline; }
.field input, .field select, .field textarea {
    width: 100%; padding: 13px 15px; border-radius: 12px; font-size: .95rem; color: var(--ink);
    background: var(--glass); border: 1px solid var(--line-strong);
    outline: none; transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none; font-family: inherit;
}
.field textarea { resize: vertical; min-height: 90px; }
.field select {
    background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
    background-size: 5px 5px; background-repeat: no-repeat;
}
.field select option { background: #0b2036; color: #eaf7ff; }
html[data-theme="light"] .field select option { background: #ffffff; color: #0b2440; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(56,189,248,.18); }

.notice {
    padding: 13px 16px; border-radius: 13px; font-size: .88rem; font-weight: 700;
    margin-bottom: 18px; line-height: 1.5;
}
.notice.ok { background: rgba(52,211,153,.12); color: var(--green); border: 1px solid rgba(52,211,153,.4); }
.notice.err { background: rgba(248,113,113,.12); color: var(--red); border: 1px solid rgba(248,113,113,.4); }

.profile-card { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.profile-card img {
    width: 92px; height: 92px; border-radius: 22px; object-fit: cover;
    border: 1px solid var(--line-strong); background: var(--logo-bg);
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.profile-card .pc-name { font-size: 1.35rem; font-weight: 800; }
.profile-card .pc-sub { color: var(--mut); font-size: .82rem; margin-top: 4px; }
.profile-card .pc-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

footer { border-top: 1px solid var(--line); margin-top: 60px; padding: 26px 0 34px; text-align: center; }
footer p { color: var(--mut); font-size: .8rem; line-height: 1.8; }
footer a { color: var(--cyan); font-weight: 600; }
footer a:hover { text-decoration: underline; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); width: 260px; }
    .sidebar.open { transform: none; box-shadow: var(--shadow-lift); }
    .content { margin-left: 0; }
    body.sidebar-collapsed .sidebar { width: 260px; }
    body.sidebar-collapsed .content { margin-left: 0; }
    body.sidebar-collapsed .side-brand-text,
    body.sidebar-collapsed .side-label,
    body.sidebar-collapsed .side-nav a span,
    body.sidebar-collapsed .side-foot a span,
    body.sidebar-collapsed .side-brand-sub { display: flex; }
    body.sidebar-collapsed .side-brand { justify-content: flex-start; }
    body.sidebar-collapsed .side-nav a,
    body.sidebar-collapsed .side-foot a { justify-content: flex-start; padding-left: 12px; padding-right: 12px; }
    body.sidebar-collapsed .side-toggle svg { transform: none; }
    .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .topbar { margin: 10px 12px 0; padding: 8px 10px; gap: 8px; }
    .page { padding: 18px 12px 22px; }
    .brand-sub { display: none; }
    .profile-btn .p-name, .profile-btn .p-role { display: none; }
    .profile-btn { padding: 5px; }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat { padding: 16px 14px; }
    .stat b { font-size: 1.4rem; }
    .charts { grid-template-columns: 1fr; }
    .chart-card .chart-body { height: 200px; }
    .grid { grid-template-columns: 1fr; }
    .table-card { padding: 10px; }
    th, td { padding: 10px 10px; font-size: .82rem; }
    .assign-bar { padding: 14px; }
    .assign-bar .field { min-width: 100%; }
    .form-card { padding: 22px 18px 20px; }
    .page-head h1 { margin-top: 12px; }
    .form-wrap { padding-top: 4px; }
    .status-pill { padding: 3px 9px; font-size: .68em; }
}
@media (max-width: 420px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .page { padding: 14px 10px 18px; }
    .topbar { margin: 8px 8px 0; }
    .profile-btn { padding: 4px; }
    .row-assign { min-width: 0; }
    .row-assign select { min-width: 90px; }
    .view-tabs a { padding: 8px 14px; font-size: .72em; }
    .profile-card { gap: 14px; }
    .profile-card img { width: 72px; height: 72px; }
}
@media (prefers-reduced-motion: reduce) {
    .aurora, .kicker .kdot { animation: none; }
    .reveal { opacity: 1; transform: none; }
}
