/* ==========================================================================
   KernelDlc panel — dark navy / periwinkle theme
   ========================================================================== */

:root {
    color-scheme: dark;
    --bg: #050814;
    --bg-2: #070b1b;
    --surface: #0c1227;
    --surface-2: #101733;
    --surface-3: #151d3e;
    --line: rgba(140, 158, 255, 0.13);
    --line-strong: rgba(140, 158, 255, 0.28);
    --text: #eef1ff;
    --text-soft: #c6cdea;
    --muted: #8b95c0;
    --muted-2: #626d9c;
    --accent: #93a3ff;
    --accent-strong: #6f80ff;
    --accent-deep: #4c5bd4;
    --success: #46e0a2;
    --warning: #ffc866;
    --danger: #ff7288;
    --info: #6fc7ff;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 8px;
    --shadow: 0 24px 70px rgba(2, 5, 18, 0.6);
    --font: "Segoe UI", "Inter", "SF Pro Display", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --mono: "Cascadia Code", "JetBrains Mono", "Consolas", "SFMono-Regular", ui-monospace, monospace;
}

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

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background:
        radial-gradient(1100px 720px at 82% -12%, rgba(86, 101, 220, 0.24), transparent 62%),
        radial-gradient(900px 640px at -12% 104%, rgba(60, 80, 200, 0.14), transparent 62%),
        linear-gradient(180deg, #050814 0%, #070b1a 45%, #050813 100%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(140, 158, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(140, 158, 255, 0.028) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 72%);
    z-index: 0;
}

::selection {
    background: rgba(111, 128, 255, 0.4);
    color: #fff;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(140, 158, 255, 0.16);
    border-radius: 99px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(140, 158, 255, 0.3);
    background-clip: padding-box;
    border: 3px solid transparent;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: #b9c3ff;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

img {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* ------------------------------------------------------------------ layout */

#root {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.app {
    display: grid;
    grid-template-columns: 254px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 22px 16px 16px;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(9, 13, 30, 0.94), rgba(6, 9, 22, 0.97));
    backdrop-filter: blur(22px);
    z-index: 50;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 8px 20px;
    user-select: none;
}

.brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 11px;
    filter: drop-shadow(0 0 16px rgba(126, 144, 255, 0.5));
    flex: none;
}

.brand-name {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.15;
}

.brand-sub {
    margin-top: 3px;
    font-size: 9.5px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted-2);
    font-weight: 700;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.nav::-webkit-scrollbar {
    display: none;
}

.nav-label {
    padding: 17px 11px 7px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--muted-2);
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 600;
    transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.nav-item .icon {
    color: var(--muted-2);
    transition: color 0.16s ease;
}

.nav-item:hover {
    color: var(--text);
    background: rgba(140, 158, 255, 0.07);
}

.nav-item:hover .icon {
    color: var(--accent);
}

.nav-item.active {
    color: #e6eaff;
    background: linear-gradient(90deg, rgba(111, 128, 255, 0.24), rgba(111, 128, 255, 0.05));
    box-shadow: inset 0 0 0 1px rgba(140, 158, 255, 0.16);
}

.nav-item.active .icon {
    color: #aeb9ff;
}

.nav-item.active::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, #a9b5ff, #5e6ef5);
    box-shadow: 0 0 14px rgba(111, 128, 255, 0.7);
}

.nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 99px;
    background: rgba(140, 158, 255, 0.13);
    border: 1px solid rgba(140, 158, 255, 0.14);
    color: #b6c0ff;
    font-size: 10.5px;
    font-weight: 700;
}

.sidebar-foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 9px 9px 10px;
    border-radius: 12px;
    background: rgba(140, 158, 255, 0.05);
    border: 1px solid rgba(140, 158, 255, 0.09);
}

.avatar {
    width: 32px;
    height: 32px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient(135deg, #9dabff, #5d6cf2);
    color: #0a0e22;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
}

.user-meta {
    min-width: 0;
    flex: 1;
}

.user-name {
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 10px;
    color: var(--muted-2);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

.main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(6, 9, 22, 0.72);
    backdrop-filter: blur(18px);
}

.crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--muted-2);
    font-weight: 600;
    min-width: 0;
}

.crumbs .current {
    color: var(--text-soft);
}

.crumbs .sep {
    opacity: 0.5;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn.menu-toggle {
    display: none;
}

.view {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px 28px 56px;
    flex: 1;
}

/* ------------------------------------------------------------- page header */

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
}

.eyebrow::before {
    content: "";
    width: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent));
}

h1 {
    margin-top: 7px;
    font-size: clamp(24px, 2.2vw, 30px);
    font-weight: 780;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.page-sub {
    margin-top: 7px;
    max-width: 680px;
    color: var(--muted);
    font-size: 13px;
}

.head-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
}

