:root {
  color-scheme: dark;
  --page: #06101f;
  --page-deep: #030a14;
  --card: #0c1a2c;
  --card-raised: #10243b;
  --nested: #081728;
  --glass: rgba(10, 29, 50, .78);
  --text: #f5f9ff;
  --text-soft: #cbd8e8;
  --muted: #8497ad;
  --border: rgba(118, 173, 226, .16);
  --border-strong: rgba(74, 169, 255, .32);
  --accent: #1688ff;
  --accent-bright: #5ac8ff;
  --accent-cyan: #19d1e5;
  --accent-soft: rgba(22, 136, 255, .13);
  --success: #2dd9a0;
  --success-deep: #0ab783;
  --warning: #f5bd55;
  --danger: #ff6578;
  --danger-deep: #df435a;
  --shadow-card: 0 18px 48px rgba(0, 4, 14, .24);
  --shadow-float: 0 24px 70px rgba(0, 5, 18, .42);
  --shadow-glow: 0 12px 36px rgba(22, 136, 255, .22);
  --radius-sm: 12px;
  --radius-md: 17px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --space-6: 32px;
  --speed: 190ms;
  --safe-top: max(12px, env(safe-area-inset-top));
  --safe-bottom: max(10px, env(safe-area-inset-bottom));
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #edf5fd;
  --page-deep: #e3eef9;
  --card: #ffffff;
  --card-raised: #f6faff;
  --nested: #edf5fc;
  --glass: rgba(255, 255, 255, .88);
  --text: #10233b;
  --text-soft: #324c68;
  --muted: #687f98;
  --border: rgba(33, 95, 150, .14);
  --border-strong: rgba(22, 136, 255, .28);
  --accent-soft: rgba(22, 136, 255, .10);
  --shadow-card: 0 16px 38px rgba(21, 70, 112, .10);
  --shadow-float: 0 22px 54px rgba(18, 62, 102, .18);
  --shadow-glow: 0 10px 28px rgba(22, 136, 255, .16);
}

* { box-sizing: border-box; }
html { width: 100%; min-height: 100%; background: var(--page); }
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: clip;
  color: var(--text);
  background:
    linear-gradient(rgba(77, 157, 231, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 157, 231, .025) 1px, transparent 1px),
    linear-gradient(155deg, var(--page) 0%, var(--page-deep) 78%);
  background-size: 38px 38px, 38px 38px, 100% 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button, a, label { touch-action: manipulation; }
svg {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: .12;
}
.ambient-one { top: -210px; right: -100px; background: var(--accent); }
.ambient-two { bottom: 10%; left: -250px; background: var(--accent-cyan); opacity: .07; }

.dev-banner {
  position: sticky;
  z-index: 80;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 14px;
  color: #dcefff;
  background: #0c4f88;
  border-bottom: 1px solid rgba(106, 195, 255, .26);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .035em;
}
.dev-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-cyan); box-shadow: 0 0 12px var(--accent-cyan); }

.app-shell {
  min-height: 100vh;
  padding-bottom: calc(92px + var(--safe-bottom));
}

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  padding: var(--safe-top) 14px 10px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--page) 96%, transparent) 60%, transparent);
}
body:has(.dev-banner) .topbar { top: 28px; }
.topbar-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand refresh" "statuses statuses";
  align-items: center;
  gap: 9px 12px;
  width: min(100%, 980px);
  margin: auto;
}
.brand { grid-area: brand; display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(130, 212, 255, .28);
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, #29a6ff 0%, #0873e6 55%, #0759b5 100%);
  box-shadow: 0 11px 28px rgba(0, 113, 233, .28), inset 0 1px rgba(255,255,255,.24);
}
.brand-mark svg { width: 26px; height: 26px; stroke-width: 1.75; }
.brand-mark.large { width: 58px; height: 58px; border-radius: 20px; }
.brand-mark.large svg { width: 32px; height: 32px; }
.brand-copy { min-width: 0; }
.brand-name { margin: 0; color: var(--accent-bright); font-size: 11px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.brand-copy h1 {
  max-width: 100%;
  margin: 3px 0 0;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-statuses { grid-area: statuses; display: flex; gap: 7px; min-width: 0; overflow: hidden; }
.status-pill, .info-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  min-width: 0;
  padding: 6px 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  font-size: 11px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pill-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px color-mix(in srgb, var(--accent) 80%, transparent); }
.monitor-pill.is-running { color: var(--success); border-color: color-mix(in srgb, var(--success) 30%, transparent); background: color-mix(in srgb, var(--success) 8%, var(--card)); }
.monitor-pill.is-running .pill-dot { background: var(--success); box-shadow: 0 0 10px var(--success); animation: status-breathe 2.2s ease-in-out infinite; }
.monitor-pill.is-checking { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 32%, transparent); }
.monitor-pill.is-checking .pill-dot { background: var(--warning); animation: status-breathe 1s ease-in-out infinite; }
.monitor-pill.is-stopped .pill-dot { background: #6f8195; box-shadow: none; }
.access-pill.is-admin { color: var(--accent-bright); border-color: var(--border-strong); }
.access-pill.is-unlimited { color: var(--accent-cyan); border-color: color-mix(in srgb, var(--accent-cyan) 30%, transparent); }
@keyframes status-breathe { 50% { opacity: .45; transform: scale(.72); } }

.icon-button {
  grid-area: refresh;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-soft);
  background: color-mix(in srgb, var(--card) 90%, transparent);
  box-shadow: 0 8px 24px rgba(0, 5, 16, .12);
  cursor: pointer;
  transition: color var(--speed), border-color var(--speed), transform var(--speed), background var(--speed);
}
.icon-button:hover { color: var(--accent-bright); border-color: var(--border-strong); }
.icon-button:active { transform: scale(.94); }
.icon-button-small { width: 44px; height: 44px; min-height: 44px; font-size: 24px; }

