/* Kho driver — tông sáng teal như bản trước */
:root {
    --bg: #e8eef3;
    --bg-elev: #f4f7fa;
    --bg-soft: #f4f7fa;
    --panel: #ffffff;
    --panel-2: #f8fafc;
    --card: #ffffff;
    --ink: #15202b;
    --muted: #5b6b7c;
    --line: #d5dee7;
    --line-strong: #b8c5d1;
    --brand: #0b6e6a;
    --brand-ink: #085652;
    --brand-soft: #e0f2f1;
    --signal: #0f4c81;
    --signal-soft: #e8f1f8;
    --danger: #b42318;
    --danger-soft: #fef3f2;
    --ok: #067647;
    --ok-soft: #ecfdf3;
    --warn: #b54708;
    --warn-bg: #fffaeb;
    --warn-line: #fedf89;
    --shadow: 0 1px 2px rgba(21, 32, 43, 0.06), 0 8px 24px rgba(21, 32, 43, 0.06);
    --radius: 12px;
    --font: "IBM Plex Sans", "Be Vietnam Pro", sans-serif;
    --display: "Syne", "IBM Plex Sans", sans-serif;
    --mono: "IBM Plex Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    min-height: 100vh;
    background:
        radial-gradient(1200px 500px at 10% -10%, #cfe8e6 0%, transparent 55%),
        radial-gradient(900px 420px at 100% 0%, #dce7f2 0%, transparent 50%),
        var(--bg);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(11, 110, 106, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 76, 129, 0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 20%, transparent 75%);
}

a { color: var(--brand-ink); text-decoration: none; }
a:hover { color: var(--brand); text-decoration: underline; }

.shell {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
    padding: 18px 22px 56px;
}
/* —— Trang chủ Driver Thiên Hà (sky / trung tâm) —— */
.page-home.sky {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 90% 70% at 50% -10%, #d7ecea 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 80% 60%, rgba(15, 76, 129, 0.14), transparent 55%),
        radial-gradient(ellipse 50% 40% at 15% 80%, rgba(11, 110, 106, 0.16), transparent 50%),
        linear-gradient(180deg, #f5f9f8 0%, #e8eef3 100%);
}
.page-home.sky::before {
    opacity: 0.16;
    mask-image: radial-gradient(ellipse 70% 50% at 50% 30%, #000, transparent);
}
.sky-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.sky-orbit {
    position: absolute;
    left: 50%;
    top: 40%;
    border: 1px solid rgba(11, 110, 106, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.sky-orbit.o1 {
    width: min(88vw, 640px);
    height: min(88vw, 640px);
    animation: sky-spin 48s linear infinite;
}
.sky-orbit.o2 {
    width: min(66vw, 480px);
    height: min(66vw, 480px);
    border-color: rgba(15, 76, 129, 0.18);
    animation: sky-spin 36s linear infinite reverse;
}
.sky-orbit.o3 {
    width: min(42vw, 300px);
    height: min(42vw, 300px);
    border-style: dashed;
    border-color: rgba(11, 110, 106, 0.26);
    animation: sky-spin 28s linear infinite;
}
.sky-dust {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #0b6e6a;
    opacity: 0.45;
    animation: sky-twinkle 3.5s ease-in-out infinite;
}
.sky-dust.d1 { top: 18%; left: 18%; }
.sky-dust.d2 { top: 24%; left: 78%; background: #0f4c81; animation-delay: 0.4s; width: 4px; height: 4px; }
.sky-dust.d3 { top: 58%; left: 12%; animation-delay: 0.9s; width: 3px; height: 3px; }
.sky-dust.d4 { top: 68%; left: 86%; background: #0f4c81; animation-delay: 1.2s; }
.sky-dust.d5 { top: 40%; left: 8%; animation-delay: 1.6s; width: 2px; height: 2px; }
.sky-dust.d6 { top: 16%; left: 55%; animation-delay: 0.7s; width: 3px; height: 3px; }

.home.home-sky {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 16px clamp(16px, 3vw, 32px) 0;
    gap: 0;
}
.sky-nav {
    display: flex;
    justify-content: flex-end;
}
.page-home.sky .home-nav-manage {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid rgba(184, 197, 209, 0.9);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.page-home.sky .home-nav-manage:hover {
    background: #fff;
    border-color: var(--brand);
    color: var(--brand-ink);
    text-decoration: none;
}

.sky-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 12px 36px;
    max-width: 44rem;
    margin: 0 auto;
    width: 100%;
}
.sky-kicker {
    margin: 0 0 14px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brand-ink);
    animation: sky-rise 0.7s ease-out both;
}
.sky-brand {
    margin: 0 0 14px;
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(2.7rem, 7.5vw, 4.6rem);
    line-height: 0.96;
    letter-spacing: -0.045em;
    background: linear-gradient(120deg, #15202b 8%, #085652 50%, #0f4c81 92%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: sky-rise 0.75s ease-out 0.06s both;
}
.sky-lead {
    margin: 0 0 26px;
    max-width: 32rem;
    color: #3a4a5a;
    font-size: clamp(1rem, 1.8vw, 1.12rem);
    font-weight: 500;
    line-height: 1.55;
    animation: sky-rise 0.8s ease-out 0.12s both;
}
.sky-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    animation: sky-rise 0.85s ease-out 0.18s both;
}
.page-home.sky .sky-ctas .btn {
    border-radius: 10px;
    padding: 12px 18px;
    font-weight: 600;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.page-home.sky .sky-ctas .btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}
.page-home.sky .sky-primary {
    background: #085652;
    border-color: #064540;
    box-shadow: 0 8px 20px rgba(8, 86, 82, 0.22);
}
.page-home.sky .sky-primary:hover {
    background: #0b6e6a;
    box-shadow: 0 10px 24px rgba(8, 86, 82, 0.28);
}
.page-home.sky .sky-ctas .btn.ghost {
    background: rgba(255, 255, 255, 0.92);
    border-color: #c5d0da;
    color: var(--ink);
}
.page-home.sky .sky-ctas .btn.ghost:hover {
    border-color: var(--brand);
    color: var(--brand-ink);
    background: #fff;
}

/* Chân đế — 3 cột full-width đều nhau */
.company-base {
    margin: 0 calc(-1 * clamp(16px, 3vw, 32px));
    background: linear-gradient(95deg, #074743 0%, #0b6e6a 50%, #0c456e 100%);
    color: #eef7f6;
}
.company-base-inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}
.company-base-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    padding: 11px clamp(12px, 2vw, 24px);
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    text-align: left;
}
.company-base-item:last-child {
    border-right: 0;
}
.company-base-ico-wrap {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
}
.company-base-ico {
    width: 13px;
    height: 13px;
    color: #b7e4e0;
}
.company-base-item > div {
    min-width: 0;
}
.company-base-item strong,
.company-base-item p,
.company-base-item a {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.35;
    color: #fff;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.company-base-item strong {
    font-family: var(--font);
    font-size: 0.88rem;
    letter-spacing: 0;
    font-weight: 600;
}
.company-base-phone a {
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.company-base-item a:hover {
    color: #c8ebe8;
    text-decoration: underline;
}

@media (max-width: 800px) {
    .company-base-inner {
        grid-template-columns: 1fr;
    }
    .company-base-item {
        justify-content: flex-start;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        padding: 10px 16px;
    }
    .company-base-item:last-child { border-bottom: 0; }
}
@media (max-width: 640px) {
    .sky-brand { font-size: clamp(2.4rem, 11vw, 3.2rem); }
    .sky-ctas { width: 100%; }
    .page-home.sky .sky-ctas .btn { width: 100%; justify-content: center; }
    .sky-orbit.o1 { width: 110vw; height: 110vw; }
}

@keyframes sky-rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}
@keyframes sky-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes sky-twinkle {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.4); }
}

@media (prefers-reduced-motion: reduce) {
    .sky-orbit, .sky-dust, .sky-kicker, .sky-brand, .sky-lead, .sky-ctas,
    .page-home.sky .sky-ctas .btn {
        animation: none !important;
        transition: none !important;
    }
}

.topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(213, 222, 231, 0.95);
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
    backdrop-filter: blur(12px);
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 220px; }

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: linear-gradient(145deg, #0b6e6a, #0f4c81);
    color: #fff;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.brand-mark .ico { width: 22px; height: 22px; }
.brand h1 {
    margin: 0;
    font-family: var(--display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 0.8rem; }

.top-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.ico { width: 16px; height: 16px; flex: 0 0 auto; vertical-align: -3px; }
.ico-lg { width: 20px; height: 20px; }

.btn, button, .chip {
    font: inherit;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 8px;
    padding: 10px 14px;
    line-height: 1.2;
    white-space: nowrap;
}

.btn, button {
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}
.btn:hover, button:hover {
    background: var(--brand-ink);
    text-decoration: none;
    color: #fff;
}
.btn.ghost, button.ghost {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
}
.btn.ghost:hover, button.ghost:hover {
    background: var(--bg-soft);
    border-color: #9bb8b6;
    color: var(--ink);
}
.btn.danger, button.danger { background: var(--danger); color: #fff; }
.btn.danger:hover, button.danger:hover { background: #912018; }
.btn.sm, button.sm { padding: 7px 10px; font-size: 0.9rem; }
.btn.lg { padding: 14px 18px; font-size: 1rem; }

.flash {
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 0.94rem;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border: 1px solid var(--line);
}
.flash.error { background: var(--danger-soft); color: var(--danger); border-color: #fecdca; }
.flash.ok { background: var(--ok-soft); color: var(--ok); border-color: #abefc6; }
.flash.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }

/* —— Cổng đăng nhập quản lý —— */
.auth-gate {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 28px 0 12px;
}
.auth-card {
    width: min(420px, 100%);
    margin-top: 8px;
    padding: 28px 28px 24px;
}
.auth-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 22px;
}
.auth-badge {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand-ink);
    border: 1px solid #b7e0dc;
}
.auth-head h2 {
    margin: 2px 0 6px;
}
.auth-head .sub {
    margin: 0;
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--ink);
}
.auth-field span { color: var(--muted); font-weight: 600; }
.auth-field input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--panel-2);
    color: var(--ink);
    font: inherit;
    font-weight: 500;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.auth-field input:focus {
    outline: none;
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(11, 110, 106, 0.18);
}
.auth-submit {
    margin-top: 6px;
    height: 46px;
    width: 100%;
    border: none;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.auth-submit:hover { background: var(--brand-ink); }

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-top: 14px;
    box-shadow: var(--shadow);
}
.card h2 {
    margin: 0 0 12px;
    font-family: var(--display);
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card > .sub:first-of-type { margin-top: -4px; }
.sub { color: var(--muted); font-size: 0.86rem; line-height: 1.5; margin: 0 0 14px; }

.stat-row, .stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    box-shadow: var(--shadow);
    min-width: 0;
}
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.stat-ico {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
    margin-bottom: 8px;
}
.stat b {
    display: block;
    font-family: var(--display);
    font-size: 1.65rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
}
.stat span { color: var(--muted); font-size: 0.8rem; }
a.stat { color: inherit; text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
a.stat:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-1px); }
a.stat.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }

.grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 14px;
    align-items: start;
}

.actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 4px;
}
.action {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    min-height: 148px;
}
.action .mark {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--signal-soft);
    color: var(--signal);
}
.action strong { font-size: 1rem; font-family: var(--display); }
.action p { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.45; flex: 1; }