.back-link:hover {
    color: var(--text);
}

/* ----------------------------------------------------------------- buttons */

.btn {
    --btn-bg: transparent;
    --btn-fg: var(--text-soft);
    --btn-line: transparent;
    height: 38px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--btn-line);
    border-radius: 10px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus-visible {
    outline: 2px solid rgba(147, 163, 255, 0.7);
    outline-offset: 2px;
}

.btn .icon {
    margin: 0 -2px;
}

.btn-primary {
    --btn-bg: linear-gradient(135deg, #9dabff 0%, #6a79f7 55%, #5a68ea 100%);
    --btn-fg: #0a0e22;
    box-shadow: 0 10px 26px rgba(96, 112, 242, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-primary:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.btn-ghost {
    --btn-bg: rgba(140, 158, 255, 0.06);
    --btn-line: var(--line);
    --btn-fg: var(--text-soft);
}

.btn-ghost:hover {
    --btn-bg: rgba(140, 158, 255, 0.11);
    --btn-line: var(--line-strong);
    --btn-fg: var(--text);
}

.btn-danger {
    --btn-bg: rgba(255, 114, 136, 0.1);
    --btn-line: rgba(255, 114, 136, 0.3);
    --btn-fg: #ff9dac;
}

.btn-danger:hover {
    --btn-bg: rgba(255, 114, 136, 0.17);
    --btn-line: rgba(255, 114, 136, 0.5);
    --btn-fg: #ffb8c3;
}

.btn-subtle {
    --btn-bg: transparent;
    --btn-fg: var(--muted);
}

.btn-subtle:hover {
    --btn-bg: rgba(140, 158, 255, 0.07);
    --btn-fg: var(--text);
}

.btn-sm {
    height: 31px;
    padding: 0 10px;
    font-size: 12px;
    border-radius: 8px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 9px;
}

.btn-icon.btn-sm {
    width: 28px;
    height: 28px;
}

.btn[disabled],
.btn.is-busy {
    opacity: 0.55;
    pointer-events: none;
}

.spinner {
    width: 14px;
    height: 14px;
    flex: none;
    border: 2px solid rgba(10, 14, 34, 0.25);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn-ghost .spinner,
.btn-danger .spinner {
    border-color: rgba(200, 210, 255, 0.25);
    border-top-color: currentColor;
}

/* ------------------------------------------------------------------ inputs */

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.field + .field {
    margin-top: 0;
}

.label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--muted);
}

.label .opt {
    font-weight: 500;
    color: var(--muted-2);
    font-size: 10.5px;
}

.hint {
    font-size: 11px;
    color: var(--muted-2);
    line-height: 1.45;
}

.input,
.select,
.textarea {
    width: 100%;
    min-width: 0;
    padding: 9px 12px;
    background: rgba(5, 9, 24, 0.72);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.input:hover,
.select:hover,
.textarea:hover {
    border-color: rgba(140, 158, 255, 0.22);
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: rgba(147, 163, 255, 0.55);
    background: rgba(7, 11, 28, 0.9);
    box-shadow: 0 0 0 3px rgba(111, 128, 255, 0.14);
}

.input::placeholder,
.textarea::placeholder {
    color: var(--muted-2);
}

.input.mono,
.textarea.mono {
    font-family: var(--mono);
    font-size: 12.5px;
}

.textarea {
    resize: vertical;
    min-height: 88px;
    line-height: 1.55;
}

.select {
    appearance: none;
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b95c0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

select option {
    background: #0b1024;
    color: var(--text);
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap .input {
    padding-right: 38px;
}

.input-wrap .trail {
    position: absolute;
    right: 5px;
    display: flex;
    align-items: center;
}

.field-error {
    font-size: 11.5px;
    color: #ff9dac;
    min-height: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-grid .span-2 {
    grid-column: span 2;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.search {
    position: relative;
    min-width: 220px;
    flex: 1;
}

.search .icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-2);
    pointer-events: none;
}

.search .input {
    padding-left: 35px;
}

/* ---------------------------------------------------------------- switches */

.switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex: none;
    display: inline-block;
    cursor: pointer;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.switch .track {
    position: absolute;
    inset: 0;
    border-radius: 99px;
    background: rgba(140, 158, 255, 0.13);
    border: 1px solid rgba(140, 158, 255, 0.16);
    transition: background 0.18s ease, border-color 0.18s ease;
    pointer-events: none;
}

.switch .track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #8c97c4;
    transition: transform 0.18s ease, background 0.18s ease;
}

.switch input:checked + .track {
    background: linear-gradient(135deg, rgba(147, 163, 255, 0.95), rgba(94, 110, 245, 0.95));
    border-color: transparent;
}

.switch input:checked + .track::after {
    transform: translateX(18px);
    background: #0a0e22;
}

.switch input:focus-visible + .track {
    box-shadow: 0 0 0 3px rgba(111, 128, 255, 0.25);
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
}

.switch-row .switch-text {
    min-width: 0;
}

.switch-title {
    font-size: 12.5px;
    font-weight: 650;
}

.switch-desc {
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted-2);
    line-height: 1.45;
}

/* ------------------------------------------------------------------- cards */

.card {
    background: linear-gradient(180deg, rgba(18, 25, 51, 0.82), rgba(9, 14, 31, 0.92));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 14px 44px rgba(2, 6, 20, 0.3);
    min-width: 0;
}

.card-pad {
    padding: 20px;
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px 0;
}

.card-title {
    font-size: 14px;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.card-sub {
    margin-top: 3px;
    font-size: 11.5px;
    color: var(--muted-2);
}

.card-body {
    padding: 16px 20px 20px;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.divider {
    height: 1px;
    background: var(--line);
    margin: 16px 0;
}

.section-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* -------------------------------------------------------------- stat cards */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 16px 16px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(18, 25, 51, 0.86), rgba(9, 14, 31, 0.94));
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.stat-card::after {
    content: "";
    position: absolute;
    top: -60px;
    right: -50px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow, rgba(111, 128, 255, 0.18)), transparent 68%);
    pointer-events: none;
}

.stat-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-1px);
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.stat-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(140, 158, 255, 0.09);
    border: 1px solid rgba(140, 158, 255, 0.1);
    color: var(--accent);
}

