@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --canvas: #f3f7fc;
  --sidebar: #ffffff;
  --panel: #ffffff;
  --panel-raised: #f4f8fd;
  --panel-soft: #edf4fc;
  --line: #e1e9f3;
  --line-strong: #cfdae9;
  --text: #14253b;
  --muted: #62748c;
  --subtle: #8999ad;
  --acid: #2563eb;
  --acid-soft: rgba(37, 99, 235, .09);
  --orange: #d97706;
  --red: #dc404b;
  --blue: #3478ed;
  --radius: 18px;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Manrope", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--canvas); color: var(--text); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }
::selection { background: var(--acid); color: #151815; }

.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.boot-mark { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(37, 99, 235, .18)); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { width: 244px; height: 100vh; position: fixed; inset: 0 auto 0 0; z-index: 5; padding: 25px 16px 18px; display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid var(--line); }
.brand { padding: 0 11px 29px; display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.brand-mark { width: 40px; height: 40px; flex: 0 0 auto; display: block; object-fit: contain; filter: drop-shadow(0 5px 10px rgba(20, 37, 59, .13)); }
.brand-name { display: block; font-weight: 800; font-size: 16px; letter-spacing: .035em; }
.nav-label { padding: 0 12px; margin: 3px 0 9px; color: #667064; font: 9px var(--mono); letter-spacing: .14em; }
.nav-list { display: grid; gap: 4px; }
.nav-item { width: 100%; border: 0; background: transparent; padding: 11px 12px; display: flex; align-items: center; gap: 12px; border-radius: 10px; color: #9ba398; text-align: left; cursor: pointer; transition: background .18s ease, color .18s ease; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav-item.is-active { color: var(--acid); background: var(--acid-soft); }
.nav-icon { width: 19px; text-align: center; font-size: 15px; }
.nav-item span:last-child { flex: 1; font-size: 12px; font-weight: 600; }
.nav-count { flex: 0 0 auto !important; padding: 2px 6px; color: #111; background: var(--acid); border-radius: 20px; font: 9px var(--mono) !important; }
.sidebar-spacer { flex: 1; }
.server-chip { padding: 12px 11px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.018); }
.live-dot { flex: 0 0 auto; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--subtle); box-shadow: 0 0 0 4px rgba(255,255,255,.025); }
.live-dot.online { background: var(--acid); box-shadow: 0 0 0 4px rgba(198,245,106,.1); }
.live-dot.offline { background: var(--red); box-shadow: 0 0 0 4px rgba(255,116,116,.1); }
.server-chip strong { display: block; font-size: 11px; font-weight: 600; }
.server-chip small { display: block; margin-top: 4px; color: var(--muted); font: 9px var(--mono); }
.profile { margin-top: 15px; padding: 13px 9px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.avatar { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #30382d; color: var(--acid); font-size: 11px; font-weight: 700; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-copy { min-width: 0; flex: 1; }
.profile-copy strong { display: block; overflow: hidden; color: #dce2d8; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { display: block; margin-top: 3px; color: var(--muted); font: 9px var(--mono); }
.logout-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 6px; }
.logout-button:hover { color: var(--red); }

.main-area { min-width: 0; grid-column: 2; padding: 0 38px 60px; }
.topbar { height: 76px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.crumb { color: var(--muted); font-size: 11px; }
.crumb b { padding: 0 8px; color: var(--subtle); font-weight: 400; }
.crumb strong { color: #d9e0d6; font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.sync-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font: 9px var(--mono); }
.sync-status .live-dot { width: 6px; height: 6px; margin: 0; }
.icon-button { width: 33px; height: 33px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; }
.icon-button:hover { color: var(--text); border-color: var(--line-strong); }
.page-header { padding: 30px 0 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.eyebrow { color: var(--muted); font: 9px var(--mono); letter-spacing: .12em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 8px 0 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.16; letter-spacing: -.055em; font-weight: 700; }
.page-subtitle { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.page-date { color: var(--muted); font: 10px var(--mono); }
.section-heading { margin: 28px 0 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin: 0; font-size: 15px; letter-spacing: -.035em; }
.section-heading .muted-label { color: var(--muted); font: 9px var(--mono); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric-card { min-height: 145px; padding: 17px 18px 15px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(135deg, rgba(255,255,255,.024), transparent 70%), var(--panel); }
.metric-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font: 9px var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.metric-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--acid); background: var(--acid-soft); font-size: 12px; }
.metric-value { margin-top: 17px; display: flex; align-items: baseline; gap: 5px; font-size: 27px; font-weight: 700; letter-spacing: -.07em; line-height: 1; }
.metric-value small { color: var(--muted); font: 10px var(--mono); letter-spacing: 0; }
.metric-foot { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; }
.metric-track, .usage-track { width: 100%; height: 3px; overflow: hidden; border-radius: 5px; background: rgba(255,255,255,.08); }
.metric-track { position: absolute; inset: auto 0 0; height: 2px; border-radius: 0; }
.metric-track span, .usage-track span { height: 100%; display: block; border-radius: inherit; background: var(--acid); transition: width .5s ease; }
.metric-track.warn span { background: var(--orange); }
.metric-track.danger span { background: var(--red); }

.overview-grid { margin-top: 14px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .85fr); gap: 13px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.panel-header { padding: 17px 18px 13px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-title { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: -.025em; }
.panel-caption { margin-top: 5px; color: var(--muted); font-size: 10px; }
.panel-action { border: 0; background: transparent; color: var(--acid); font: 9px var(--mono); cursor: pointer; }
.chart-wrap { height: 185px; padding: 3px 15px 13px; position: relative; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid-line { stroke: rgba(255,255,255,.07); stroke-dasharray: 3 6; }
.chart-area { fill: url(#chartFill); }
.chart-line { fill: none; stroke: var(--acid); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chart-line.memory { stroke: #9b8cf3; stroke-width: 1.7; }
.chart-legend { display: flex; gap: 16px; padding: 0 18px 16px; color: var(--muted); font: 9px var(--mono); }
.legend-dot { width: 6px; height: 6px; display: inline-block; margin-right: 6px; border-radius: 50%; background: var(--acid); vertical-align: 1px; }
.legend-dot.memory { background: #9b8cf3; }
.server-facts { padding: 0 18px 14px; display: grid; gap: 0; }
.server-fact { min-height: 41px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.server-fact strong { max-width: 60%; overflow: hidden; color: #dfe5db; font: 10px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.load-pills { display: flex; gap: 5px; }
.load-pills span { padding: 5px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--text); font: 9px var(--mono); }

.service-list { display: grid; }
.service-row { padding: 11px 18px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; border-top: 1px solid var(--line); }
.service-main { min-width: 0; display: flex; align-items: center; gap: 10px; }
.service-glyph { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--acid); background: rgba(198,245,106,.045); font: 10px var(--mono); }
.service-copy { min-width: 0; }
.service-copy strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.service-copy small { display: block; margin-top: 3px; color: var(--muted); font: 9px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-health { display: flex; align-items: center; gap: 6px; color: var(--muted); font: 9px var(--mono); white-space: nowrap; }
.service-health .live-dot { width: 6px; height: 6px; margin: 0; }
.service-empty { padding: 26px 18px; color: var(--muted); font-size: 11px; }

.apps-toolbar { margin: 14px 0; display: flex; gap: 10px; align-items: center; }
.search-field { min-width: 0; max-width: 360px; flex: 1; height: 38px; padding: 0 12px; display: flex; gap: 9px; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--muted); }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 11px; }
.search-field input::placeholder { color: #697166; }
.filter-select { height: 38px; padding: 0 28px 0 11px; border: 1px solid var(--line); border-radius: 10px; color: #bdc5b9; background: var(--panel); font-size: 10px; }
.apps-count { margin-left: auto; color: var(--muted); font: 9px var(--mono); }
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.app-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); transition: border-color .18s ease, transform .18s ease; }
.app-card:hover { border-color: rgba(198,245,106,.2); transform: translateY(-1px); }
.app-card-top { display: flex; align-items: flex-start; gap: 11px; }
.app-symbol { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; background: #20271e; color: var(--acid); font: 11px var(--mono); }
.app-ident { min-width: 0; flex: 1; }
.app-title-line { min-width: 0; display: flex; align-items: center; gap: 5px; }
.app-ident h3 { min-width: 0; flex: 1; margin: 2px 0 4px; overflow: hidden; font-size: 12px; font-weight: 700; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.app-ident p { margin: 0; overflow: hidden; color: var(--muted); font: 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.app-rename-button { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid transparent; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.app-rename-button:hover { border-color: #c8daf8; color: #1d5bd4; background: #f4f8ff; }
.app-rename-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; }
.app-rename-input { width: 100%; min-width: 0; min-height: 32px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); background: var(--panel-raised); font-size: 10px; }
.app-rename-input:focus { border-color: #8eb0f1; }
.app-rename-form .button { min-height: 32px; padding: 0 8px; }
.app-rename-form small { grid-column: 1 / -1; color: var(--muted); font-size: 8px; }
.self-control-note { max-width: 220px; margin-left: 0; }
.status-badge { flex: 0 0 auto; padding: 5px 7px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); font: 8px var(--mono); text-transform: uppercase; }
.status-badge.running { color: var(--acid); border-color: rgba(198,245,106,.18); background: rgba(198,245,106,.05); }
.status-badge.exited, .status-badge.dead { color: var(--red); border-color: rgba(255,116,116,.18); background: rgba(255,116,116,.04); }
.status-badge.created { color: var(--blue); }
.app-desc { min-height: 28px; margin: 13px 0 14px; color: #9aa294; font-size: 10px; line-height: 1.5; }
.app-resource { margin-top: 10px; }
.resource-heading { margin-bottom: 6px; display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font: 9px var(--mono); }
.resource-heading strong { color: #dbe2d7; font-weight: 400; }
.usage-track { height: 4px; }
.usage-track span.memory { background: #9b8cf3; }
.resource-sub { margin-top: 5px; color: #657063; font-size: 8px; }
.app-meta { margin-top: 14px; padding-top: 11px; display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); color: var(--muted); font: 8px var(--mono); }
.app-actions { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 7px; }
.button { min-height: 32px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(255,255,255,.025); color: #cbd3c7; font-size: 9px; font-weight: 600; cursor: pointer; transition: .17s ease; }
.button:hover:not(:disabled) { border-color: rgba(198,245,106,.4); color: var(--acid); background: rgba(198,245,106,.05); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button-primary { border-color: var(--acid); color: #111; background: var(--acid); }
.button-primary:hover:not(:disabled) { color: #111; background: #d5ff80; }
.button-quiet { background: transparent; color: var(--muted); }
.button-danger:hover:not(:disabled) { border-color: rgba(255,116,116,.45); color: var(--red); background: rgba(255,116,116,.05); }
.button .arrow { font-size: 12px; }
.read-only-note { margin-left: auto; align-self: center; color: var(--muted); font-size: 9px; }

.server-hero { padding: 22px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 20px; align-items: center; border: 1px solid rgba(198,245,106,.17); border-radius: 16px; background: radial-gradient(ellipse at 90% 20%, rgba(198,245,106,.09), transparent 42%), var(--panel); }
.server-hero h2 { margin: 7px 0 5px; font-size: 19px; letter-spacing: -.05em; }
.server-hero p { margin: 0; color: var(--muted); font-size: 10px; }
.server-emblem { width: 66px; height: 66px; display: grid; place-items: center; border: 1px solid rgba(198,245,106,.2); border-radius: 50%; color: var(--acid); font-size: 26px; box-shadow: inset 0 0 20px rgba(198,245,106,.07), 0 0 30px rgba(198,245,106,.05); }
.server-metric-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.server-metric { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.server-metric-head { display: flex; justify-content: space-between; color: var(--muted); font: 9px var(--mono); }
.server-metric-value { margin: 14px 0 10px; display: flex; justify-content: space-between; align-items: baseline; font-size: 21px; font-weight: 700; letter-spacing: -.05em; }
.server-metric-value small { color: var(--muted); font: 9px var(--mono); }
.server-details { margin-top: 12px; }
.server-details-grid { padding: 0 18px 16px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px 18px; }
.detail-item { min-height: 50px; padding-top: 10px; border-top: 1px solid var(--line); }
.detail-item span { display: block; color: var(--muted); font-size: 9px; }
.detail-item strong { display: block; margin-top: 6px; overflow: hidden; color: #e1e6dd; font: 10px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.helper-panel { padding: 15px 17px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: rgba(255,255,255,.018); font-size: 10px; line-height: 1.6; }
.helper-panel strong { color: #dfe6dc; font-weight: 600; }
.helper-panel code { color: var(--acid); font: 9px var(--mono); }
.server-settings { margin-top: 13px; }
.server-settings-form { padding: 0 18px 17px; }
.server-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.server-form-grid label { display: grid; gap: 6px; color: var(--muted); font-size: 9px; }
.server-form-grid input { width: 100%; min-height: 37px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: #131613; font-size: 10px; }
.server-form-grid input::placeholder { color: #596357; }
.server-form-note { margin: 12px 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.server-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.access-summary { margin-bottom: 13px; padding: 18px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.access-stat span { display: block; color: var(--muted); font: 9px var(--mono); text-transform: uppercase; }
.access-stat strong { display: block; margin-top: 7px; font-size: 20px; letter-spacing: -.05em; }
.access-table { width: 100%; border-collapse: collapse; }
.access-table th { padding: 0 12px 10px; color: var(--muted); text-align: left; font: 8px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.access-table td { padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; font-size: 10px; }
.access-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.user-cell { display: flex; align-items: center; gap: 9px; }
.user-cell .avatar { width: 28px; height: 28px; }
.user-cell strong { display: block; font-size: 10px; }
.user-cell small { display: block; margin-top: 3px; color: var(--muted); font: 8px var(--mono); }
.role-select { min-height: 30px; padding: 0 24px 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-raised); color: #cfd7ca; font-size: 9px; }
.request-actions { display: flex; gap: 6px; }
.request-actions .button { min-height: 28px; }
.access-empty { padding: 20px; color: var(--muted); font-size: 10px; }
.email-assignment { min-width: 225px; display: flex; align-items: center; gap: 6px; }
.email-assignment input { width: 100%; min-width: 130px; min-height: 31px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: #f8fafd; font-size: 9px; }
.email-assignment input::placeholder { color: #8a9ab0; }
.email-assignment .button { min-height: 31px; padding: 0 9px; font-size: 9px; white-space: nowrap; }
.email-access-hint { margin: -3px 0 22px; color: var(--muted); font-size: 10px; }

.empty-state { min-height: 240px; padding: 25px; display: grid; place-items: center; text-align: center; border: 1px dashed var(--line-strong); border-radius: 15px; background: rgba(255,255,255,.01); }
.empty-icon { width: 42px; height: 42px; margin: 0 auto 12px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 13px; color: var(--acid); font-size: 17px; }
.empty-state h3 { margin: 0 0 7px; font-size: 13px; }
.empty-state p { max-width: 400px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.error-box { margin: 14px 0; padding: 13px 15px; border: 1px solid rgba(255,116,116,.2); border-radius: 10px; color: #efaaa6; background: rgba(255,116,116,.045); font-size: 10px; }
.skeleton { position: relative; overflow: hidden; background: #20251f; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.055), transparent); animation: shimmer 1.6s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

.login-screen { min-height: 100vh; padding: 28px; display: grid; place-items: center; background: radial-gradient(ellipse at 16% 22%, rgba(161,203,98,.11), transparent 38%), radial-gradient(ellipse at 82% 86%, rgba(106,121,85,.1), transparent 38%), #101210; }
.login-frame { width: min(1030px, 100%); min-height: 570px; display: grid; grid-template-columns: 1.08fr .92fr; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 22px; background: #151815; box-shadow: 0 30px 100px rgba(0,0,0,.35); }
.login-visual { min-height: 540px; padding: 34px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; background-color: #171c16; background-image: linear-gradient(rgba(198,245,106,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(198,245,106,.04) 1px, transparent 1px); background-size: 34px 34px; }
.login-visual::before { content: ""; position: absolute; width: 540px; height: 540px; top: 5%; left: 5%; border: 1px solid rgba(198,245,106,.08); border-radius: 50%; box-shadow: 0 0 0 35px rgba(198,245,106,.025), 0 0 0 90px rgba(198,245,106,.018), inset 0 0 70px rgba(198,245,106,.03); }
.login-visual::after { content: ""; width: 150px; height: 150px; position: absolute; top: 27%; left: 48%; border: 1px solid rgba(198,245,106,.25); border-radius: 50%; background: radial-gradient(circle at 35% 33%, #d9ff9a, #99c354 29%, #273221 66%, transparent 70%); box-shadow: 0 0 65px rgba(198,245,106,.2); }
.login-brand, .login-statement, .login-visual-footer { z-index: 1; position: relative; }
.login-statement { max-width: 420px; margin-top: auto; margin-bottom: 50px; }
.login-statement .eyebrow { color: var(--acid); }
.login-statement h1 { margin-top: 15px; font-size: clamp(36px, 5vw, 54px); line-height: 1.03; letter-spacing: -.075em; }
.login-statement p { max-width: 340px; margin: 16px 0 0; color: #a0a99b; font-size: 12px; line-height: 1.7; }
.login-visual-footer { display: flex; justify-content: space-between; color: #70796c; font: 8px var(--mono); letter-spacing: .08em; }
.login-form-side { padding: 46px; display: flex; flex-direction: column; justify-content: center; }
.login-form-side h2 { margin: 0; font-size: 22px; letter-spacing: -.055em; }
.login-form-side > p { margin: 9px 0 27px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.telegram-mount { min-height: 48px; display: flex; align-items: center; }
.telegram-mount iframe { max-width: 100%; }
.telegram-login-button { width: 100%; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 12px; text-decoration: none; }
.telegram-login-button span { font-size: 17px; }
.login-error { margin-top: 14px; color: #ff9a8c; font-size: 10px; }
.login-footnote { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); color: #687064; font-size: 9px; line-height: 1.6; }
.local-login { margin-top: 12px; display: grid; gap: 7px; }
.local-login .button { width: 100%; }
.local-login span { color: #768070; text-align: center; font-size: 9px; }
.setup-note { padding: 13px; border: 1px solid rgba(198,245,106,.15); border-radius: 10px; color: #b9c5b0; background: rgba(198,245,106,.035); font-size: 10px; line-height: 1.65; }
.setup-note strong { color: var(--acid); font-weight: 600; }
.email-login-form { display: grid; gap: 12px; }
.email-login-field { display: grid; gap: 7px; color: #536781; font-size: 10px; font-weight: 600; }
.email-login-field input { width: 100%; min-height: 43px; padding: 0 12px; border: 1px solid #d6e1ef; border-radius: 9px; color: #14253b; background: #f8fafd; font-size: 13px; }
.email-login-field input[name="code"] { font: 20px var(--mono); letter-spacing: .22em; text-align: center; }
.email-login-form .button { min-height: 42px; }
.email-login-note { margin: 0 0 14px; padding: 11px 12px; border: 1px solid #d5e4fa; border-radius: 9px; color: #526985; background: #f4f8ff; font-size: 10px; line-height: 1.6; }
.email-login-back { margin-top: 20px; color: #2563eb; font-size: 10px; text-decoration: none; }
.email-login-back:hover { text-decoration: underline; }
.email-login-links { margin-top: 11px; }
.text-button { padding: 0; border: 0; color: #2563eb; background: transparent; font-size: 10px; cursor: pointer; }

.pending-screen { min-height: 100vh; padding: 24px; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 35%, rgba(198,245,106,.07), transparent 40%), var(--canvas); }
.pending-card { width: min(420px, 100%); padding: 32px; text-align: center; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--panel); }
.pending-orbit { width: 58px; height: 58px; margin: 0 auto 20px; display: grid; place-items: center; border: 1px solid rgba(198,245,106,.28); border-radius: 50%; color: var(--acid); font-size: 20px; box-shadow: 0 0 0 10px rgba(198,245,106,.035); }
.pending-card h1 { font-size: 22px; }
.pending-card p { margin: 10px 0 21px; color: var(--muted); font-size: 11px; line-height: 1.6; }

.modal { width: min(520px, calc(100% - 28px)); max-height: min(90vh, 780px); padding: 23px; border: 1px solid var(--line-strong); border-radius: 17px; color: var(--text); background: #1a1e1a; box-shadow: 0 30px 100px rgba(0,0,0,.65); }
.modal::backdrop { background: rgba(3,5,3,.74); backdrop-filter: blur(6px); }
.modal-heading { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.modal-heading h2 { margin: 6px 0 0; font-size: 18px; letter-spacing: -.04em; }
.modal label { margin-top: 14px; display: grid; gap: 7px; color: #aeb7aa; font-size: 9px; }
.modal input, .modal textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: #131613; font-size: 10px; resize: vertical; }
.modal input::placeholder, .modal textarea::placeholder { color: #586255; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-actions { margin-top: 22px; display: flex; justify-content: flex-end; gap: 8px; }
.modal-logs { width: min(800px, calc(100% - 28px)); }
.logs-content { max-height: 62vh; min-height: 180px; margin: 0; padding: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; color: #ced7c8; background: #0e100e; font: 9px/1.7 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.toast-region { position: fixed; z-index: 20; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { max-width: min(380px, calc(100vw - 36px)); padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 10px; color: #e7eee2; background: #252b24; box-shadow: 0 10px 35px rgba(0,0,0,.3); font-size: 10px; animation: toast-in .2s ease both; }
.toast.error { border-color: rgba(255,116,116,.28); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1050px) {
  .main-area { padding-right: 24px; padding-left: 24px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .overview-grid { grid-template-columns: minmax(0,1.2fr) minmax(250px,.8fr); }
}
@media (max-width: 800px) {
  .app-shell { display: block; padding-bottom: 67px; }
  .sidebar { width: 100%; height: 62px; inset: auto 0 0; padding: 0 10px env(safe-area-inset-bottom); flex-direction: row; align-items: center; border: 0; border-top: 1px solid var(--line); background: rgba(21,24,21,.96); backdrop-filter: blur(15px); }
  .brand, .nav-label, .sidebar-spacer, .server-chip, .profile { display: none; }
  .nav-list { width: 100%; display: flex; justify-content: space-around; gap: 4px; }
  .nav-item { min-width: 54px; min-height: 48px; padding: 5px 8px; flex-direction: column; justify-content: center; gap: 3px; }
  .nav-item span:last-child { flex: 0 0 auto; font-size: 8px; }
  .nav-icon { font-size: 14px; }
  .nav-count { position: absolute; margin: -23px 0 0 24px; }
  .main-area { padding: 0 18px 28px; }
  .topbar { height: 60px; }
  .overview-grid { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: 1fr; }
  .login-frame { grid-template-columns: 1fr; }
  .login-visual { min-height: 300px; padding: 24px; }
  .login-visual::before { width: 400px; height: 400px; top: -25%; left: 42%; }
  .login-visual::after { width: 90px; height: 90px; top: 23%; left: 65%; }
  .login-statement { margin: 38px 0 17px; }
  .login-statement h1 { max-width: 340px; font-size: 38px; }
  .login-statement p { max-width: 290px; margin-top: 8px; font-size: 10px; }
  .login-visual-footer { display: none; }
  .login-form-side { padding: 30px 24px; }
}
@media (max-width: 520px) {
  .main-area { padding-right: 13px; padding-left: 13px; }
  .page-header { padding-top: 23px; }
  .page-date { display: none; }
  .metric-grid { gap: 8px; }
  .metric-card { min-height: 127px; padding: 13px; }
  .metric-value { margin-top: 13px; font-size: 23px; }
  .metric-head { font-size: 8px; }
  .server-metric-grid { gap: 8px; }
  .server-metric { padding: 13px; }
  .server-details-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .server-form-grid { grid-template-columns: 1fr; }
  .server-hero { padding: 17px; }
  .server-emblem { width: 52px; height: 52px; font-size: 20px; }
  .access-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 7px; padding: 13px; }
  .access-stat strong { font-size: 16px; }
  .access-stat span { font-size: 7px; }
  .access-table th, .access-table td { padding-right: 8px; padding-left: 8px; }
  .filter-select { max-width: 115px; padding-right: 18px; }
  .apps-count { display: none; }
  .modal { padding: 18px; }
  .form-pair { grid-template-columns: 1fr; gap: 0; }
  .login-screen { padding: 12px; }
  .login-visual { min-height: 250px; }
  .login-form-side { padding: 25px 21px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Світла тема панелі: чисті поверхні, темний текст і насичені сині дії. */
body, html { background: var(--canvas); color: var(--text); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline-color: #3478ed; }
::selection { background: #2563eb; color: #fff; }
.boot-mark { filter: drop-shadow(0 8px 22px rgba(37, 99, 235, .18)); }
.nav-label, .search-field input::placeholder, .login-footnote, .local-login span { color: #8a9ab0; }
.nav-item { color: #586b84; }
.nav-item:hover { color: #14253b; background: #f1f6fc; }
.nav-item.is-active { color: #1d5bd4; background: #eaf2ff; }
.nav-count { color: #fff; }
.server-chip { background: #f8fafd; }
.live-dot.online { box-shadow: 0 0 0 4px rgba(37, 99, 235, .11); }
.avatar { color: #1d5bd4; background: #e9f1ff; }
.profile-copy strong, .crumb strong, .server-fact strong, .resource-heading strong,
.detail-item strong, .helper-panel strong { color: #14253b; }
.metric-card { background: linear-gradient(135deg, rgba(37, 99, 235, .035), transparent 72%), #fff; box-shadow: 0 8px 24px rgba(38, 69, 111, .035); }
.metric-track, .usage-track { background: #e8eef6; }
.chart-grid-line { stroke: rgba(37, 65, 102, .11); }
.service-glyph { background: #edf4ff; }
.search-field, .filter-select { background: #fff; color: #536781; }
.filter-select { color: #344a66; }
.app-card { box-shadow: 0 7px 22px rgba(38, 69, 111, .035); }
.app-card:hover { border-color: rgba(37, 99, 235, .3); box-shadow: 0 12px 26px rgba(38, 69, 111, .075); }
.app-symbol { background: #edf4ff; }
.app-desc { color: #536781; }
.resource-sub { color: #788ba3; }
.status-badge.running { color: #167449; border-color: #bce8d1; background: #effaf4; }
.status-badge.exited, .status-badge.dead { color: #bd3945; border-color: #f1c7ca; background: #fff4f4; }
.button { color: #344a66; background: #fff; }
.button:hover:not(:disabled) { border-color: #9dbaf0; color: #1d5bd4; background: #f4f8ff; }
.button-primary { border-color: #2563eb; color: #fff; background: #2563eb; }
.button-primary:hover:not(:disabled) { color: #fff; background: #1d4ed8; }
.button-quiet { color: #61748d; background: transparent; }
.button-danger:hover:not(:disabled) { border-color: #e9a4aa; color: #c53240; background: #fff4f4; }
.server-hero { border-color: #d5e4fa; background: radial-gradient(ellipse at 90% 15%, rgba(37, 99, 235, .09), transparent 45%), #fff; }
.server-emblem { border-color: #c8daf8; color: #2563eb; box-shadow: inset 0 0 20px rgba(37, 99, 235, .055), 0 0 26px rgba(37, 99, 235, .06); }
.helper-panel { background: #fff; }
.role-select { color: #344a66; }
.empty-icon { background: #f4f8ff; }
.skeleton { background: #eaf0f7; }
.skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent); }
.login-screen { background: radial-gradient(ellipse at 16% 22%, rgba(37, 99, 235, .1), transparent 38%), radial-gradient(ellipse at 82% 86%, rgba(74, 139, 232, .08), transparent 38%), #f3f7fc; }
.login-frame { border-color: #dce6f2; background: #fff; box-shadow: 0 30px 90px rgba(37, 65, 102, .13); }
.login-visual { color: #14253b; background-color: #edf4ff; background-image: linear-gradient(rgba(37, 99, 235, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(37, 99, 235, .055) 1px, transparent 1px); }
.login-visual::before { border-color: rgba(37, 99, 235, .12); box-shadow: 0 0 0 35px rgba(37, 99, 235, .035), 0 0 0 90px rgba(37, 99, 235, .025), inset 0 0 70px rgba(37, 99, 235, .04); }
.login-visual::after { border-color: rgba(37, 99, 235, .24); background: radial-gradient(circle at 35% 33%, #fff, #a9c8ff 30%, #3d7ee8 67%, transparent 71%); box-shadow: 0 0 65px rgba(37, 99, 235, .2); }
.login-statement .eyebrow { color: #2563eb; }
.login-statement p { color: #526985; }
.login-visual-footer { color: #6f839c; }
.login-error { color: #bd3945; }
.setup-note { border-color: #cdddf8; color: #536781; background: #f4f8ff; }
.setup-note strong { color: #1d5bd4; }
.pending-screen { background: radial-gradient(ellipse at 50% 35%, rgba(37, 99, 235, .075), transparent 40%), var(--canvas); }
.pending-orbit { border-color: #bfd3f5; box-shadow: 0 0 0 10px rgba(37, 99, 235, .055); }
.modal { background: #fff; box-shadow: 0 30px 90px rgba(20, 37, 59, .2); }
.modal::backdrop { background: rgba(20, 37, 59, .32); }
.modal label { color: #536781; }
.modal input, .modal textarea { background: #f8fafd; }
.logs-content { color: #263a55; background: #f7f9fc; }
.toast { color: #14253b; background: #fff; box-shadow: 0 10px 35px rgba(20, 37, 59, .15); }
.sidebar { box-shadow: 8px 0 24px rgba(38, 69, 111, .025); }
@media (max-width: 800px) {
  .sidebar { background: rgba(255, 255, 255, .96); }
}
