:root {
  color-scheme: light;
  --ink: #11192e;
  --muted: #65708a;
  --line: #dce2ed;
  --paper: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #edf3ff;
  --blue: #2d68ff;
  --blue-dark: #194cca;
  --cyan: #00b8d9;
  --mint: #12a77d;
  --amber: #d07a00;
  --red: #c43f52;
  --navy: #07101f;
  --navy-soft: #111d32;
  --shadow-sm: 0 12px 32px rgba(21, 39, 75, 0.08);
  --shadow-lg: 0 30px 90px rgba(13, 35, 82, 0.18);
  --radius: 18px;
  --radius-lg: 28px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img, svg { display: block; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: #fff;
  background: var(--navy);
  border-radius: 10px;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.narrow { width: min(760px, calc(100% - 40px)); margin-inline: auto; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.section-title {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}
.section-lead { max-width: 680px; margin: 18px 0 0; color: var(--muted); font-size: 1.08rem; }

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgba(220, 226, 237, 0.82);
  background: rgba(247, 249, 252, 0.9);
  backdrop-filter: blur(18px);
}
.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 1.14rem; font-weight: 850; letter-spacing: -0.02em; }
.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--blue), #184bd1 58%, var(--cyan));
  box-shadow: 0 9px 24px rgba(45, 104, 255, 0.26);
}
.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  left: 8px;
  width: 18px;
  height: 5px;
  border: 2px solid #fff;
  border-top: 0;
  border-radius: 0 0 14px 14px;
}
.brand-mark::before { top: 7px; }
.brand-mark::after { top: 15px; width: 10px; left: 12px; }
.brand-sub { color: var(--muted); font-size: 0.78rem; font-weight: 650; }
.nav-links { display: flex; align-items: center; gap: 28px; color: #3d465c; font-size: 0.93rem; font-weight: 650; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--blue); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.menu-button { display: none; }

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 760;
  line-height: 1.1;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .icon-button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(45, 104, 255, 0.22);
  outline-offset: 2px;
}
.button-primary { color: #fff; background: var(--blue); box-shadow: 0 10px 26px rgba(45, 104, 255, 0.25); }
.button-primary:hover { background: var(--blue-dark); box-shadow: 0 14px 32px rgba(45, 104, 255, 0.3); }
.button-secondary { color: var(--ink); border-color: var(--line); background: var(--surface); }
.button-secondary:hover { border-color: #b8c4d9; background: #fbfcff; }
.button-danger { color: var(--red); border-color: #f0c4cb; background: #fff6f7; }
.button-quiet { color: var(--blue-dark); background: transparent; }
.button-small { min-height: 36px; padding: 8px 12px; border-radius: 10px; font-size: 0.86rem; }
.button-block { width: 100%; }
.button[disabled] { opacity: 0.58; cursor: wait; transform: none; }
.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  cursor: pointer;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 84px;
  background:
    radial-gradient(circle at 8% 22%, rgba(0, 184, 217, 0.13), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(45, 104, 255, 0.16), transparent 33%),
    linear-gradient(180deg, #fbfdff 0%, #f4f7fc 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(51, 82, 134, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(51, 82, 134, 0.055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 62px; align-items: center; }
.hero-copy h1 { margin: 0; font-size: clamp(3rem, 6vw, 5.6rem); line-height: 0.96; letter-spacing: -0.065em; }
.hero-copy h1 span { color: var(--blue); }
.hero-copy > p { max-width: 620px; margin: 24px 0 0; color: #56627a; font-size: clamp(1.05rem, 2vw, 1.23rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 20px; color: var(--muted); font-size: 0.87rem; }
.product-window {
  overflow: hidden;
  border: 1px solid rgba(147, 166, 201, 0.5);
  border-radius: 24px;
  background: #0b1425;
  box-shadow: 0 35px 90px rgba(22, 49, 100, 0.28);
  transform: perspective(1100px) rotateY(-4deg) rotateX(2deg);
}
.window-bar { height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 15px; border-bottom: 1px solid #24314a; background: #111d31; }
.window-dot { width: 8px; height: 8px; border-radius: 50%; background: #52627e; }
.window-dot:first-child { background: #ff6b6b; }
.window-dot:nth-child(2) { background: #ffc44d; }
.window-dot:nth-child(3) { background: #36d69b; }
.window-label { margin-left: auto; color: #8fa1c0; font-size: 0.72rem; }
.product-body { padding: 18px; color: #dbe7ff; }
.product-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.product-kicker { color: #7e95bc; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; }
.product-body h2 { margin: 5px 0 0; color: #fff; font-size: 1.3rem; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; color: #8ae4c4; background: rgba(18, 167, 125, 0.14); border: 1px solid rgba(18, 167, 125, 0.25); border-radius: 999px; font-size: 0.7rem; font-weight: 750; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #3cdfa9; box-shadow: 0 0 0 4px rgba(60, 223, 169, 0.12); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.metric { min-height: 94px; padding: 14px; border: 1px solid #243451; border-radius: 14px; background: #101c31; }
.metric span { color: #8da0c2; font-size: 0.72rem; }
.metric strong { display: block; margin-top: 9px; color: #fff; font-size: 1.32rem; }
.metric small { color: #6f83a7; font-size: 0.68rem; }
.network-list { margin-top: 12px; padding: 12px 14px; border: 1px solid #243451; border-radius: 14px; background: #0d192c; }
.network-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #1d2c46; }
.network-row:last-child { border-bottom: 0; }
.network-name { display: flex; align-items: center; gap: 10px; color: #dce8ff; font-size: 0.82rem; }
.network-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #76a0ff; background: #172a48; }
.network-state { color: #8fa1c0; font-size: 0.72rem; }

.trust-strip { padding: 24px 0; border-block: 1px solid var(--line); background: #fff; }
.trust-content { display: flex; justify-content: center; align-items: center; gap: 18px 46px; flex-wrap: wrap; color: #526078; font-size: 0.9rem; font-weight: 700; }
.trust-item { display: inline-flex; align-items: center; gap: 9px; }
.trust-check { width: 22px; height: 22px; display: grid; place-items: center; color: var(--mint); border-radius: 50%; background: #e8f8f2; }

.section { padding: 100px 0; }
.section-white { background: #fff; }
.section-dark { color: #f4f7ff; background: var(--navy); }
.section-dark .section-lead { color: #9eb0cf; }
.section-dark .eyebrow { color: #6ea0ff; }
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 46px; }
.module-card { min-height: 235px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
.module-card:hover { transform: translateY(-4px); border-color: #b9caf0; box-shadow: var(--shadow-sm); }
.module-icon { width: 44px; height: 44px; display: grid; place-items: center; color: var(--blue); border-radius: 13px; background: var(--surface-soft); }
.module-card h3 { margin: 22px 0 8px; font-size: 1.12rem; }
.module-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.module-card small { display: block; margin-top: 18px; color: #8993a7; font-weight: 650; }

.workflow { display: grid; grid-template-columns: 0.88fr 1.12fr; gap: 70px; align-items: center; margin-top: 50px; }
.workflow-copy { display: grid; gap: 10px; }
.workflow-step { display: grid; grid-template-columns: 44px 1fr; gap: 15px; padding: 17px; border: 1px solid transparent; border-radius: 15px; }
.workflow-step.active { border-color: #274165; background: #0e1b30; }
.step-number { width: 38px; height: 38px; display: grid; place-items: center; color: #9fc0ff; border: 1px solid #31486a; border-radius: 12px; font-size: 0.78rem; font-weight: 850; }
.workflow-step h3 { margin: 1px 0 4px; font-size: 1rem; }
.workflow-step p { margin: 0; color: #93a5c3; font-size: 0.88rem; }
.workflow-panel { min-height: 420px; padding: 26px; border: 1px solid #2b3a54; border-radius: 24px; background: linear-gradient(145deg, #111f36, #0c1729); box-shadow: inset 0 1px rgba(255,255,255,0.04); }
.signal-map { position: relative; height: 240px; overflow: hidden; border: 1px solid #263a59; border-radius: 16px; background: #0a1424; }
.signal-map::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(#20304a 1px, transparent 1px), linear-gradient(90deg, #20304a 1px, transparent 1px); background-size: 34px 34px; opacity: 0.55; }
.map-line { position: absolute; height: 2px; background: linear-gradient(90deg, transparent, #3975ff, #22d3ae); transform-origin: left; }
.map-line.one { width: 57%; left: 22%; top: 48%; transform: rotate(-18deg); }
.map-line.two { width: 38%; left: 21%; top: 49%; transform: rotate(31deg); }
.map-line.three { width: 42%; left: 56%; top: 62%; transform: rotate(-38deg); }
.map-node { position: absolute; width: 18px; height: 18px; border: 4px solid #0b1628; border-radius: 50%; background: #4d82ff; box-shadow: 0 0 0 3px rgba(77,130,255,.25); }
.map-node.core { width: 26px; height: 26px; left: 20%; top: 45%; background: #16c49a; box-shadow: 0 0 0 6px rgba(22,196,154,.14); }
.map-node.a { left: 71%; top: 25%; }.map-node.b { left: 54%; top: 68%; }.map-node.c { left: 84%; top: 51%; }
.workflow-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.summary-cell { padding: 14px; border: 1px solid #263a59; border-radius: 13px; }
.summary-cell span { color: #8195b6; font-size: 0.74rem; }
.summary-cell strong { display: block; margin-top: 4px; font-size: 0.94rem; }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 46px; }
.principle { padding: 28px; border-radius: var(--radius); background: #f6f8fc; }
.principle strong { display: block; margin-bottom: 8px; font-size: 1.05rem; }
.principle p { margin: 0; color: var(--muted); font-size: 0.91rem; }
.principle-line { width: 36px; height: 3px; margin-bottom: 20px; border-radius: 99px; background: var(--blue); }
.cta-panel { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 30px; padding: 42px; color: #fff; border-radius: var(--radius-lg); background: linear-gradient(135deg, #0f2e72, #245dff 62%, #00a9ce); box-shadow: var(--shadow-lg); }
.cta-panel h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.06; letter-spacing: -0.04em; }
.cta-panel p { max-width: 650px; margin: 13px 0 0; color: #d9e7ff; }
.cta-panel .button { color: var(--blue-dark); background: #fff; box-shadow: 0 12px 34px rgba(3, 20, 64, 0.25); }

.site-footer { padding: 50px 0 26px; color: #b8c5da; background: #08111f; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.site-footer .brand { color: #fff; }
.footer-copy { max-width: 360px; margin: 16px 0 0; color: #8292ae; font-size: 0.9rem; }
.footer-column strong { display: block; margin-bottom: 14px; color: #fff; font-size: 0.86rem; }
.footer-column a { display: block; margin: 9px 0; color: #91a0bb; font-size: 0.86rem; }
.footer-column a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 42px; padding-top: 22px; border-top: 1px solid #1c2940; color: #71829e; font-size: 0.78rem; }

/* Authentication surfaces */
.auth-body { min-height: 100vh; color: #eff4ff; background: var(--navy); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .92fr) minmax(520px, 1.08fr); }
.auth-aside {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 42px clamp(34px, 5vw, 76px);
  background:
    radial-gradient(circle at 16% 18%, rgba(0, 190, 218, .18), transparent 30%),
    radial-gradient(circle at 82% 70%, rgba(45, 104, 255, .25), transparent 38%),
    #091426;
}
.auth-aside::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(100,140,205,.07) 1px, transparent 1px), linear-gradient(90deg,rgba(100,140,205,.07) 1px, transparent 1px); background-size: 50px 50px; mask-image: linear-gradient(#000, transparent); }
.auth-aside .brand { position: relative; z-index: 1; color: #fff; }
.auth-story { position: relative; z-index: 1; max-width: 580px; margin: auto 0; }
.auth-story h1 { margin: 0; font-size: clamp(2.3rem, 5vw, 4.4rem); line-height: 1; letter-spacing: -0.055em; }
.auth-story h1 span { color: #6e9cff; }
.auth-story p { max-width: 520px; margin: 22px 0 0; color: #a9b9d3; font-size: 1.05rem; }
.auth-bullets { display: grid; gap: 12px; margin-top: 32px; }
.auth-bullet { display: flex; align-items: center; gap: 11px; color: #d4def0; font-size: .9rem; }
.auth-bullet i { width: 24px; height: 24px; display: grid; place-items: center; color: #6ff0c5; border-radius: 50%; background: rgba(18, 167, 125, .16); font-style: normal; }
.auth-footer { position: relative; z-index: 1; display: flex; gap: 20px; color: #7386a7; font-size: .78rem; }
.auth-footer a:hover { color: #fff; }
.auth-main { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 90px clamp(24px, 5vw, 76px) 36px; color: var(--ink); background: #fbfcff; }
.locale-switch { position: absolute; top: 22px; right: clamp(24px, 5vw, 76px); display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); }
.locale-switch select { width: 145px; min-height: 38px; padding: 7px 12px; }
.auth-panel[data-view="register"] { width: min(680px, 100%); }
#register-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; }
#register-form > .field-wide, #register-form > .registration-section, #register-form > .check, #register-form > button { grid-column: 1 / -1; }
.registration-section { margin: 5px 0 0; font-size: .95rem; color: var(--ink); }
.registration-phone { display: grid; grid-template-columns: minmax(130px,.8fr) minmax(0,1fr); gap: 10px; }
.registration-phone select { min-width: 0; text-overflow: ellipsis; }
.registration-details { margin-top: 8px; font-size: .8rem; max-width: 340px; white-space: normal; }
.registration-details summary { cursor: pointer; color: var(--blue-dark); }
.registration-details dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; margin-top: 10px; }
.registration-details dt { color: var(--muted); }
.registration-details dd { margin: 0; overflow-wrap: anywhere; }
.auth-panel { width: min(460px, 100%); }
.auth-story h1 span:first-child { color: inherit; }
.auth-panel-header { margin-bottom: 26px; }
.auth-panel-header h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.45rem); line-height: 1.08; letter-spacing: -0.04em; }
.auth-panel-header p { margin: 10px 0 0; color: var(--muted); }
.auth-switch { margin-top: 24px; color: var(--muted); text-align: center; font-size: .89rem; }
.auth-switch a { color: var(--blue-dark); font-weight: 750; }
.form { display: grid; gap: 17px; }
.field { display: grid; gap: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { color: #2e3850; font-size: .84rem; font-weight: 740; }
.field-help { margin: 0; color: #7d879b; font-size: .76rem; }
.control {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--ink);
  border: 1px solid #cfd7e6;
  border-radius: 12px;
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.control:hover { border-color: #afbbd0; }
.control:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(45,104,255,.1); outline: none; }
textarea.control { min-height: 100px; resize: vertical; }
.password-wrap { position: relative; }
.password-wrap .control { padding-right: 48px; }
.password-toggle { position: absolute; top: 5px; right: 5px; width: 38px; height: 38px; border: 0; border-radius: 9px; color: #66728a; background: transparent; cursor: pointer; }
.password-toggle:hover { background: #f0f3f8; }
.form-options { display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: .82rem; }
.check { display: inline-flex; align-items: flex-start; gap: 9px; color: #5e687d; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--blue); }
.text-link { color: var(--blue-dark); font-weight: 720; }
.form-message { padding: 12px 14px; border: 1px solid; border-radius: 11px; font-size: .86rem; }
.form-message.info { color: #235394; border-color: #bfd3f7; background: #eef5ff; }
.form-message.success { color: #12694e; border-color: #b4e0d1; background: #effbf7; }
.form-message.error { color: #9e2d40; border-color: #f0bec6; background: #fff4f6; }
.loading-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1s infinite ease-in-out; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.75); } }
.token-state { padding: 32px 0; text-align: center; }
.state-icon { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 20px; color: var(--blue); border-radius: 20px; background: var(--surface-soft); }
.state-icon.success { color: var(--mint); background: #eaf9f4; }
.state-icon.error { color: var(--red); background: #fff0f2; }
.token-state h2 { margin: 0; font-size: 1.8rem; }
.token-state p { margin: 10px auto 22px; color: var(--muted); }
.app-welcome { width: min(620px, 100%); }
.welcome-card { padding: 30px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow-sm); }
.welcome-top { display: flex; align-items: center; gap: 14px; }
.avatar { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: #fff; background: linear-gradient(145deg, var(--blue), var(--cyan)); font-weight: 850; }
.welcome-top h2 { margin: 0; font-size: 1.3rem; }
.welcome-top p { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.empty-product { margin-top: 24px; padding: 24px; border: 1px dashed #bfc9da; border-radius: 16px; background: #fafcff; }
.empty-product h3 { margin: 0 0 7px; }
.empty-product p { margin: 0; color: var(--muted); font-size: .9rem; }
.account-org-grid { display: grid; gap: 12px; margin-top: 24px; }
.account-org-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fbfcff; }
.account-org-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.account-org-head h3 { margin: 0; font-size: 1rem; }
.account-org-head p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }
.account-org-details { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 0; }
.account-org-details div { min-width: 0; }
.account-org-details dt { color: var(--muted); font-size: .7rem; }
.account-org-details dd { overflow: hidden; margin: 3px 0 0; color: var(--ink); font-size: .82rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.account-workspace-access { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.account-workspace-access p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.account-workspace-access .button { flex: 0 0 auto; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* Master administration */
.admin-body { min-height: 100vh; background: #f1f4f9; }
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, #1e3763, #08111f 55%); }
.admin-login-card { width: min(440px, 100%); padding: 30px; border: 1px solid #263651; border-radius: 24px; background: rgba(255,255,255,.97); box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.admin-login-card .brand { margin-bottom: 30px; }
.admin-login-card h1 { margin: 0; font-size: 1.8rem; letter-spacing: -.035em; }
.admin-login-card > p { margin: 8px 0 24px; color: var(--muted); }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 18px; color: #c7d2e5; background: #091322; }
.admin-sidebar .brand { padding: 0 9px; color: #fff; }
.admin-caption { margin: 30px 10px 9px; color: #647795; font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.admin-nav { display: grid; gap: 4px; }
.admin-nav button { width: 100%; display: flex; align-items: center; gap: 11px; padding: 11px 12px; color: #9eafc9; border: 0; border-radius: 11px; background: transparent; cursor: pointer; text-align: left; font-weight: 650; }
.admin-nav button:hover { color: #fff; background: #101f35; }
.admin-nav button.active { color: #fff; background: #1e4ca2; }
.admin-nav svg { width: 18px; height: 18px; }
.admin-profile { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 14px 10px 0; border-top: 1px solid #1c2a3f; }
.admin-profile .avatar { width: 36px; height: 36px; border-radius: 11px; font-size: .8rem; }
.admin-profile-text { min-width: 0; flex: 1; }
.admin-profile-text strong, .admin-profile-text span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-profile-text strong { color: #fff; font-size: .8rem; }
.admin-profile-text span { color: #7385a2; font-size: .68rem; }
.admin-profile button { border: 0; color: #8293ae; background: none; cursor: pointer; }
.admin-main { min-width: 0; }
.admin-topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); }
.admin-topbar h1 { margin: 0; font-size: 1.18rem; }
.admin-topbar p { margin: 2px 0 0; color: var(--muted); font-size: .78rem; }
.admin-content { padding: 30px; }
.admin-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.admin-heading h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.2rem); letter-spacing: -.04em; }
.admin-heading p { margin: 6px 0 0; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-card { padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 7px 24px rgba(25,46,86,.04); }
.stat-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: .8rem; font-weight: 680; }
.stat-card-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--blue); border-radius: 10px; background: var(--surface-soft); }
.stat-card strong { display: block; margin-top: 14px; font-size: 1.85rem; letter-spacing: -.04em; }
.stat-card small { color: #8b95a8; }
.panel { border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 8px 28px rgba(25,46,86,.04); }
.panel + .panel { margin-top: 18px; }
.panel-spaced { margin-top: 18px; }
.panel-copy { padding: 22px; color: var(--muted); font-size: .9rem; }
.email-settings-form { max-width: 880px; }
.email-settings-form small { color: var(--muted); font-size: .78rem; line-height: 1.6; }
.email-enabled { display: flex; align-items: center; gap: 10px; color: var(--ink); cursor: pointer; }
.email-enabled input { width: 17px; height: 17px; accent-color: var(--blue); }
.email-test-recipient { margin: 0; font-size: .8rem; color: var(--muted); }
.panel-head { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 1rem; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: .76rem; }
.panel-tools { display: flex; align-items: center; gap: 9px; }
.search { position: relative; }
.search .control { width: min(290px, 30vw); min-height: 40px; padding-left: 37px; }
.search svg { position: absolute; top: 11px; left: 12px; width: 17px; height: 17px; color: #7d8a9f; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.data-table th, .data-table td { padding: 14px 18px; border-bottom: 1px solid #e9edf4; text-align: left; vertical-align: middle; }
.data-table th { color: #6f7a8f; background: #fafbfe; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcff; }
.cell-main { display: block; color: #172039; font-weight: 730; }
.cell-sub { display: block; margin-top: 3px; color: #7a8498; font-size: .74rem; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: .69rem; font-weight: 800; text-transform: capitalize; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-active, .badge-trialing { color: #0e7d5a; background: #e7f8f1; }
.badge-pending, .badge-trial, .badge-invited { color: #a36500; background: #fff5dc; }
.badge-locked, .badge-past_due, .badge-suspended { color: #b03b4d; background: #fff0f2; }
.badge-disabled, .badge-closed, .badge-canceled, .badge-expired, .badge-paused { color: #657087; background: #eef1f5; }
.row-actions { display: flex; gap: 7px; justify-content: flex-end; }
.empty-state { padding: 50px 24px; color: var(--muted); text-align: center; }
.empty-state svg { width: 42px; height: 42px; margin: 0 auto 12px; color: #aab5c8; }
.empty-state strong { display: block; color: var(--ink); }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .77rem; }
.skeleton { min-height: 16px; border-radius: 7px; background: linear-gradient(90deg,#eef1f6,#f8f9fb,#eef1f6); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skeleton-row { margin: 14px; }
.control.compact-control { min-height: 36px; padding: 6px 9px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 20px; box-shadow: 0 30px 100px rgba(8,20,46,.35); }
.dialog::backdrop { background: rgba(5,12,26,.64); backdrop-filter: blur(4px); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 23px 24px 18px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 1.25rem; }
.dialog-head p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.dialog-body { max-height: calc(100vh - 210px); overflow-y: auto; padding: 22px 24px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 24px; border-top: 1px solid var(--line); background: #fafbfe; }
.toast-region { position: fixed; z-index: 100; right: 22px; bottom: 22px; display: grid; gap: 10px; width: min(390px, calc(100% - 44px)); }
.toast { display: grid; grid-template-columns: 25px 1fr auto; gap: 10px; padding: 14px; color: #edf4ff; border: 1px solid #273a58; border-radius: 14px; background: #0d192c; box-shadow: 0 18px 50px rgba(0,0,0,.25); animation: toast-in .2s ease-out; }
.toast.success { border-color: #1d705b; }.toast.error { border-color: #8c3342; }
.toast strong { display: block; font-size: .84rem; }.toast p { margin: 2px 0 0; color: #aebdd4; font-size: .76rem; }
.toast button { align-self: start; color: #90a2bd; border: 0; background: none; cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Documentation */
.docs-body { background: #fff; }
.docs-shell { min-height: 100vh; display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.docs-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 24px 22px; border-right: 1px solid var(--line); background: #f8faff; }
.docs-sidebar .brand { margin-bottom: 28px; }
.docs-nav strong { display: block; margin: 20px 10px 8px; color: #8791a4; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; }
.docs-nav a { display: block; padding: 8px 10px; color: #566178; border-radius: 8px; font-size: .85rem; }
.docs-nav a:hover, .docs-nav a.active { color: var(--blue-dark); background: #eaf0ff; }
.docs-main { min-width: 0; }
.docs-topbar { min-height: 64px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 32px; border-bottom: 1px solid var(--line); }
.docs-content { width: min(880px, calc(100% - 48px)); margin: 0 auto; padding: 62px 0 100px; }
.docs-content h1 { margin: 0; font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1; letter-spacing: -.055em; }
.docs-content h2 { margin: 54px 0 14px; font-size: 1.7rem; letter-spacing: -.03em; }
.docs-content h3 { margin: 30px 0 10px; font-size: 1.05rem; }
.docs-content p, .docs-content li { color: #59647a; }
.docs-lead { max-width: 730px; font-size: 1.08rem; }
.callout { margin: 24px 0; padding: 18px 20px; border-left: 4px solid var(--blue); border-radius: 0 12px 12px 0; background: #eef4ff; }
.callout strong { display: block; color: var(--ink); }
.callout p { margin: 5px 0 0; }
.code-block { position: relative; overflow-x: auto; margin: 18px 0; padding: 20px; color: #dce8ff; border-radius: 14px; background: #091426; font: .83rem/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.code-block .token-blue { color: #7aa2ff; }.code-block .token-green { color: #70dfbd; }.code-block .token-dim { color: #7285a5; }
.endpoint { display: grid; grid-template-columns: 86px 1fr; gap: 13px; align-items: start; margin: 10px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.method { display: inline-flex; justify-content: center; padding: 4px 8px; border-radius: 7px; color: #0d7656; background: #e5f8f0; font-size: .7rem; font-weight: 850; }
.method.post { color: #2259bb; background: #e9f0ff; }.method.patch { color: #9a6200; background: #fff3da; }
.endpoint code { color: #172039; font: .82rem ui-monospace, monospace; word-break: break-all; }
.endpoint small { display: block; margin-top: 4px; color: #7d879a; }

.api-hero { min-height: 100vh; display: grid; place-items: center; padding: 44px 20px; color: #edf4ff; background: radial-gradient(circle at 20% 10%, #163a72, transparent 32%), radial-gradient(circle at 80% 80%, #0a4e5f, transparent 30%), #07101f; }
.api-card { width: min(850px, 100%); padding: clamp(28px, 6vw, 58px); border: 1px solid #2a3c5c; border-radius: 28px; background: rgba(10,22,39,.85); box-shadow: 0 34px 100px rgba(0,0,0,.36); backdrop-filter: blur(12px); }
.api-card h1 { margin: 30px 0 0; font-size: clamp(2.7rem, 7vw, 5.4rem); line-height: .94; letter-spacing: -.06em; }
.api-card > p { max-width: 660px; margin: 22px 0 0; color: #9fb0ca; font-size: 1.06rem; }
.api-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 30px; }
.api-card .button-secondary { color: #dce8ff; border-color: #334865; background: #111f34; }
.api-status { display: flex; align-items: center; gap: 10px; margin-top: 30px; color: #8295b3; font-size: .81rem; }
.api-status-dot { width: 9px; height: 9px; border-radius: 50%; background: #71809a; }
.api-status.ok .api-status-dot { background: #3cdfa9; box-shadow: 0 0 0 5px rgba(60,223,169,.11); }
.api-status.error .api-status-dot { background: #ff657a; }

@media (max-width: 980px) {
  .nav-links { display: none; }
  .menu-button { display: inline-grid; }
  .hero-grid, .workflow { grid-template-columns: 1fr; }
  .product-window { max-width: 660px; margin-inline: auto; transform: none; }
  .module-grid, .principles { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-grid > :last-child { grid-column: 2; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { min-height: 360px; }
  .auth-story { margin: 70px 0; }
  .auth-footer { margin-top: 20px; }
  .admin-shell { grid-template-columns: 82px minmax(0,1fr); }
  .admin-sidebar { padding-inline: 13px; }
  .admin-sidebar .brand span, .admin-caption, .admin-nav button span, .admin-profile-text, .admin-profile > button { display: none; }
  .admin-sidebar .brand { justify-content: center; padding: 0; }
  .admin-nav button { justify-content: center; padding: 12px; }
  .admin-profile { justify-content: center; padding-inline: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .wrap, .narrow { width: min(100% - 28px, 1180px); }
  .site-header .nav-actions .button-secondary { display: none; }
  .hero { padding: 66px 0 62px; }
  .hero-copy h1 { font-size: clamp(2.75rem, 15vw, 4.2rem); }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric:last-child { grid-column: span 2; }
  .section { padding: 72px 0; }
  .module-grid, .principles, .workflow-summary { grid-template-columns: 1fr; }
  .cta-panel { grid-template-columns: 1fr; padding: 30px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: span 2; }
  .footer-grid > :last-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
  .auth-aside { min-height: 270px; padding: 28px 24px; }
  .auth-story { margin: 46px 0 28px; }
  .auth-story h1 { font-size: 2.45rem; }
  .auth-story p, .auth-bullets { display: none; }
  .auth-main { min-height: auto; padding: 88px 22px 42px; }
  #register-form { grid-template-columns: minmax(0,1fr); }
  #register-form > * { grid-column: 1; }
  .field-row { grid-template-columns: 1fr; }
  .admin-shell { display: block; }
  .admin-sidebar { position: fixed; z-index: 60; top: auto; right: 0; bottom: 0; left: 0; width: 100%; height: 66px; display: block; padding: 8px 10px; border-top: 1px solid #26364f; }
  .admin-sidebar > .brand, .admin-caption, .admin-profile { display: none; }
  .admin-nav { display: grid; grid-template-columns: repeat(5,1fr); }
  .admin-nav button { min-width: 0; display: grid; place-items: center; gap: 2px; padding: 5px 3px; font-size: .62rem; }
  .admin-nav button span { display: block; overflow: hidden; max-width: 100%; text-overflow: ellipsis; }
  .admin-nav svg { width: 18px; height: 18px; }
  .admin-topbar { padding: 0 16px; }
  .admin-content { padding: 22px 14px 90px; }
  .admin-heading { align-items: flex-start; flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr; }
  .panel-head { align-items: stretch; flex-direction: column; }
  .panel-tools { align-items: stretch; flex-direction: column; }
  .search .control { width: 100%; }
  .docs-shell { display: block; }
  .docs-sidebar { position: static; width: 100%; height: auto; padding: 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .docs-nav { display: none; }
  .docs-sidebar .brand { margin: 0; }
  .docs-topbar { display: none; }
  .docs-content { width: min(100% - 32px, 880px); padding-top: 42px; }
  .endpoint { grid-template-columns: 72px 1fr; }
}

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