:root {
  --harbour: #0b1f3a;
  --pulse: #1d4ed8;
  --pulse-deep: #1e3a8a;
  --current: #0891b2;
  --mist: #f4f7fb;
  --ink: #0f172a;
  --slate: #5b6b82;
  --line: #e2e8f0;
  --paid: #047857;
  --white: #ffffff;
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--mist);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--pulse); }
h1 { font-size: 2.2rem; line-height: 1.15; margin: 0 0 0.6rem; letter-spacing: -0.03em; }
h2 { margin: 0 0 0.4rem; font-size: 1.05rem; }
p { margin: 0; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--harbour);
  color: var(--white);
}
.brand { color: var(--white); text-decoration: none; font-weight: 700; display: flex; align-items: center; gap: 0.55rem; }
.brand span span { color: #93c5fd; }
.brand-mark { color: var(--current); display: flex; }
.top nav { display: flex; align-items: center; gap: 0.8rem; }
.top a { color: var(--white); }
.top button { background: transparent; color: var(--white); border: 0; font: inherit; cursor: pointer; }

main { max-width: 960px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.eyebrow { color: var(--current); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.78rem; margin-bottom: 0.6rem; }
.lede { color: var(--slate); max-width: 38rem; line-height: 1.5; }

.modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.modules article, .panel, .facts { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem; }
.modules p { color: var(--slate); line-height: 1.45; }
.state { margin-top: 1rem; font-weight: 700; font-size: 0.85rem; }
.state.on { color: var(--paid); }
.state.wait { color: var(--pulse); }
.state.off { color: var(--slate); }

.panel { max-width: 28rem; }
form { display: grid; gap: 0.9rem; margin-top: 1.2rem; }
label { display: grid; gap: 0.35rem; font-weight: 600; }
input { font: inherit; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 10px; }
.button, button.button {
  display: inline-block;
  background: var(--pulse);
  color: var(--white);
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  width: fit-content;
}
.button:hover, button.button:hover { background: var(--pulse-deep); }
.error { background: #fef2f2; color: #b91c1c; border-radius: 12px; padding: 0.7rem 0.8rem; margin-top: 1rem; }
.secret { color: var(--slate); font-family: Consolas, ui-monospace, monospace; margin: 0.6rem 0 0; word-break: break-all; font-size: 0.82rem; }
.qr svg { display: block; width: min(240px, 68vw); height: auto; aspect-ratio: 1; }
.choices { border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 1rem; display: grid; gap: 0.45rem; }
.address { color: var(--pulse); font-weight: 700; word-break: break-all; }
.choices label { font-weight: 600; }

.facts { display: grid; gap: 0.8rem; margin-top: 1.5rem; }
.facts div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; }
dt { color: var(--slate); }
dd { margin: 0; font-weight: 600; }

@media (max-width: 800px) {
  .modules { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: 1fr; gap: 0.15rem; }
}

body.site { background: var(--white); color: var(--ink); }
.site-nav, .site-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.5rem; }
.site-nav { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.site-nav nav, .hero-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.nav-button { background: var(--pulse); color: var(--white) !important; border-radius: 999px; padding: 0.45rem 0.8rem; }
.nav-button.quiet { background: var(--harbour); }
.hero { background: var(--harbour); color: var(--white); padding: 4.5rem 1.5rem 4rem; }
.hero h1, .page-intro h1 { max-width: 16em; font-size: 2.6rem; letter-spacing: -0.04em; }
.desk-head h1 { font-size: 2rem; letter-spacing: -0.03em; }
.hero .lede, .page-intro .lede { color: #dbe4f0; }
.hero .eyebrow { color: #67e8f9; }
.hero-actions { margin-top: 1.4rem; }
.button.ghost { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.4); }
.band, .hosting, .move, .page-intro, .steps, .plain { max-width: 1040px; margin: 0 auto; padding: 2.2rem 1.5rem; }
.band, .hosting { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.hosting { grid-template-columns: 1fr 1fr; }
.band article, .hosting div, .move { background: var(--mist); border-radius: 16px; padding: 1.2rem; }
.page-intro { padding-top: 3rem; }
.page-intro h1, .desk-head h1 { color: var(--harbour); }
.page-intro .lede { color: var(--slate); }
.steps { list-style: none; padding: 0 1.5rem 2rem; display: grid; gap: 0.8rem; }
.steps li, .plain li { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 1rem; }
.plain { list-style: none; display: grid; gap: 0.7rem; }
.site-foot { background: var(--harbour); color: #dbe4f0; }
.site-foot strong { color: white; }
.narrow { max-width: 32rem; margin: 0 1.5rem 3rem; }

body.desk { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: var(--mist); }
.desk aside { background: var(--harbour); color: white; padding: 1.2rem 1rem; }
.desk aside .brand { color: white; white-space: nowrap; font-size: 1.05rem; }
.desk aside .brand-mark { display: none; }
.desk aside a { color: #dbe4f0; text-decoration: none; display: block; padding: 0.45rem 0.6rem; border-radius: 8px; }
.desk aside a.on, .desk aside a:hover { background: rgba(255,255,255,0.08); color: white; }
.client-name { color: #67e8f9; font-weight: 700; margin: 0.4rem 0.6rem 1rem; }
.desk-main { padding: 1.6rem; }
.desk-head h1 { margin-top: 0.2rem; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin: 1rem 0; }
.kpis article { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 0.9rem 1rem; }
.kpis span { color: var(--slate); display: block; }
.kpis strong { font-size: 1.6rem; }
.split-table { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1rem; }
table { width: 100%; border-collapse: collapse; background: white; border-radius: 14px; overflow: hidden; }
th, td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
th { color: var(--slate); font-weight: 600; }
.threads { list-style: none; padding: 0; display: grid; gap: 0.7rem; }
.threads li { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 0.9rem 1rem; }
.threads .waiting { border-color: var(--pulse); }
.threads span, .threads p { color: var(--slate); }

body.field-body { background: #d9e2ef; min-height: 100vh; padding: 2rem 1rem; }
.window { max-width: 920px; margin: 0 auto; background: var(--mist); border-radius: 18px; overflow: hidden; box-shadow: 0 20px 50px rgba(11, 31, 58, 0.18); }
.titlebar { background: var(--harbour); color: white; display: flex; gap: 0.8rem; align-items: center; padding: 0.8rem 1rem; }
.pill { margin-left: auto; border-radius: 999px; padding: 0.15rem 0.55rem; font-style: normal; font-size: 0.8rem; }
.pill.off { background: #b45309; }
.pill.on { background: var(--paid); }
.window-note { padding: 1rem 1rem 0; }
.window-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1rem; }
.queue { padding-left: 1.1rem; }
select { font: inherit; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 10px; background: white; }

/* Desk */
body.desk { grid-template-columns: 236px 1fr; }
.desk aside { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; background: linear-gradient(180deg, #0f2747 0%, var(--harbour) 70%); }
.desk aside nav { display: grid; gap: 0.1rem; }
.nav-group { color: #7c93b5; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin: 0.9rem 0.6rem 0.25rem; }
.desk aside a.on { background: rgba(29, 78, 216, 0.55); color: white; }
.signout { margin-top: auto; padding-top: 1rem; }
.signout button { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #dbe4f0; border-radius: 10px; padding: 0.5rem 0.7rem; width: 100%; font: inherit; cursor: pointer; }
.signout button:hover { background: rgba(255,255,255,0.08); }
.desk-main { padding: 1.6rem 2rem 3rem; max-width: 1280px; width: 100%; }
.desk-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.desk-head .eyebrow a { color: inherit; text-decoration: none; }
.head-actions { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.head-actions form { margin: 0; display: block; }
.button.ghost-dark { background: white; color: var(--harbour); border: 1px solid var(--line); }
.button.ghost-dark:hover { background: var(--mist); }
.button.small { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.file-button.pdf { background: #b91c1c; }
.file-button.pdf:hover { background: #991b1b; }
.file-button.xlsx { background: var(--paid); }
.file-button.xlsx:hover { background: #065f46; }
.flash { background: #ecfdf5; color: var(--paid); border: 1px solid #a7f3d0; padding: 0.7rem 0.9rem; border-radius: 12px; margin: 0 0 1rem; font-weight: 600; }
.card { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.2rem; margin: 1rem 0; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.split-table > .card { margin: 0; }
.split-table { margin: 1rem 0; align-items: start; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.7rem; }
.card-head a, .head-links a { font-weight: 600; text-decoration: none; }
.head-links { display: flex; gap: 0.8rem; }
.card table { border-radius: 0; }
.muted { color: var(--slate); }
.kpis article { position: relative; overflow: hidden; }
.kpis article::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--pulse); }
.kpis article.good::before { background: var(--paid); }
.kpis article.warn::before { background: #b45309; }
.kpis article.bad::before { background: #b91c1c; }
.kpis em { display: block; color: var(--slate); font-style: normal; font-size: 0.82rem; margin-top: 0.2rem; }
.kpis strong { display: block; margin-top: 0.2rem; }
.meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 0.5rem; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--pulse), var(--current)); border-radius: 99px; }
.meter.small { display: inline-block; width: 70px; height: 6px; margin: 0 0.4rem 0 0; vertical-align: middle; }
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.8rem; align-items: end; height: 210px; padding-top: 0.5rem; }
.bar-col { display: grid; grid-template-rows: 1fr auto auto; height: 100%; text-align: center; color: var(--slate); text-decoration: none; border-radius: 10px; padding: 0.2rem; }
.bar-col:hover, .bar-col.current { background: var(--mist); }
.bar-col b { color: var(--ink); font-size: 0.82rem; }
.bar-col span { font-size: 0.82rem; margin-top: 0.3rem; }
.bar-track { position: relative; height: 100%; }
.bar { position: absolute; bottom: 0; border-radius: 8px 8px 3px 3px; }
.bar.expected { left: 12%; right: 12%; background: #dbe4f0; }
.bar.collected { left: 26%; right: 26%; background: linear-gradient(180deg, var(--current), var(--pulse)); }
.legend { color: var(--slate); font-size: 0.82rem; margin-top: 0.6rem; display: flex; gap: 0.6rem; align-items: center; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dot.expected { background: #dbe4f0; }
.dot.collected { background: var(--pulse); }
.facts-list { display: grid; gap: 0.6rem; margin: 0; }
.facts-list div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding-bottom: 0.5rem; }
.notice { background: #fffbeb; color: #92400e; border-radius: 10px; padding: 0.6rem 0.8rem; margin-top: 1rem; }
.badge { display: inline-block; border-radius: 99px; padding: 0.12rem 0.55rem; font-size: 0.78rem; font-weight: 700; text-transform: capitalize; background: #e0e7ff; color: var(--pulse-deep); white-space: nowrap; }
.badge.good { background: #d1fae5; color: var(--paid); }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.bad { background: #fee2e2; color: #b91c1c; }
.badge.info { background: #e0f2fe; color: #075985; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 700; border-top: 2px solid var(--harbour); background: var(--mist); }
.month-nav { display: flex; gap: 1rem; margin-top: 0.3rem; }
.month-nav a { text-decoration: none; font-weight: 600; }
form.pay { display: flex; gap: 0.4rem; margin: 0; align-items: center; flex-wrap: wrap; }
form.pay select, form.pay input { padding: 0.35rem 0.5rem; font-size: 0.85rem; border-radius: 8px; }
form.pay input { width: 10rem; }
.period { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.period-form { display: flex; gap: 0.8rem; align-items: end; margin: 0; flex-wrap: wrap; }
.period-form label { font-size: 0.85rem; }
.period-form input { padding: 0.5rem 0.6rem; }
.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); border-radius: 99px; padding: 0.3rem 0.75rem; text-decoration: none; color: var(--ink); font-size: 0.85rem; background: white; display: inline-block; margin: 0.15rem 0.2rem 0 0; }
.chip.on { background: var(--harbour); color: white; border-color: var(--harbour); }
.chip.quiet { background: var(--mist); }
.group-title { margin: 1.6rem 0 0.4rem; color: var(--harbour); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.9rem; }
.report-card { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.report-card h3 { margin: 0; font-size: 1.02rem; }
.report-card h3 a { color: var(--harbour); text-decoration: none; }
.report-card p { color: var(--slate); line-height: 1.45; flex: 1; }
.downloads { display: flex; gap: 0.45rem; }
.file { border-radius: 9px; padding: 0.35rem 0.7rem; font-weight: 700; font-size: 0.82rem; text-decoration: none; }
.file.pdf { background: #fee2e2; color: #b91c1c; }
.file.xlsx { background: #d1fae5; color: var(--paid); }
.file.view { background: var(--mist); color: var(--harbour); }
.upload img { width: 100%; max-height: 180px; object-fit: contain; border-radius: 12px; background: var(--mist); }
.drop { border: 2px dashed #c7d2e2; border-radius: 14px; padding: 1.2rem; background: var(--mist); font-weight: 400; }
.problems { color: #92400e; background: #fffbeb; border-radius: 12px; padding: 0.8rem 1rem 0.8rem 2rem; line-height: 1.6; }
.next { margin-top: 0.8rem; font-weight: 600; }

/* Marketing images */
.hero.with-image { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2rem; align-items: center; padding: 3.5rem 2rem; }
.hero.with-image img { width: 100%; border-radius: 20px; box-shadow: 0 24px 60px rgba(0,0,0,0.35); }
.band article img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; margin-bottom: 0.8rem; background: white; }
.band article { display: flex; flex-direction: column; }
.band article p { color: var(--slate); line-height: 1.5; }

body.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(820px 420px at 12% 0%, rgba(8, 145, 178, 0.45), transparent 60%),
    radial-gradient(640px 380px at 100% 100%, rgba(29, 78, 216, 0.45), transparent 55%),
    var(--harbour);
}
body.auth main.auth-card {
  width: min(960px, 100%);
  max-width: 960px;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: var(--white);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(2, 8, 23, 0.38);
}
.auth-aside {
  background: linear-gradient(165deg, #16325d 0%, #0b1f3a 62%);
  color: white;
  padding: 2.4rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 520px;
}
.auth-kicker { margin: 0; color: #67e8f9; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.auth-kicker.dark { color: var(--pulse); }
.auth-aside h2 { margin: 0.2rem 0 0; font-size: 2rem; letter-spacing: -0.03em; line-height: 1.15; }
.auth-aside p { color: #dbe4f0; line-height: 1.5; max-width: 22rem; }
.auth-points { list-style: none; padding: 0; margin: auto 0 0; display: grid; gap: 0.55rem; }
.auth-points li { display: flex; align-items: center; gap: 0.65rem; font-weight: 600; }
.auth-points i { width: 8px; height: 8px; border-radius: 99px; background: #22d3ee; display: inline-block; }
.auth-form { padding: 2.5rem 2.1rem 2rem; display: flex; flex-direction: column; justify-content: center; }
.auth-form h1 { font-size: 1.9rem; }
.auth-form .lede { margin-top: 0.35rem; }
.auth-form form { margin-top: 1.3rem; }
.auth-form input { background: #f8fafc; border-color: #d5deea; border-radius: 12px; padding: 0.85rem 0.9rem; }
.field { display: grid; gap: 0.35rem; }
.password-field { position: relative; }
.password-field input { width: 100%; box-sizing: border-box; padding-right: 4.6rem; }
.show-password { position: absolute; top: 50%; right: 0.45rem; transform: translateY(-50%); border: 0; background: transparent; color: var(--pulse);
  font: inherit; font-size: 0.88rem; font-weight: 700; padding: 0.4rem 0.6rem; border-radius: 8px; cursor: pointer; }
.show-password:hover, .show-password:focus-visible { background: #eff6ff; }
.auth-form input:focus { outline: 3px solid rgba(29, 78, 216, 0.16); border-color: var(--pulse); background: white; }
.auth-form .code { letter-spacing: 0.32em; font-size: 1.3rem; font-weight: 700; text-align: center; }
.auth-form .button { width: 100%; text-align: center; border-radius: 12px; padding: 0.9rem 1rem; }
.auth-form .qr { margin-top: 1rem; width: fit-content; padding: 0.55rem; border: 1px solid var(--line); border-radius: 16px; background: white; }
.auth-note { color: var(--slate); margin-top: 1rem; line-height: 1.45; }

@media (max-width: 900px) {
  .band, .hosting, .kpis, .split-table, .window-grid, body.desk { display: block; }
  .desk aside { padding-bottom: 0.4rem; }
  .hero h1, .page-intro h1 { font-size: 2rem; }
  body.auth main.auth-card { grid-template-columns: 1fr; }
  .hero.with-image { grid-template-columns: 1fr; }
  .desk aside { position: static; height: auto; }
  .split-table > .card { margin-bottom: 1rem; }
  .auth-aside { min-height: 0; }
}