.stat-card.green {
    --glow: rgba(70, 224, 162, 0.2);
}

.stat-card.green .stat-icon {
    background: rgba(70, 224, 162, 0.08);
    border-color: rgba(70, 224, 162, 0.14);
    color: var(--success);
}

.stat-card.amber {
    --glow: rgba(255, 200, 102, 0.18);
}

.stat-card.amber .stat-icon {
    background: rgba(255, 200, 102, 0.08);
    border-color: rgba(255, 200, 102, 0.14);
    color: var(--warning);
}

.stat-card.red {
    --glow: rgba(255, 114, 136, 0.18);
}

.stat-card.red .stat-icon {
    background: rgba(255, 114, 136, 0.08);
    border-color: rgba(255, 114, 136, 0.14);
    color: var(--danger);
}

.stat-card.cyan {
    --glow: rgba(111, 199, 255, 0.18);
}

.stat-card.cyan .stat-icon {
    background: rgba(111, 199, 255, 0.08);
    border-color: rgba(111, 199, 255, 0.14);
    color: var(--info);
}

.stat-value {
    font-size: 27px;
    font-weight: 780;
    letter-spacing: -0.035em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    margin-top: 7px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-soft);
}

.stat-sub {
    margin-top: 3px;
    font-size: 10.5px;
    color: var(--muted-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ------------------------------------------------------------------- grids */

.dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 16px;
    align-items: start;
}

.dash-grid.even {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.hwid-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 14px;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

/* ----------------------------------------------------------------- releases */

.release-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}

.release-state {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 10px;
    border-radius: 99px;
    background: rgba(70, 224, 162, 0.08);
    border: 1px solid rgba(70, 224, 162, 0.24);
    color: #74f0bf;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.release-build {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(8, 12, 28, 0.45);
}

.release-build-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.release-build-icon {
    width: 34px;
    height: 34px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
}

.release-build-title {
    font-size: 13px;
    font-weight: 700;
}

.release-build-version {
    margin-top: 1px;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--muted-2);
}

.release-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 11.5px;
    color: var(--muted-2);
}

.release-meta .mono {
    color: var(--text-soft);
}

.release-hash {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
    color: var(--text-soft);
    font-family: var(--mono);
    font-size: 11px;
}

.release-build .btn {
    margin-top: 2px;
    align-self: flex-start;
}

.release-notes {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(8, 12, 28, 0.35);
}

.release-notes-label {
    margin-bottom: 4px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted-2);
}

.release-notes-text {
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-soft);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.release-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.release-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 18px 14px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: rgba(5, 9, 24, 0.45);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-over {
    border-color: rgba(147, 163, 255, 0.65);
    background: rgba(111, 128, 255, 0.07);
    outline: none;
}

.dropzone.has-file {
    border-style: solid;
    border-color: rgba(70, 224, 162, 0.36);
    background: rgba(70, 224, 162, 0.04);
}

.dropzone-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
}

.dropzone.has-file .dropzone-icon {
    color: #74f0bf;
    border-color: rgba(70, 224, 162, 0.3);
}

.dropzone-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-soft);
}

.dropzone-file {
    max-width: 100%;
    font-size: 11px;
    line-height: 1.4;
    color: var(--muted-2);
    overflow-wrap: anywhere;
}