.content {
  width: min(100%, 840px);
  margin: 0 auto;
  padding: 0 13px 24px;
}
.page { display: none; }
.page.active { display: block; animation: page-enter 210ms ease-out both; }
@keyframes page-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.eyebrow {
  margin: 0;
  color: var(--accent-bright);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 2px 13px;
}
.page-heading h2 { margin: 5px 0 0; font-size: clamp(27px, 8vw, 34px); line-height: 1.05; letter-spacing: -.045em; }
.page-heading p:not(.eyebrow) { max-width: 48ch; margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.section-heading, .setting-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.section-heading h3, .setting-card-head h3 { margin: 4px 0 0; font-size: 17px; line-height: 1.25; letter-spacing: -.025em; }

.monitor-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  min-height: 245px;
  padding: 23px;
  overflow: hidden;
  border: 1px solid rgba(78, 174, 255, .28);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 88% 15%, rgba(66, 197, 255, .23), transparent 30%),
    linear-gradient(145deg, #0c4d92 0%, #082c58 44%, #0a1c34 100%);
  box-shadow: 0 22px 65px rgba(0, 31, 71, .38), inset 0 1px rgba(255,255,255,.09);
}
:root[data-theme="light"] .monitor-hero { color: #f7fbff; }
.monitor-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}
.hero-copy { position: relative; z-index: 1; min-width: 0; }
.hero-kicker { display: flex; align-items: center; gap: 8px; color: #9bd8ff; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #8191a4; }
.monitor-hero.is-running .live-dot { background: var(--success); box-shadow: 0 0 12px var(--success); animation: status-breathe 2.2s infinite; }
.monitor-hero.is-checking .live-dot { background: var(--warning); box-shadow: 0 0 12px var(--warning); animation: status-breathe 1s infinite; }
.hero-copy h2 { max-width: 480px; margin: 13px 0 7px; color: #fff; font-size: clamp(27px, 8vw, 38px); line-height: 1.04; letter-spacing: -.045em; }
.hero-copy > p { max-width: 44ch; margin: 0; color: #b9cce0; font-size: 13px; line-height: 1.5; }
.next-check { display: flex; align-items: center; gap: 7px; margin-top: 16px; color: #9cb4cb; font-size: 11px; }
.next-check svg { width: 16px; height: 16px; }
.next-check strong { color: #e8f5ff; font-weight: 800; }
.status-orb {
  position: relative;
  z-index: 1;
  align-self: start;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-top: 16px;
  border: 1px solid rgba(173, 215, 246, .24);
  border-radius: 50%;
  background: rgba(7, 25, 45, .48);
}
.status-orb span, .status-orb i, .status-orb b { position: absolute; border-radius: 50%; }
.status-orb span { width: 15px; height: 15px; background: #708197; box-shadow: 0 0 15px rgba(112,129,151,.5); }
.status-orb i { width: 34px; height: 34px; border: 1px solid rgba(147,190,225,.26); }
.status-orb b { width: 52px; height: 52px; border: 1px solid rgba(147,190,225,.14); }
.status-orb.running span { background: var(--success); box-shadow: 0 0 18px var(--success); }
.status-orb.running i { border-color: rgba(45,217,160,.36); animation: radar-pulse 2.2s ease-out infinite; }
.status-orb.checking span { background: var(--warning); box-shadow: 0 0 18px var(--warning); }
.status-orb.checking i { border-color: rgba(245,189,85,.5); animation: radar-pulse 1s ease-out infinite; }
@keyframes radar-pulse { 0% { transform: scale(.55); opacity: 1; } 100% { transform: scale(1.45); opacity: 0; } }
.hero-actions {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 8px;
  align-self: end;
}

.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.metric-card {
  position: relative;
  min-width: 0;
  min-height: 132px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(150deg, var(--card-raised), var(--card));
  box-shadow: var(--shadow-card);
  transition: transform var(--speed), border-color var(--speed);
}
.metric-card:active { transform: scale(.985); }
.metric-card::after {
  content: "";
  position: absolute;
  width: 76px;
  height: 76px;
  right: -40px;
  bottom: -45px;
  border-radius: 50%;
  background: var(--accent);
  filter: blur(27px);
  opacity: .12;
}
.metric-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 13px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  color: var(--accent-bright);
  background: var(--accent-soft);
}
.metric-icon svg { width: 18px; height: 18px; }
.metric-card > span { display: block; color: var(--muted); font-size: 11px; line-height: 1.25; }
.metric-card > strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 21px;
  line-height: 1.08;
  letter-spacing: -.025em;
}
.metric-card > small { display: block; margin-top: 5px; color: color-mix(in srgb, var(--muted) 82%, transparent); font-size: 9.5px; line-height: 1.3; }
.metric-blue { border-color: rgba(49, 155, 255, .28); }
.metric-cyan { border-color: rgba(25, 209, 229, .22); }
.metric-cyan .metric-icon { color: var(--accent-cyan); border-color: rgba(25, 209, 229, .25); background: rgba(25, 209, 229, .08); }

.card, .wizard-card {
  margin: 12px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, var(--card-raised), var(--card));
  box-shadow: var(--shadow-card);
}
.filter-summary { position: relative; overflow: hidden; }
.score-badge, .score-output {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(60, 172, 255, .3);
  border-radius: 14px;
  color: #bce6ff;
  background: linear-gradient(145deg, rgba(22,136,255,.22), rgba(25,209,229,.09));
  box-shadow: inset 0 1px rgba(255,255,255,.07);
  font-size: 16px;
  font-weight: 900;
}
:root[data-theme="light"] .score-badge, :root[data-theme="light"] .score-output { color: #0869c7; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 16px; overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: var(--border); }
.summary-item { min-width: 0; padding: 12px; background: var(--nested); }
.summary-item span { display: block; color: var(--muted); font-size: 10px; }
.summary-item strong { display: block; margin-top: 5px; overflow-wrap: anywhere; font-size: 13px; }
.text-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 8px 2px 0;
  border: 0;
  color: var(--accent-bright);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  min-width: 0;
  padding: 11px 15px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text);
  font-weight: 820;
  font-size: 13px;
  line-height: 1.1;
  cursor: pointer;
  transition: transform 150ms, border-color var(--speed), background var(--speed), box-shadow var(--speed), opacity var(--speed);
}
.button svg { flex: 0 0 auto; width: 18px; height: 18px; }
.button:active { transform: scale(.975); }
.button:focus-visible, .icon-button:focus-visible, .nav-item:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent-bright) 30%, transparent); outline-offset: 2px; }
.button:disabled { opacity: .56; cursor: wait; }
.button.is-busy .button-label, .button.is-busy > span:not(.button-spinner) { opacity: .2; }
.button-spinner { position: absolute; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.button-primary { color: #fff; background: linear-gradient(135deg, #2aa6ff, #0875ed 65%, #0763cf); border-color: rgba(130,212,255,.24); box-shadow: var(--shadow-glow), inset 0 1px rgba(255,255,255,.2); }
.button-success { color: #04271d; background: linear-gradient(135deg, #52e9b5, var(--success-deep)); border-color: rgba(157,255,219,.28); box-shadow: 0 11px 30px rgba(22, 202, 142, .18), inset 0 1px rgba(255,255,255,.35); }
.button-secondary { color: var(--text); background: var(--card-raised); border-color: var(--border); }
.button-glass { color: #e7f5ff; background: rgba(8, 29, 52, .58); border-color: rgba(159,211,255,.18); backdrop-filter: blur(12px); }
.button-ghost { color: var(--accent-bright); background: transparent; border-color: var(--border-strong); }
.button-danger { color: #fff; background: linear-gradient(135deg, var(--danger), var(--danger-deep)); box-shadow: 0 10px 26px rgba(255, 70, 95, .14); }
.button-small { min-height: 44px; padding: 9px 12px; font-size: 12px; }
.button-full { width: 100%; }

.wizard-card { padding: 19px; border-color: var(--border-strong); }
.wizard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.wizard-head h3 { margin: 4px 0 0; font-size: 20px; }
.wizard-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 20px 0 23px;
  padding: 0;
  list-style: none;
}
.wizard-steps li { position: relative; display: grid; justify-items: center; gap: 5px; color: var(--muted); font-size: 9px; text-align: center; }
.wizard-steps li:not(:last-child)::after { content: ""; position: absolute; z-index: 0; top: 13px; left: calc(50% + 14px); width: calc(100% - 28px); height: 1px; background: var(--border); }
.wizard-steps li span { position: relative; z-index: 1; display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--border); border-radius: 50%; background: var(--nested); font-size: 10px; font-weight: 850; }
.wizard-steps li.is-active { color: var(--accent-bright); }
.wizard-steps li.is-active span { color: #fff; border-color: transparent; background: var(--accent); box-shadow: 0 0 18px rgba(22,136,255,.3); }
.wizard-steps li.is-complete { color: var(--success); }
.wizard-steps li.is-complete span { color: #05291e; background: var(--success); border-color: transparent; }

.settings-layout, .form-card { display: grid; gap: 12px; }
.setting-card { margin: 0; display: grid; gap: 18px; }
.setting-card-head { justify-content: flex-start; }
.setting-card-head > :last-child:not(.score-output):not(.mini-switch) { margin-left: 0; }
.setting-card-head .score-output, .setting-card-head .mini-switch { margin-left: auto; }
.setting-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  color: var(--accent-bright);
  background: var(--accent-soft);
}
.setting-icon svg { width: 21px; height: 21px; }
.field-label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 780;
}
.field-label small, .setting-explainer, .callout-note { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.45; }
input, textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: none;
  resize: vertical;
  color: var(--text);
  background: var(--nested);
  caret-color: var(--accent-bright);
  transition: border-color var(--speed), box-shadow var(--speed), opacity var(--speed);
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22,136,255,.12); }
input:disabled { opacity: .48; cursor: not-allowed; }
textarea { line-height: 1.45; }
.input-shell { position: relative; }
.input-shell > svg { position: absolute; z-index: 1; top: 14px; left: 13px; width: 19px; height: 19px; color: var(--muted); pointer-events: none; }
.input-shell input, .input-shell textarea { padding-left: 42px; }
.number-field { position: relative; }
.number-field input { padding-right: 56px; font-size: 18px; font-weight: 850; }
.number-field span { position: absolute; top: 50%; right: 13px; transform: translateY(-50%); color: var(--muted); font-size: 11px; font-weight: 800; pointer-events: none; }
.field-footer { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.quick-values { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-values button, .capability-tags span {
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--nested);
  font-size: 10px;
  font-weight: 780;
}
.quick-values button { cursor: pointer; }
.quick-values button:active { transform: scale(.95); }
.money-fields { display: grid; gap: 20px; }
.range-label { display: grid; gap: 10px; }
input[type="range"] {
  appearance: none;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, #61bfff, #1688ff 52%, #075bbd); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 24px; height: 24px; margin-top: -8px; border: 4px solid var(--card); border-radius: 50%; background: #7dd6ff; box-shadow: 0 0 0 1px var(--accent), 0 5px 14px rgba(22,136,255,.38); }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, #61bfff, #1688ff 52%, #075bbd); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border: 4px solid var(--card); border-radius: 50%; background: #7dd6ff; }
.range-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; font-style: normal; }
.range-scale i { font-style: normal; }
.setting-explainer { margin: 0; padding: 11px 12px; border-left: 2px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-soft); }
.roi-grid { display: grid; gap: 13px; transition: opacity var(--speed); }
.roi-grid.is-disabled { opacity: .48; }
.formula-card { display: grid; gap: 5px; padding: 13px; border: 1px solid var(--border); border-radius: 14px; background: var(--nested); }
.formula-card span { color: var(--muted); font-size: 10px; }
.formula-card strong { color: var(--text-soft); font-size: 11px; line-height: 1.4; }
.formula-card small { color: var(--muted); font-size: 10px; line-height: 1.4; }

.switch-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--border); }
.switch-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px !important;
  min-height: 66px;
  padding: 13px;
  background: var(--nested);
  cursor: pointer;
}
.switch-row > span { display: grid; gap: 4px; min-width: 0; }
.switch-row b { color: var(--text-soft); font-size: 12px; line-height: 1.3; }
.switch-row small { color: var(--muted); font-size: 10px; line-height: 1.4; font-weight: 500; }
.switch-row input, .mini-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.switch-row i, .mini-switch i {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 46px;
  height: 27px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 28%, var(--nested));
  transition: background var(--speed), border-color var(--speed), box-shadow var(--speed);
}
.switch-row i::after, .mini-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #f5fbff;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  transition: transform var(--speed);
}
.switch-row input:checked + i, .mini-switch input:checked + i { border-color: rgba(71,175,255,.55); background: linear-gradient(90deg, var(--accent), #27b8f5); box-shadow: 0 0 16px rgba(22,136,255,.2); }
.switch-row input:checked + i::after, .mini-switch input:checked + i::after { transform: translateX(19px); }
.danger-switch input:checked + i { border-color: rgba(255,101,120,.5); background: var(--danger); box-shadow: 0 0 16px rgba(255,101,120,.2); }
.mini-switch { display: block; cursor: pointer; }
.capability-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.capability-tags span.is-selected { color: var(--accent-bright); border-color: var(--border-strong); background: var(--accent-soft); }
.notes-field { padding-top: 2px; }
.sticky-save {
  position: sticky;
  z-index: 12;
  bottom: calc(82px + var(--safe-bottom));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 11px 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(18px);
}
.sticky-save > span { display: grid; gap: 2px; min-width: 0; }
.sticky-save b { font-size: 11px; }
.sticky-save small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sticky-save .button { min-height: 43px; }

.validation-note, .callout-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(45,217,160,.18);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(45,217,160,.055);
}
.validation-note > span { display: grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; color: #06261d; background: var(--success); font-weight: 900; }
.validation-note p { margin: 0; font-size: 10px; line-height: 1.5; }
.validation-note b { color: var(--text-soft); }
.form-actions { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8px; }

.stack-list { display: grid; gap: 10px; }
.list-card {
  position: relative;
  min-width: 0;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(150deg, var(--card-raised), var(--card));
  box-shadow: var(--shadow-card);
}
.list-card::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: var(--accent); opacity: .85; }
.list-card.is-disabled { opacity: .72; }
.list-card.is-disabled::before { background: var(--muted); opacity: .45; }
.list-card.is-error::before { background: var(--danger); }
.list-card h3 { margin: 0; overflow-wrap: anywhere; font-size: 15px; line-height: 1.3; }
.list-card .meta { display: grid; gap: 7px; margin-top: 11px; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.meta-row { display: flex; align-items: flex-start; gap: 7px; min-width: 0; }
.meta-row svg { flex: 0 0 auto; width: 14px; height: 14px; margin-top: 1px; }
.list-card .url { overflow: hidden; color: var(--accent-bright); text-overflow: ellipsis; white-space: nowrap; }
.search-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 12px; }
.search-stats span { display: grid; gap: 3px; padding: 9px; border-radius: 11px; color: var(--muted); background: var(--nested); font-size: 9px; }
.search-stats strong { color: var(--text-soft); font-size: 11px; }
.search-note { margin: 11px 0 0; padding: 10px 11px; border: 1px solid var(--border); border-radius: 11px; color: var(--text-soft); background: color-mix(in srgb, var(--nested) 85%, transparent); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.list-card-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.list-card-actions .button { flex: 1 1 120px; }
.chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--nested);
  font-size: 9.5px;
  font-weight: 800;
  white-space: nowrap;
}
.chip.running { color: var(--success); border-color: rgba(45,217,160,.25); background: rgba(45,217,160,.06); }
.chip.error { color: var(--danger); border-color: rgba(255,101,120,.28); }
.chip.admin { color: var(--accent-bright); border-color: var(--border-strong); }
.chip.unlimited { color: var(--accent-cyan); border-color: rgba(25,209,229,.27); }
.empty-state, .inline-error {
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 32px 18px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--muted);
  background: color-mix(in srgb, var(--card) 68%, transparent);
}
.state-icon { display: grid; place-items: center; width: 50px; height: 50px; border: 1px solid var(--border-strong); border-radius: 17px; color: var(--accent-bright); background: var(--accent-soft); }
.state-icon svg { width: 25px; height: 25px; }
.empty-state h3, .inline-error h3 { margin: 2px 0 0; color: var(--text); font-size: 15px; }
.empty-state p, .inline-error p { max-width: 40ch; margin: 0; font-size: 11px; line-height: 1.5; }
.empty-state .button, .inline-error .button { margin-top: 4px; }
.list-section-head { margin: 18px 2px 10px; }
.list-section-head h3 { margin: 0; font-size: 17px; }
.list-section-head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
body.compact .list-card { padding: 11px 13px; }
body.compact .list-card .meta { margin-top: 6px; }
body.compact .search-stats, body.compact .search-note { display: none; }

