/* Xgen — light pastel aurora glassmorphism (PRD D8) */
:root {
  --indigo: #2e2a55;
  --indigo-soft: #4d4878;
  --muted: #727091;
  --muted-2: #8e8cab;
  --line: rgba(255, 255, 255, 0.7);
  --line-strong: rgba(46, 42, 85, 0.1);
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.76);
  --glass-soft: rgba(255, 255, 255, 0.4);
  --glass-inset: rgba(255, 255, 255, 0.45);
  --shadow: 0 24px 60px -30px rgba(46, 42, 85, 0.42);
  --shadow-soft: 0 12px 30px -20px rgba(46, 42, 85, 0.4);
  --accent: linear-gradient(135deg, #f43f9e 0%, #a855f7 55%, #8b5cf6 100%);
  --accent-solid: #d946ef;
  --accent-pink: #f43f9e;
  --violet: #8b5cf6;
  --green: #14b8a6;
  --green-soft: rgba(20, 184, 166, 0.12);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --red: #ef476f;
  --red-soft: rgba(239, 71, 111, 0.12);
  --blue: #4f7df3;
  --blue-soft: rgba(79, 125, 243, 0.12);
  --radius: 24px;
  --radius-sm: 16px;
  --radius-xs: 12px;
  --sidebar: 272px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, SFMono-Regular, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--indigo);
  background: #b9c6f2;
  background-image: linear-gradient(135deg, #a8c8ec 0%, #b9c6f2 48%, #f2b8d8 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
h1, h2, h3, h4, p { margin: 0; }
svg { display: block; }
svg[aria-hidden="true"] { width: 16px; height: 16px; flex: none; }
.hidden { display: none !important; }

/* ── aurora background ── */
.aurora { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(8px); opacity: 0.65; animation: drift 26s ease-in-out infinite alternate; }
.blob-a { width: 52vw; height: 52vw; left: -12vw; top: -18vw; background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.9), rgba(168,200,236,.35) 48%, transparent 70%); }
.blob-b { width: 42vw; height: 42vw; right: -8vw; top: 4vh; background: radial-gradient(circle at 50% 50%, rgba(244,63,158,.32), rgba(242,184,216,.18) 55%, transparent 72%); animation-delay: -6s; }
.blob-c { width: 36vw; height: 36vw; left: 28vw; bottom: -14vw; background: radial-gradient(circle at 45% 45%, rgba(139,92,246,.28), rgba(185,198,242,.2) 55%, transparent 72%); animation-delay: -12s; }
.blob-d { width: 24vw; height: 24vw; right: 18vw; bottom: 12vh; background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.55), transparent 68%); animation-delay: -3s; }
@keyframes drift {
  0% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(3vw, 2vh, 0) scale(1.06); }
  100% { transform: translate3d(-2vw, 4vh, 0) scale(0.98); }
}
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  html { scroll-behavior: auto; }
  * { transition-duration: 0.001ms !important; }
}

/* ── primitives ── */
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.glass-inset {
  background: var(--glass-inset);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.card { padding: 22px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.card-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.card-sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 1.5; }
.muted { color: var(--muted); }
.tiny { font-size: 11.5px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 16px; }
.grow { flex: 1; min-width: 0; }
.right { margin-left: auto; }
.center { text-align: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 14px; padding: 10px 16px; font-size: 13px; font-weight: 650;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  background: rgba(255,255,255,.55); color: var(--indigo);
  box-shadow: inset 0 0 0 1px rgba(46,42,85,.08);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.8); box-shadow: inset 0 0 0 1px rgba(46,42,85,.1), var(--shadow-soft); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 12px 26px -14px rgba(244,63,158,.75); }