.dropzone.has-file .dropzone-file {
    font-family: var(--mono);
    color: #74f0bf;
}

@media (max-width: 820px) {
    .release-form-grid {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------------------------------------------- table */

.table-wrap {
    overflow-x: auto;
    border-radius: 0 0 var(--radius) var(--radius);
}

.table-wrap.flush {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(8, 12, 28, 0.45);
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.data thead th {
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
}

.data tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(140, 158, 255, 0.065);
    vertical-align: middle;
}

.data tbody tr:last-child td {
    border-bottom: 0;
}

.data tbody tr.clickable {
    cursor: pointer;
    transition: background 0.14s ease;
}

.data tbody tr.clickable:hover {
    background: rgba(140, 158, 255, 0.05);
}

.data .num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.table-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    border-top: 1px solid var(--line);
    color: var(--muted-2);
    font-size: 11.5px;
    flex-wrap: wrap;
}

.pager {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pager .btn {
    min-width: 30px;
}

/* ------------------------------------------------------------------ badges */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 9px;
    border-radius: 99px;
    border: 1px solid transparent;
    font-size: 10.5px;
    font-weight: 750;
    letter-spacing: 0.01em;
    white-space: nowrap;
    line-height: 1;
}

.badge .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.badge.active {
    color: #61f0bb;
    background: rgba(70, 224, 162, 0.09);
    border-color: rgba(70, 224, 162, 0.22);
}

.badge.unused {
    color: #93ccff;
    background: rgba(111, 199, 255, 0.09);
    border-color: rgba(111, 199, 255, 0.2);
}

.badge.expired {
    color: #ffd07e;
    background: rgba(255, 200, 102, 0.09);
    border-color: rgba(255, 200, 102, 0.22);
}

.badge.banned {
    color: #ff9dac;
    background: rgba(255, 114, 136, 0.09);
    border-color: rgba(255, 114, 136, 0.24);
}

.badge.deleted {
    color: #a1aacb;
    background: rgba(154, 163, 197, 0.07);
    border-color: rgba(154, 163, 197, 0.18);
}

.badge.neutral {
    color: var(--text-soft);
    background: rgba(140, 158, 255, 0.08);
    border-color: var(--line);
}

.badge.tier-standard {
    color: #a9b5ff;
    background: rgba(140, 158, 255, 0.08);
    border-color: rgba(140, 158, 255, 0.2);
}

.badge.tier-premium {
    color: #ffd07e;
    background: rgba(255, 200, 102, 0.08);
    border-color: rgba(255, 200, 102, 0.2);
}

.badge.tier-private {
    color: #f2a9ff;
    background: rgba(226, 120, 255, 0.08);
    border-color: rgba(226, 120, 255, 0.2);
}

.badge.tier-all {
    color: #8fe6d2;
    background: rgba(70, 224, 200, 0.07);
    border-color: rgba(70, 224, 200, 0.18);
}

.badge.soft {
    color: var(--muted);
    background: rgba(140, 158, 255, 0.05);
    border-color: var(--line);
}

.online-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(70, 224, 162, 0.12);
    display: inline-block;
    flex: none;
}

.offline-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4a557e;
    display: inline-block;
    flex: none;
}

/* --------------------------------------------------------------- utilities */

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

.col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.spacer {
    flex: 1;
}

.muted {
    color: var(--muted);
}

.dim {
    color: var(--muted-2);
}

.small {
    font-size: 11.5px;
}

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

.code {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.01em;
    color: #cfd7ff;
    background: rgba(140, 158, 255, 0.06);
    border: 1px solid rgba(140, 158, 255, 0.1);
    border-radius: 6px;
    padding: 2px 6px;
}

.key-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
}

.key-cell .code {
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 12px;
    color: #d6ddff;
    font-weight: 600;
}

.copy-btn {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    flex: none;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted-2);
    cursor: pointer;
    transition: color 0.14s ease, background 0.14s ease;
}

.copy-btn:hover {
    color: var(--accent);
    background: rgba(140, 158, 255, 0.1);
}