.progress-group { margin: 17px 0; }
.progress-copy { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 12px; }
.progress-copy span { color: var(--muted); }
.progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: var(--nested); box-shadow: inset 0 1px 3px rgba(0,0,0,.18); }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-cyan)); box-shadow: 0 0 15px rgba(22,136,255,.24); transition: width 300ms ease; }
.limits-card .callout-note { border-color: var(--border); background: var(--nested); }
.result-bars { display: grid; gap: 14px; margin-top: 18px; }
.result-bars > div { display: grid; grid-template-columns: 82px minmax(0, 1fr) 38px; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.result-bars i { height: 10px; overflow: hidden; border-radius: 99px; background: var(--nested); }
.result-bars b { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-cyan)); transition: width 350ms ease; }
.result-bars > div:nth-child(2) b { background: linear-gradient(90deg, #50789e, #7797b5); }
.result-bars strong { color: var(--text-soft); text-align: right; }
.info-badge { color: var(--accent-bright); min-height: 26px; padding: 4px 9px; }
.settings-actions { display: grid; gap: 9px; margin-top: 12px; }
.version { margin: 22px 0; color: var(--muted); text-align: center; font-size: 10px; }

.segmented-control { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 4px; border: 1px solid var(--border); border-radius: 15px; background: var(--nested); }
.segmented-control button { min-width: 0; min-height: 44px; padding: 8px 6px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 800; cursor: pointer; }
.segmented-control button.is-active { color: var(--text); background: var(--card-raised); box-shadow: 0 6px 16px rgba(0,0,0,.14); }
.segmented-control button span { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 3px; border-radius: 9px; color: var(--accent-bright); background: var(--accent-soft); font-size: 9px; }
.admin-section { display: none; }
.admin-section.is-active { display: block; animation: page-enter var(--speed) ease-out; }
.admin-user-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  color: #d9f0ff;
  background: linear-gradient(145deg, #258edb, #0b4f96);
  font-weight: 900;
}
.admin-user-copy { min-width: 0; }
.admin-user-copy h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-copy p { margin: 3px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.admin-details { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 12px; }
.admin-details div { min-width: 0; padding: 9px; border-radius: 11px; background: var(--nested); }
.admin-details span { display: block; color: var(--muted); font-size: 8.5px; }
.admin-details strong { display: block; margin-top: 3px; overflow-wrap: anywhere; font-size: 10.5px; }

.bottom-nav {
  position: fixed;
  z-index: 60;
  left: max(7px, env(safe-area-inset-left));
  right: max(7px, env(safe-area-inset-right));
  bottom: var(--safe-bottom);
  display: flex;
  gap: 2px;
  width: auto;
  max-width: 820px;
  min-height: 68px;
  margin: 0 auto;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 21px;
  background: color-mix(in srgb, var(--card) 91%, transparent);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(20px);
}
.nav-item {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  flex: 1 1 0;
  gap: 3px;
  min-width: 0;
  min-height: 56px;
  padding: 5px 1px;
  overflow: hidden;
  border: 0;
  border-radius: 15px;
  color: var(--muted);
  background: transparent;
  font-weight: 760;
  cursor: pointer;
  transition: color var(--speed), background var(--speed), transform var(--speed);
}
.nav-item svg { width: 20px; height: 20px; transition: transform var(--speed); }
.nav-item > span { display: block; max-width: 100%; font-size: clamp(9px, 2.5vw, 10.5px); line-height: 1; letter-spacing: -.025em; white-space: nowrap; }
.nav-item.active { color: #caecff; background: linear-gradient(145deg, rgba(22,136,255,.24), rgba(22,136,255,.11)); box-shadow: inset 0 0 0 1px rgba(89,186,255,.18), 0 0 18px rgba(22,136,255,.09); }
:root[data-theme="light"] .nav-item.active { color: #075eb5; }
.nav-item.active svg { transform: translateY(-1px) scale(1.08); filter: drop-shadow(0 0 8px rgba(56,175,255,.45)); }

.loading-screen, .error-screen {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: 26px;
  background:
    radial-gradient(circle at 50% 25%, rgba(22,136,255,.13), transparent 30%),
    var(--page);
}
.loading-brand { display: flex; align-items: center; gap: 13px; width: min(100%, 330px); }
.loading-brand > div:last-child { display: grid; gap: 4px; }
.loading-brand strong { font-size: 18px; }
.loading-brand span { color: var(--muted); font-size: 11px; }
.skeleton-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; width: min(100%, 330px); }
.skeleton-preview i, .skeleton-line, .skeleton-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}
.skeleton-preview i { height: 86px; }
.skeleton-preview i:first-child { grid-column: 1 / -1; height: 132px; border-radius: 22px; }
.skeleton-preview i::after, .skeleton-line::after, .skeleton-card::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(118,190,255,.08), transparent);
  animation: shimmer 1.25s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.error-screen { text-align: center; }
.error-screen h2 { margin: -2px 0 0; font-size: 24px; letter-spacing: -.035em; }
.error-screen > p:not(.eyebrow) { max-width: 360px; margin: -7px 0 3px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.state-illustration { display: grid; place-items: center; width: 72px; height: 72px; border: 1px solid rgba(255,101,120,.24); border-radius: 24px; color: #fff; background: linear-gradient(145deg, rgba(255,101,120,.25), rgba(255,101,120,.08)); box-shadow: 0 16px 40px rgba(255,70,96,.1); }
.state-illustration span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--danger); font-size: 18px; font-weight: 900; }

.toast {
  position: fixed;
  z-index: 150;
  left: 14px;
  right: 14px;
  bottom: calc(88px + var(--safe-bottom));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  max-width: 520px;
  min-height: 52px;
  margin: auto;
  padding: 11px 14px;
  border: 1px solid rgba(45,217,160,.28);
  border-radius: 16px;
  color: var(--text);
  background: color-mix(in srgb, var(--card-raised) 94%, transparent);
  box-shadow: var(--shadow-float);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity var(--speed), transform var(--speed);
  backdrop-filter: blur(16px);
}
.toast.show { opacity: 1; transform: none; }
.toast.error { border-color: rgba(255,101,120,.38); }
.toast-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; color: #04251c; background: var(--success); font-weight: 900; }
.toast-icon::before { content: "✓"; }
.toast.error .toast-icon { color: #fff; background: var(--danger); }
.toast.error .toast-icon::before { content: "!"; }
.toast-message { min-width: 0; font-size: 11px; font-weight: 650; line-height: 1.4; }
.operation-progress {
  position: fixed;
  z-index: 100;
  top: calc(var(--safe-top) + 76px);
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 420px;
  margin: auto;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 15px;
  background: color-mix(in srgb, var(--card-raised) 94%, transparent);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(16px);
}
.operation-progress > div { display: grid; gap: 2px; }
.operation-progress b { font-size: 11px; }
.operation-progress small { color: var(--muted); font-size: 9px; }
.loader-small { flex: 0 0 auto; width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--accent-bright); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal {
  width: min(calc(100% - 20px), 560px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 24px;
  color: var(--text);
  background: transparent;
}
.modal::backdrop { background: rgba(1, 7, 15, .72); backdrop-filter: blur(5px); }
.modal[open] { animation: modal-in 190ms ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-card {
  display: grid;
  gap: 15px;
  max-height: calc(100dvh - 24px);
  padding: 18px;
  overflow-y: auto;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  background: linear-gradient(155deg, var(--card-raised), var(--card));
  box-shadow: var(--shadow-float);
}
.compact-modal { max-width: 420px; margin: auto; }
.modal-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; }
.modal-head > div:nth-child(2) { min-width: 0; }
.modal-head h3 { margin: 4px 0 0; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.modal-head p:not(.eyebrow) { margin: 3px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.modal-head .icon-button { grid-area: auto; }
.admin-limit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; transition: opacity var(--speed); }
.admin-limit-grid.is-disabled { opacity: .38; pointer-events: none; }
.admin-limit-grid label { display: grid; gap: 6px; color: var(--muted); font-size: 9.5px; }
.admin-limit-grid input { min-height: 44px; font-weight: 750; }

.skeleton-list { display: grid; gap: 10px; }
.skeleton-card { height: 142px; }
.skeleton-card.short { height: 92px; }
.inline-error .state-icon { color: var(--danger); border-color: rgba(255,101,120,.25); background: rgba(255,101,120,.06); }
.hidden { display: none !important; }

@media (hover: hover) and (pointer: fine) {
  .metric-card:hover, .list-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
  .button-primary:hover { box-shadow: 0 14px 38px rgba(22,136,255,.3), inset 0 1px rgba(255,255,255,.2); }
  .button-success:hover { box-shadow: 0 14px 38px rgba(22,202,142,.26), inset 0 1px rgba(255,255,255,.35); }
  .nav-item:hover { color: var(--text-soft); background: rgba(77,160,235,.07); }
  .quick-values button:hover { color: var(--accent-bright); border-color: var(--border-strong); }
}

@media (max-width: 370px) {
  .content { padding-inline: 10px; }
  .topbar { padding-inline: 10px; }
  .brand-mark { width: 41px; height: 41px; border-radius: 14px; }
  .brand-copy h1 { font-size: 16px; }
  .status-pill { padding-inline: 8px; font-size: 10px; }
  .monitor-hero { min-height: 238px; padding: 19px; }
  .status-orb { width: 56px; height: 56px; }
  .hero-copy h2 { font-size: 26px; }
  .hero-actions { grid-template-columns: 1fr 1fr; }
  .hero-actions .button:first-child { grid-column: 1 / -1; }
  .hero-actions .button { padding-inline: 9px; font-size: 11px; }
  .metric-card { min-height: 125px; padding: 13px; }
  .metric-card > strong { font-size: 18px; }
  .card, .wizard-card { padding: 15px; }
  .summary-item { padding: 10px; }
  .wizard-steps small { display: none; }
  .nav-item > span { font-size: 9px; }
  .bottom-nav { left: 4px; right: 4px; padding: 4px; gap: 0; }
  .nav-item { min-height: 55px; }
  .nav-item svg { width: 19px; height: 19px; }
}

@media (min-width: 640px) {
  .topbar { padding-inline: 20px; }
  .topbar-inner { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "brand statuses refresh"; }
  .header-statuses { justify-content: flex-end; }
  .content { padding-inline: 20px; }
  .monitor-hero { min-height: 260px; padding: 30px; }
  .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric-card { min-height: 148px; padding: 18px; }
  .money-fields, .roi-grid { grid-template-columns: 1fr 1fr; }
  .settings-layout { grid-template-columns: 1fr 1fr; align-items: start; }
  .settings-layout > .score-card, .settings-layout > .skills-card, .settings-layout > .sticky-save, .settings-layout > .button-full { grid-column: 1 / -1; }
  .sticky-save { bottom: calc(84px + var(--safe-bottom)); }
  .statistics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stack-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-section .empty-state, .admin-section .inline-error, .skeleton-list { grid-column: 1 / -1; }
}

@media (min-width: 920px) {
  .bottom-nav { max-width: 820px; }
  .app-shell { padding-bottom: 106px; }
  .content { width: min(100%, 920px); }
}

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

/* Deals, onboarding and beginner-friendly controls */
.topbar-inner {
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "brand theme refresh" "statuses statuses statuses";
}
#theme-toggle { grid-area: theme; }
#refresh-header { grid-area: refresh; }

select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 38px 11px 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: none;
  color: var(--text);
  background: var(--nested);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22,136,255,.12); }
.advanced-setting { transition: opacity var(--speed), transform var(--speed); }
#profit-form:not(.is-advanced) > .advanced-setting,
#profit-form:not(.is-advanced) .switch-row.advanced-setting { display: none !important; }
.help-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--accent-bright);
  background: var(--accent-soft);
  font-weight: 900;
  cursor: pointer;
}
.confidence-guide { display: grid; gap: 7px; }
.confidence-guide p { margin: 0; padding: 10px 12px; border-radius: 12px; color: var(--muted); background: var(--nested); font-size: 10px; line-height: 1.45; }
.confidence-guide b { color: var(--text-soft); }
.skill-tags button {
  min-height: 44px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--nested);
  font-size: 10px;
  font-weight: 780;
  cursor: pointer;
}
.skill-tags button.is-selected { color: var(--accent-bright); border-color: var(--border-strong); background: var(--accent-soft); }
.search-title-with-icon { display: flex; align-items: center; gap: 11px; min-width: 0; }
.search-title-with-icon > div { min-width: 0; }
.search-title-with-icon h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-title-with-icon small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.theme-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-options label { position: relative; cursor: pointer; }
.theme-options input { position: absolute; opacity: 0; pointer-events: none; }
.theme-options span { display: grid; place-items: center; min-height: 52px; padding: 8px; border: 1px solid var(--border); border-radius: 13px; color: var(--muted); background: var(--nested); font-size: 10px; font-weight: 800; text-align: center; }
.theme-options input:checked + span { color: var(--accent-bright); border-color: var(--border-strong); background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(22,136,255,.12); }

