/* VPS Info — tünd tema (Deployer ilə eyni rənglər). Mobile-first. */
:root {
  --bg: #0B0F17;
  --surface: #111723;
  --surface-2: #0E131D;
  --surface-3: #141B28;
  --console: #080B12;
  --stroke: #1E2636;
  --stroke-h: #2E3A52;
  --text: #E6EDF7;
  --text-2: #8A97AD;
  --muted: #5B677D;
  --accent: #5B8CFF;
  --accent-soft: rgba(91, 140, 255, .14);
  --ok: #34D399;
  --ok-soft: rgba(52, 211, 153, .12);
  --warn: #FBBF24;
  --warn-soft: rgba(251, 191, 36, .12);
  --err: #F87171;
  --err-soft: rgba(248, 113, 113, .12);
  --violet: #A78BFA;
  --info: #93B4E8;
  --grad: linear-gradient(135deg, #3B82F6 0%, #7C5CFA 100%);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --top-h: 56px;
  --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.45; }
body { min-height: 100vh; min-height: 100dvh; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(91, 140, 255, .35); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.dim { color: var(--text-2); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .err { color: var(--err); } .accent { color: var(--accent); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--stroke-h) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--stroke-h); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ── icons ── */
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 22px; height: 22px; }

/* ── shell ── */
.shell { min-height: 100vh; min-height: 100dvh; }
.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) 12px 0 16px;
  display: flex; align-items: center; gap: 12px; background: rgba(11, 15, 23, .86);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--stroke);
}
.topbar .logo { width: 32px; height: 32px; border-radius: 9px; flex: none; }
.topbar .title { flex: 1; min-width: 0; }
.topbar .title b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .title small { display: block; font-size: 11.5px; color: var(--text-2); margin-top: -1px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, .15); }
.live.stale i { background: var(--warn); box-shadow: 0 0 0 3px rgba(251, 191, 36, .15); }
.live.down i { background: var(--err); box-shadow: 0 0 0 3px rgba(248, 113, 113, .15); }

.main { padding: 16px 16px calc(var(--tab-h) + var(--safe-b) + 24px); max-width: 1440px; margin: 0 auto; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(11, 15, 23, .92); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-top: 1px solid var(--stroke);
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0;
  color: var(--muted); font-size: 11px; font-weight: 500; background: none; border: 0; padding: 0; cursor: pointer; position: relative;
}
.tabbar .ic { width: 22px; height: 22px; }
.tabbar .active { color: var(--text); }
.tabbar .active::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 2px; background: var(--accent); }
.tabbar .dot { position: absolute; top: 9px; left: calc(50% + 7px); width: 8px; height: 8px; border-radius: 50%; background: var(--err); border: 2px solid var(--bg); }

@media (min-width: 1024px) {
  :root { --tab-h: 0px; }
  .shell { display: grid; grid-template-columns: 248px 1fr; }
  .topbar, .tabbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 20px 14px;
    border-right: 1px solid var(--stroke); background: var(--bg); overflow-y: auto;
  }
  .brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; }
  .brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 0 22px rgba(91, 108, 255, .35); }
  .brand b { display: block; font-size: 16px; font-weight: 600; }
  .brand small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
  .nav { display: flex; flex-direction: column; gap: 2px; }
  .nav a {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500;
    transition: background .12s, color .12s;
  }
  .nav a:hover { background: var(--surface); color: var(--text); }
  .nav a.active { background: var(--accent-soft); color: var(--text); }
  .nav a.active .ic { color: var(--accent); }
  .nav .count { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 9px; background: var(--err-soft); color: var(--err); }
  .nav-sep { height: 1px; background: var(--stroke); margin: 12px 8px; }
  .side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--stroke); display: flex; flex-direction: column; gap: 10px; }
  .main { padding: 28px 32px 48px; }
}

