:root {
  color-scheme: dark;
  --bg: #070b11;
  --bg-soft: #0a1018;
  --surface: #0d141e;
  --surface-raised: #111a27;
  --surface-hover: #162232;
  --surface-input: #09101a;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.24);
  --text: #edf4fb;
  --text-soft: #c4d0dd;
  --muted: #8090a3;
  --accent: #5eead4;
  --accent-strong: #2dd4bf;
  --accent-dim: #143f3c;
  --accent-ink: #052b28;
  --danger: #fb7185;
  --warn: #fbbf24;
  --ok: #4ade80;
  --post: #60a5fa;
  --get: #4ade80;
  --put: #fbbf24;
  --patch: #c084fc;
  --delete: #fb7185;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.22);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 20px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 80% -180px, rgba(45, 212, 191, 0.075), transparent 62%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.has-modal { overflow: hidden; }
button, input, select, textarea { color: inherit; font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-decoration: none; }
[hidden] { display: none !important; }
::selection { background: rgba(94, 234, 212, 0.24); color: var(--text); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(94, 234, 212, 0.26);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(94, 234, 212, 0.18), rgba(45, 212, 191, 0.05));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 24px rgba(20, 184, 166, .1);
  color: var(--accent);
}
.brand-mark svg { width: 25px; height: 25px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark--large { width: 46px; height: 46px; border-radius: 14px; }

/* Login */
.login {
  display: grid;
  grid-template-columns: minmax(480px, 1.08fr) minmax(440px, .92fr);
  min-height: 100vh;
  background: var(--bg);
}
.login__showcase {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(34px, 5vw, 70px);
  border-right: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(45, 212, 191, .12), transparent 38%),
    radial-gradient(560px 440px at 55% 60%, rgba(45, 212, 191, .11), transparent 65%),
    #09101a;
}
.login__showcase::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .045) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(to bottom, black 10%, transparent 88%);
  pointer-events: none;
}
.showcase__brand, .showcase__copy, .flow-visual, .showcase__signal { position: relative; z-index: 1; }
.showcase__brand { display: flex; align-items: center; gap: 14px; }
.showcase__brand > span:last-child { display: grid; }
.showcase__brand strong { font-size: 15px; letter-spacing: -.01em; }
.showcase__brand small { margin-top: 1px; color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.showcase__copy { max-width: 620px; margin: auto 0 38px; }
.showcase__eyebrow, .login__brand {
  display: block;
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.showcase__copy h2 {
  max-width: 560px;
  margin: 0;
  font-size: clamp(42px, 5.2vw, 72px);
  font-weight: 680;
  letter-spacing: -.055em;
  line-height: .98;
}
.showcase__copy p { max-width: 530px; margin: 24px 0 0; color: #aab8c7; font-size: 17px; line-height: 1.65; }
.flow-visual { display: grid; grid-template-columns: 1fr 54px 1fr 54px 1fr; align-items: center; margin-bottom: 48px; }
.flow-node {
  display: grid;
  min-height: 136px;
  align-content: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(13, 20, 30, .76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.flow-node > span:not(.brand-mark) { color: var(--accent); font-family: var(--mono); font-size: 11px; }
.flow-node > .brand-mark { width: 30px; height: 30px; margin-bottom: 8px; border-radius: 9px; }
.flow-node > .brand-mark svg { width: 19px; height: 19px; }
.flow-node strong { margin-top: 11px; font-size: 15px; }
.flow-node small { margin-top: 3px; color: var(--muted); }
.flow-node--hub { border-color: rgba(94, 234, 212, .28); background: linear-gradient(145deg, rgba(21, 54, 52, .86), rgba(13, 20, 30, .9)); transform: translateY(-10px); }
.flow-line { display: flex; align-items: center; justify-content: space-around; }
.flow-line i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(94, 234, 212, .8); }
.flow-line i:nth-child(1) { opacity: .25; }.flow-line i:nth-child(2) { opacity: .55; }.flow-line i:nth-child(3) { opacity: 1; }
.showcase__signal { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.showcase__signal > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 5px rgba(74, 222, 128, .1); }
.login__panel { display: grid; min-height: 100vh; place-items: center; padding: clamp(30px, 6vw, 92px); background: #080d14; }
.login__card { width: min(100%, 430px); }
.login__lang { display: flex; justify-content: flex-end; margin-bottom: clamp(56px, 11vh, 116px); }
.login__title { margin: 0; font-size: clamp(30px, 4vw, 40px); font-weight: 680; letter-spacing: -.035em; line-height: 1.1; }
.login__lead { margin: 15px 0 30px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.login__error { margin-bottom: 18px; padding: 12px 14px; border: 1px solid rgba(251,113,133,.25); border-radius: 11px; background: rgba(251,113,133,.08); color: #fda4af; }
.login__google {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid #d7dce2;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  color: #1f2937;
  cursor: pointer;
  font-weight: 680;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.login__google:hover { background: #f8fafc; box-shadow: 0 12px 32px rgba(0,0,0,.25); transform: translateY(-1px); }
.login__google:active { transform: translateY(0); }
.login__google svg { width: 20px; height: 20px; }
.login__hint { min-height: 20px; margin: 12px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.login__terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
}
.login__terms input { margin-top: 3px; accent-color: var(--accent-strong); }
.login__legal-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.login__legal-link:hover { color: var(--accent-strong); }
.login__privacy { margin: 34px 0 0; padding-top: 22px; border-top: 1px solid var(--line); color: #667689; font-size: 11px; line-height: 1.6; text-align: center; }
.legal { width: min(720px, 100%); margin: 0 auto; padding: clamp(32px, 6vw, 72px) 22px 80px; }
.legal__brand { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.legal__meta { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.legal h1 { margin: 0 0 22px; font-size: 32px; letter-spacing: -.03em; }
.legal-doc h2 { margin: 22px 0 8px; font-size: 15px; }
.legal-doc p { margin: 0 0 10px; color: var(--text-soft); font-size: 14px; line-height: 1.65; }
.legal__back { margin-top: 28px; }
.legal__back a { color: var(--accent); }
.login__dev { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.login__dev label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 650; }
.login__dev input { width: 100%; margin-bottom: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-input); }
.login__dev .btn { width: 100%; }

/* Application chrome */
.app { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 24px 17px 18px;
  border-right: 1px solid var(--line);
  background: rgba(9, 15, 23, .92);
  backdrop-filter: blur(18px);
}
.nav__brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; margin-bottom: 34px; }
.nav__brand-copy { display: grid; min-width: 0; }
.nav__brand-copy strong { color: var(--text); font-size: 14px; letter-spacing: -.01em; }
.nav__brand-copy small { margin-top: 1px; color: var(--muted); font-size: 9px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.nav__section-label { padding: 0 12px; margin-bottom: 8px; color: #58687a; font-size: 9px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.nav__menu { display: grid; gap: 4px; }
.nav__link {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #9aa9b9;
  font-size: 13px;
  font-weight: 610;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.nav__link svg { width: 19px; height: 19px; flex: 0 0 auto; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav__link:hover { border-color: rgba(148,163,184,.09); background: rgba(255,255,255,.025); color: var(--text-soft); }
.nav__link.is-active { border-color: rgba(94,234,212,.12); background: linear-gradient(90deg, rgba(45,212,191,.13), rgba(45,212,191,.035)); color: var(--accent); }
.nav__link.is-hidden { display: none; }
.impersonation-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid rgba(251,191,36,.35);
  border-radius: 10px;
  background: rgba(251,191,36,.1);
  color: #fde68a;
  font-size: 12px;
}
.impersonation-bar.is-visible { display: flex; }
.nav__system { display: flex; align-items: center; gap: 9px; margin: auto 9px 14px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 11px; }
.nav__system-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(74,222,128,.08); }
.nav__user { padding: 14px 9px 2px; border-top: 1px solid var(--line); }
.nav__profile { display: flex; min-width: 0; align-items: center; gap: 10px; }
.nav__avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(94,234,212,.18); border-radius: 10px; background: var(--accent-dim); color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.nav__identity { display: grid; min-width: 0; }
.nav__identity-head { display: flex; min-width: 0; align-items: center; gap: 6px; }
.nav__identity-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); font-size: 12px; font-weight: 650; }
.nav__identity-head .badge { flex: 0 0 auto; }
#userEmail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.nav__controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 13px; }
.lang { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0,0,0,.12); }
.lang__btn { min-width: 32px; padding: 4px 7px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.lang__btn:hover { color: var(--text); }
.lang__btn.is-active { background: var(--surface-hover); color: var(--accent); box-shadow: var(--shadow-sm); }

.main { min-width: 0; padding: 42px clamp(24px, 4vw, 58px) 64px; }
.main__inner { width: min(100%, 1440px); margin: 0 auto; animation: view-in .26s ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.topbar > div:first-child { min-width: 0; }
.topbar h1 { margin: 0; color: #f4f8fc; font-size: clamp(27px, 3vw, 34px); font-weight: 680; letter-spacing: -.035em; line-height: 1.15; }
.topbar p { max-width: 720px; margin: 8px 0 0; color: var(--muted); font-size: 13px; }

/* Controls */
.btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(17, 26, 39, .84);
  box-shadow: var(--shadow-sm);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:hover { border-color: rgba(94,234,212,.28); background: var(--surface-hover); color: var(--text); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { border-color: var(--accent-strong); background: linear-gradient(135deg, #67ead7, #2dd4bf); box-shadow: 0 8px 22px rgba(20,184,166,.14); color: var(--accent-ink); }
.btn--primary:hover { border-color: #99f6e4; background: linear-gradient(135deg, #7ef0df, #45ddca); color: #032c28; box-shadow: 0 10px 28px rgba(20,184,166,.2); }
.btn--danger { border-color: rgba(251,113,133,.32); background: rgba(251,113,133,.055); color: #fda4af; }
.btn--danger:hover { border-color: rgba(251,113,133,.56); background: rgba(251,113,133,.11); color: #fecdd3; }
.settings-danger { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.settings-danger .card__title { margin-bottom: 8px; }
.settings-danger .card__meta { margin-bottom: 12px; }
.btn--ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--muted); }
.btn--ghost:hover { border-color: var(--line); background: rgba(255,255,255,.025); color: var(--text); }
.btn--compact { min-height: 30px; padding: 5px 8px; font-size: 10px; }
.btn[disabled] { cursor: not-allowed; opacity: .45; transform: none; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(17,26,39,.94), rgba(12,19,29,.94));
  box-shadow: var(--shadow-sm);
}
.grid > .card { transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.grid > .card:hover { border-color: rgba(94,234,212,.18); box-shadow: 0 18px 42px rgba(0,0,0,.2); transform: translateY(-2px); }
.card > h3, .copy-head h3 { margin: 0; color: var(--text); font-size: 14px; font-weight: 680; letter-spacing: -.01em; }
.card__title { margin: 0; color: var(--text); font-size: 15px; font-weight: 680; letter-spacing: -.015em; }
.card__meta { color: var(--muted); font-size: 11px; line-height: 1.65; }
.card__url { margin: 0; color: #7dd3fc; font-family: var(--mono); font-size: 11px; word-break: break-all; }
.card__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.entity-card { position: relative; overflow: hidden; padding: 0; }
.entity-card::after { position: absolute; top: -80px; right: -70px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(94,234,212,.055), transparent 68%); content: ""; pointer-events: none; }
.entity-card__head { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 13px; padding: 20px 20px 15px; }
.entity-card__mark { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(94,234,212,.16); border-radius: 11px; background: rgba(45,212,191,.08); color: var(--accent); font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.entity-card__identity { min-width: 0; flex: 1; }
.entity-card__title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-height: 22px; }
.entity-card__slug { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font-family: var(--mono); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.entity-card__body { padding: 0 20px 17px; }
.entity-card__meta { min-height: 38px; margin-top: 13px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.entity-card__actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 7px; padding: 13px 20px 16px; border-top: 1px solid var(--line); background: rgba(4,8,13,.13); }

.badge { display: inline-flex; min-height: 21px; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid transparent; border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .06em; line-height: 1; text-transform: uppercase; }
.badge::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.badge--active { border-color: rgba(74,222,128,.18); background: rgba(74,222,128,.08); color: var(--ok); }
.badge--paused { border-color: rgba(251,191,36,.18); background: rgba(251,191,36,.08); color: var(--warn); }
.badge--POST { border-color: rgba(96,165,250,.18); background: rgba(96,165,250,.1); color: var(--post); }
.badge--GET { border-color: rgba(74,222,128,.18); background: rgba(74,222,128,.09); color: var(--get); }
.badge--PUT { border-color: rgba(251,191,36,.2); background: rgba(251,191,36,.09); color: var(--put); }
.badge--PATCH { border-color: rgba(192,132,252,.2); background: rgba(192,132,252,.09); color: var(--patch); }
.badge--DELETE { border-color: rgba(251,113,133,.2); background: rgba(251,113,133,.09); color: var(--delete); }
.badge--success { border-color: rgba(74,222,128,.18); background: rgba(74,222,128,.08); color: var(--ok); }
.badge--failed { border-color: rgba(251,113,133,.2); background: rgba(251,113,133,.08); color: var(--danger); }
.badge--pending { border-color: rgba(251,191,36,.18); background: rgba(251,191,36,.08); color: var(--warn); }

/* Forms and filters */
.form label { display: block; margin: 15px 0 6px; color: #9babbc; font-size: 11px; font-weight: 650; }
.form .field-label { position: relative; display: flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%; margin: 15px 0 6px; }
.form .field-label label { margin: 0; }
.info-tip { position: relative; display: inline-grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(94,234,212,.045); color: var(--muted); cursor: help; transition: border-color .14s ease, background .14s ease, color .14s ease; }
.info-tip:hover, .info-tip:focus-visible { border-color: rgba(94,234,212,.45); background: rgba(94,234,212,.1); color: var(--accent); }
.info-tip svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.info-tip__bubble { position: absolute; z-index: 30; bottom: calc(100% + 9px); left: -8px; width: min(280px, calc(100vw - 64px)); padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: #172231; box-shadow: 0 12px 30px rgba(0,0,0,.38); color: var(--text-soft); font-size: 10px; font-weight: 500; line-height: 1.55; text-align: left; opacity: 0; pointer-events: none; transform: translateY(4px); transition: opacity .14s ease, transform .14s ease; }
.info-tip__bubble::after { position: absolute; top: 100%; left: 14px; border: 5px solid transparent; border-top-color: #172231; content: ""; }
.info-tip:hover .info-tip__bubble, .info-tip:focus .info-tip__bubble { opacity: 1; transform: translateY(0); }
.form input, .form select, .form textarea {
  width: 100%;
  min-height: 41px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-input);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.12);
  color: var(--text-soft);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.form input::placeholder, .form textarea::placeholder { color: #4f6072; }
.form input:hover, .form select:hover, .form textarea:hover { border-color: var(--line-strong); }
.form input:focus, .form select:focus, .form textarea:focus { border-color: rgba(94,234,212,.52); background: #0a121c; box-shadow: 0 0 0 3px rgba(94,234,212,.075); outline: 0; }
.form input:disabled { background: rgba(9,16,26,.5); color: #5f7082; cursor: not-allowed; }
.form textarea { min-height: 126px; resize: vertical; font-family: var(--mono); font-size: 11px; line-height: 1.6; }
.form__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.team-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.team-row:first-child { border-top: 0; padding-top: 0; }
.team-row__who { display: grid; min-width: 0; }
.team-row__who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.team-row__who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.team-row .badge { flex: 0 0 auto; }
.filters {
  display: grid;
  grid-template-columns: 1.4fr .8fr .8fr auto;
  align-items: end;
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(13,20,30,.72);
}
.filters label { margin: 0 0 5px; }
.filters > .form__actions { align-self: end; margin: 0; }
.filters--dash { grid-template-columns: 1.4fr .75fr auto; margin: 0 0 17px; }
.suggest { position: relative; min-width: 0; }
.suggest__list {
  position: absolute;
  z-index: 24;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  max-height: 240px;
  overflow: auto;
  list-style: none;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #172231;
  box-shadow: 0 12px 30px rgba(0,0,0,.38);
}
.suggest__item, .suggest__empty {
  display: grid;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  text-align: left;
}
.suggest__item { cursor: pointer; }
.suggest__item small { color: var(--muted); }
.suggest__item:hover, .suggest__item.is-active { background: var(--surface-hover); color: var(--text); }
.suggest__empty { color: var(--muted); cursor: default; }
.filters--compact { grid-template-columns: .8fr .8fr 1.2fr; margin: 8px 0 14px; padding: 12px; }
.form--compact label { margin-top: 10px; }
.form--compact .fwd-grid label { margin-top: 0; }
.fwd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.textarea--sm { min-height: 82px !important; }
.kv-row { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 8px; margin-bottom: 8px; }
.kv-row--3 { grid-template-columns: 1fr 1fr 1fr auto; }
.kv-row--1 { grid-template-columns: 1fr auto; }
.route-map { margin: 4px 0 8px; }
.route-map__block { margin-top: 10px; }
.route-map__title { margin: 0 0 6px; font-size: 11px; font-weight: 700; color: var(--muted); }
.route-map__add { margin-top: 0; }
.token-gen { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
.method-checks { display: flex; flex-wrap: wrap; gap: 7px; margin: 5px 0 11px; }
.form .method-chip { display: inline-flex; align-items: center; margin: 0; padding: 0; cursor: pointer; user-select: none; }
.method-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.method-chip span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-input); color: var(--muted); font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: .04em; transition: all .14s ease; }
.method-chip:hover span { border-color: var(--line-strong); color: var(--text); }
.method-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.method-chip--POST input:checked + span { border-color: var(--post); background: rgba(96,165,250,.12); color: var(--post); }
.method-chip--GET input:checked + span { border-color: var(--get); background: rgba(74,222,128,.12); color: var(--get); }
.method-chip--PUT input:checked + span { border-color: var(--put); background: rgba(251,191,36,.12); color: var(--put); }
.method-chip--PATCH input:checked + span { border-color: var(--patch); background: rgba(192,132,252,.12); color: var(--patch); }
.method-chip--DELETE input:checked + span { border-color: var(--delete); background: rgba(251,113,133,.12); color: var(--delete); }
.method-chip--any input:checked + span { border-color: var(--accent); background: rgba(94,234,212,.11); color: var(--accent); }

/* Data and states */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th, .table td { padding: 12px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; font-size: 11px; }
.table th { background: rgba(7,11,17,.42); color: #6f8092; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.table tbody tr { cursor: pointer; transition: background .13s ease; }
.table tbody tr:hover td { background: rgba(94,234,212,.025); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.is-unread td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.table tr.is-unread td { background: rgba(94,234,212,.018); }
.table--static tr { cursor: default; }
.table--static tr:hover td { background: transparent; }
.table__check { width: 32px; }
.table__preview { max-width: 420px; }
.table__preview-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: zoom-in;
}
.table__preview-btn:hover { color: var(--accent); }
.table input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--accent-strong); }
#histWrap, #delivList { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.empty { padding: 38px 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(9,16,24,.45); color: var(--muted); line-height: 1.7; text-align: center; }
.empty code { display: inline-block; max-width: 100%; margin-top: 8px; color: var(--accent); font-family: var(--mono); word-break: break-all; }
.notice { padding: 13px 15px; border: 1px solid rgba(251,191,36,.18); border-radius: 10px; background: rgba(251,191,36,.055); color: #d6bd70; font-size: 11px; line-height: 1.6; }
.notice code { color: #fde68a; font-family: var(--mono); }
.settings-page { max-width: 760px; }
.settings-page .tabs { margin-bottom: 16px; }
.billing-page { display: grid; gap: 16px; }
.billing-page .tabs { margin-bottom: 0; }
.billing-page .table-wrap { overflow-x: auto; margin-top: 12px; }
.billing-brick { min-height: 120px; margin-top: 12px; }
.billing-debug { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.plan-card { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(7,11,17,.42); }
.plan-card--current { border-color: rgba(74,222,128,.35); }
.plan-card__name { margin: 0; font-size: 15px; }
.plan-card__price { margin: 0; font-size: 18px; font-weight: 700; }
.billing-current { display: grid; gap: 10px; }
.billing-current__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.billing-current__name { margin: 0 0 6px; font-size: 20px; }
.billing-current__price { margin: 0; font-size: 28px; font-weight: 700; }
.billing-interval { display: inline-flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: rgba(9,16,24,.62); }
.billing-interval__btn { min-height: 34px; padding: 7px 13px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 680; }
.billing-interval__btn.is-active { background: var(--surface-hover); box-shadow: var(--shadow-sm); color: var(--accent); }
.change-list { margin: 0; padding-left: 16px; color: var(--text-soft); font-size: 12px; line-height: 1.55; }
.change-list__field { margin: 0 0 8px; }
.change-list__field:last-child { margin-bottom: 0; }
.change-list__field strong { color: var(--text); font-weight: 680; }
.change-list__pair { margin: 4px 0 0; padding-left: 16px; }
.pay-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.pay-method { min-height: 72px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(7,11,17,.42); color: var(--text-soft); cursor: pointer; font-size: 14px; font-weight: 700; }
.pay-method:hover { border-color: var(--accent); color: var(--accent); }
.pix-box { display: grid; justify-items: center; gap: 12px; margin-top: 12px; }
.pix-box__qr { width: 220px; height: 220px; border-radius: 10px; background: #fff; }
.settings-card { max-width: none; }
.mcp-card { margin-top: 0; }
.mcp-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.mcp-card__head .card__meta { margin: 7px 0 0; }
.mcp-card #mcpAccess { display: grid; gap: 14px; margin-top: 16px; }
.mcp-how__title { margin: 4px 0 0; font-size: 13px; font-weight: 700; }
.mcp-commands { display: grid; gap: 10px; }
.mcp-command { max-height: none; margin: 0; font-size: 10px; white-space: pre-wrap; }
.mcp-access-list { display: grid; gap: 9px; }
.mcp-access { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(7,11,17,.42); }
.mcp-access > div { display: grid; min-width: 0; gap: 6px; }
.mcp-access code, .mcp-access small { color: var(--muted); font-family: var(--mono); font-size: 9px; overflow-wrap: anywhere; }
.mcp-empty { padding: 22px; }
.mail-tpl-list { display: grid; gap: 9px; }
.mail-tpl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(7,11,17,.42);
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.mail-tpl:hover { border-color: var(--line-strong); background: var(--surface-hover); }
.mail-tpl span { min-width: 0; }
.mail-tpl strong { display: block; }
.mail-tpl small { color: var(--muted); font-size: 11px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.pager span { color: var(--muted); font-size: 10px; }
.pager button[disabled] { opacity: .35; cursor: default; }

/* Copy, code and event detail */
.copy-line { display: flex; width: fit-content; max-width: 100%; align-items: center; gap: 7px; margin: 8px 0 0; padding: 6px 7px 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(7,11,17,.55); }
.copy-line .card__url { min-width: 0; flex: 0 1 auto; }
.topbar .copy-line { margin-top: 9px; }
.table .copy-line { margin: 0; padding: 4px 6px 4px 8px; }
.table .copy-line .card__url { max-width: 360px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn { display: inline-grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; transition: all .14s ease; }
.copy-btn:hover { border-color: var(--line); background: var(--surface-hover); color: var(--accent); }
.copy-btn.is-copied { border-color: rgba(74,222,128,.3); color: var(--ok); }
.copy-btn svg { width: 14px; height: 14px; }
.copy-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.copy-actions { display: inline-flex; gap: 5px; }
.payload-card { padding: 16px; }
.pre { margin: 0; overflow: auto; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #060a0f; color: #b7c6d6; font-family: var(--mono); font-size: 11px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.payload-card .pre { max-height: 300px; }
.payload-card.is-collapsed .pre { position: relative; max-height: 5.2em; overflow: hidden; }
.payload-card.is-collapsed .pre::after { position: absolute; right: 0; bottom: 0; left: 0; height: 34px; background: linear-gradient(transparent, #060a0f); content: ""; pointer-events: none; }
.payload-card.is-collapsed [data-fold] svg { transform: rotate(-90deg); }
.payload-card [data-fold] svg { transition: transform .15s ease; }
.event-page .topbar { margin-bottom: 18px; }
.event-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 390px); align-items: start; gap: 16px; }
.payload-stack, .event-side { display: grid; gap: 13px; }
.event-side { position: sticky; top: 22px; }
.tabs { display: flex; gap: 3px; margin: 0 0 18px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: rgba(9,16,24,.62); }
.tabs--page { width: fit-content; }
.tabs__btn { min-height: 34px; padding: 7px 13px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 680; transition: all .14s ease; }
.tabs__btn:hover { color: var(--text-soft); }
.tabs__btn.is-active { background: var(--surface-hover); box-shadow: var(--shadow-sm); color: var(--accent); }

.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .72fr); align-items: start; gap: 17px; }
.inbox-side { display: grid; gap: 13px; }
.fold-card { padding: 12px 14px; }
.fold-card__toggle {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.fold-card__toggle:hover { color: var(--accent); }
.fold-card__toggle svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--muted); transition: transform .15s ease; }
.fold-card__title { margin: 0; font-size: 13px; font-weight: 700; }
.fold-card__body { margin-top: 12px; }
.fold-card.is-collapsed .fold-card__body { display: none; }
.fold-card.is-collapsed .fold-card__toggle svg { transform: rotate(-90deg); }
.live-pill { display: inline-flex; min-height: 30px; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid rgba(74,222,128,.18); border-radius: 999px; background: rgba(74,222,128,.07); color: var(--ok); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.live-pill::before { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); content: ""; }
.live-pill.is-pulse::before { animation: live-pulse .8s ease; }
@keyframes live-pulse { 50% { box-shadow: 0 0 0 7px rgba(74,222,128,.15); } }

/* Inbox analytics dashboard */
#metricsDashboard { margin-bottom: 17px; }
.metrics-dashboard {
  position: relative;
  container-type: inline-size;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(700px 260px at 74% -60%, rgba(45,212,191,.105), transparent 68%),
    linear-gradient(145deg, rgba(17,26,39,.98), rgba(10,17,26,.98));
  box-shadow: 0 20px 55px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.025);
}
.metrics-dashboard::before { position: absolute; top: 0; right: 10%; left: 38%; height: 1px; background: linear-gradient(90deg, transparent, rgba(94,234,212,.5), transparent); content: ""; }
.metrics-dashboard__head { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.metrics-dashboard__eyebrow { display: block; margin-bottom: 5px; color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.metrics-dashboard__head h2 { margin: 0; color: #f4f8fc; font-size: 20px; font-weight: 690; letter-spacing: -.025em; }
.metrics-dashboard__head p { max-width: 650px; margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.metrics-dashboard__fresh { display: grid; flex: 0 0 auto; justify-items: end; gap: 4px; color: var(--text-soft); font-size: 10px; }
.metrics-dashboard__fresh > strong { margin-bottom: 2px; padding: 4px 8px; border: 1px solid rgba(94,234,212,.16); border-radius: 999px; background: rgba(94,234,212,.06); color: var(--accent); font-size: 8px; font-weight: 750; letter-spacing: .04em; }
.metrics-kpis { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.metric-kpi { position: relative; display: flex; min-width: 0; align-items: center; gap: 13px; overflow: hidden; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(7,12,19,.57); box-shadow: inset 0 1px 0 rgba(255,255,255,.018); }
.metric-kpi::after { position: absolute; right: -28px; bottom: -34px; width: 86px; height: 86px; border-radius: 50%; background: radial-gradient(circle, var(--kpi-glow, rgba(94,234,212,.07)), transparent 68%); content: ""; pointer-events: none; }
.metric-kpi--success { --kpi-glow: rgba(74,222,128,.12); }.metric-kpi--failed { --kpi-glow: rgba(251,113,133,.12); }.metric-kpi--pending { --kpi-glow: rgba(251,191,36,.1); }
.metric-kpi__icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(94,234,212,.18); border-radius: 11px; background: rgba(94,234,212,.075); color: var(--accent); }
.metric-kpi__icon svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.metric-kpi__icon--success { border-color: rgba(74,222,128,.18); background: rgba(74,222,128,.075); color: var(--ok); }
.metric-kpi__icon--failed { border-color: rgba(251,113,133,.2); background: rgba(251,113,133,.075); color: var(--danger); }
.metric-kpi__icon--pending { border-color: rgba(251,191,36,.18); background: rgba(251,191,36,.07); color: var(--warn); }
.metric-kpi > div { display: grid; min-width: 0; }
.metric-kpi strong { color: #f7fbff; font-family: var(--mono); font-size: 22px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.metric-kpi span:not(.metric-kpi__icon) { overflow: hidden; margin-top: 5px; color: var(--text-soft); font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.metric-kpi small { margin-top: 2px; color: #617184; font-size: 8px; }
.metrics-visuals { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .72fr); align-items: stretch; gap: 12px; margin-top: 12px; }
.metric-chart, .metric-health { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(6,11,17,.48); }
.metric-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.metric-panel__head h3 { margin: 0; color: var(--text); font-size: 12px; font-weight: 680; }
.metric-panel__head p { margin: 3px 0 0; color: #617184; font-size: 9px; }
.metric-legend { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; }
.metric-legend i { width: 14px; height: 2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 8px rgba(94,234,212,.6); }
.metric-chart__svg { display: block; width: 100%; height: auto; margin-top: 9px; overflow: visible; }
.metric-chart__grid line { stroke: rgba(148,163,184,.11); stroke-width: 1; stroke-dasharray: 3 6; }
.metric-chart__grid text, .metric-chart__labels text { fill: #566679; font-family: var(--mono); font-size: 9px; }
.metric-chart__area { fill: url(#metricArea); }
.metric-chart__line { fill: none; filter: url(#metricGlow); stroke: var(--accent); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.3; vector-effect: non-scaling-stroke; }
.metric-chart__dots circle { fill: #0b151d; stroke: var(--accent); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.metric-chart__dots circle:hover { fill: var(--accent); }
.metric-health { display: flex; flex-direction: column; }
.metric-health__summary { display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: center; gap: 17px; margin: 18px 0 14px; }
.health-ring { display: grid; width: 124px; height: 124px; place-items: center; border-radius: 50%; background: conic-gradient(var(--ok) var(--health), rgba(74,222,128,.08) 0); box-shadow: 0 0 28px rgba(74,222,128,.07); }
.health-ring::before { grid-area: 1 / 1; width: 94px; height: 94px; border: 1px solid rgba(148,163,184,.11); border-radius: 50%; background: #09111a; content: ""; }
.health-ring > div { z-index: 1; grid-area: 1 / 1; display: grid; justify-items: center; }
.health-ring strong { color: #f4fbf8; font-family: var(--mono); font-size: 20px; letter-spacing: -.04em; }
.health-ring span { color: var(--muted); font-size: 8px; }
.health-stats { display: grid; gap: 7px; }
.health-stats p { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 9px; }
.health-stats p strong { color: var(--text-soft); font-family: var(--mono); font-size: 10px; }
.health-dot { width: 6px; height: 6px; border-radius: 50%; }.health-dot--ok { background: var(--ok); box-shadow: 0 0 8px rgba(74,222,128,.45); }.health-dot--fail { background: var(--danger); }
.health-stats .health-stats__latency { grid-template-columns: minmax(0,1fr) auto; margin-top: 5px; padding-top: 9px; border-top: 1px solid var(--line); }
.delivery-bars { display: flex; min-height: 86px; flex: 1; align-items: stretch; gap: 6px; padding-top: 11px; border-top: 1px solid var(--line); }
.delivery-bars__day { display: grid; min-width: 0; flex: 1; grid-template-rows: 1fr auto; justify-items: center; gap: 5px; }
.delivery-bars__pair { display: flex; height: 62px; align-items: flex-end; gap: 3px; }
.delivery-bars__pair i { width: 6px; min-height: 0; border-radius: 4px 4px 1px 1px; transition: height .25s ease; }
.delivery-bars__success { background: linear-gradient(to top, #16a34a, #4ade80); box-shadow: 0 0 9px rgba(74,222,128,.16); }.delivery-bars__failed { background: linear-gradient(to top, #e11d48, #fb7185); }
.delivery-bars__day > span { color: #536376; font-family: var(--mono); font-size: 7px; text-transform: uppercase; }
.skeleton-block { display: block; overflow: hidden; border-radius: 5px; background: rgba(148,163,184,.075); }
.skeleton-block--eyebrow { width: 86px; height: 8px; margin-bottom: 9px; }.skeleton-block--title { width: 240px; height: 20px; }.skeleton-block--status { width: 118px; height: 12px; }
.skeleton-block--icon { width: 38px; height: 38px; border-radius: 11px; }.skeleton-block--value { width: 45px; height: 20px; }.skeleton-block--label { width: 90px; height: 8px; margin-top: 8px; }
.metrics-dashboard--loading::after { position: absolute; z-index: 3; inset: 0; background: linear-gradient(105deg, transparent 28%, rgba(255,255,255,.025) 44%, rgba(255,255,255,.055) 50%, rgba(255,255,255,.025) 56%, transparent 72%); content: ""; animation: shimmer 1.6s infinite; pointer-events: none; transform: translateX(-100%); }
.metric-kpi--skeleton > div { gap: 1px; }.metric-chart--skeleton, .metric-health--skeleton { min-height: 255px; }

@container (max-width: 900px) {
  .metrics-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics-visuals { grid-template-columns: 1fr; }
}
@container (max-width: 560px) {
  .metrics-dashboard { padding: 18px; }
  .metrics-dashboard__head { flex-direction: column; gap: 12px; }
  .metrics-dashboard__fresh { justify-items: start; }
  .metrics-kpis { grid-template-columns: 1fr; }
  .metric-health__summary { grid-template-columns: 1fr; justify-items: center; }
  .health-stats { width: min(100%, 230px); }
}
.route-item { margin-top: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(7,11,17,.32); }
.route-item p { margin: 0; }
.route-item .card__row { margin-top: 10px; }
.delivery { padding: 9px 0; border-top: 1px solid var(--line); }
.delivery:first-child { padding-top: 0; border-top: 0; }
.delivery__top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.semantic-card { margin-bottom: 12px; }
.semantic-card h3 { margin: 0 0 6px; font-size: 12px; color: var(--muted); font-weight: 650; }
.semantic-card p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text); }
.semantic-card--warn { border-color: rgba(251,113,133,.32); }
.contrast-list { margin: 8px 0 0; padding-left: 16px; color: var(--muted); font-size: 12px; }
.incident-card { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.incident-card__meta { color: var(--muted); font-size: 12px; margin-top: 6px; }
.monitor-board { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 16px; }
.monitor-board--single { grid-template-columns: 1fr; }
.impact-card, .contract-panel { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(9,14,22,.72); }
.impact-card--hot { border-color: rgba(251,113,133,.42); background: linear-gradient(160deg, rgba(251,113,133,.12), rgba(9,14,22,.72)); }
.impact-card__headline { display: block; margin: 10px 0 6px; color: #f4f8fc; font-size: 22px; font-weight: 690; letter-spacing: -.03em; line-height: 1.25; }
.impact-card__money { margin: 0 0 14px; color: var(--accent); font-size: 14px; font-weight: 650; }
.impact-card__empty { margin: 12px 0 14px; color: var(--muted); font-size: 14px; }
.monitor-board__sub { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.contract-panel .empty { margin-top: 12px; }
.contract-card { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.contract-card p { margin: 8px 0; font-size: 13px; line-height: 1.45; }
.contract-card a { color: var(--accent); font-size: 12px; }
.contract-card__tags { display: flex; gap: 6px; }
.contract-card--high { border-color: rgba(251,113,133,.35); }
.contract-card--medium { border-color: rgba(251,191,36,.28); }
.contract-card--low { border-color: rgba(94,234,212,.2); }
@media (max-width: 860px) {
  .monitor-board { grid-template-columns: 1fr; }
}

/* Dialogs and feedback */
.modal { position: fixed; z-index: 100; inset: 0; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(1,4,8,.74); backdrop-filter: blur(7px); }
.modal.is-open { display: flex; animation: modal-fade .16s ease both; }
@keyframes modal-fade { from { opacity: 0; } }
.modal__box { width: min(600px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 22px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: linear-gradient(150deg, #121c29, #0d151f); box-shadow: 0 32px 90px rgba(0,0,0,.55); animation: modal-rise .2s ease both; }
@keyframes modal-rise { from { transform: translateY(8px) scale(.985); } }
.modal__head { position: sticky; z-index: 2; top: -22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -22px -22px 16px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); background: rgba(17,26,39,.94); backdrop-filter: blur(12px); }
.modal__head h3 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.modal__head #modalClose { font-size: 19px; }
.modal__box--confirm { width: min(440px, 100%); }
.modal__box--body { width: min(760px, 100%); }
.modal__box--body .pre { max-height: min(60vh, 520px); }
.modal__text { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.modal__box--confirm .form__actions { justify-content: flex-end; margin-top: 22px; }
.toast-root { position: fixed; z-index: 200; right: 22px; bottom: 22px; display: grid; width: min(370px, calc(100vw - 32px)); gap: 9px; }
.toast { position: relative; overflow: hidden; padding: 13px 15px 13px 42px; border: 1px solid var(--line-strong); border-radius: 11px; background: rgba(17,26,39,.97); box-shadow: 0 18px 44px rgba(0,0,0,.38); color: var(--text-soft); font-size: 12px; animation: toast-in .22s ease both; }
.toast::before { position: absolute; top: 15px; left: 16px; display: grid; width: 16px; height: 16px; place-items: center; border-radius: 50%; background: rgba(94,234,212,.14); color: var(--accent); content: "i"; font-size: 10px; font-weight: 800; }
.toast::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: var(--accent); content: ""; animation: toast-life 3.5s linear both; transform-origin: left; }
.toast--error::before { background: rgba(251,113,133,.13); color: var(--danger); content: "!"; }.toast--error::after { background: var(--danger); }
.toast--success::before { background: rgba(74,222,128,.13); color: var(--ok); content: "✓"; }.toast--success::after { background: var(--ok); }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } }
@keyframes toast-life { to { transform: scaleX(0); } }
.skeleton { position: relative; min-height: 178px; overflow: hidden; }
.skeleton::after { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 25%, rgba(255,255,255,.025) 42%, rgba(255,255,255,.055) 50%, rgba(255,255,255,.025) 58%, transparent 75%); content: ""; animation: shimmer 1.6s infinite; transform: translateX(-100%); }
.skeleton__line { height: 10px; margin: 12px 0; border-radius: 5px; background: rgba(148,163,184,.075); }.skeleton__line:first-child { width: 48%; height: 16px; }.skeleton__line:nth-child(2) { width: 82%; }.skeleton__line:nth-child(3) { width: 64%; }
@keyframes shimmer { to { transform: translateX(100%); } }

@media (max-width: 1280px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .event-layout, .split { grid-template-columns: 1fr; }
  .event-side { position: static; }
  .inbox-side { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters > .form__actions { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  .login { grid-template-columns: 1fr; }
  .login__showcase { display: none; }
  .login__panel { background: radial-gradient(600px 300px at 50% -80px, rgba(45,212,191,.1), transparent 70%), var(--bg); }
  .login__lang { margin-bottom: 70px; }
  .app { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .nav { position: sticky; height: auto; align-self: start; align-content: center; flex-flow: row wrap; align-items: center; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav__brand { margin: 0 auto 0 0; padding: 0; }
  .nav__brand .brand-mark { width: 33px; height: 33px; border-radius: 10px; }
  .nav__brand .brand-mark svg { width: 21px; height: 21px; }
  .nav__brand-copy small, .nav__section-label, .nav__system { display: none; }
  .nav__menu { display: flex; order: 3; width: 100%; gap: 5px; margin-top: 11px; overflow-x: auto; }
  .nav__link { min-height: 37px; flex: 1 0 auto; justify-content: center; padding: 7px 12px; }
  .nav__link.is-active::before { right: 20%; bottom: -1px; left: 20%; width: auto; height: 2px; border-radius: 4px 4px 0 0; }
  .nav__user { padding: 0; border: 0; }
  .nav__profile { display: none; }
  .nav__controls { margin: 0; }
  .nav__controls .lang { display: none; }
  .main { padding: 28px 18px 48px; }
  .inbox-side { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .login__panel { padding: 26px 22px; }
  .login__lang { margin-bottom: 56px; }
  .nav__brand-copy strong { font-size: 12px; }
  .nav__link { gap: 7px; font-size: 11px; }
  .nav__link svg { width: 16px; height: 16px; }
  .main { padding: 24px 14px 42px; }
  .topbar { flex-direction: column; margin-bottom: 22px; }
  .topbar > .btn, .topbar > .card__row { width: 100%; }
  .topbar > .btn { min-height: 42px; }
  .topbar h1 { font-size: 27px; }
  .grid { grid-template-columns: 1fr; }
  .entity-card__actions .btn { flex: 1; }
  .filters, .filters--compact, .filters--dash, .fwd-grid { grid-template-columns: 1fr; }
  .filters > .form__actions { grid-column: auto; }
  .filters > .form__actions .btn { flex: 1; }
  .table { min-width: 650px; }
  .kv-row, .token-gen { grid-template-columns: 1fr; }
  .modal { align-items: flex-end; padding: 0; }
  .modal__box { width: 100%; max-height: 92vh; padding: 20px 18px 26px; border-radius: 20px 20px 0 0; }
  .modal__head { top: -20px; margin: -20px -18px 14px; padding: 17px 18px 13px; }
  .toast-root { right: 16px; bottom: 16px; }
}

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