.truncate {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nowrap {
    white-space: nowrap;
}

.mt-8 {
    margin-top: 8px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-24 {
    margin-top: 24px;
}

.hidden {
    display: none !important;
}

/* ------------------------------------------------------------------- chart */

.chart-shell {
    padding: 10px 4px 0;
}

.chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 178px;
}

.chart-col {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.chart-count {
    height: 13px;
    font-size: 10px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.chart-bar {
    width: 100%;
    max-width: 30px;
    min-height: 3px;
    border-radius: 5px 5px 3px 3px;
    background: linear-gradient(180deg, rgba(160, 174, 255, 0.98), rgba(84, 101, 235, 0.5));
    box-shadow: 0 0 18px rgba(94, 110, 245, 0.25);
    transition: height 0.45s cubic-bezier(0.2, 0.7, 0.3, 1), filter 0.15s ease;
}

.chart-bar:hover {
    filter: brightness(1.18);
}

.chart-bar.zero {
    background: rgba(140, 158, 255, 0.09);
    box-shadow: none;
}

.chart-labels {
    display: flex;
    gap: 8px;
    margin-top: 7px;
}

.chart-label {
    flex: 1;
    text-align: center;
    font-size: 9.5px;
    color: var(--muted-2);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
}

/* ------------------------------------------------------------ status rows */

.status-row {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr) 40px;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    font-size: 12px;
}

.status-name {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-soft);
    font-weight: 600;
    white-space: nowrap;
    font-size: 11.5px;
}

.status-track {
    height: 6px;
    border-radius: 99px;
    background: rgba(140, 158, 255, 0.08);
    overflow: hidden;
}

.status-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #8f9fff, #5f6df0);
    transition: width 0.5s ease;
}

.status-fill.green {
    background: linear-gradient(90deg, #53eab0, #22a97b);
}

.status-fill.amber {
    background: linear-gradient(90deg, #ffd27d, #d99a2b);
}

.status-fill.red {
    background: linear-gradient(90deg, #ff8fa1, #d94863);
}

.status-fill.gray {
    background: linear-gradient(90deg, #8f98ba, #596080);
}

.status-count {
    text-align: right;
    font-size: 11.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ events */

.timeline {
    display: flex;
    flex-direction: column;
}

.tl-item {
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
    position: relative;
}

.tl-item + .tl-item::before {
    content: "";
    position: absolute;
    left: 4px;
    top: -14px;
    height: 22px;
    width: 1px;
    background: var(--line);
}

.tl-dot {
    width: 7px;
    height: 7px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--info);
    box-shadow: 0 0 0 4px rgba(111, 199, 255, 0.08);
}

.tl-item.success .tl-dot {
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(70, 224, 162, 0.08);
}

.tl-item.warning .tl-dot {
    background: var(--warning);
    box-shadow: 0 0 0 4px rgba(255, 200, 102, 0.08);
}

.tl-item.danger .tl-dot {
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(255, 114, 136, 0.09);
}

.tl-text {
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-soft);
}

.tl-text strong {
    color: var(--text);
    font-weight: 650;
}

.tl-meta {
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 10.5px;
    color: var(--muted-2);
}

.tl-meta .sep {
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--muted-2);
}

/* ------------------------------------------------------------------- tabs */

.tabs {
    display: flex;
    align-items: center;
    gap: 3px;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: none;
}

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

.tab {
    position: relative;
    padding: 9px 12px;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 12.5px;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s ease, border-color 0.15s ease;
}

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

.tab.active {
    color: #e3e7ff;
    border-bottom-color: var(--accent);
}

.tab .count {
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 99px;
    background: rgba(140, 158, 255, 0.1);
    font-size: 10px;
    color: var(--muted);
}

.tab.active .count {
    background: rgba(140, 158, 255, 0.18);
    color: #c6cfff;
}

.seg {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    background: rgba(5, 9, 24, 0.6);
    border: 1px solid var(--line);
    border-radius: 9px;
}

.seg button {
    height: 28px;
    padding: 0 11px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 11.5px;
    font-weight: 650;
    cursor: pointer;
    transition: background 0.14s ease, color 0.14s ease;
}

.seg button.active {
    background: rgba(140, 158, 255, 0.14);
    color: #dfe4ff;
}

/* ------------------------------------------------------------------- empty */

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 56px 20px;
    color: var(--muted);
}

.empty-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(140, 158, 255, 0.07);
    border: 1px solid var(--line);
    color: var(--accent);
    margin-bottom: 13px;
}

.empty-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-soft);
}

.empty-text {
    margin-top: 4px;
    font-size: 12px;
    max-width: 360px;
}

/* --------------------------------------------------------------- key drawer */

.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(3, 5, 15, 0.62);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.16s ease;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 81;
    width: min(760px, 100vw);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #0c1228, #080c1d);
    border-left: 1px solid var(--line-strong);
    box-shadow: -30px 0 90px rgba(0, 0, 0, 0.55);
    animation: slideIn 0.22s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--line);
}

.drawer-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted-2);
}

.drawer-key {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 7px;
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 650;
    color: #dfe4ff;
    letter-spacing: 0.02em;
    word-break: break-all;
}

.drawer-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 9px;
}

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

.drawer-actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.meta-cell {
    background: #0a1024;
    padding: 11px 14px;
    min-width: 0;
}

.meta-cell dt {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted-2);
}