/* ── page header ── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.page-head p { margin: 2px 0 0; color: var(--text-2); font-size: 13px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 1023px) { .page-head h1 { font-size: 20px; } }

/* ── layout grids ── */
.grid { display: grid; gap: 12px; }
.g2, .g3, .g4 { grid-template-columns: 1fr; }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .grid { gap: 16px; }
  .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { gap: 14px; }
  .tiles.t6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tiles.t4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .span2 { grid-column: span 2; }
}
@media (min-width: 1280px) { .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt { margin-top: 12px; } .mt2 { margin-top: 20px; } .mb { margin-bottom: 12px; }
@media (min-width: 1024px) { .mt { margin-top: 16px; } }

/* ── card ── */
.card { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 14px; min-width: 0; }
@media (min-width: 640px) { .card { padding: 18px; } }
.card.flush { padding: 0; overflow: hidden; }
.card.click { cursor: pointer; transition: border-color .12s, transform .12s; }
.card.click:hover { border-color: var(--stroke-h); }
.card.click:active { transform: scale(.995); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; min-width: 0; flex-wrap: wrap; }
.card-h h3 { margin: 0; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; min-width: 0; }
.card-h h3 .ic { color: var(--text-2); }
.card-h .sub { font-size: 12px; color: var(--muted); }
.card.ok-b { border-color: rgba(52, 211, 153, .3); }
.card.err-b { border-color: rgba(248, 113, 113, .45); background: linear-gradient(180deg, rgba(248, 113, 113, .06), transparent 60%), var(--surface); }
.card.warn-b { border-color: rgba(251, 191, 36, .35); }

/* ── stat tile ── */
.tile { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 12px 12px 10px; min-width: 0; position: relative; overflow: hidden; }
.tile .lbl { font-size: 11.5px; color: var(--text-2); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 6px; }
.tile .val { font-size: 22px; font-weight: 650; margin-top: 6px; letter-spacing: -.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tile .val small { font-size: 13px; font-weight: 500; color: var(--text-2); margin-left: 3px; }
.tile .hint { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tile .spark { height: 34px; margin: 6px -4px -4px; }
@media (min-width: 640px) { .tile { padding: 16px 16px 12px; } .tile .val { font-size: 26px; } }

.gauge-tile { display: flex; flex-direction: column; align-items: center; text-align: center; }
.gauge { position: relative; width: 100%; max-width: 150px; aspect-ratio: 1.45; margin: 4px auto 0; }
.gauge canvas { position: absolute; inset: 0; }
.gauge .g-val { position: absolute; left: 0; right: 0; bottom: 14%; text-align: center; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gauge .g-val small { font-size: 12px; color: var(--text-2); font-weight: 500; }
.gauge-tile .hint { margin-top: -2px; max-width: 100%; }
@media (min-width: 640px) { .gauge .g-val { font-size: 26px; } }

/* ── badges / pills ── */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; background: var(--surface-3); color: var(--text-2); }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(52, 211, 153, .22); }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(251, 191, 36, .22); }
.badge.err { background: var(--err-soft); color: var(--err); border-color: rgba(248, 113, 113, .25); }
.badge.info { background: var(--accent-soft); color: var(--info); border-color: rgba(91, 140, 255, .25); }
.badge.violet { background: rgba(167, 139, 250, .12); color: var(--violet); border-color: rgba(167, 139, 250, .25); }
.badge.mono { font-family: var(--mono); font-weight: 500; }
.sdot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.sdot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, .14); }
.sdot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(251, 191, 36, .14); }
.sdot.err { background: var(--err); box-shadow: 0 0 0 3px rgba(248, 113, 113, .16); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(248, 113, 113, 0); } }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: var(--radius-sm);
  background: var(--surface-3); border: 1px solid var(--stroke); color: #C9D4E5; font-weight: 600; font-size: 13.5px; cursor: pointer;
  transition: background .12s, border-color .12s, opacity .12s, transform .06s; white-space: nowrap; user-select: none; text-decoration: none;
}
.btn:hover { border-color: var(--stroke-h); background: #182133; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 6px 22px rgba(91, 108, 255, .28); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.success { color: var(--ok); background: #0F1A16; border-color: #1B3A2E; }
.btn.warn { color: var(--warn); background: #1A1610; border-color: #3B2F14; }
.btn.danger { color: var(--err); background: #1C1114; border-color: #4A2027; }
.btn.danger.solid { background: #DC2626; color: #fff; border-color: #DC2626; }
.btn.sm { min-height: 34px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn.icon { padding: 0; width: 40px; }
.btn.sm.icon { width: 34px; }
.btn.block { width: 100%; }
.btn .spin { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (pointer: coarse) { .btn { min-height: 44px; } .btn.sm { min-height: 38px; } .btn.icon { width: 44px; } .btn.sm.icon { width: 38px; } }

/* segmented */
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--stroke); gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: none; color: var(--text-2); font-weight: 600; font-size: 12.5px; padding: 0 11px; min-height: 30px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--stroke-h); }
@media (pointer: coarse) { .seg button { min-height: 34px; padding: 0 12px; } }

/* ── forms ── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field small { color: var(--muted); font-size: 12px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 42px; padding: 0 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--stroke);
  color: var(--text); outline: none; transition: border-color .12s, box-shadow .12s; font-size: 16px; /* iOS zoom olmasın */
}
textarea.input { padding: 10px 12px; min-height: 90px; resize: vertical; }
.input:hover { border-color: var(--stroke-h); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 140, 255, .18); }
.input.mono { font-family: var(--mono); }
@media (min-width: 640px) { .input, select.input { font-size: 14px; min-height: 40px; } .input.mono { font-size: 13.5px; } }
.save-bar {
  position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 8px); z-index: 5; display: flex; justify-content: flex-end; gap: 10px;
  padding: 10px; border-radius: var(--radius); background: rgba(17, 23, 35, .92); border: 1px solid var(--stroke);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 -8px 24px rgba(0, 0, 0, .35);
}
.save-bar .hint { flex: 1; align-self: center; color: var(--muted); font-size: 12px; min-width: 0; }
@media (max-width: 639px) { .save-bar .btn { flex: 1; } .save-bar .hint { display: none; } }
select.input { appearance: none; -webkit-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='%238A97AD' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.input-wrap .btn { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); border: 0; background: none; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid.c2 { grid-template-columns: 1fr 1fr; } .form-grid.c4 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 639px) { .form-grid.c4 { grid-template-columns: 1fr 1fr; } }

