:root {
    color-scheme: dark;
    --bg: #08090c;
    --bg-soft: #0b0d12;
    --surface: #0f1117;
    --surface-2: #141720;
    --surface-3: #191d27;
    --surface-hover: #1c202b;
    --line: #252a36;
    --line-soft: #1b1f29;
    --text: #f7f8fb;
    --text-soft: #cbd1dc;
    --muted: #7f889b;
    --muted-2: #5d6677;
    --accent: #7c5cff;
    --accent-2: #9b88ff;
    --accent-soft: rgba(124, 92, 255, .14);
    --cyan: #55c8ff;
    --green: #52d996;
    --green-soft: rgba(82, 217, 150, .12);
    --yellow: #f3bc5b;
    --yellow-soft: rgba(243, 188, 91, .12);
    --red: #ff6479;
    --red-soft: rgba(255, 100, 121, .12);
    --blue-soft: rgba(85, 200, 255, .12);
    --shadow: 0 22px 70px rgba(0, 0, 0, .38);
    --sidebar: 258px;
    --radius-xl: 20px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 9px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 80% -20%, rgba(124, 92, 255, .10), transparent 34%),
        radial-gradient(circle at 10% 110%, rgba(85, 200, 255, .05), transparent 34%),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.hidden { display: none !important; }
.desktop-only { display: inline; }
.mobile-only { display: none !important; }
.muted { color: var(--muted); }
.mono, code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
code { color: #c9c0ff; background: rgba(124, 92, 255, .09); border: 1px solid rgba(124, 92, 255, .13); padding: 2px 6px; border-radius: 6px; }

.ambient { position: fixed; pointer-events: none; filter: blur(90px); opacity: .22; z-index: -1; border-radius: 50%; }
.ambient-one { width: 420px; height: 420px; background: var(--accent); right: -230px; top: 80px; }
.ambient-two { width: 360px; height: 360px; background: #174f8f; left: -240px; bottom: 30px; opacity: .12; }

.icon { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 21px; height: 21px; }

.btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text-soft);
    font-weight: 650;
    font-size: 12px;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}
.btn:hover { background: var(--surface-hover); color: var(--text); border-color: #343a49; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(135deg, var(--accent), #6a4ce8); color: white; border-color: transparent; box-shadow: 0 8px 24px rgba(124, 92, 255, .22); }
.btn.primary:hover { background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: 0 10px 30px rgba(124, 92, 255, .32); }
.btn.subtle { background: rgba(255,255,255,.025); }
.btn.danger { color: #ff98a6; border-color: rgba(255, 100, 121, .22); background: rgba(255, 100, 121, .06); }
.btn.success { color: #8ce9b5; border-color: rgba(82, 217, 150, .23); background: rgba(82, 217, 150, .06); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .52; cursor: default; transform: none; }
.icon-btn {
    width: 36px; height: 36px; display: inline-grid; place-items: center;
    padding: 0; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted);
    transition: .16s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--line); background: var(--surface-2); }

.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(82,217,150,.08), 0 0 14px rgba(82,217,150,.5); display: inline-block; animation: breathe 2.2s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 6px rgba(82,217,150,.02), 0 0 18px rgba(82,217,150,.65); } }