.btn-primary:hover { background: var(--accent); box-shadow: 0 16px 32px -14px rgba(244,63,158,.8); }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 1px rgba(46,42,85,.12); }
.btn-soft { background: rgba(255,255,255,.46); }
.btn-danger { background: var(--red-soft); color: #c81e4b; box-shadow: inset 0 0 0 1px rgba(239,71,111,.24); }
.btn-danger:hover { background: rgba(239,71,111,.18); }
.btn-kill { background: rgba(255,255,255,.5); color: #b91c4b; box-shadow: inset 0 0 0 1px rgba(239,71,111,.2); padding: 9px 13px; font-size: 12.5px; }
.btn-kill.is-armed { background: var(--red); color: #fff; box-shadow: 0 10px 24px -12px rgba(239,71,111,.8); }
.btn-sm { padding: 7px 11px; border-radius: 11px; font-size: 12px; }
.btn-xs { padding: 5px 9px; border-radius: 9px; font-size: 11px; gap: 5px; }
.btn-block { width: 100%; }
.btn-icon-only { width: 36px; height: 36px; padding: 0; border-radius: 11px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; border: 0; border-radius: 12px;
  background: rgba(255,255,255,.46); color: var(--indigo-soft);
  box-shadow: inset 0 0 0 1px rgba(46,42,85,.08);
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.icon-btn:hover { background: rgba(255,255,255,.82); color: var(--indigo); transform: translateY(-1px); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.danger:hover { color: var(--red); }
.input-icon svg, .input-action svg { width: 16px; height: 16px; }

.field { display: grid; gap: 7px; }
.field > span, .field-label { font-size: 12px; font-weight: 650; color: var(--indigo-soft); }
.field .hint { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input-icon { position: absolute; left: 13px; color: var(--muted-2); pointer-events: none; }
.input-wrap .input-action { position: absolute; right: 6px; width: 30px; height: 30px; background: transparent; box-shadow: none; }
.input-wrap input { padding-left: 38px; }
.input-wrap .input-action + input, .input-wrap input.has-action { padding-right: 40px; }
input, select, textarea {
  width: 100%; border: 1px solid rgba(46,42,85,.1); background: rgba(255,255,255,.6);
  border-radius: 13px; padding: 11px 13px; font-size: 13px; outline: none;
  transition: border .16s ease, box-shadow .16s ease, background .16s ease;
}
input::placeholder, textarea::placeholder { color: #a3a1b8; }
input:focus, select:focus, textarea:focus { border-color: rgba(139,92,246,.5); background: rgba(255,255,255,.85); box-shadow: 0 0 0 4px rgba(139,92,246,.1); }
textarea { resize: vertical; min-height: 92px; line-height: 1.55; }
select { appearance: none; 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='%23727091' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }
input[type="checkbox"] { width: auto; accent-color: var(--violet); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-error { color: #c81e4b; font-size: 12.5px; line-height: 1.45; }
.form-note { font-size: 12px; color: var(--muted); line-height: 1.55; }
.inline-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--indigo-soft); }
.divider { height: 1px; background: rgba(46,42,85,.08); margin: 18px 0; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em; line-height: 1.3; white-space: nowrap;
}
.badge svg { width: 11px; height: 11px; }
.badge-soft { background: rgba(255,255,255,.55); color: var(--indigo-soft); box-shadow: inset 0 0 0 1px rgba(46,42,85,.08); }
.badge-success { background: var(--green-soft); color: #0f766e; }
.badge-warn { background: var(--amber-soft); color: #b45309; }
.badge-danger { background: var(--red-soft); color: #be123c; }
.badge-info { background: var(--blue-soft); color: #3559c7; }
.badge-violet { background: rgba(139,92,246,.13); color: #6d28d9; }
.badge-pink { background: rgba(244,63,158,.12); color: #be185d; }
.badge-mock { background: linear-gradient(135deg, rgba(244,63,158,.16), rgba(139,92,246,.16)); color: #9333ea; box-shadow: inset 0 0 0 1px rgba(139,92,246,.25); letter-spacing: .08em; }
.badge-lang { background: rgba(255,255,255,.6); box-shadow: inset 0 0 0 1px rgba(46,42,85,.08); font-size: 10px; }
.badge-count { background: rgba(46,42,85,.07); color: var(--indigo-soft); min-width: 18px; justify-content: center; }

.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); flex: none; }
.status-dot[data-state="ok"] { background: var(--green); box-shadow: 0 0 0 3px rgba(20,184,166,.14); }
.status-dot[data-state="warn"] { background: var(--amber); box-shadow: 0 0 0 3px rgba(245,158,11,.16); }
.status-dot[data-state="bad"] { background: var(--red); box-shadow: 0 0 0 3px rgba(239,71,111,.14); }
.status-dot[data-state="idle"] { background: #a3a1b8; }

.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border-radius: 15px; color: #fff; font-weight: 750;
  font-size: 14px; letter-spacing: -.02em; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 18px -12px rgba(46,42,85,.5);
  background: linear-gradient(135deg, #8b5cf6, #f43f9e);
}
.avatar-sm { width: 32px; height: 32px; border-radius: 11px; font-size: 11px; }
.avatar-lg { width: 60px; height: 60px; border-radius: 20px; font-size: 19px; }
.avatar.a1 { background: linear-gradient(135deg,#6366f1,#a855f7); }
.avatar.a2 { background: linear-gradient(135deg,#f43f9e,#fb7185); }
.avatar.a3 { background: linear-gradient(135deg,#0ea5e9,#6366f1); }
.avatar.a4 { background: linear-gradient(135deg,#14b8a6,#0ea5e9); }
.avatar.a5 { background: linear-gradient(135deg,#f59e0b,#f43f9e); }

/* ── boot & login ── */
.boot { position: fixed; inset: 0; z-index: 80; display: grid; place-content: center; justify-items: center; gap: 18px; color: var(--indigo-soft); font-size: 13px; }
.boot-logo { width: 68px; height: 68px; padding: 7px; border-radius: 22px; background: rgba(255,255,255,.5); backdrop-filter: blur(18px); box-shadow: var(--shadow); animation: breathe 2.4s ease-in-out infinite; }
.boot .logo-mark { width: 54px; height: 54px; font-size: 22px; }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

.login-screen { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; overflow: auto; }
.login-card { position: relative; width: min(420px, 100%); padding: 34px; overflow: hidden; }
.login-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 26px; }
.login-brand h1 { font-size: 24px; letter-spacing: -.04em; }
.login-brand p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.login-card h2 { font-size: 20px; letter-spacing: -.03em; }
.login-card > p.muted { margin: 7px 0 20px; font-size: 12.5px; line-height: 1.6; }
.login-card form { display: grid; gap: 14px; }
.login-foot { margin-top: 20px; font-size: 10.8px; line-height: 1.55; color: var(--muted-2); }
.login-orbit { position: absolute; width: 220px; height: 220px; right: -110px; top: -90px; border-radius: 50%; border: 1px solid rgba(255,255,255,.6); }
.login-orbit span { position: absolute; border-radius: 50%; background: var(--accent); opacity: .55; }
.login-orbit span:nth-child(1) { width: 9px; height: 9px; left: 18px; top: 76px; }
.login-orbit span:nth-child(2) { width: 6px; height: 6px; left: 72px; bottom: 20px; opacity: .4; }
.login-orbit span:nth-child(3) { width: 14px; height: 14px; left: 108px; top: 22px; opacity: .25; }

/* ── logo ── */
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border-radius: 13px; color: #fff;
  font-size: 18px; font-weight: 850; font-style: italic; letter-spacing: -.08em;
  background: var(--accent); box-shadow: 0 10px 22px -12px rgba(244,63,158,.85), inset 0 1px 0 rgba(255,255,255,.35);
}
.logo-mark.lg { width: 52px; height: 52px; border-radius: 17px; font-size: 23px; }

/* ── layout ── */
.app { position: relative; z-index: 1; min-height: 100dvh; }
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar); height: 100dvh;
  display: flex; flex-direction: column; padding: 22px 16px 16px;
  background: rgba(255,255,255,.5);
  border-right: 1px solid rgba(255,255,255,.65);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 12px 0 40px -30px rgba(46,42,85,.4);
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 20px; }
.brand-text { display: grid; gap: 1px; }
.brand-text strong { font-size: 18px; letter-spacing: -.045em; }
.brand-text small { font-size: 9.5px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.nav { display: grid; gap: 20px; overflow-y: auto; padding: 2px 2px 12px; scrollbar-width: thin; }
.nav-group { display: grid; gap: 4px; }
.nav-label { font-size: 9.5px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); padding: 0 12px 6px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border-radius: 13px; font-size: 12.8px; font-weight: 600; color: var(--indigo-soft);
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.nav-item svg { width: 17px; height: 17px; opacity: .72; }
.nav-item:hover { background: rgba(255,255,255,.5); color: var(--indigo); }
.nav-item.active { color: var(--indigo); background: rgba(255,255,255,.76); box-shadow: 0 10px 24px -18px rgba(46,42,85,.5), inset 0 0 0 1px rgba(255,255,255,.7); }
.nav-item.active::before { content: ""; position: absolute; left: -4px; top: 10px; bottom: 10px; width: 4px; border-radius: 4px; background: var(--accent); }
.nav-item.active svg { opacity: 1; color: var(--violet); }
.nav-count { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 7px; background: rgba(46,42,85,.07); font-size: 10px; font-weight: 700; text-align: center; color: var(--muted); }
.nav-count.accent { background: rgba(244,63,158,.14); color: #be185d; }
.sidebar-foot { margin-top: auto; display: grid; gap: 10px; padding-top: 14px; }
.pool-mini { padding: 12px; display: grid; gap: 9px; }
.pool-mini-top { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 650; }
.pool-mini-top .badge { margin-left: auto; font-size: 8.5px; padding: 2px 7px; }
.pool-mini-stats { display: flex; gap: 14px; font-size: 10.5px; color: var(--muted); }
.pool-mini-stats strong { font-size: 12px; color: var(--indigo); }
.sidebar-user { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 8px; border-radius: 13px; text-align: left; }
.sidebar-user:hover { background: rgba(255,255,255,.45); }
.sidebar-user-text { display: grid; gap: 1px; flex: 1; }
.sidebar-user-text strong { font-size: 12px; }
.sidebar-user-text small { font-size: 10px; color: var(--muted); }
.sidebar-user > svg { width: 15px; height: 15px; color: var(--muted); }

.main { margin-left: var(--sidebar); min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; min-height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 12px 30px;
  background: rgba(255,255,255,.42);
  border-bottom: 1px solid rgba(255,255,255,.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); min-width: 0; }
.breadcrumb strong { color: var(--indigo); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb-sep svg { width: 13px; height: 13px; opacity: .5; }
.clock { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--indigo-soft); }
.clock svg { width: 14px; height: 14px; opacity: .6; }
.clock small { font-size: 9px; color: var(--muted); letter-spacing: .06em; }
.mobile-menu { display: none; }
.content { flex: 1; width: 100%; max-width: 1540px; margin: 0 auto; padding: 28px 30px 36px; }
.content:focus { outline: none; }
.content-foot { display: flex; justify-content: space-between; gap: 12px; padding: 0 30px 22px; color: var(--muted-2); font-size: 10.5px; }

/* ── page header ── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 27px; letter-spacing: -.045em; line-height: 1.15; }
.page-head p { color: var(--muted); font-size: 12.8px; margin-top: 6px; line-height: 1.55; max-width: 680px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.section-label { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); margin: 24px 2px 12px; }
.section-label::after { content: ""; height: 1px; flex: 1; background: rgba(255,255,255,.55); }

/* ── dashboard ── */
.hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 26px; padding: 26px 28px; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -90px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(244,63,158,.22), transparent 66%); pointer-events: none; }
.hero-copy { position: relative; z-index: 1; display: grid; gap: 9px; max-width: 620px; }
.hero-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hero h2 { font-size: clamp(22px, 2.4vw, 31px); letter-spacing: -.05em; line-height: 1.12; }
.hero h2 em { font-style: normal; background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 12.8px; line-height: 1.6; max-width: 540px; }
.hero-side { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; }
.hero-ring { width: 108px; height: 108px; border-radius: 50%; background: conic-gradient(var(--accent-pink) var(--p, 0%), rgba(255,255,255,.38) 0); display: grid; place-items: center; box-shadow: 0 16px 36px -24px rgba(244,63,158,.7); }
.hero-ring-inner { width: 84px; height: 84px; border-radius: 50%; background: rgba(255,255,255,.8); display: grid; place-items: center; text-align: center; }
.hero-ring-inner strong { font-size: 20px; line-height: 1; letter-spacing: -.04em; }
.hero-ring-inner small { font-size: 8.5px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }
.hero-legend { display: grid; gap: 8px; font-size: 11px; color: var(--muted); }
.hero-legend span { display: flex; align-items: center; gap: 7px; }
.hero-legend strong { color: var(--indigo); font-size: 12px; margin-left: auto; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-top: 16px; }
.kpi { position: relative; padding: 18px; overflow: hidden; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.55); color: var(--violet); box-shadow: inset 0 0 0 1px rgba(46,42,85,.06); }
.kpi-icon svg { width: 16px; height: 16px; }
.kpi strong { display: block; font-size: 27px; letter-spacing: -.05em; line-height: 1.1; margin-top: 12px; }
.kpi-label { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.kpi-foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 10.5px; color: var(--muted); }
.kpi-spark { display: flex; align-items: flex-end; gap: 2px; height: 22px; margin-top: 8px; }
.kpi-spark span { width: 5px; border-radius: 4px; background: rgba(139,92,246,.25); min-height: 2px; }
.kpi-spark span.hot { background: var(--accent); }

.dash-grid { display: grid; grid-template-columns: 1.45fr .9fr; gap: 16px; margin-top: 16px; align-items: start; }
.chart-card { min-height: 300px; }
.chart-legend { display: flex; align-items: center; gap: 14px; font-size: 10.5px; color: var(--muted); }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.legend-dot.post { background: var(--accent-pink); }
.legend-dot.action { background: var(--violet); }
.bar-chart { display: flex; align-items: flex-end; gap: clamp(8px, 2vw, 20px); height: 190px; padding: 16px 4px 0; border-bottom: 1px solid rgba(46,42,85,.08); }
.bar-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar-pair { display: flex; align-items: flex-end; gap: 4px; height: 100%; width: 100%; justify-content: center; }
.bar { width: min(14px, 38%); border-radius: 6px 6px 2px 2px; min-height: 3px; transition: height .5s cubic-bezier(.2,.7,.2,1); }
.bar.post { background: linear-gradient(180deg, #f43f9e, #c026d3); }
.bar.action { background: linear-gradient(180deg, #a78bfa, #8b5cf6); opacity: .85; }
.bar-day > span { font-size: 9.5px; color: var(--muted-2); }
.bar-day.today > span { color: var(--indigo); font-weight: 700; }
.chart-foot { display: flex; justify-content: space-between; gap: 10px; padding-top: 12px; font-size: 10.5px; color: var(--muted); }

.pool-status { display: grid; gap: 14px; }
.pool-gauge { display: flex; align-items: center; gap: 15px; padding: 13px; border-radius: 15px; background: rgba(255,255,255,.35); }
.pool-gauge-ring { width: 68px; height: 68px; border-radius: 50%; background: conic-gradient(#8b5cf6 var(--p,0%), rgba(46,42,85,.08) 0); display: grid; place-items: center; flex: none; }
.pool-gauge-inner { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.8); display: grid; place-items: center; font-size: 13px; font-weight: 750; }
.pool-meta { display: grid; gap: 4px; }
.pool-meta strong { font-size: 12.5px; }
.pool-meta span { font-size: 10.5px; color: var(--muted); line-height: 1.45; }
.pool-rows { display: grid; gap: 8px; }
.pool-row { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--muted); padding: 8px 2px; border-bottom: 1px solid rgba(46,42,85,.06); }
.pool-row:last-child { border-bottom: 0; }
.pool-row strong { font-size: 12px; color: var(--indigo); }
.activation { padding: 12px; border-radius: 14px; background: rgba(255,255,255,.35); display: grid; gap: 8px; }
.activation-top { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; font-weight: 650; }
.wave-track { display: flex; gap: 5px; }
.wave-seg { height: 6px; border-radius: 6px; background: rgba(46,42,85,.1); flex: 1; }
.wave-seg.on { background: linear-gradient(90deg,#f43f9e,#8b5cf6); }
.wave-seg.next { background: rgba(139,92,246,.32); }

.hour-strip { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 56px; margin-top: 8px; }
.hour-cell { height: 100%; display: flex; align-items: flex-end; border-radius: 4px; background: rgba(255,255,255,.28); overflow: hidden; }
.hour-cell i { display: block; width: 100%; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, rgba(244,63,158,.85), rgba(139,92,246,.8)); min-height: 0; }
.hour-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 9px; color: var(--muted-2); }

.attention-list { display: grid; gap: 8px; }
.attention-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.4); }
.attention-item .icon-box { width: 30px; height: 30px; border-radius: 10px; background: var(--red-soft); color: #be123c; display: grid; place-items: center; flex: none; }
.attention-item .icon-box.warn { background: var(--amber-soft); color: #b45309; }
.attention-item .icon-box svg { width: 14px; height: 14px; }
.attention-item .grow { display: grid; gap: 2px; }
.attention-item strong { font-size: 11.8px; }
.attention-item span { font-size: 10.5px; color: var(--muted); line-height: 1.4; }
.empty-inline { padding: 18px; text-align: center; color: var(--muted); font-size: 11.5px; border: 1px dashed rgba(46,42,85,.12); border-radius: 14px; background: rgba(255,255,255,.25); }

.account-pulse { display: grid; gap: 9px; }
.pulse-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 13px; background: rgba(255,255,255,.34); transition: background .16s; }
.pulse-row:hover { background: rgba(255,255,255,.58); }
.pulse-row .grow { display: grid; gap: 1px; min-width: 0; }
.pulse-row strong { font-size: 11.8px; }
.pulse-row small { font-size: 9.8px; color: var(--muted); }
.mini-strip { display: flex; gap: 2px; width: 96px; flex: none; }
.mini-strip i { flex: 1; height: 18px; border-radius: 3px; background: rgba(46,42,85,.07); }
.mini-strip i.on { background: rgba(139,92,246,.6); }
.mini-strip i.post { background: var(--accent-pink); }
.pulse-meta { width: 60px; text-align: right; flex: none; }
.pulse-meta strong { font-size: 12px; }
.pulse-meta small { font-size: 9px; color: var(--muted); display: block; }

.timeline { display: grid; gap: 0; }
.timeline-item { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-rail { display: flex; flex-direction: column; align-items: center; flex: none; width: 16px; }
.timeline-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--violet); margin-top: 4px; box-shadow: 0 0 0 4px rgba(139,92,246,.1); }
.timeline-item.warn .timeline-dot { background: var(--amber); box-shadow: 0 0 0 4px rgba(245,158,11,.12); }
.timeline-item.error .timeline-dot { background: var(--red); box-shadow: 0 0 0 4px rgba(239,71,111,.1); }
.timeline-line { width: 1px; flex: 1; background: rgba(46,42,85,.08); margin-top: 4px; }
.timeline-body { display: grid; gap: 2px; padding-bottom: 2px; min-width: 0; }
.timeline-body strong { font-size: 11.5px; font-weight: 600; line-height: 1.45; }
.timeline-body span { font-size: 9.8px; color: var(--muted-2); }
.timeline-body .badge { margin-left: 5px; }

/* ── accounts ── */
.mini-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mini-metric { padding: 12px 14px; border-radius: 15px; background: rgba(255,255,255,.36); }
.mini-metric strong { display: block; font-size: 19px; letter-spacing: -.04em; }
.mini-metric span { font-size: 10px; color: var(--muted); }
.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.account-card { padding: 18px; display: grid; gap: 14px; position: relative; overflow: hidden; }
.account-card::after { content: ""; position: absolute; width: 120px; height: 120px; right: -60px; top: -60px; border-radius: 50%; background: radial-gradient(circle, rgba(244,63,158,.12), transparent 70%); pointer-events: none; }
.account-head { display: flex; align-items: center; gap: 11px; position: relative; z-index: 1; }
.account-id { display: grid; gap: 2px; min-width: 0; }
.account-id strong { font-size: 14px; letter-spacing: -.02em; }
.account-id span { font-size: 11px; color: var(--muted); }
.account-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.account-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.account-stat { padding: 9px 10px; border-radius: 12px; background: rgba(255,255,255,.33); }
.account-stat strong { display: block; font-size: 15px; letter-spacing: -.03em; }
.account-stat span { font-size: 9.5px; color: var(--muted); }
.account-actions { display: flex; gap: 6px; align-items: center; }
.account-actions .btn { flex: 1; }
.health-bar { height: 5px; border-radius: 5px; background: rgba(46,42,85,.08); overflow: hidden; }
.health-bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg,#14b8a6,#8b5cf6); }
.health-bar.warn i { background: linear-gradient(90deg,#f59e0b,#f43f9e); }
.health-bar.bad i { background: var(--red); }

/* ── plans ── */
.plan-card { padding: 20px; display: grid; gap: 16px; }
.plan-head { display: flex; align-items: flex-start; gap: 11px; }
.plan-head .grow { display: grid; gap: 3px; }
.plan-head strong { font-size: 14px; }
.plan-head small { font-size: 10.5px; color: var(--muted); }
.plan-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.plan-timeline { position: relative; height: 38px; border-radius: 10px; background: rgba(255,255,255,.32); overflow: hidden; }
.plan-session { position: absolute; top: 8px; bottom: 8px; border-radius: 5px; min-width: 3px; opacity: .85; }
.plan-session.post { background: linear-gradient(90deg,#f43f9e,#c026d3); }
.plan-session.interaksi { background: linear-gradient(90deg,#8b5cf6,#6366f1); }
.plan-session.cek { background: linear-gradient(90deg,#14b8a6,#0ea5e9); }
.plan-session.done { opacity: .35; }
.plan-now { position: absolute; top: 2px; bottom: 2px; width: 2px; background: var(--red); box-shadow: 0 0 0 2px rgba(239,71,111,.16); border-radius: 2px; z-index: 2; }
.plan-scale { display: flex; justify-content: space-between; font-size: 8.5px; color: var(--muted-2); margin-top: 4px; }
.plan-legend { display: flex; gap: 12px; font-size: 9.5px; color: var(--muted); flex-wrap: wrap; }
.plan-legend span { display: flex; align-items: center; gap: 4px; }
.plan-legend i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.progress-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px,1fr)); gap: 10px; }
.progress-item { display: grid; gap: 6px; padding: 10px 11px; border-radius: 12px; background: rgba(255,255,255,.32); }
.progress-top { display: flex; justify-content: space-between; gap: 6px; font-size: 10px; color: var(--muted); }
.progress-top strong { font-size: 10.5px; color: var(--indigo); }
.progress-track { height: 5px; border-radius: 5px; background: rgba(46,42,85,.08); overflow: hidden; }
.progress-track i { display: block; height: 100%; border-radius: 5px; background: var(--accent); transition: width .4s ease; }
.progress-track i.full { background: linear-gradient(90deg,#14b8a6,#0d9488); }
.plan-sessions { display: flex; flex-wrap: wrap; gap: 5px; }
.session-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 9px; background: rgba(255,255,255,.4); font-size: 9.8px; color: var(--muted); box-shadow: inset 0 0 0 1px rgba(46,42,85,.06); }
.session-chip i { width: 6px; height: 6px; border-radius: 50%; }
.session-chip.post i { background: var(--accent-pink); }
.session-chip.interaksi i { background: var(--violet); }
.session-chip.cek i { background: var(--green); }
.session-chip.done { opacity: .45; text-decoration: line-through; }

/* ── tables ── */
.table-card { padding: 0; overflow: hidden; }
.table-toolbar { display: flex; align-items: center; gap: 9px; padding: 16px 18px; flex-wrap: wrap; border-bottom: 1px solid rgba(46,42,85,.07); }
.table-toolbar .grow { min-width: 150px; }
.table-toolbar > select { width: auto; flex: 1 1 132px; min-width: 120px; }
.table-toolbar > .field { flex: 2 1 220px; }
.table-toolbar > .btn { flex: 0 0 auto; }
.table-toolbar input, .table-toolbar select { padding: 8px 11px; font-size: 12px; border-radius: 11px; }
.table-toolbar select { padding-right: 30px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); font-weight: 750; padding: 11px 14px; background: rgba(255,255,255,.22); border-bottom: 1px solid rgba(46,42,85,.06); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid rgba(46,42,85,.055); vertical-align: top; line-height: 1.5; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,255,255,.26); }
td .row { gap: 7px; }
.cell-main { font-weight: 600; color: var(--indigo); }
.cell-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }
.cell-text { max-width: 420px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cell-target { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.table-empty { padding: 46px 20px; text-align: center; color: var(--muted); font-size: 12px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; font-size: 11px; color: var(--muted); }
.pager { display: flex; gap: 6px; }

/* ── posts & media ── */
.tabs { display: inline-flex; padding: 4px; border-radius: 13px; background: rgba(255,255,255,.38); box-shadow: inset 0 0 0 1px rgba(46,42,85,.06); }
.tab { border: 0; background: transparent; padding: 7px 13px; border-radius: 10px; font-size: 11.5px; font-weight: 650; color: var(--muted); }
.tab.active { background: rgba(255,255,255,.85); color: var(--indigo); box-shadow: 0 4px 12px -8px rgba(46,42,85,.4); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px,1fr)); gap: 14px; }
.post-card { padding: 17px; display: grid; gap: 12px; }
.post-head { display: flex; align-items: center; gap: 9px; }
.post-head .grow { display: grid; gap: 1px; }
.post-head strong { font-size: 11.8px; }
.post-head small { font-size: 9.8px; color: var(--muted); }
.post-text { font-size: 12.5px; line-height: 1.62; white-space: pre-wrap; word-break: break-word; }
.post-text a { color: var(--violet); }
.post-media { display: grid; grid-template-columns: repeat(2,1fr); gap: 5px; border-radius: 13px; overflow: hidden; }
.post-media img, .post-media video { width: 100%; height: 150px; object-fit: cover; background: rgba(46,42,85,.06); display: block; }
.post-media.single { grid-template-columns: 1fr; }
.post-media.single img, .post-media.single video { height: 210px; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 2px; }
.post-metrics { display: flex; gap: 11px; font-size: 10px; color: var(--muted); }
.post-metrics span { display: flex; align-items: center; gap: 4px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 12px; }
.media-card { padding: 9px; display: grid; gap: 8px; }
.media-thumb { position: relative; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; background: rgba(46,42,85,.06); }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-thumb .badge { position: absolute; top: 7px; left: 7px; }
.media-meta { display: flex; align-items: center; gap: 7px; }
.media-meta .grow { display: grid; gap: 1px; min-width: 0; }
.media-meta strong { font-size: 10.8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-meta small { font-size: 9.3px; color: var(--muted); }
.upload-zone { display: grid; place-items: center; gap: 8px; padding: 30px 18px; border-radius: 16px; border: 1.5px dashed rgba(139,92,246,.3); background: rgba(255,255,255,.25); text-align: center; cursor: pointer; transition: background .16s, border .16s; }
.upload-zone:hover, .upload-zone.drag { background: rgba(255,255,255,.45); border-color: rgba(139,92,246,.6); }
.upload-zone svg { width: 26px; height: 26px; color: var(--violet); opacity: .75; }
.upload-zone strong { font-size: 12px; }
.upload-zone span { font-size: 10.5px; color: var(--muted); }
.compose-count { font-size: 11px; color: var(--muted); text-align: right; }
.compose-count.over { color: var(--red); font-weight: 700; }
.compose-preview { display: flex; flex-wrap: wrap; gap: 7px; }
.compose-preview .chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; background: rgba(255,255,255,.55); font-size: 10.5px; }
.compose-preview .chip button { border: 0; background: transparent; padding: 0; color: var(--red); }

/* ── DM ── */
.dm-layout { display: grid; grid-template-columns: 330px 1fr; gap: 14px; min-height: 580px; }
.dm-side { display: flex; flex-direction: column; padding: 14px; gap: 10px; min-height: 0; }
.dm-account-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.dm-account-tab { border: 0; background: rgba(255,255,255,.35); padding: 6px 10px; border-radius: 9px; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.dm-account-tab.active { background: var(--accent); color: #fff; }
.dm-search { padding: 8px 11px; font-size: 11.5px; border-radius: 10px; }
.conv-list { display: grid; gap: 3px; overflow-y: auto; flex: 1; min-height: 0; padding-right: 2px; align-content: start; }
.conv-item { display: flex; align-items: center; gap: 9px; padding: 9px; border-radius: 12px; border: 0; background: transparent; text-align: left; width: 100%; }
.conv-item:hover { background: rgba(255,255,255,.4); }
.conv-item.active { background: rgba(255,255,255,.68); box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.conv-body { display: grid; gap: 1px; min-width: 0; flex: 1; }
.conv-body strong { font-size: 11.3px; display: flex; align-items: center; gap: 5px; }
.conv-body span { font-size: 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-time { font-size: 8.5px; color: var(--muted-2); align-self: flex-start; margin-top: 3px; }
.dm-main { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.dm-main-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid rgba(46,42,85,.07); background: rgba(255,255,255,.2); }
.dm-main-head .grow { display: grid; gap: 1px; }
.dm-main-head strong { font-size: 12.5px; }
.dm-main-head small { font-size: 10px; color: var(--muted); }
.thread { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; min-height: 300px; max-height: 500px; }
.bubble { max-width: min(76%, 520px); padding: 9px 12px; border-radius: 14px; font-size: 11.8px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.bubble.in { align-self: flex-start; background: rgba(255,255,255,.75); border-bottom-left-radius: 5px; box-shadow: 0 6px 16px -14px rgba(46,42,85,.6); }
.bubble.out { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; box-shadow: 0 8px 18px -14px rgba(244,63,158,.8); }
.bubble-meta { font-size: 8.5px; opacity: .65; margin-top: 3px; display: block; }
.dm-composer { display: flex; align-items: flex-end; gap: 8px; padding: 13px 15px; border-top: 1px solid rgba(46,42,85,.07); background: rgba(255,255,255,.2); }
.dm-composer textarea { min-height: 42px; max-height: 120px; padding: 10px 12px; border-radius: 12px; resize: none; font-size: 12px; }
.dm-composer .btn { height: 42px; }
.dm-empty { display: grid; place-content: center; place-items: center; gap: 8px; flex: 1; text-align: center; color: var(--muted); font-size: 12px; padding: 40px; }
.dm-empty svg { width: 34px; height: 34px; opacity: .35; }

/* ── clusters ── */
.cluster-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px,1fr)); gap: 16px; }
.cluster-card { padding: 20px; display: grid; gap: 14px; }
.cluster-head { display: flex; align-items: flex-start; gap: 10px; }
.cluster-head .grow { display: grid; gap: 3px; }
.cluster-head strong { font-size: 15px; letter-spacing: -.02em; }
.cluster-head p { font-size: 11px; color: var(--muted); line-height: 1.55; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.topic-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 8px; background: rgba(255,255,255,.42); font-size: 10.5px; color: var(--indigo-soft); box-shadow: inset 0 0 0 1px rgba(46,42,85,.055); }
.topic-chip.recent { background: rgba(245,158,11,.13); color: #92620a; }
.topic-chip button { border: 0; background: transparent; padding: 0; width: 14px; height: 14px; border-radius: 4px; color: var(--muted-2); font-size: 12px; line-height: 1; }
.topic-chip button:hover { color: var(--red); background: rgba(239,71,111,.1); }
.topic-add { display: flex; gap: 6px; }
.topic-add input { padding: 8px 10px; font-size: 11.5px; border-radius: 10px; }
.topic-add .btn { padding: 8px 11px; }

/* ── proxies ── */
.coverage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px,1fr)); gap: 12px; margin-bottom: 16px; }
.coverage { padding: 16px; }
.coverage strong { font-size: 24px; letter-spacing: -.04em; display: block; }
.coverage span { font-size: 10.5px; color: var(--muted); }
.proxy-list { display: grid; gap: 10px; }
.proxy-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.proxy-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(139,92,246,.12); color: var(--violet); flex: none; }
.proxy-icon svg { width: 16px; height: 16px; }
.proxy-item .grow { display: grid; gap: 2px; min-width: 0; }
.proxy-item strong { font-size: 12.5px; }
.proxy-item small { font-size: 10.3px; color: var(--muted); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── settings ── */
.settings-layout { display: grid; grid-template-columns: 232px 1fr; gap: 16px; align-items: start; }
.settings-nav { padding: 10px; display: grid; gap: 2px; position: sticky; top: 86px; }
.settings-nav button { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; border-radius: 10px; padding: 9px 11px; font-size: 11.8px; font-weight: 600; color: var(--muted); text-align: left; }
.settings-nav button svg { width: 15px; height: 15px; opacity: .7; }
.settings-nav button:hover { background: rgba(255,255,255,.36); color: var(--indigo); }
.settings-nav button.active { background: rgba(255,255,255,.72); color: var(--indigo); box-shadow: var(--shadow-soft); }
.settings-nav button.active svg { color: var(--violet); opacity: 1; }
.settings-panel { display: grid; gap: 16px; }
.settings-card { padding: 22px; display: grid; gap: 18px; }
.settings-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.settings-card-head h3 { font-size: 15px; letter-spacing: -.02em; }
.settings-card-head p { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.55; max-width: 560px; }
.settings-actions { display: flex; align-items: center; gap: 8px; }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(46,42,85,.06); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .grow { display: grid; gap: 2px; }
.switch-row strong { font-size: 12px; }
.switch-row span { font-size: 10.5px; color: var(--muted); line-height: 1.45; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: rgba(46,42,85,.15); transition: background .18s; }
.switch i::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform .18s; box-shadow: 0 1px 4px rgba(46,42,85,.25); }
.switch input:checked + i { background: linear-gradient(135deg,#f43f9e,#8b5cf6); }
.switch input:checked + i::after { transform: translateX(18px); }
.form-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.runtime-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 10px; }
.runtime-item { padding: 11px 13px; border-radius: 12px; background: rgba(255,255,255,.34); }
.runtime-item span { display: block; font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.runtime-item strong { display: block; font-size: 11.5px; margin-top: 3px; word-break: break-all; }
.procedure { display: grid; gap: 8px; counter-reset: step; }
.procedure div { display: flex; gap: 9px; font-size: 11.5px; line-height: 1.5; color: var(--indigo-soft); }
.procedure div::before { counter-increment: step; content: counter(step); width: 18px; height: 18px; border-radius: 6px; flex: none; display: grid; place-items: center; background: rgba(139,92,246,.12); color: var(--violet); font-size: 9.5px; font-weight: 750; }
.danger-zone { border-color: rgba(239,71,111,.25); background: linear-gradient(135deg, rgba(255,255,255,.5), rgba(255,238,244,.5)); }
.danger-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 13px; background: rgba(255,255,255,.36); }
.danger-row .grow { display: grid; gap: 2px; }
.danger-row strong { font-size: 12px; }
.danger-row span { font-size: 10.5px; color: var(--muted); }

/* ── modal ── */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 22px; background: rgba(46,42,85,.24); backdrop-filter: blur(6px); animation: fadeIn .16s ease; overflow-y: auto; }
.modal { width: min(640px, 100%); max-height: min(88dvh, 900px); display: flex; flex-direction: column; background: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.82); border-radius: 26px; box-shadow: 0 40px 90px -36px rgba(46,42,85,.6); backdrop-filter: blur(26px) saturate(150%); overflow: hidden; animation: modalIn .2s cubic-bezier(.2,.8,.2,1); }
.modal.wide { width: min(920px, 100%); }
.modal.xwide { width: min(1080px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 15px; border-bottom: 1px solid rgba(46,42,85,.07); }
.modal-head .grow { display: grid; gap: 3px; }
.modal-head h2 { font-size: 17px; letter-spacing: -.03em; }
.modal-head p { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.modal-body { padding: 20px 22px; overflow-y: auto; display: grid; gap: 16px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 22px 18px; border-top: 1px solid rgba(46,42,85,.07); background: rgba(255,255,255,.22); }
.modal-foot .left { margin-right: auto; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.detail-hero { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, rgba(255,255,255,.5), rgba(255,255,255,.24)); }
.detail-hero .grow { display: grid; gap: 3px; min-width: 0; }
.detail-hero h3 { font-size: 18px; letter-spacing: -.03em; }
.detail-hero p { font-size: 11.5px; color: var(--muted); }
.detail-section { display: grid; gap: 10px; }
.detail-section h4 { font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); display: flex; align-items: center; gap: 7px; }
.detail-section h4::after { content: ""; flex: 1; height: 1px; background: rgba(46,42,85,.07); }
.detail-kv { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.detail-kv > div { padding: 9px 11px; border-radius: 11px; background: rgba(255,255,255,.35); display: grid; gap: 2px; }
.detail-kv span { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.detail-kv strong { font-size: 11.5px; word-break: break-word; }
.chip-row { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 8px; background: rgba(139,92,246,.1); color: #6d28d9; font-size: 10px; font-weight: 600; }
.detail-tabs { display: flex; gap: 5px; padding: 4px; border-radius: 11px; background: rgba(255,255,255,.32); }
.detail-tabs button { flex: 1; border: 0; background: transparent; padding: 6px 8px; border-radius: 8px; font-size: 10.5px; font-weight: 650; color: var(--muted); }
.detail-tabs button.active { background: rgba(255,255,255,.8); color: var(--indigo); }
.mini-list { display: grid; gap: 6px; }
.mini-list-item { display: flex; gap: 8px; align-items: flex-start; padding: 7px 9px; border-radius: 9px; background: rgba(255,255,255,.28); font-size: 10.5px; line-height: 1.45; }
.mini-list-item strong { font-size: 10.5px; }
.mini-list-item span { color: var(--muted); }

/* ── toast ── */
.toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: grid; gap: 8px; width: min(360px, calc(100vw - 30px)); }
.toast { display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.9); box-shadow: 0 20px 40px -22px rgba(46,42,85,.55); backdrop-filter: blur(18px); animation: toastIn .24s cubic-bezier(.2,.8,.2,1); font-size: 11.8px; line-height: 1.5; }
.toast .toast-icon { width: 20px; height: 20px; border-radius: 7px; display: grid; place-items: center; flex: none; background: var(--green-soft); color: #0f766e; }
.toast .toast-icon.error { background: var(--red-soft); color: #be123c; }
.toast .toast-icon.warn { background: var(--amber-soft); color: #b45309; }
.toast .toast-icon svg { width: 12px; height: 12px; }
.toast strong { display: block; font-size: 11.8px; }
.toast span { color: var(--muted); font-size: 10.8px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── skeleton / empty ── */
.skeleton { border-radius: 10px; background: linear-gradient(90deg, rgba(255,255,255,.22), rgba(255,255,255,.5), rgba(255,255,255,.22)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-state { display: grid; place-items: center; gap: 9px; padding: 50px 20px; text-align: center; }
.empty-orb { width: 66px; height: 66px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(244,63,158,.14), rgba(139,92,246,.14)); color: var(--violet); }
.empty-orb svg { width: 27px; height: 27px; }
.empty-state h3 { font-size: 14px; letter-spacing: -.02em; }
.empty-state p { font-size: 11.5px; color: var(--muted); line-height: 1.55; max-width: 360px; }

/* ── misc ── */
.code-block { font-family: var(--mono); font-size: 10.5px; line-height: 1.6; background: rgba(46,42,85,.05); border-radius: 11px; padding: 12px; overflow-x: auto; white-space: pre; }
.stat-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.stat-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.4); font-size: 10.2px; color: var(--muted); }
.stat-pill strong { color: var(--indigo); font-size: 10.5px; }
.scroll-thin { scrollbar-width: thin; scrollbar-color: rgba(46,42,85,.18) transparent; }
.scroll-thin::-webkit-scrollbar { width: 6px; height: 6px; }
.scroll-thin::-webkit-scrollbar-thumb { background: rgba(46,42,85,.16); border-radius: 6px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── responsive ── */
@media (max-width: 1200px) {
  .dash-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; flex-wrap: wrap; }
}
@media (max-width: 980px) {
  :root { --sidebar: 250px; }
  .main { margin-left: 0; }
  .sidebar { transform: translateX(-105%); transition: transform .24s cubic-bezier(.2,.8,.2,1); width: 276px; box-shadow: 20px 0 60px -30px rgba(46,42,85,.5); }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 25; background: rgba(46,42,85,.2); backdrop-filter: blur(3px); }
  .mobile-menu { display: inline-flex; }
  .content { padding: 22px 18px 30px; }
  .topbar { padding: 10px 18px; }
  .content-foot { padding: 0 18px 18px; }
  .dm-layout { grid-template-columns: 280px 1fr; }
  .cluster-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .hero { flex-direction: column; align-items: flex-start; }
  .hero-side { width: 100%; justify-content: space-between; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mini-metrics { grid-template-columns: repeat(2,1fr); }
  .dm-layout { grid-template-columns: 1fr; min-height: 0; }
  .dm-side { min-height: 230px; }
  .dm-main { min-height: 440px; }
  .thread { max-height: 340px; }
  .form-grid, .form-split, .detail-kv { grid-template-columns: 1fr; }
  .topbar-right .clock { display: none; }
  .topbar-right .badge-mock { display: none; }
  .btn-kill span:last-child { display: none; }
  .btn-kill { padding: 9px; }
  .page-head h1 { font-size: 23px; }
  .page-head { margin-bottom: 16px; }
  .content { padding: 18px 14px 26px; }
  .content-foot { flex-direction: column; gap: 3px; }
  .post-grid { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 10px; align-items: end; }
  .modal { max-height: 92dvh; border-radius: 22px; }
  .modal-body { padding: 16px; }
  .modal-head { padding: 16px 16px 12px; }
  .modal-foot { padding: 12px 16px 15px; }
  .table-toolbar { padding: 12px; }
  .table-toolbar .grow { min-width: 100%; }
  .table-toolbar > select { flex: 1 1 100%; width: 100%; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .hero-side { flex-direction: column; align-items: flex-start; }
  .account-grid { grid-template-columns: 1fr; }
  .mini-metrics { grid-template-columns: 1fr 1fr; }
  .detail-hero { flex-wrap: wrap; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
}