.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #263045; border-radius: 13px; transition: background .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(91, 140, 255, .35); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--stroke); min-width: 0; }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row b { display: block; font-weight: 600; font-size: 13.5px; }
.toggle-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 12px; border-radius: 16px; background: var(--surface-3); border: 1px solid var(--stroke); font-family: var(--mono); font-size: 13px; }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; width: 24px; height: 24px; border-radius: 12px; display: grid; place-items: center; }
.chip button:hover { background: var(--err-soft); color: var(--err); }

/* ── lists / tables ── */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--stroke); min-width: 0; }
.li:last-child { border-bottom: 0; }
.li .grow { flex: 1; min-width: 0; }
.li .t { font-weight: 600; font-size: 13.5px; }
.li .s { color: var(--muted); font-size: 12px; }
.li.click { cursor: pointer; }

.table-wrap { overflow-x: auto; margin: 0 -14px; padding: 0 14px; }
@media (min-width: 640px) { .table-wrap { margin: 0 -18px; padding: 0 18px; } }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--stroke); white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid var(--stroke); vertical-align: middle; font-variant-numeric: tabular-nums; }
table.t tr:last-child td { border-bottom: 0; }
table.t th:first-child, table.t td:first-child { padding-left: 0; }
table.t th:last-child, table.t td:last-child { padding-right: 0; }
table.t .r { text-align: right; }
/* mobil: cədvəl → kart siyahısı */
@media (max-width: 719px) {
  table.rt thead { display: none; }
  table.rt, table.rt tbody, table.rt tr, table.rt td { display: block; width: 100%; }
  table.rt tr { padding: 10px 0; border-bottom: 1px solid var(--stroke); }
  table.rt tr:last-child { border-bottom: 0; }
  table.rt td { border: 0; padding: 3px 0 !important; display: flex; justify-content: space-between; gap: 12px; text-align: right; min-width: 0; }
  table.rt td::before { content: attr(data-l); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; flex: none; }
  table.rt td.head { font-weight: 600; font-size: 14px; justify-content: flex-start; text-align: left; padding-bottom: 6px !important; }
  table.rt td.head::before { display: none; }
  table.rt td > * { min-width: 0; }
  table.rt .r { text-align: right; }
}

/* progress bar */
.bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.bar.ok > i { background: var(--ok); } .bar.warn > i { background: var(--warn); } .bar.err > i { background: var(--err); }
.bar.lg { height: 9px; border-radius: 5px; }