.steps { margin: 0; padding-left: 0; list-style: none; counter-reset: step; }
.steps li {
    counter-increment: step;
    position: relative;
    padding: 12px 12px 12px 48px;
    margin: 0 0 8px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.92rem;
    line-height: 1.5;
}
.steps li::before {
    content: counter(step);
    position: absolute;
    left: 12px;
    top: 12px;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--brand);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    display: grid;
    place-items: center;
    font-family: var(--mono);
}

.addr-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.addr-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 12px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 8px;
}

code, .mono {
    font-family: var(--mono);
    font-size: 0.82rem;
    word-break: break-all;
}
code {
    background: #eef2f6;
    color: #334155;
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid var(--line);
}
.mono { overflow-wrap: anywhere; }

.foot-note { margin-top: 14px; color: var(--muted); font-size: 0.84rem; line-height: 1.45; }

/* Home hero */
.hero {
    position: relative;
    overflow: hidden;
    min-height: min(72vh, 640px);
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: clamp(28px, 5vw, 48px);
    margin-bottom: 18px;
    background:
        linear-gradient(135deg, #ffffff 0%, #f4faf9 55%, #eef4f8 100%),
        radial-gradient(600px 300px at 80% 40%, rgba(11, 110, 106, 0.12), transparent 60%);
    box-shadow: var(--shadow);
}
.hero-copy { position: relative; z-index: 1; max-width: 34rem; }
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 14px;
}
.hero-kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--brand);
}
.hero h1 {
    margin: 0 0 12px;
    font-family: var(--display);
    font-size: clamp(2.4rem, 6vw, 4rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
    font-weight: 800;
}
.hero h1 span { color: var(--brand); }
.hero .lead {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.55;
    max-width: 28rem;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-visual {
    position: relative;
    min-height: 280px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background:
        linear-gradient(160deg, #e8f3f2, #f4f7fa 70%),
        repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(11, 110, 106, 0.04) 10px, rgba(11, 110, 106, 0.04) 11px);
    overflow: hidden;
}
.hero-visual::before {
    content: "";
    position: absolute;
    inset: 18% 16% 22% 16%;
    border: 1px solid rgba(11, 110, 106, 0.35);
    border-radius: 6px;
    background:
        linear-gradient(90deg, transparent 48%, rgba(11, 110, 106, 0.2) 49%, rgba(11, 110, 106, 0.2) 51%, transparent 52%),
        linear-gradient(transparent 48%, rgba(15, 76, 129, 0.15) 49%, rgba(15, 76, 129, 0.15) 51%, transparent 52%),
        rgba(255, 255, 255, 0.55);
    animation: pulse-board 4.5s ease-in-out infinite;
}
.hero-visual::after {
    content: "HWID · MATCH · INSTALL";
    position: absolute;
    left: 18px;
    bottom: 16px;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: var(--muted);
}
.chip-node {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: var(--brand);
    box-shadow: 0 0 0 4px rgba(11, 110, 106, 0.15);
    animation: blink 2.8s ease-in-out infinite;
}
.chip-node.n2 { left: 22%; top: 28%; background: var(--signal); animation-delay: 0.6s; box-shadow: 0 0 0 4px rgba(15, 76, 129, 0.15); }
.chip-node.n3 { right: 24%; top: 36%; animation-delay: 1.2s; }
.chip-node.n4 { left: 40%; bottom: 30%; background: var(--signal); animation-delay: 1.8s; box-shadow: 0 0 0 4px rgba(15, 76, 129, 0.15); }

@keyframes pulse-board {
    0%, 100% { opacity: 0.75; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.015); }
}
@keyframes blink {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

.section-label {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 8px 0 10px;
}

/* Admin extras */
.nav-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.nav-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.nav-tools a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--ink);
    font-size: 0.9rem;
}
.nav-tools a:hover { border-color: var(--brand); background: var(--brand-soft); text-decoration: none; color: var(--ink); }
.nav-tools a.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.tool-links { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.86rem;
    padding: 6px 8px;
    border-radius: 8px;
}
.tool-links a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }

/* Admin sidebar layout */
.admin-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-top: 8px;
}
.admin-side {
    position: sticky;
    top: 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 10px 14px;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}
.admin-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 6px 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 10px;
}
.admin-side-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ink);
}
.admin-side-toggle {
    display: none;
    font: inherit;
    font-size: 0.82rem;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}
.admin-side-group + .admin-side-group { margin-top: 12px; }
.admin-side-label {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 4px 10px 6px;
}
.admin-side-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 12px;
    color: var(--ink);
    text-decoration: none;
    border: 1px solid transparent;
    transition: background .15s ease, border-color .15s ease;
}
.admin-side-link:hover {
    background: var(--brand-soft);
    border-color: rgba(15, 118, 110, 0.18);
    text-decoration: none;
    color: var(--ink);
}
.admin-side-link.on {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.admin-side-link.on small { color: rgba(255, 255, 255, 0.82); }
.admin-side-link.on .admin-side-badge {
    background: #fff;
    color: var(--brand);
}
.admin-side-ico {
    display: inline-flex;
    width: 1.25rem;
    flex: 0 0 auto;
    margin-top: 2px;
    opacity: 0.92;
}
.admin-side-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.admin-side-text b {
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.25;
}
.admin-side-text small {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.3;
}
.admin-side-badge {
    flex: 0 0 auto;
    min-width: 1.4rem;
    padding: 2px 7px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
    margin-top: 2px;
}
.admin-main { min-width: 0; }
.admin-crumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.88rem;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.tool-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    background: rgba(15, 118, 110, 0.04);
}
.tool-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 980px) {
    .admin-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .admin-side {
        position: static;
        padding: 10px;
    }
    .admin-side-toggle { display: inline-flex; }
    .admin-side-nav { display: none; }
    .admin-side-nav.open { display: block; }
    .tool-grid { grid-template-columns: 1fr; }
}