.meta-cell dd {
    margin: 4px 0 0;
    font-size: 12.5px;
    color: var(--text-soft);
    overflow-wrap: anywhere;
}

.meta-cell dd.mono {
    font-family: var(--mono);
    font-size: 11.5px;
}

.meta-cell.wide {
    grid-column: span 2;
}

.meta-cell.meta-cell-empty {
    background: #0a1024;
}

/* ------------------------------------------------------------------ modals */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(3, 5, 15, 0.74);
    backdrop-filter: blur(6px);
    animation: fadeIn 0.15s ease;
}

.modal {
    width: 100%;
    max-width: 540px;
    max-height: calc(100vh - 44px);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #111834, #0a1024);
    border: 1px solid rgba(140, 158, 255, 0.22);
    border-radius: 18px;
    box-shadow: var(--shadow);
    animation: popIn 0.17s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.modal.modal-lg {
    max-width: 760px;
}

.modal.modal-sm {
    max-width: 420px;
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 20px 22px 0;
}

.modal-title {
    font-size: 17px;
    font-weight: 760;
    letter-spacing: -0.01em;
}

.modal-sub {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.modal-body {
    padding: 18px 22px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-text {
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.55;
}

.modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding: 0 22px 20px;
    flex-wrap: wrap;
}

.modal-actions .spacer {
    flex: 1;
}

/* --------------------------------------------------------------- toasts */

.toasts {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-width: min(430px, calc(100vw - 44px));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 12px;
    background: #101733;
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow);
    font-size: 12.5px;
    color: var(--text-soft);
    animation: toastIn 0.2s cubic-bezier(0.2, 0.8, 0.3, 1);
    pointer-events: auto;
}

.toast .icon {
    flex: none;
    margin-top: 1px;
}

.toast.success {
    border-color: rgba(70, 224, 162, 0.35);
}

.toast.success .icon {
    color: var(--success);
}

.toast.error {
    border-color: rgba(255, 114, 136, 0.4);
}

.toast.error .icon {
    color: var(--danger);
}

.toast.warning {
    border-color: rgba(255, 200, 102, 0.35);
}

.toast.warning .icon {
    color: var(--warning);
}

.toast.info .icon {
    color: var(--info);
}

.toast-text {
    min-width: 0;
}

.toast-title {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1px;
}

/* ---------------------------------------------------------------- configs */

.config-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
}

.config-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.config-name {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14.5px;
    font-weight: 750;
    letter-spacing: -0.01em;
    min-width: 0;
}

.config-slug {
    margin-top: 3px;
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--muted-2);
}

.config-desc {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
    min-height: 36px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.config-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    padding-top: 11px;
    border-top: 1px solid var(--line);
}

.config-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.config-foot .updated {
    font-size: 10.5px;
    color: var(--muted-2);
}

.editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
}

.side-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.json-area {
    min-height: 480px;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.6;
    tab-size: 2;
}

.json-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    min-height: 18px;
}

.json-status.ok {
    color: var(--success);
}

.json-status.bad {
    color: var(--danger);
}

.json-status .icon {
    flex: none;
}

/* ------------------------------------------------------------------ hwid */

.hwid-card {
    padding: 16px 18px 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hwid-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.hwid-icon {
    width: 34px;
    height: 34px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(111, 199, 255, 0.08);
    border: 1px solid rgba(111, 199, 255, 0.14);
    color: var(--info);
}

.hwid-value {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--mono);
    font-size: 12.5px;
    font-weight: 650;
    color: #dfe4ff;
    overflow-wrap: anywhere;
}

.hwid-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
    font-size: 10.5px;
    color: var(--muted-2);
}

.hwid-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    font-size: 10.5px;
    color: var(--muted-2);
}

.hwid-meta span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hwid-meta b {
    display: block;
    margin-top: 2px;
    color: var(--text-soft);
    font-weight: 600;
    font-size: 11px;
}

.hwid-keys {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 11px;
    border-top: 1px solid var(--line);
}

.key-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 7px;
    background: rgba(140, 158, 255, 0.05);
    border: 1px solid var(--line);
    color: var(--text-soft);
    font-family: var(--mono);
    font-size: 10.5px;
    cursor: pointer;
    transition: background 0.14s ease, border-color 0.14s ease;
}

.key-chip:hover {
    background: rgba(140, 158, 255, 0.11);
    border-color: var(--line-strong);
    color: #fff;
}

/* ---------------------------------------------------------------- settings */

.settings-card .card-body {
    padding-top: 6px;
}

.setting-list {
    display: flex;
    flex-direction: column;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(140, 158, 255, 0.065);
}

.setting-row:last-child {
    border-bottom: 0;
}

.setting-info {
    min-width: 0;
}

.setting-name {
    font-size: 12.5px;
    font-weight: 650;
}