/* uptime bars (24 saat) */
.ubars { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; height: 22px; align-items: end; }
.ubars i { display: block; height: 100%; border-radius: 2px; background: var(--ok); opacity: .85; }
.ubars i.w { background: var(--warn); } .ubars i.e { background: var(--err); } .ubars i.n { background: var(--surface-3); }

/* ── problems banner ── */
.problems { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.prob { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--stroke); background: var(--surface); font-size: 13px; color: var(--text); min-width: 0; }
.prob .ic { flex: none; }
.prob span { flex: 1; min-width: 0; }
.prob.critical { border-color: rgba(248, 113, 113, .4); background: linear-gradient(90deg, rgba(248, 113, 113, .1), transparent), var(--surface); }
.prob.critical .ic { color: var(--err); }
.prob.warning { border-color: rgba(251, 191, 36, .35); }
.prob.warning .ic { color: var(--warn); }
.prob.info .ic { color: var(--info); }
.prob-more { align-self: flex-start; }
@media (min-width: 1024px) { .problems { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .prob-more { grid-column: 1 / -1; } }

/* ── charts ── */
.chart { position: relative; height: 200px; width: 100%; }
.chart.sm { height: 150px; } .chart.lg { height: 240px; }
@media (min-width: 1024px) { .chart { height: 240px; } .chart.lg { height: 290px; } .chart.sm { height: 170px; } }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ── site / app cards ── */
.cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.sc-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sc-head .name { font-weight: 650; font-size: 14.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.kv div { min-width: 0; }
.kv b { display: block; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ups { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ups b { color: var(--text); font-weight: 600; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.btn-row .btn { flex: 1 1 auto; }
@media (max-width: 400px) { .btn-row .btn { flex-basis: calc(50% - 4px); } }
.mini-spark { height: 38px; margin-top: 10px; }

/* toolbar (filtr, axtarış) */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .search { flex: 1 1 220px; min-width: 0; position: relative; }
.toolbar .search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search .input { padding-left: 38px; }

/* ── logs ── */
.logbox { background: var(--console); border: 1px solid var(--stroke); border-radius: var(--radius); font-family: var(--mono); font-size: 12.5px; line-height: 1.55; padding: 12px 0; height: calc(100dvh - 330px); min-height: 320px; overflow: auto; }
@media (min-width: 1024px) { .logbox { height: calc(100vh - 260px); } }
.logbox .ln { padding: 0 14px; white-space: pre; color: #9AA6BA; }
.logbox.wrap .ln { white-space: pre-wrap; word-break: break-word; }
.logbox .ln.e { color: var(--err); background: rgba(248, 113, 113, .05); }
.logbox .ln.w { color: var(--warn); }
.logbox .ln.new { animation: flash 1.2s ease-out; }
.logbox mark { background: rgba(251, 191, 36, .3); color: inherit; border-radius: 2px; }
@keyframes flash { from { background: rgba(91, 140, 255, .18); } }
.log-controls { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-bottom: 12px; }
.log-controls .full { grid-column: 1 / -1; }
@media (min-width: 900px) { .log-controls { grid-template-columns: minmax(200px, 260px) auto auto 1fr auto; align-items: center; } .log-controls .full { grid-column: auto; } }

/* ── alert history ── */
.al { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--stroke); min-width: 0; }
.al:last-child { border-bottom: 0; }
.al .ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-3); }
.al.critical .ico { background: var(--err-soft); color: var(--err); }
.al.warning .ico { background: var(--warn-soft); color: var(--warn); }
.al.ok .ico { background: var(--ok-soft); color: var(--ok); }
.al.info .ico { background: var(--accent-soft); color: var(--info); }
.al .msg { flex: 1; min-width: 0; white-space: pre-wrap; word-break: break-word; font-size: 13px; }
.al .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; font-size: 12px; color: var(--muted); }

/* ── sheet / dialog ── */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(3, 6, 12, .66); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease-out; }
.sheet {
  width: 100%; max-height: 92dvh; overflow-y: auto; background: var(--surface); border: 1px solid var(--stroke); border-bottom: 0;
  border-radius: 18px 18px 0 0; padding: 8px 16px calc(18px + var(--safe-b)); animation: up .2s cubic-bezier(.2, .8, .2, 1);
}
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--stroke-h); margin: 4px auto 12px; }
.sheet-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet-h h2 { margin: 0; font-size: 18px; font-weight: 650; min-width: 0; word-break: break-word; }
.sheet-h p { margin: 3px 0 0; color: var(--text-2); font-size: 13px; }
.sheet-foot { display: flex; gap: 10px; margin-top: 18px; }
.sheet-foot .btn { flex: 1; }
@media (min-width: 720px) {
  .overlay { align-items: center; padding: 24px; }
  .sheet { max-width: 560px; border-radius: 18px; border-bottom: 1px solid var(--stroke); padding: 22px 24px; max-height: 88vh; }
  .sheet.wide { max-width: 860px; }
  .sheet .grab { display: none; }
  .sheet-foot { justify-content: flex-end; } .sheet-foot .btn { flex: 0 0 auto; min-width: 120px; }
}
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.menu-grid a, .menu-grid button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--stroke); color: var(--text); font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: center; }
.menu-grid .ic { width: 24px; height: 24px; color: var(--accent); }
.menu-grid .active { border-color: var(--accent); background: var(--accent-soft); }