.deals-metrics { margin-bottom: 14px; }
.deal-toolbar { display: grid; gap: 12px; margin-bottom: 12px; }
.deal-search-row { display: flex; gap: 8px; }
.grow { flex: 1 1 auto; min-width: 0; }
.deal-search-row .input-shell input { min-height: 44px; }
.deal-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.deal-filters select { min-height: 44px; }
.date-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.date-range label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.deal-secondary-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; }
.bulk-bar {
  position: sticky;
  z-index: 13;
  top: 88px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: color-mix(in srgb, var(--card-raised) 94%, transparent);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}
.bulk-bar strong { align-self: center; font-size: 11px; }
.bulk-bar select, .bulk-bar .button { min-height: 44px; }
.deal-grid { display: grid; gap: 11px; }
.deal-card {
  position: relative;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 13px;
  padding: 13px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, var(--card-raised), var(--card));
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform var(--speed), border-color var(--speed);
}
.deal-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow-card); }
.deal-card-photo {
  position: relative;
  display: grid;
  place-items: center;
  width: 86px;
  min-height: 104px;
  overflow: hidden;
  border-radius: 15px;
  color: var(--accent-bright);
  background: radial-gradient(circle at 30% 20%, rgba(83,192,255,.22), transparent 40%), var(--nested);
}
.deal-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.deal-card-photo svg { width: 42px; height: 42px; }
.deal-select-box { position: absolute; z-index: 2; top: 8px; left: 8px; display: none; place-items: center; width: 28px; height: 28px; border: 2px solid rgba(255,255,255,.75); border-radius: 9px; background: rgba(3,12,24,.72); }
.selection-mode .deal-select-box { display: grid; }
.deal-card.is-selected .deal-select-box::after { content: "✓"; color: #fff; font-weight: 900; }
.deal-card-copy { min-width: 0; }
.deal-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.deal-card h3 { margin: 0; overflow: hidden; font-size: 14px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.deal-money { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.deal-money div { min-width: 0; padding: 8px; border-radius: 11px; background: var(--nested); }
.deal-money span { display: block; color: var(--muted); font-size: 8px; }
.deal-money strong { display: block; margin-top: 3px; overflow-wrap: anywhere; font-size: 10px; }
.deal-result { margin: 9px 0 0; color: var(--muted); font-size: 10px; font-weight: 700; }
.deal-result.profit { color: var(--success); }
.deal-result.loss { color: var(--danger); }
.deal-card-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; color: var(--muted); font-size: 8.5px; }
.more-grid { display: grid; gap: 10px; }
.more-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; width: 100%; text-align: left; cursor: pointer; }
.more-card > span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: var(--accent-bright); background: var(--accent-soft); font-size: 18px; }
.more-card > div { display: grid; gap: 3px; }
.more-card b { font-size: 13px; }
.more-card small { color: var(--muted); font-size: 10px; }
.more-card > i { color: var(--accent-bright); font-style: normal; }