.setting-desc {
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted-2);
    max-width: 420px;
}

.setting-row .input,
.setting-row .select {
    max-width: 260px;
}

.secret-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 9px;
    background: rgba(5, 9, 24, 0.7);
    border: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--text-soft);
    overflow-wrap: anywhere;
}

.secret-box .value {
    flex: 1;
    min-width: 0;
    word-break: break-all;
}

.endpoint-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px solid rgba(140, 158, 255, 0.06);
    font-size: 11.5px;
}

.endpoint-row:last-child {
    border-bottom: 0;
}

.method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 19px;
    padding: 0 6px;
    border-radius: 5px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    background: rgba(70, 224, 162, 0.1);
    color: #6ff0be;
}

.method.post {
    background: rgba(111, 199, 255, 0.1);
    color: #93ccff;
}

.method.put {
    background: rgba(255, 200, 102, 0.1);
    color: #ffd07e;
}

.endpoint-path {
    font-family: var(--mono);
    font-size: 11.5px;
    color: #cfd7ff;
    overflow-wrap: anywhere;
}

.endpoint-desc {
    margin-top: 2px;
    font-family: var(--font);
    font-size: 10.5px;
    color: var(--muted-2);
}

.backup-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(140, 158, 255, 0.06);
    font-size: 12px;
}

.backup-row:last-child {
    border-bottom: 0;
}

.backup-name {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--text-soft);
    overflow-wrap: anywhere;
}

/* -------------------------------------------------------------------- auth */

.auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px 20px;
    position: relative;
    overflow: hidden;
}

.auth::before {
    content: "";
    position: absolute;
    width: 640px;
    height: 640px;
    top: -250px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(94, 110, 245, 0.22), transparent 65%);
    pointer-events: none;
}

.auth::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    bottom: -300px;
    right: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(70, 224, 200, 0.07), transparent 65%);
    pointer-events: none;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 430px;
    padding: 30px 30px 26px;
    border-radius: 20px;
    border: 1px solid rgba(140, 158, 255, 0.18);
    background: linear-gradient(180deg, rgba(18, 25, 51, 0.9), rgba(8, 12, 28, 0.95));
    box-shadow: 0 30px 90px rgba(2, 5, 18, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    animation: popIn 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.auth-logo {
    width: 68px;
    height: 68px;
    object-fit: contain;
    border-radius: 16px;
    filter: drop-shadow(0 0 24px rgba(126, 144, 255, 0.55));
    margin-bottom: 16px;
}

.auth-brand {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
}

.auth-title {
    margin-top: 6px;
    font-size: 24px;
    font-weight: 780;
    letter-spacing: -0.025em;
}

.auth-sub {
    margin-top: 7px;
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.55;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 22px;
}

.auth-form .btn {
    height: 42px;
    font-size: 13.5px;
}

.auth-note {
    margin-top: 18px;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid rgba(111, 199, 255, 0.16);
    background: rgba(111, 199, 255, 0.05);
    font-size: 11.5px;
    line-height: 1.55;
    color: #a8cdec;
}

.auth-note.warn {
    border-color: rgba(255, 200, 102, 0.2);
    background: rgba(255, 200, 102, 0.05);
    color: #e6c98e;
}

.auth-note code {
    font-family: var(--mono);
    font-size: 10.5px;
    color: #d6ddff;
}

.auth-foot {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 10.5px;
    color: var(--muted-2);
}

.auth-error {
    display: none;
    padding: 9px 12px;
    border-radius: 9px;
    border: 1px solid rgba(255, 114, 136, 0.3);
    background: rgba(255, 114, 136, 0.07);
    color: #ffadb9;
    font-size: 12px;
    line-height: 1.45;
}

.auth-error.show {
    display: block;
}

.strength {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}

.strength span {
    height: 3px;
    flex: 1;
    border-radius: 99px;
    background: rgba(140, 158, 255, 0.12);
    transition: background 0.2s ease;
}

.strength[data-score="1"] span:nth-child(1),
.strength[data-score="2"] span:nth-child(-n+2) {
    background: var(--danger);
}

.strength[data-score="3"] span:nth-child(-n+3) {
    background: var(--warning);
}

.strength[data-score="4"] span:nth-child(-n+4),
.strength[data-score="5"] span {
    background: var(--success);
}

.strength-text {
    font-size: 10.5px;
    color: var(--muted-2);
    text-align: right;
}

.code-input {
    text-align: center;
    font-family: var(--mono);
    font-size: 24px;
    letter-spacing: 0.3em;
    padding: 12px 8px 12px 18px;
    height: 54px;
}

.recovery-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(5, 9, 24, 0.6);
    border: 1px solid var(--line);
}

.recovery-codes code {
    font-family: var(--mono);
    font-size: 12px;
    color: #d6ddff;
    letter-spacing: 0.03em;
    text-align: center;
    padding: 5px 0;
}