.warnbox { display: flex; gap: 10px; padding: 12px; border-radius: 12px; font-size: 13px; background: var(--warn-soft); border: 1px solid rgba(251, 191, 36, .25); color: #F5D58A; }
.warnbox.err { background: var(--err-soft); border-color: rgba(248, 113, 113, .3); color: #FCA5A5; }
.warnbox.info { background: var(--accent-soft); border-color: rgba(91, 140, 255, .25); color: #BFD0F5; }
.warnbox .ic { flex: none; margin-top: 1px; }
.warnbox code, .dim code, .muted code { font-family: var(--mono); font-size: 12px; background: rgba(255, 255, 255, .06); padding: 1px 5px; border-radius: 4px; }

/* toasts */
.toasts { position: fixed; z-index: 80; left: 12px; right: 12px; bottom: calc(var(--tab-h) + var(--safe-b) + 12px); display: flex; flex-direction: column; gap: 8px; pointer-events: none; align-items: center; }
@media (min-width: 1024px) { .toasts { left: auto; right: 24px; bottom: 24px; align-items: flex-end; } }
.toast { pointer-events: auto; max-width: 440px; width: 100%; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #172033; border: 1px solid var(--stroke-h); box-shadow: 0 12px 32px rgba(0, 0, 0, .45); font-size: 13.5px; animation: up .2s; word-break: break-word; }
.toast.ok .ic { color: var(--ok); } .toast.err .ic { color: var(--err); } .toast.warn .ic { color: var(--warn); }

/* skeleton / empty */
.skel { border-radius: 8px; background: linear-gradient(90deg, var(--surface-3) 25%, #1A2335 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: sk 1.3s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; font-size: 13px; }
.mock-flag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--warn); background: var(--warn-soft); border: 1px solid rgba(251, 191, 36, .25); padding: 2px 8px; border-radius: 10px; }

/* ── login ── */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px calc(24px + var(--safe-b));
  background: radial-gradient(900px 500px at 50% -10%, rgba(91, 108, 255, .18), transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--stroke); border-radius: 20px; padding: 28px 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.login-card .lg { width: 60px; height: 60px; border-radius: 16px; display: block; margin: 0 auto 14px; box-shadow: 0 0 30px rgba(91, 108, 255, .4); }
.login-card h1 { text-align: center; font-size: 22px; margin: 0; font-weight: 650; }
.login-card p.sub { text-align: center; color: var(--text-2); margin: 4px 0 22px; font-size: 13px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.login-card .err-msg { color: var(--err); font-size: 13px; min-height: 18px; text-align: center; }
.login-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }

.flag { width: 20px; height: 15px; border-radius: 3px; object-fit: cover; vertical-align: -2px; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); background: var(--surface-3); }
.ipcell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ipcell .ip { font-family: var(--mono); font-weight: 600; font-size: 13px; }
.ipcell .place { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12px; min-width: 0; }
.ipcell .place span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-acts { display: inline-flex; gap: 6px; justify-content: flex-end; }
@media (max-width: 719px) { table.rt td.acts { justify-content: flex-end; padding-top: 8px !important; } table.rt td.acts::before { display: none; } table.rt td.head .ipcell { width: 100%; } }
.kbd { font-family: var(--mono); font-size: 12px; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--stroke); }
hr.sep { border: 0; border-top: 1px solid var(--stroke); margin: 14px 0; }
.big-num { font-size: 34px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
