:root {
  --navy: #0b1f33;
  --navy-2: #122a44;
  --ink: #102033;
  --muted: #5b6d7c;
  --line: #e3eaee;
  --bg: #f3f6f8;
  --card: #ffffff;
  --teal: #0e8a86;
  --teal-2: #14a39a;
  --teal-dim: #d7f1ef;
  --gold: #c4a35a;
  --red: #c23b3b;
  --green: #1f8a56;
  --orange: #d4891a;
  --shadow: 0 10px 30px rgba(11, 31, 51, .08);
  --radius: 16px;
  --sidebar: 268px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: -.01em;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

/* ========== LANDING ========== */
.land { background: #071421; color: #e8eef3; }
.land a { color: inherit; }
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 40px;
  background: rgba(7,20,33,.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand { display: flex; gap: 10px; align-items: center; font-weight: 800; letter-spacing: -.03em; }
.logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--teal), #1ad1c4);
  display: grid; place-items: center; color: #04221f; font-weight: 800;
}
.nav-links { display: flex; gap: 22px; color: #9db0c0; font-size: 14px; }
.nav-cta { display: flex; gap: 10px; }
.btn {
  border: 0; cursor: pointer; border-radius: 12px;
  padding: 11px 16px; font-weight: 700; font-size: 14px;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-ghost { background: transparent; color: #d5e2ea; border: 1px solid rgba(255,255,255,.14); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-soft { background: var(--teal-dim); color: #0b4f4c; }

.hero { padding: 72px 40px 40px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.eyebrow { color: #7de0d8; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { font-size: 58px; line-height: .95; margin: 12px 0 18px; letter-spacing: -.05em; }
.hero p.lead { color: #b7c6d2; font-size: 18px; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; margin: 28px 0 18px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { font-size: 12px; color: #c9d7e1; border: 1px solid rgba(255,255,255,.1); padding: 6px 10px; border-radius: 999px; }

.hero-panel {
  background: linear-gradient(180deg, #10283f, #0c2033);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px; padding: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { background: rgba(255,255,255,.04); border-radius: 14px; padding: 12px; }
.kpi b { display: block; font-size: 22px; }
.kpi span { color: #8ea0ae; font-size: 12px; }
.up { color: #3dce8b; } .down { color: #ff7a7a; }
.mini-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13px; }
.mini-table th { text-align: left; color: #7f93a3; font-weight: 600; padding: 8px 6px; }
.mini-table td { padding: 8px 6px; border-top: 1px solid rgba(255,255,255,.05); }

.section { padding: 72px 40px; }
.land .section.light { background: #f4f7f8; color: var(--ink); }
.section h2 { font-size: 36px; letter-spacing: -.04em; margin: 0 0 12px; }
.sub { color: #8aa0b0; max-width: 640px; }
.light .sub { color: var(--muted); }
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.news-card {
  display: flex; flex-direction: column; gap: 8px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px; padding: 16px; min-height: 120px;
}
.news-card b { font-size: 15px; line-height: 1.35; }
.news-mp {
  align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .08em;
  color: #04221f; background: #7de0d8; border-radius: 999px; padding: 2px 8px;
}
.news-meta { margin-top: 8px; font-size: 12px; }
.news-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.news-filters .pill { cursor: pointer; background: transparent; }
.news-filters .pill.on { background: #7de0d8; color: #04221f; border-color: #7de0d8; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 28px; }
.card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px; padding: 18px;
}
.light .card { background: #fff; border-color: var(--line); box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; font-size: 16px; }
.card p { margin: 0; color: #93a7b6; font-size: 13px; line-height: 1.5; }
.light .card p { color: var(--muted); }
.ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--teal-dim); color: var(--teal); font-weight: 800; margin-bottom: 12px; }

.compare { width: 100%; border-collapse: collapse; margin-top: 24px; font-size: 14px; }
.compare th, .compare td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.compare th { color: var(--muted); font-weight: 700; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.price { background: #fff; border-radius: 20px; padding: 24px; border: 1px solid var(--line); }
.price.feat { border: 2px solid var(--teal); transform: translateY(-6px); }
.price b.cost { font-size: 32px; display: block; margin: 8px 0 16px; }
.footer { padding: 28px 40px; color: #7d90a0; display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.06); }

/* ========== APP ========== */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; }
.sidebar {
  background: var(--navy); color: #d7e2ea; padding: 16px 12px 24px;
  position: sticky; top: 0; height: 100vh; overflow: auto;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 8px 10px 16px; font-weight: 800; }
.ws {
  margin: 0 8px 14px; padding: 10px; border-radius: 12px;
  background: #16324d; display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
}
.navg { margin: 0 0 8px; padding: 0 10px; color: #7f93a4; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.slink {
  display: flex; gap: 10px; align-items: center;
  padding: 8px 10px; margin: 2px 4px; border-radius: 10px;
  color: #c5d4de; font-size: 13.5px; cursor: pointer; border: 0; width: calc(100% - 8px);
  background: transparent; text-align: left;
}
.slink:hover, .slink.active { background: #1a3b5c; color: #fff; }
.slink.active { box-shadow: inset 3px 0 0 var(--teal-2); }
.main { min-width: 0; }
.topbar {
  background: #fff; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px; position: sticky; top: 0; z-index: 10;
}
.search {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 12px; min-width: 320px; color: var(--muted);
}
.top-right { display: flex; gap: 8px; align-items: center; }
.chip { background: var(--teal-dim); color: #0c5855; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 700; }
.content { padding: 22px; }
.page-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.page-title h1 { margin: 0; font-size: 28px; letter-spacing: -.03em; }
.page-title p { margin: 6px 0 0; color: var(--muted); }

.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: 1.4fr .8fr; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.panel h2, .panel h3 { margin: 0 0 12px; font-size: 15px; }
.stat b { display: block; font-size: 26px; letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: 12px; }
.delta { font-size: 12px; font-weight: 700; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; padding: 8px 8px; border-bottom: 1px solid var(--line); }
table.data td { padding: 10px 8px; border-bottom: 1px solid #eef3f5; vertical-align: middle; }
table.data tr:hover td { background: #f7fbfb; }
.tag { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 8px; }
.tag-green { background: #e4f7ed; color: var(--green); }
.tag-red { background: #fdecec; color: var(--red); }
.tag-yellow { background: #fff4dd; color: #9a6b00; }
.tag-blue { background: #e7f1fb; color: #1d5f9a; }
.bar { height: 8px; background: #e8eef1; border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--teal); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
select.sel, input.inp {
  border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 10px;
}
.alert { border-left: 4px solid var(--orange); background: #fff8ec; padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.ok { border-left-color: var(--green); background: #eefbf4; }
.bad { border-left-color: var(--red); background: #fff1f1; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 42px; }
.spark span { width: 8px; background: #b7e4e0; border-radius: 3px 3px 0 0; }
.spark span.on { background: var(--teal); }
.muted { color: var(--muted); }
.right { text-align: right; }
.hidden { display: none !important; }
.saas-banner {
  background: linear-gradient(90deg, #12324f, #0e8a86);
  color: #fff; border-radius: 14px; padding: 12px 14px; font-size: 13px;
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px;
}
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: #071421; }
.login {
  width: 420px; background: #fff; border-radius: 20px; padding: 28px;
}
.login h1 { margin: 0 0 6px; }
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; padding-left: 24px; padding-right: 24px; }
  .hero h1 { font-size: 42px; }
  .cards, .news-grid { grid-template-columns: 1fr 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: 1fr 1fr; }
  .nav, .section, .footer { padding-left: 24px; padding-right: 24px; }
}

.logo-img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; background: #0b1f33; }
.logo-img.lg { width: 56px; height: 56px; border-radius: 16px; }

#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #102033; color: #fff; padding: 10px 14px; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2); font-size: 13px; min-width: 220px;
}
.toast.ok { background: #1f8a56; }
.toast.bad { background: #c23b3b; }

.drawer-bg { position: fixed; inset: 0; background: rgba(7,20,33,.45); z-index: 40; }
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: min(440px, 100%);
  background: #fff; z-index: 41; padding: 22px; overflow: auto;
  box-shadow: -20px 0 60px rgba(0,0,0,.2);
}
.cmd {
  position: fixed; inset: 0; background: rgba(7,20,33,.5); z-index: 50;
  display: grid; place-items: start center; padding-top: 12vh;
}
.cmd-box { width: min(560px, 92vw); background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.cmd-box input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 16px; font-size: 16px; outline: none; }
.cmd-item { padding: 10px 16px; cursor: pointer; font-size: 14px; }
.cmd-item:hover, .cmd-item.on { background: #eef7f6; }

.paper {
  background: #fbfaf6; border: 1px solid #e6e0d2; border-radius: 8px;
  padding: 28px 32px; color: #1b1812; max-width: 720px;
  font-family: "Manrope", serif;
}
.paper h2 { font-size: 22px; margin: 0 0 4px; }
.paper .kicker { color: #8a7a4b; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 800; }
.tg {
  background: #0e1d2b; color: #dce7ee; border-radius: 18px; padding: 16px;
  max-width: 420px; font-size: 13.5px; line-height: 1.55;
}

.switch { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 12px; }
.switch button { border: 0; background: transparent; padding: 6px 10px; border-radius: 9px; cursor: pointer; font-weight: 700; font-size: 12px; }
.switch button.on { background: #fff; box-shadow: var(--shadow); }

.row-actions button { margin-right: 4px; }

.notif-pop {
  position: absolute; right: 0; top: 42px; width: 320px; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 15;
  max-height: 360px; overflow: auto;
}
.notif-pop div { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.notif-pop .notif-row.unread { background: #eef6ff; border-left: 3px solid var(--blue, #1d5f9a); }
body.theme-dark .notif-pop .notif-row.unread { background: #16283a; }

body.theme-dark { --bg: #0b1520; --card: #12202d; --ink: #e8eef3; --muted: #93a7b6; --line: #223445; }
body.theme-dark .panel, body.theme-dark .topbar, body.theme-dark .drawer, body.theme-dark .login,
body.theme-dark .cmd-box, body.theme-dark .notif-pop { background: #12202d; color: #e8eef3; }
body.theme-dark table.data tr:hover td { background: #173044; }
body.theme-dark .search, body.theme-dark .sel, body.theme-dark .inp { background: #0b1520; color: #e8eef3; border-color: #223445; }
body.theme-dark .paper { background: #1a2430; color: #e8eef3; border-color: #2a3b4c; }

.hero-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.onboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.onboard .panel { padding: 12px; }
.onboard b { display: block; font-size: 13px; }
.progress { height: 6px; background: #e8eef1; border-radius: 99px; margin-top: 8px; }
.progress i { display: block; height: 100%; width: 75%; background: var(--teal); border-radius: 99px; }
.strat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.strat {
  text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 10px; cursor: pointer;
}
.strat b { display: block; margin-bottom: 4px; }
.strat.on { border-color: var(--teal); background: var(--teal-dim); }
.toolbar label { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.lb-sheet { display: flex; flex-wrap: wrap; gap: 10px; }
.lb { width: 220px; border: 1px solid var(--ink); padding: 8px 10px; background: #fff; color: #111; border-radius: 6px; }
.lb-top { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .06em; color: #555; }
.lb strong { display: block; font-size: 13px; margin: 4px 0; }
.bc { display: flex; height: 42px; align-items: stretch; margin: 6px 0 2px; }
.bc i { display: block; flex: 1; background: #111; }
.bc i.n { background: transparent; }
.lb-code { letter-spacing: .12em; font-size: 11px; text-align: center; }
.lb-meta { font-size: 10px; color: #555; margin-top: 4px; }
@media print {
  .nav, .sidebar, .page-title .toolbar, .page-title button, header, .side-brand, .dock, .ticker, .nav-burger { display: none !important; }
  .lb { break-inside: avoid; }
}

/* ===== motion A ===== */
.ticker {
  overflow: hidden; border-bottom: 1px solid rgba(255,255,255,.06);
  background: #061018; white-space: nowrap;
}
.ticker-track {
  display: inline-flex; gap: 36px; padding: 8px 0;
  animation: ticker 28s linear infinite;
  color: #7de0d8; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.ticker-track span { opacity: .85; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.word-swap {
  display: inline-block; color: #7de0d8;
  transition: transform .28s ease, opacity .28s ease;
}
.word-swap.out { opacity: 0; transform: translateY(10px); }
.reveal { animation: rise .7s ease both; }
.reveal.d1 { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.pulse { animation: pulse 3.2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(20,163,154,.0); }
  50% { box-shadow: 0 0 0 6px rgba(20,163,154,.12); }
}
.hero-panel { animation: floaty 6s ease-in-out infinite; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.pill { animation: fadein .6s ease both; }
.pills .pill:nth-child(2) { animation-delay: .05s; }
.pills .pill:nth-child(3) { animation-delay: .1s; }
.pills .pill:nth-child(4) { animation-delay: .15s; }
.pills .pill:nth-child(5) { animation-delay: .2s; }
.pills .pill:nth-child(6) { animation-delay: .25s; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.btn-primary { transition: transform .15s ease, filter .15s ease; }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }

.nav-burger {
  display: none; border: 1px solid rgba(255,255,255,.16); background: transparent;
  color: #fff; border-radius: 10px; width: 40px; height: 40px; font-size: 18px; cursor: pointer;
}
.app-burger { display: none; color: var(--ink); border-color: var(--line); background: #fff; }
.dock { display: none; }
.side-mask { display: none; }

/* ===== phones ===== */
@media (max-width: 900px) {
  .nav { padding: 10px 14px; gap: 8px; }
  .nav-burger { display: grid; place-items: center; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 58px;
    background: #071421; flex-direction: column; padding: 12px 16px 16px; gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .nav-links.open { display: flex; }
  .hide-sm { display: none !important; }
  .hero { padding: 28px 16px 20px; grid-template-columns: 1fr; gap: 22px; }
  .hero h1 { font-size: clamp(32px, 11vw, 44px); }
  .hero p.lead { font-size: 16px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .kpi-grid { grid-template-columns: 1fr; }
  .section { padding: 40px 16px; }
  .section h2 { font-size: 26px; }
  .cards, .price-grid, .onboard, .news-grid { grid-template-columns: 1fr; }
  .compare { display: block; overflow-x: auto; }
  .footer { flex-direction: column; gap: 8px; padding: 20px 16px; }
  .login { width: min(420px, calc(100vw - 28px)); padding: 22px 18px; }
  .app { grid-template-columns: 1fr; }
  .app-burger { display: grid; place-items: center; flex-shrink: 0; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(280px, 86vw);
    z-index: 30; transform: translateX(-105%); transition: transform .25s ease;
    height: 100vh;
  }
  .app.side-open .sidebar { transform: none; }
  .side-mask { display: none; }
  .app.side-open .side-mask {
    display: block; position: fixed; inset: 0; background: rgba(7,20,33,.45); z-index: 25;
  }
  .topbar { padding: 10px 12px; gap: 8px; }
  .search { min-width: 0; flex: 1; font-size: 13px; }
  .top-right .btn-ghost, .top-right a { display: none; }
  .content { padding: 14px 12px 88px; }
  .page-title { flex-direction: column; }
  .page-title h1 { font-size: 22px; }
  .g4, .g3, .g2 { grid-template-columns: 1fr; }
  .stat b { font-size: 22px; }
  table.data { display: block; overflow-x: auto; }
  .saas-banner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .dock {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: #0b1f33; padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .dock-btn {
    border: 0; background: transparent; color: #9db0c0;
    font-size: 11px; font-weight: 700; padding: 8px 2px; cursor: pointer;
  }
  .dock-btn.on { color: #7de0d8; }
  #toasts { right: 10px; bottom: 72px; left: 10px; }
  .toast { min-width: 0; }
}
@media (max-width: 480px) {
  .cards, .news-grid { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: 1fr; }
  .hero-actions .btn, .nav-cta .btn { width: 100%; text-align: center; }
  .nav-cta { flex: 1; }
  .kpi b { font-size: 20px; }
  .lb { width: 100%; }
  .strat-grid { grid-template-columns: 1fr; }
  .paper, .tg { max-width: 100%; padding: 16px; }
  input.inp, select.sel, .search { font-size: 16px; } /* iOS zoom guard */
}
@media (max-width: 360px) {
  .hero h1 { font-size: 28px; }
  .btn { padding: 10px 12px; font-size: 13px; }
  .dock-btn { font-size: 10px; padding: 6px 0; }
  .page-title h1 { font-size: 20px; }
}
.conn-list { display: flex; flex-direction: column; gap: 10px; }
.conn { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.conn-hd {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; cursor: pointer; width: 100%;
  border: 0; background: transparent; text-align: left;
}
.conn-hd:hover { background: #f7fafb; }
.conn-hd b { display: block; font-size: 15px; }
.conn-hd span.muted { font-size: 12px; }
.conn-hd .grow { flex: 1; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #c5d0d6; flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 0 4px rgba(31,138,86,.15); }
.conn-bd { display: none; padding: 0 16px 16px; border-top: 1px solid var(--line); }
.conn.open .conn-bd { display: block; padding-top: 14px; }
.conn-field { margin-bottom: 10px; }
.conn-field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.conn-field .hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.conn-field.bad input { border-color: var(--red); }
.conn-field .err { display: none; font-size: 11px; color: var(--red); margin-top: 4px; }
.conn-field.bad .err { display: block; }
.conn-actions { position: sticky; bottom: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 16px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }

@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding-top: 16px; }
  .ticker { display: none; }
  .dock { padding-top: 4px; padding-bottom: 4px; }
  .content { padding-bottom: 64px; }
  .sidebar { width: min(240px, 70vw); }
}
@media (pointer: coarse) {
  .slink, .dock-btn, .btn { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ========== SaaS workspace ========== */
.src-banner {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 12px; margin-bottom: 14px;
  background: #fff8ec; border: 1px solid #f0e0c0; font-size: 13px;
}
.src-banner.live { background: #eefbf4; border-color: #cde9d8; }
.src-banner.empty { background: #fff1f1; border-color: #f3d0d0; }
.src-banner.stale { box-shadow: inset 3px 0 0 var(--orange); }
.src-mp { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.src-mp .dot { display: inline-block; }
.filterbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px;
}
.seg {
  display: flex; gap: 2px; background: var(--bg); padding: 3px; border-radius: 12px; border: 1px solid var(--line);
}
.seg button {
  border: 0; background: transparent; padding: 7px 12px; border-radius: 9px;
  cursor: pointer; font-weight: 700; font-size: 12px; color: var(--muted);
}
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.state-box {
  background: #fff; border: 1px dashed var(--line); border-radius: 16px;
  padding: 28px 22px; text-align: left; margin-bottom: 14px;
}
.state-box b { display: block; font-size: 16px; margin-bottom: 6px; }
.state-box p { margin: 0 0 12px; color: var(--muted); }
.state-box.loading { border-style: solid; }
.mp-ind { display: flex; gap: 6px; align-items: center; }
.mp-ind span {
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; color: var(--muted);
}
.mp-ind span.on { background: #e4f7ed; color: var(--green); border-color: #cde9d8; }
.mp-ind span.warn { background: #fff4dd; color: #9a6b00; }
.news-app { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.news-item a { display: block; margin: 8px 0; }
.news-item .news-mp { background: var(--teal-dim); color: #0c5855; }
.formula { margin: 12px 0 0; padding-left: 18px; font-size: 12px; }
.pager { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.plan-on { border: 2px solid var(--teal); }
.ticket-msg { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
th.sorted { color: var(--teal); }
.report-pre { font-size: 12px; white-space: pre-wrap; max-height: 360px; overflow: auto; }
.table-wrap { overflow-x: auto; }
.alert-hd { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.login .alert { margin: 0 0 12px; }
body.theme-dark .src-banner { background: #2a2418; border-color: #4a3d22; color: #e8eef3; }
body.theme-dark .src-banner.live { background: #163024; border-color: #1f5a3c; }
body.theme-dark .seg { background: #0b1520; }
body.theme-dark .seg button.on { background: #1a3b5c; color: #fff; }
body.theme-dark .state-box, body.theme-dark .conn { background: #12202d; }
@media (max-width: 900px) {
  .news-app { grid-template-columns: 1fr; }
  .mp-ind { display: none; }
  .filterbar { flex-direction: column; align-items: stretch; }
}