/* Login */
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr); }
.login-visual { min-height: 100vh; padding: 46px clamp(42px, 7vw, 108px); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; border-right: 1px solid var(--line-soft); background: linear-gradient(150deg, rgba(124,92,255,.07), transparent 45%); }
.login-visual::after { content: ""; position: absolute; width: 620px; height: 620px; border: 1px solid rgba(124,92,255,.08); border-radius: 50%; right: -330px; top: 120px; box-shadow: 0 0 0 90px rgba(124,92,255,.018), 0 0 0 180px rgba(124,92,255,.012); }
.login-logo-wrap { display: flex; align-items: center; gap: 15px; position: relative; z-index: 1; }
.brand-orb { width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; background: linear-gradient(145deg, #9b88ff, #6a4ce8 68%, #55c8ff); color: #fff; box-shadow: 0 12px 32px rgba(124,92,255,.24), inset 0 1px 0 rgba(255,255,255,.26); font-weight: 900; letter-spacing: -.06em; font-size: 15px; }
.brand-orb.compact { width: 39px; height: 39px; border-radius: 12px; font-size: 11px; }
.eyebrow { margin: 0 0 4px; color: #8c81c7; letter-spacing: .14em; font-weight: 800; font-size: 10px; }
.login-logo-wrap h1 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.login-copy { max-width: 720px; position: relative; z-index: 1; }
.hero-kicker { display: inline-flex; align-items: center; gap: 9px; color: var(--text-soft); background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; font-size: 11px; font-weight: 650; }
.login-copy h2 { max-width: 690px; margin: 22px 0 18px; font-size: clamp(44px, 5.6vw, 78px); line-height: .98; letter-spacing: -.06em; font-weight: 800; }
.login-copy p { max-width: 620px; margin: 0; color: var(--muted); line-height: 1.7; font-size: 15px; }
.login-security-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; position: relative; z-index: 1; }
.security-mini { display: flex; gap: 11px; align-items: center; padding: 13px; border: 1px solid var(--line-soft); border-radius: 13px; background: rgba(14,16,22,.68); backdrop-filter: blur(10px); }
.security-mini > span { color: var(--accent-2); }
.security-mini strong, .security-mini small { display: block; }
.security-mini strong { font-size: 11px; }
.security-mini small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.login-panel-wrap { display: grid; place-items: center; padding: 30px; }
.panel-elevated { background: linear-gradient(180deg, rgba(20,23,32,.97), rgba(13,15,21,.98)); border: 1px solid var(--line); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.035); }
.login-card { width: min(430px, 100%); padding: 30px; border-radius: 22px; animation: rise .45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.login-card-top { display: flex; gap: 13px; align-items: center; }
.login-card-top h3 { margin: 0; font-size: 21px; letter-spacing: -.03em; }
.login-hint { margin: 18px 0 24px; color: var(--muted); line-height: 1.55; font-size: 12px; }
.field { display: grid; gap: 8px; margin: 15px 0; }
.field > span { color: var(--text-soft); font-size: 11px; font-weight: 650; }
.input-shell { height: 44px; display: flex; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px; background: #0a0c11; color: var(--muted); transition: .16s ease; }
.input-shell:focus-within { border-color: rgba(124,92,255,.75); box-shadow: 0 0 0 3px rgba(124,92,255,.11); color: var(--accent-2); }
.input-shell input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.input-shell input::placeholder { color: #4f5766; }
.form-error { min-height: 18px; color: var(--red); font-size: 11px; margin-top: 10px; }
.login-foot { display: flex; align-items: center; gap: 7px; padding-top: 18px; margin-top: 8px; border-top: 1px solid var(--line-soft); color: var(--muted-2); font-size: 10px; }

/* Shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; }
.sidebar { height: 100vh; position: sticky; top: 0; z-index: 30; display: flex; flex-direction: column; padding: 17px 14px; border-right: 1px solid var(--line-soft); background: rgba(10,12,16,.94); backdrop-filter: blur(18px); }
.sidebar-brand { display: flex; align-items: center; gap: 11px; min-height: 55px; padding: 0 7px 14px; border-bottom: 1px solid var(--line-soft); }
.sidebar-brand-copy { min-width: 0; flex: 1; }
.sidebar-brand-copy strong, .sidebar-brand-copy small { display: block; }
.sidebar-brand-copy strong { font-size: 13px; letter-spacing: -.02em; }
.sidebar-brand-copy small { margin-top: 2px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.sidebar-system { margin: 14px 4px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 11px; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(255,255,255,.018); }
.system-state { display: flex; align-items: center; gap: 9px; min-width: 0; }
.system-state strong, .system-state small { display: block; }
.system-state strong { font-size: 10px; }
.system-state small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.tiny-pill { padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line); font-size: 8px; font-weight: 800; letter-spacing: .07em; }
.tiny-pill.success { color: var(--green); border-color: rgba(82,217,150,.18); background: var(--green-soft); }
.main-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; padding: 8px 0; }
.nav-label { margin: 15px 10px 6px; color: #505867; font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.nav-item { width: 100%; min-height: 41px; display: flex; align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 10px; padding: 0 10px; background: transparent; color: #838c9e; text-align: left; font-weight: 650; font-size: 11px; transition: .16s ease; position: relative; }
.nav-item:hover { color: #d8dce5; background: rgba(255,255,255,.025); }
.nav-item.active { color: white; background: linear-gradient(90deg, rgba(124,92,255,.15), rgba(124,92,255,.045)); border-color: rgba(124,92,255,.14); box-shadow: inset 2px 0 0 var(--accent); }
.nav-item.active > .icon { color: var(--accent-2); }
.nav-count { margin-left: auto; min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 5px; border-radius: 7px; background: var(--surface-3); color: var(--muted); font-size: 9px; }
.nav-alert { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px rgba(255,100,121,.6); }
.sidebar-bottom { padding-top: 12px; border-top: 1px solid var(--line-soft); }
.operator-card { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 11px; }
.operator-card > div:nth-child(2) { min-width: 0; flex: 1; }
.operator-card strong, .operator-card small { display: block; }
.operator-card strong { font-size: 10px; }
.operator-card small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.operator-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-2); font-size: 10px; font-weight: 800; border: 1px solid rgba(124,92,255,.15); }
.workspace { min-width: 0; }
.topbar { height: 82px; position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 0 30px; border-bottom: 1px solid var(--line-soft); background: rgba(8,9,12,.76); backdrop-filter: blur(18px); }
.topbar-left { display: flex; align-items: center; gap: 10px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; color: var(--muted-2); font-size: 9px; }
.breadcrumb strong { color: var(--muted); font-weight: 600; }
.topbar h1 { margin: 0; font-size: 20px; letter-spacing: -.035em; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.api-status { min-height: 35px; display: inline-flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line-soft); border-radius: 10px; color: var(--muted); background: rgba(255,255,255,.016); font-size: 10px; }
.api-status.error .live-dot { background: var(--red); box-shadow: 0 0 12px rgba(255,100,121,.45); animation: none; }
.page-wrap { padding: 26px 30px 52px; }
.page { animation: pageIn .24s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(5px); } }

/* Common content */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px; margin-bottom: 20px; }
.page-heading p { margin: 4px 0 0; color: var(--muted); line-height: 1.55; font-size: 11px; }
.page-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.03em; }
.page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.panel { border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(17,19,25,.96), rgba(13,15,21,.96)); box-shadow: inset 0 1px 0 rgba(255,255,255,.025); overflow: hidden; }
.panel:hover.panel-hover { border-color: #2b303d; }
.panel-head { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); }
.panel-head h3 { margin: 0; font-size: 12px; letter-spacing: -.015em; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.panel-body { padding: 16px; }
.panel-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.section-space { margin-top: 16px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr); gap: 16px; }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.hero-panel { position: relative; overflow: hidden; min-height: 172px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 26px 28px; border: 1px solid rgba(124,92,255,.15); border-radius: var(--radius-xl); background: linear-gradient(115deg, rgba(124,92,255,.12), rgba(17,19,25,.9) 45%, rgba(85,200,255,.045)); box-shadow: inset 0 1px 0 rgba(255,255,255,.035); }
.hero-panel::before { content: ""; position: absolute; width: 260px; height: 260px; right: -80px; top: -100px; border-radius: 50%; border: 1px solid rgba(124,92,255,.12); box-shadow: 0 0 0 50px rgba(124,92,255,.018), 0 0 0 100px rgba(124,92,255,.01); }
.hero-content { position: relative; z-index: 1; max-width: 680px; }
.hero-content h2 { margin: 8px 0 9px; font-size: clamp(25px, 3vw, 37px); letter-spacing: -.05em; line-height: 1.04; }
.hero-content p { max-width: 590px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.hero-actions { position: relative; z-index: 1; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 10px; margin-top: 14px; }
.kpi-card { min-height: 116px; padding: 15px; border: 1px solid var(--line-soft); border-radius: 14px; background: rgba(15,17,23,.86); position: relative; overflow: hidden; transition: .18s ease; }
.kpi-card:hover { transform: translateY(-2px); border-color: #2d3240; background: rgba(19,22,29,.96); }
.kpi-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; font-weight: 650; }
.kpi-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--accent-2); background: var(--accent-soft); }
.kpi-value { margin-top: 15px; font-size: 26px; line-height: 1; font-weight: 800; letter-spacing: -.045em; }
.kpi-meta { margin-top: 7px; color: var(--muted-2); font-size: 9px; }
.kpi-meta.good { color: var(--green); }
.kpi-meta.warn { color: var(--yellow); }
.kpi-meta.bad { color: var(--red); }