/* ------------------------------------------------------------------ loading */

.loading {
    display: grid;
    place-items: center;
    gap: 12px;
    padding: 70px 20px;
    color: var(--muted);
    font-size: 12.5px;
}

.loading .spinner {
    width: 22px;
    height: 22px;
    border-width: 2px;
    border-color: rgba(140, 158, 255, 0.18);
    border-top-color: var(--accent);
}

.skeleton {
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(140, 158, 255, 0.05), rgba(140, 158, 255, 0.12), rgba(140, 158, 255, 0.05));
    background-size: 200% 100%;
    animation: shimmer 1.35s linear infinite;
}

.skeleton-card {
    height: 108px;
}

.skeleton-row {
    height: 42px;
    border-radius: 0;
}

.fatal {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px;
}

.fatal-card {
    width: 100%;
    max-width: 480px;
    text-align: center;
    padding: 34px;
}

/* --------------------------------------------------------------- mobile nav */

.nav-overlay {
    display: none;
}

@media (max-width: 1380px) {
    .stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .dash-grid,
    .dash-grid.even {
        grid-template-columns: 1fr;
    }

    .editor-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .app {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 270px;
        transform: translateX(-104%);
        transition: transform 0.24s cubic-bezier(0.2, 0.7, 0.3, 1);
        box-shadow: 30px 0 80px rgba(0, 0, 0, 0.5);
    }

    .app.nav-open .sidebar {
        transform: translateX(0);
    }

    .app.nav-open .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 45;
        background: rgba(3, 5, 15, 0.6);
        backdrop-filter: blur(3px);
        animation: fadeIn 0.15s ease;
    }

    .btn.menu-toggle {
        display: inline-flex;
    }

    .topbar {
        padding: 0 18px;
    }

    .view {
        padding: 22px 18px 46px;
    }
}

@media (max-width: 700px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid .span-2 {
        grid-column: span 1;
    }

    .meta-grid {
        grid-template-columns: 1fr;
    }

    .meta-cell.wide {
        grid-column: span 1;
    }

    .hwid-grid {
        grid-template-columns: 1fr;
    }

    .drawer-body,
    .drawer-head {
        padding-left: 18px;
        padding-right: 18px;
    }

    .modal {
        max-height: calc(100vh - 24px);
    }

    .modal-backdrop {
        padding: 12px;
    }

    .toasts {
        right: 12px;
        bottom: 12px;
        max-width: calc(100vw - 24px);
    }

    .page-head {
        align-items: flex-start;
    }

    .head-actions {
        width: 100%;
    }

    .head-actions .btn {
        flex: 1;
    }

    .table-toolbar {
        align-items: stretch;
    }

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

    .config-grid {
        grid-template-columns: 1fr;
    }

    .crumbs .parent {
        display: none;
    }

    .crumbs .sep {
        display: none;
    }

    .hwid-meta {
        grid-template-columns: 1fr 1fr;
    }

    .recovery-codes {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .auth-card {
        padding: 24px 20px 22px;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------- animations */

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideIn {
    from {
        transform: translateX(40px);
        opacity: 0.4;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@keyframes shimmer {
    from {
        background-position: 200% 0;
    }
    to {
        background-position: -200% 0;
    }
}

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

/* --------------------------------------------------------------- additions */

body.drawer-open {
    overflow: hidden;
}

.stat-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.maintenance-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 28px -6px;
    padding: 11px 15px;
    border-radius: 11px;
    border: 1px solid rgba(255, 200, 102, 0.28);
    background: rgba(255, 200, 102, 0.07);
    color: #ffd68a;
    font-size: 12.5px;
    line-height: 1.45;
}

.maintenance-bar .icon {
    flex: none;
    color: var(--warning);
}

.totp-setup {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.totp-qr {
    flex: none;
    padding: 10px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(140, 158, 255, 0.25);
    box-shadow: 0 10px 30px rgba(2, 5, 18, 0.5);
    line-height: 0;
}

.totp-qr img {
    display: block;
    width: 188px;
    height: 188px;
    image-rendering: pixelated;
}

.auth-note.info {
    border-color: rgba(111, 199, 255, 0.2);
    background: rgba(111, 199, 255, 0.06);
    color: #a8cdec;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 0;
}

.auth-note.info .icon {
    flex: none;
    margin-top: 1px;
}

.log-detail td {
    border-bottom: 1px solid rgba(140, 158, 255, 0.06);
}

@media (max-width: 700px) {
    .stat-grid.three {
        grid-template-columns: 1fr;
    }

    .maintenance-bar {
        margin: 12px 18px -4px;
    }

    .totp-setup {
        flex-direction: column;
        align-items: center;
    }
}