.deal-modal { width: min(calc(100% - 14px), 720px); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.span-2 { grid-column: 1 / -1; }
.calculation-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding: 10px; border: 1px solid var(--border); border-radius: 15px; background: var(--nested); }
.calculation-preview div { min-width: 0; }
.calculation-preview span { display: block; color: var(--muted); font-size: 8px; }
.calculation-preview strong { display: block; margin-top: 3px; overflow-wrap: anywhere; font-size: 11px; }
.photo-strip { display: flex; gap: 8px; overflow-x: auto; }
.photo-thumb { position: relative; flex: 0 0 84px; height: 84px; overflow: hidden; border-radius: 13px; background: var(--nested); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb button { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border: 0; border-radius: 10px; color: #fff; background: rgba(8,18,32,.78); cursor: pointer; }
.expense-editor { display: grid; gap: 10px; }
.expense-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; padding: 10px; border-radius: 12px; background: var(--nested); }
.expense-row p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.expense-row button { width: 44px; min-height: 44px; }
.system-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.system-actions .button { min-height: 48px; }
.onboarding-illustration { position: relative; display: grid; place-items: center; width: 110px; height: 86px; margin: 0 auto; border-radius: 26px; color: var(--accent-bright); background: radial-gradient(circle, rgba(22,136,255,.26), transparent 70%); }
.onboarding-illustration span { font-size: 40px; }
.onboarding-illustration i, .onboarding-illustration b { position: absolute; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--card-raised); font-style: normal; }
.onboarding-illustration i { left: 3px; bottom: 3px; }
.onboarding-illustration b { right: 3px; top: 3px; }
.onboarding-steps { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.onboarding-steps li { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; padding: 9px; border-radius: 12px; background: var(--nested); }
.onboarding-steps li > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: var(--accent-bright); background: var(--accent-soft); font-weight: 900; }
.onboarding-steps div { display: grid; gap: 2px; }
.onboarding-steps b { font-size: 10.5px; }
.onboarding-steps small { color: var(--muted); font-size: 9px; }
.danger-icon { color: var(--danger); background: rgba(255,101,120,.09); }

@media (max-width: 520px) {
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .calculation-preview { grid-template-columns: 1fr 1fr; }
  .system-actions { grid-template-columns: 1fr; }
  .admin-tabs { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; }
  .admin-tabs button { flex: 0 0 auto; min-width: 112px; }
}

@media (max-width: 360px) {
  .deal-card { grid-template-columns: 72px minmax(0, 1fr); gap: 10px; padding: 11px; }
  .deal-card-photo { width: 72px; min-height: 96px; }
  .deal-money { grid-template-columns: 1fr; }
  .deal-filters { grid-template-columns: 1fr; }
  .theme-options { grid-template-columns: 1fr; }
}

@media (min-width: 640px) {
  .topbar-inner { grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "brand statuses theme refresh"; }
  .deal-grid { grid-template-columns: 1fr 1fr; }
  .deals-metrics, .system-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .deal-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .more-grid { grid-template-columns: repeat(3, 1fr); }
}