input[type="password"],
input[type="search"],
input[type="text"],
textarea,
select {
    font: inherit;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    width: min(420px, 100%);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(11, 110, 106, 0.18);
}
textarea { min-height: 72px; width: min(560px, 100%); }
select { width: auto; min-width: 88px; }

table { width: 100%; border-collapse: collapse; }
th, td {
    text-align: left;
    padding: 11px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    font-size: 0.9rem;
}
th {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--bg-elev);
}
tr:hover td { background: #f8fafc; }

.scroll { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
form.inline { display: inline; }

.filters {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 10px;
    align-items: center;
    margin: 0 0 12px;
    padding: 12px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.filters .search-wrap { position: relative; min-width: 0; }
.filters .search-wrap .ico {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}
.filters .search-wrap input { width: 100%; padding-left: 38px; }
.filters label.check { display: inline-flex; align-items: center; gap: 7px; font-size: 0.9rem; white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.chip {
    background: var(--panel);
    color: var(--ink);
    border: 1px solid var(--line);
    text-decoration: none;
    font-size: 0.88rem;
}
.chip:hover { border-color: var(--brand); background: var(--brand-soft); text-decoration: none; color: var(--ink); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .ico { width: 15px; height: 15px; }

.toolbar-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 12px;
}

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    margin: 4px 0 10px;
}
.pager-pages { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pager-btn, .pager-num {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 36px;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
    text-decoration: none;
    font-size: 0.88rem;
}
.pager-btn:hover, .pager-num:hover { background: var(--brand-soft); text-decoration: none; color: var(--ink); }
.pager-num.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager-btn.disabled { opacity: 0.45; pointer-events: none; }
.pager-gap { color: var(--muted); padding: 0 2px; }
.pager-meta { color: var(--muted); font-size: 0.86rem; margin-left: auto; }

.actions-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table.list { margin: 0; }
table.list th:first-child, table.list td:first-child { width: 42px; }
table.list td:nth-child(2) { min-width: 240px; }

.group-row td {
    background: linear-gradient(90deg, #e8f3f2, #f4f7fa);
    border-bottom: 1px solid var(--line);
    font-weight: 600;
    color: var(--brand-ink);
    padding-top: 12px;
    padding-bottom: 12px;
}
.group-row .ico { margin-right: 6px; }
.pkg-title { font-weight: 600; color: var(--ink); }
.pkg-title:hover { color: var(--brand); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #eef2f6;
    color: var(--muted);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }

.class-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.82rem;
    color: #334155;
}

details.jobs-box {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 4px 18px 14px;
    margin: 0 0 14px;
    box-shadow: var(--shadow);
}
details.jobs-box > summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
details.jobs-box > summary::-webkit-details-marker { display: none; }
.jobs td:first-child { font-weight: 600; white-space: nowrap; }
.usb-groups label { display: inline-flex; align-items: center; gap: 6px; margin: 4px 12px 4px 0; font-size: 0.9rem; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 0.92rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

@media (max-width: 980px) {
    .hero { grid-template-columns: 1fr; min-height: 0; }
    .hero-visual { min-height: 200px; }
    .grid, .actions, .stat-row { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .filters { grid-template-columns: 1fr 1fr; }
    .filters button { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters { grid-template-columns: 1fr; }
    .brand h1 { font-size: 1.05rem; }
    .shell { padding: 12px 12px 40px; }
}