.badge { min-height: 22px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.025); color: #9ba4b5; font-size: 9px; font-weight: 700; white-space: nowrap; }
.badge.success, .badge.good { color: var(--green); border-color: rgba(82,217,150,.17); background: var(--green-soft); }
.badge.warning, .badge.warn { color: var(--yellow); border-color: rgba(243,188,91,.17); background: var(--yellow-soft); }
.badge.danger, .badge.bad, .badge.error, .badge.security { color: var(--red); border-color: rgba(255,100,121,.17); background: var(--red-soft); }
.badge.info { color: var(--cyan); border-color: rgba(85,200,255,.17); background: var(--blue-soft); }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metric-mini { padding: 11px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255,255,255,.014); }
.metric-mini span { color: var(--muted); font-size: 8px; }
.metric-mini strong { display: block; margin-top: 5px; font-size: 14px; }

.chart-wrap { padding: 12px 2px 2px; }
.chart-bars { height: 165px; display: flex; align-items: flex-end; gap: 5px; padding: 10px 3px 22px; border-bottom: 1px solid var(--line-soft); position: relative; }
.chart-bars::before, .chart-bars::after { content: ""; position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(255,255,255,.035); }
.chart-bars::before { top: 35%; }
.chart-bars::after { top: 67%; }
.chart-col { min-width: 0; flex: 1; height: 100%; display: flex; align-items: flex-end; gap: 2px; position: relative; }
.chart-bar { flex: 1; min-width: 2px; border-radius: 4px 4px 1px 1px; min-height: 2px; transition: height .35s ease, opacity .15s ease; position: relative; z-index: 1; }
.chart-bar.decrypt { background: linear-gradient(180deg, #9a86ff, #654be2); box-shadow: 0 -4px 15px rgba(124,92,255,.10); }
.chart-bar.failure { background: linear-gradient(180deg, #ff7b8d, #c6465c); }
.chart-col:hover .chart-bar { opacity: .82; }
.chart-axis { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted-2); font-size: 8px; }
.chart-legend { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 9px; }
.legend-dot { width: 7px; height: 7px; border-radius: 2px; display: inline-block; margin-right: 5px; }
.legend-dot.decrypt { background: var(--accent); }
.legend-dot.failure { background: var(--red); }

.table-shell { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
th { color: #626c7e; font-size: 8px; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; background: rgba(9,11,15,.45); white-space: nowrap; }
td { color: #c5cad4; font-size: 10px; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: rgba(255,255,255,.018); }
tbody tr:last-child td { border-bottom: 0; }
.table-primary { color: var(--text); font-weight: 700; }
.table-secondary { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; white-space: nowrap; }
.hash { display: inline-block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #a99cff; font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; }

.entity-list { display: grid; }
.entity-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 68px; padding: 11px 15px; border-bottom: 1px solid var(--line-soft); transition: .15s ease; }
.entity-row:last-child { border-bottom: 0; }
.entity-row:hover { background: rgba(255,255,255,.014); }
.entity-main { min-width: 0; display: flex; align-items: center; gap: 11px; }
.entity-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: var(--accent-2); background: var(--accent-soft); border: 1px solid rgba(124,92,255,.10); }
.entity-copy { min-width: 0; }
.entity-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.entity-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entity-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.timeline { display: grid; }
.timeline-item { position: relative; display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); background: var(--surface-3); }
.timeline-icon.security, .timeline-icon.error { color: var(--red); background: var(--red-soft); }
.timeline-icon.info { color: var(--cyan); background: var(--blue-soft); }
.timeline-icon.warn { color: var(--yellow); background: var(--yellow-soft); }
.timeline-copy { min-width: 0; }
.timeline-copy strong { font-size: 9px; color: var(--text-soft); }
.timeline-copy p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.timeline-time { color: var(--muted-2); font-size: 8px; margin-top: 4px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-box { height: 38px; min-width: 260px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: #0b0d12; color: var(--muted); }
.search-box:focus-within { border-color: rgba(124,92,255,.65); box-shadow: 0 0 0 3px rgba(124,92,255,.09); color: var(--accent-2); }
.search-box input { min-width: 0; flex: 1; color: var(--text); border: 0; outline: 0; background: transparent; font-size: 10px; }
.select-control { height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #0b0d12; color: var(--text-soft); padding: 0 30px 0 10px; outline: none; font-size: 10px; }
.select-control:focus { border-color: rgba(124,92,255,.65); }

.script-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 12px; }
.script-card { min-height: 205px; display: flex; flex-direction: column; padding: 17px; border: 1px solid var(--line-soft); border-radius: 15px; background: linear-gradient(180deg, rgba(18,20,27,.96), rgba(13,15,20,.96)); transition: .18s ease; position: relative; overflow: hidden; }
.script-card::after { content: ""; position: absolute; width: 120px; height: 120px; right: -65px; top: -70px; border-radius: 50%; background: rgba(124,92,255,.055); filter: blur(8px); }
.script-card:hover { transform: translateY(-2px); border-color: #303644; box-shadow: 0 14px 36px rgba(0,0,0,.16); }
.script-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; position: relative; z-index: 1; }
.script-icon { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 10px; color: var(--accent-2); background: var(--accent-soft); border: 1px solid rgba(124,92,255,.13); }
.script-title { margin-top: 13px; position: relative; z-index: 1; }
.script-title h3 { margin: 0; font-size: 13px; letter-spacing: -.02em; }
.script-title p { height: 31px; margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; overflow: hidden; }
.script-slug { margin-top: 10px; color: #9e92de; font-size: 9px; }
.script-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: auto; padding-top: 14px; }
.script-stat { padding: 8px; border: 1px solid var(--line-soft); border-radius: 9px; background: rgba(255,255,255,.012); }
.script-stat span { display: block; color: var(--muted-2); font-size: 7px; text-transform: uppercase; letter-spacing: .07em; }
.script-stat strong { display: block; margin-top: 4px; font-size: 10px; }
.script-card-actions { display: flex; gap: 6px; margin-top: 11px; position: relative; z-index: 1; }
.script-card-actions .btn { flex: 1; }

.deployment-list { display: grid; gap: 9px; }
.deployment-card { display: grid; grid-template-columns: minmax(230px, 1.4fr) minmax(130px,.8fr) minmax(120px,.7fr) minmax(120px,.7fr) auto; align-items: center; gap: 16px; padding: 14px 15px; border: 1px solid var(--line-soft); border-radius: 13px; background: rgba(15,17,23,.88); transition: .16s ease; }
.deployment-card:hover { border-color: #303542; background: rgba(18,21,28,.96); transform: translateY(-1px); }
.deployment-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.server-state-icon { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: var(--surface-3); color: var(--muted); position: relative; }
.server-state-icon.online { color: var(--green); background: var(--green-soft); }
.server-state-icon.online::after { content: ""; position: absolute; right: 2px; bottom: 2px; width: 6px; height: 6px; border: 2px solid var(--surface); border-radius: 50%; background: var(--green); }
.deployment-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.deployment-name small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.deployment-cell span { display: block; color: var(--muted-2); font-size: 7px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.deployment-cell strong { color: var(--text-soft); font-size: 9px; font-weight: 650; }
.deployment-actions { display: flex; align-items: center; gap: 5px; }

.log-summary { display: grid; grid-template-columns: repeat(4, minmax(120px,1fr)); gap: 8px; margin-bottom: 12px; }
.log-summary-card { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(15,17,23,.75); }
.log-summary-card .summary-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-3); color: var(--muted); }
.log-summary-card strong { display: block; font-size: 14px; }
.log-summary-card small { display: block; color: var(--muted); font-size: 8px; margin-top: 2px; }
.log-table td { max-width: 260px; }
.event-name { color: #d3d6de; font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; }
.log-details-preview { max-width: 270px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 8px; }
.log-row { cursor: pointer; }
.log-level-stripe { width: 3px; height: 24px; border-radius: 4px; background: var(--muted-2); }
.log-level-stripe.security, .log-level-stripe.error { background: var(--red); box-shadow: 0 0 10px rgba(255,100,121,.2); }
.log-level-stripe.warn { background: var(--yellow); }
.log-level-stripe.info { background: var(--cyan); }

.empty-state { min-height: 250px; display: grid; place-items: center; padding: 35px; text-align: center; }
.empty-state-inner { max-width: 380px; }
.empty-icon { width: 48px; height: 48px; margin: 0 auto 13px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; color: var(--accent-2); background: var(--accent-soft); }
.empty-state h3 { margin: 0; font-size: 13px; }
.empty-state p { margin: 7px 0 14px; color: var(--muted); line-height: 1.6; font-size: 10px; }

/* Forms and modal */
.modal { width: min(760px, calc(100vw - 28px)); max-height: calc(100vh - 36px); padding: 0; border: 1px solid #2b303c; border-radius: 18px; background: #0f1117; color: var(--text); box-shadow: 0 28px 100px rgba(0,0,0,.55); overflow: hidden; }
.modal.wide { width: min(980px, calc(100vw - 28px)); }
.modal::backdrop { background: rgba(2,3,5,.78); backdrop-filter: blur(7px); }
.modal[open] { animation: modalIn .18s ease both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.988); } }
.modal-head { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); background: rgba(255,255,255,.012); }
.modal-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.modal-title-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--accent-2); background: var(--accent-soft); }
.modal-title h3 { margin: 0; font-size: 13px; }
.modal-title p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.modal-body { padding: 18px; max-height: calc(100vh - 120px); overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 7px; padding: 13px 18px; border-top: 1px solid var(--line-soft); background: rgba(255,255,255,.01); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.form-label { display: grid; gap: 7px; }
.form-label > span { color: var(--text-soft); font-size: 9px; font-weight: 700; }
.input, .textarea, .select { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #0a0c11; color: var(--text); outline: none; padding: 10px 11px; font-size: 10px; transition: .15s ease; }
.input { height: 40px; }
.textarea { min-height: 85px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus { border-color: rgba(124,92,255,.7); box-shadow: 0 0 0 3px rgba(124,92,255,.09); }
.help { color: var(--muted-2); font-size: 8px; line-height: 1.5; }
.dropzone { min-height: 145px; display: grid; place-items: center; text-align: center; border: 1px dashed #353b4a; border-radius: 13px; background: rgba(255,255,255,.012); padding: 18px; transition: .15s ease; position: relative; }
.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone-icon { width: 38px; height: 38px; margin: 0 auto 8px; display: grid; place-items: center; border-radius: 11px; color: var(--accent-2); background: var(--accent-soft); }
.dropzone strong { font-size: 10px; }
.dropzone p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.token-box, .code-box { position: relative; padding: 12px 42px 12px 12px; border: 1px solid var(--line); border-radius: 10px; background: #090b0f; color: #b7f2d1; font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; word-break: break-all; }
.copy-float { position: absolute; top: 6px; right: 6px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.detail-item { padding: 10px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(255,255,255,.012); min-width: 0; }
.detail-item span { display: block; color: var(--muted-2); font-size: 7px; text-transform: uppercase; letter-spacing: .08em; }
.detail-item strong { display: block; margin-top: 5px; color: var(--text-soft); font-size: 9px; overflow-wrap: anywhere; }
.json-view { max-height: 340px; overflow: auto; margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #080a0e; color: #b7bed0; font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.release-list { display: grid; gap: 8px; }
.release-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 13px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255,255,255,.012); }
.release-main h4 { margin: 0; font-size: 11px; }
.release-main p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.release-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.release-actions { display: flex; gap: 6px; }

.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 8px; width: min(360px, calc(100vw - 30px)); pointer-events: none; }
.toast { pointer-events: auto; display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(20,23,30,.96); box-shadow: 0 18px 50px rgba(0,0,0,.36); backdrop-filter: blur(14px); animation: toastIn .22s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(12px); } }
.toast.out { animation: toastOut .18s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(12px); } }
.toast-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--cyan); background: var(--blue-soft); }
.toast.success .toast-icon { color: var(--green); background: var(--green-soft); }
.toast.error .toast-icon { color: var(--red); background: var(--red-soft); }
.toast strong { display: block; font-size: 10px; }
.toast p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }

.skeleton { position: relative; overflow: hidden; background: #12151c; border-radius: 8px; min-height: 18px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.04), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1280px) {
    .kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .script-grid { grid-template-columns: repeat(2, 1fr); }
    .deployment-card { grid-template-columns: minmax(230px, 1.4fr) minmax(120px,.8fr) minmax(120px,.7fr) auto; }
    .deployment-card .hide-mid { display: none; }
}
@media (max-width: 980px) {
    :root { --sidebar: 220px; }
    .content-grid, .grid-two { grid-template-columns: 1fr; }
    .login-shell { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .login-panel-wrap { min-height: 100vh; }
    .page-wrap { padding: 22px; }
    .topbar { padding: 0 22px; }
    .script-grid { grid-template-columns: 1fr; }
    .deployment-card { grid-template-columns: minmax(200px,1.3fr) minmax(120px,.8fr) auto; }
    .deployment-card .hide-tablet { display: none; }
}
@media (max-width: 760px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: inline-grid !important; }
    .app-shell { display: block; }
    .sidebar { position: fixed; left: 0; top: 0; width: 258px; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 20px 0 60px rgba(0,0,0,.45); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 25; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
    .topbar { height: 70px; padding: 0 15px; }
    .page-wrap { padding: 16px 15px 40px; }
    .hero-panel { display: block; padding: 20px; }
    .hero-actions { justify-content: flex-start; margin-top: 17px; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .toolbar { align-items: stretch; flex-direction: column; }
    .toolbar-left, .toolbar-right { width: 100%; }
    .search-box { min-width: 0; flex: 1; }
    .deployment-card { grid-template-columns: 1fr auto; }
    .deployment-card .deployment-cell { display: none; }
    .log-summary { grid-template-columns: repeat(2, 1fr); }
    .form-grid, .detail-grid { grid-template-columns: 1fr; }
    .release-card { grid-template-columns: 1fr; }
    .modal-body { padding: 15px; }
}
@media (max-width: 480px) {
    .kpi-grid { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; }
    .page-actions, .page-actions .btn { width: 100%; }
    .metric-row { grid-template-columns: 1fr; }
    .login-card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

.server-profile-grid { display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 10px; }
.server-profile-card { border: 1px solid var(--line-soft); border-radius: 14px; padding: 14px; background: linear-gradient(180deg, rgba(18,20,27,.96), rgba(13,15,20,.96)); transition: .18s ease; }
.server-profile-card:hover { transform: translateY(-2px); border-color: #303644; }
.server-profile-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.server-profile-title { min-width: 0; display: grid; gap: 3px; }
.server-profile-title strong { font-size: 14px; }
.server-profile-title span { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.server-profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 13px; }
.server-profile-stats > div { border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px; background: rgba(255,255,255,.018); display: grid; gap: 3px; }
.server-profile-stats span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.server-profile-stats strong { font-size: 13px; }
.server-profile-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; }
.server-profile-actions { display: flex; gap: 5px; }
.toggle-row { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-soft); border-radius: 12px; padding: 11px 12px; background: rgba(255,255,255,.015); }
.toggle-row input { margin-top: 3px; accent-color: #7c5cff; }
.toggle-row span { display: grid; gap: 3px; }
.toggle-row strong { font-size: 12px; }
.toggle-row small { color: var(--muted); line-height: 1.45; }
@media (max-width: 1100px) { .server-profile-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); } }
@media (max-width: 720px) { .server-profile-grid { grid-template-columns: 1fr; } }
