:root {
  --bg: #eef5f2;
  --bg-deep: #d7ebe3;
  --ink: #14221f;
  --muted: #51635d;
  --brand: #0f6b5c;
  --brand-deep: #0a4a40;
  --accent: #d4a017;
  --accent-soft: #f4e3a8;
  --surface: rgba(255, 255, 255, 0.78);
  --line: rgba(20, 34, 31, 0.1);
  --danger: #b42318;
  --ok: #0f6b5c;
  --shadow: 0 18px 50px rgba(15, 52, 45, 0.12);
  --radius: 18px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #cfe8df 0%, transparent 60%),
    radial-gradient(900px 420px at 90% 0%, #f3e7b8 0%, transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
  min-height: 100vh;
}

a { color: var(--brand-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 4.5rem);
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}
.brand--sm { font-size: 1.35rem; }
.brand:hover { text-decoration: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 0;
  border-radius: 999px;
  padding: .9rem 1.35rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 107, 92, .28);
}
.btn--primary:hover { background: var(--brand-deep); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn--sm { padding: .45rem .9rem; font-size: .9rem; }

.app-top {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(238, 245, 242, .82);
  border-bottom: 1px solid var(--line);
}
.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  flex: 1;
}
.app-nav a {
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}
.app-nav a.is-active, .app-nav a:hover { color: var(--ink); }
.app-top__actions { display: flex; align-items: center; gap: .75rem; }

.flash {
  margin: 1rem 1.5rem 0;
  padding: .85rem 1rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
}
.flash--success { border-color: rgba(15,107,92,.35); background: #edf8f4; }
.flash--error { border-color: rgba(180,35,24,.3); background: #fdf2f1; }

.shell { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 4rem; }
.shell--wide { width: min(1240px, calc(100% - 2rem)); }

.hero {
  min-height: 100vh;
  display: grid;
  align-items: end;
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
}
.hero__media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(10, 40, 36, .72), rgba(15, 107, 92, .35)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='900' viewBox='0 0 1600 900'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop stop-color='%230a4a40'/%3E%3Cstop offset='1' stop-color='%231a7a68'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='1600' height='900' fill='url(%23g)'/%3E%3Cpath d='M0 620 C 280 520 420 740 720 640 S 1180 480 1600 560 V900 H0Z' fill='%23d4a017' opacity='.18'/%3E%3Cpath d='M0 700 C 260 610 480 780 780 690 S 1220 560 1600 650 V900 H0Z' fill='%23ffffff' opacity='.08'/%3E%3C/svg%3E") center/cover no-repeat;
  animation: heroShift 18s ease-in-out infinite alternate;
}
.hero__content {
  position: relative;
  z-index: 1;
  color: #f7faf8;
  width: min(780px, 100%);
  padding: 2rem 1rem 3rem;
  animation: riseIn .8s ease both;
}
.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  margin: 0 0 .4rem;
  letter-spacing: -0.04em;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  font-weight: 500;
  max-width: 16ch;
}
.hero p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 38ch;
  opacity: .92;
  margin: 0 0 1.75rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; }

.section { padding: 4.5rem 0; }
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 0 0 .75rem;
}
.section__lead { color: var(--muted); max-width: 46ch; margin: 0 0 2rem; }

.steps {
  display: grid;
  gap: 1rem;
  counter-reset: step;
}
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  animation: riseIn .6s ease both;
}
.step:nth-child(2) { animation-delay: .08s; }
.step:nth-child(3) { animation-delay: .16s; }
.step:nth-child(4) { animation-delay: .24s; }
.step:nth-child(5) { animation-delay: .32s; }
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}
.pricing {
  display: grid;
  gap: 1rem;
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.pricing__price {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin: 0;
}
.pricing__price span { font-size: .45em; color: var(--muted); }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  backdrop-filter: blur(8px);
}
.panel--hero-stat {
  padding: 1.75rem;
  animation: riseIn .7s ease both;
}
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin: .2rem 0;
  letter-spacing: -0.03em;
}
.stat-label { color: var(--muted); margin: 0; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .app-top { flex-wrap: wrap; }
  .app-nav { order: 3; width: 100%; }
}

.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}
table.data th, table.data td {
  text-align: left;
  padding: .85rem .6rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data th { color: var(--muted); font-weight: 600; }

.badge {
  display: inline-flex;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  background: #e5f1ed;
  color: var(--brand-deep);
}
.badge--danger { background: #fde8e6; color: var(--danger); }
.badge--warn { background: var(--accent-soft); color: #7a5a00; }
.badge--ok { background: #e7f8ef; color: #15803d; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.25rem; }
.filters a {
  padding: .4rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
}
.filters a.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

.timeline { display: grid; gap: 0; margin: 1.5rem 0; }
.timeline__item {
  position: relative;
  padding: 0 0 1.4rem 1.4rem;
  border-left: 2px solid rgba(15,107,92,.35);
}
.timeline__item:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: .35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(15,107,92,.15);
}
.timeline__meta { color: var(--muted); font-size: .85rem; }

.inv-messages { margin-top: 1rem; }
.inv-messages__table td { vertical-align: top; }
.inv-messages__date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.inv-messages__planned { color: #64748b; }
.inv-messages__content {
  white-space: pre-wrap;
  line-height: 1.45;
  color: #334155;
  max-width: 42rem;
}
.inv-messages__channel--email { background: #e0f2fe; color: #075985; }
.inv-messages__channel--sms { background: #ecfdf5; color: #047857; }
.inv-messages__channel--voice { background: #f5f3ff; color: #6d28d9; }
html[data-theme="dark"] .inv-messages__content { color: #cbd5e1; }
html[data-theme="dark"] .inv-messages__channel--email { background: #0c4a6e; color: #bae6fd; }
html[data-theme="dark"] .inv-messages__channel--sms { background: #064e3b; color: #a7f3d0; }
html[data-theme="dark"] .inv-messages__channel--voice { background: #4c1d95; color: #ddd6fe; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
.auth-card {
  width: min(460px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  animation: riseIn .55s ease both;
}
.auth-card h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin: .35rem 0 1rem;
}

/* Split auth (Terminovo-style) */
.page-auth {
  margin: 0;
  background: #f3f5f7;
  font-family: Inter, system-ui, sans-serif;
  min-height: 100vh;
}
.page-auth > .flash { display: none; }

.auth-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) {
  .auth-split { grid-template-columns: minmax(320px, 42fr) minmax(0, 58fr); }
}

.auth-split__brand {
  display: none;
  background: linear-gradient(160deg, #111827 0%, #1a2332 55%, #152032 100%);
  color: #fff;
  padding: 2rem 2.5rem 1.75rem;
  position: relative;
  overflow: hidden;
}
.auth-split__brand::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(64,188,193,.18), transparent 65%);
  pointer-events: none;
}
@media (min-width: 960px) {
  .auth-split__brand {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
  }
}
.auth-split__logo {
  position: relative;
  z-index: 1;
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
  color: #fff;
  text-decoration: none;
  width: fit-content;
}
.auth-split__copy {
  position: relative;
  z-index: 1;
  max-width: 28rem;
  padding: 2rem 0 3rem;
}
.auth-split__copy h1 {
  margin: 0 0 1rem;
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.auth-split__copy > p {
  margin: 0 0 1.75rem;
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.6;
}
.auth-split__features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .9rem;
}
.auth-split__features li {
  position: relative;
  padding-left: 2.2rem;
  color: #e5eef5;
  font-size: .98rem;
  line-height: 1.4;
}
.auth-split__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .05rem;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: #40BCC1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 10.5 8.2 13.7 15 6.5' stroke='%23111827' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 12px 12px;
  background-repeat: no-repeat;
  background-position: center;
}
.auth-split__legal {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #94a3b8;
  font-size: .8rem;
}

.auth-split__main {
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  background: #f3f5f7;
  min-height: 100vh;
}
.auth-split__card {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
  border: 1px solid rgba(17, 24, 39, 0.04);
}
.auth-split__card h2 {
  margin: 0;
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111827;
}
.auth-split__subtitle {
  margin: .4rem 0 1.4rem;
  color: #64748b;
  font-size: .98rem;
}
.auth-alert {
  margin: 0 0 1rem;
  padding: .8rem .95rem;
  border-radius: 12px;
  font-size: .9rem;
  line-height: 1.4;
}
.auth-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b42318;
}
.auth-alert--info {
  background: rgba(64,188,193,.1);
  border: 1px solid rgba(64,188,193,.28);
  color: #0f766e;
}
.auth-form { display: grid; gap: .95rem; }
.auth-field { display: grid; gap: .4rem; }
.auth-field label {
  font-size: .88rem;
  font-weight: 600;
  color: #111827;
}
.auth-input {
  display: flex;
  align-items: center;
  gap: .65rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: 0 .95rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-input:focus-within {
  border-color: #40BCC1;
  box-shadow: 0 0 0 3px rgba(64,188,193,.18);
}
.auth-input svg { color: #94a3b8; flex-shrink: 0; }
.auth-input input {
  width: 100%;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  padding: .9rem 0 !important;
  border-radius: 0 !important;
  font: inherit;
  color: #111827;
  box-shadow: none !important;
}
.auth-input input::placeholder { color: #94a3b8; }
.auth-form__row {
  display: flex;
  justify-content: flex-end;
  margin-top: -.35rem;
}
.auth-text-link {
  color: #40BCC1;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
}
.auth-text-link:hover { text-decoration: underline; }
.auth-help {
  margin: .2rem 0 0;
  color: #94a3b8;
  font-size: .82rem;
  line-height: 1.4;
}
.auth-help--center { text-align: center; margin-top: .65rem; }
.auth-legal {
  margin: .9rem 0 0;
  text-align: center;
  color: #94a3b8;
  font-size: .8rem;
  line-height: 1.4;
}
.auth-legal a {
  color: #cbd5e1;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-legal a:hover { color: #fff; }
.auth-or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .75rem;
  margin: 1.25rem 0;
  color: #94a3b8;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.auth-or::before,
.auth-or::after {
  content: "";
  height: 1px;
  background: #e5e7eb;
}
.auth-google {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.auth-google:hover {
  border-color: #40BCC1;
  background: #f8fafc;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.06);
}
.auth-field.is-invalid label { color: #b42318; }
.auth-field.is-invalid .auth-input {
  border-color: #f2a8a2;
}
.auth-field .form-error,
.auth-field ul {
  margin: .25rem 0 0;
  padding: 0;
  list-style: none;
  color: #b42318;
  font-size: .82rem;
}
.auth-submit {
  width: 100%;
  margin-top: .25rem;
  border: 0;
  border-radius: 12px;
  background: #40BCC1;
  color: #111827;
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  font-weight: 800;
  font-size: 1rem;
  padding: .95rem 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 10px 24px rgba(64,188,193,.25);
}
.auth-submit:hover {
  background: #5CCDD3;
  transform: translateY(-1px);
}
.auth-split__switch {
  margin: 1.25rem 0 0;
  text-align: center;
  color: #64748b;
  font-size: .92rem;
}
.auth-split__switch a {
  color: #40BCC1;
  font-weight: 700;
  text-decoration: none;
}
.auth-split__switch a:hover { text-decoration: underline; }

.form-row { display: grid; gap: .35rem; margin-bottom: .9rem; }
.form-row label { font-weight: 600; font-size: .92rem; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .75rem .9rem;
  font: inherit;
  background: #fff;
}
.form-error { color: var(--danger); font-size: .85rem; }

.onboarding-steps {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.onboarding-steps span {
  padding: .35rem .7rem;
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
}
.onboarding-steps span.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.rule-list { display: grid; gap: .75rem; }
.rule {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.rule__meta { color: var(--muted); font-size: .9rem; }

.insight {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  margin: 0;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroShift {
  from { transform: scale(1.02) translateY(0); }
  to { transform: scale(1.06) translateY(-1.5%); }
}

.site-footer {
  padding: 2rem 1.5rem 3rem;
  color: var(--muted);
  text-align: center;
}

/* =========================================================
   Landing — Terminovo visual system (WindykON content)
   ========================================================= */
.page-landing {
  --navy-950: #111827;
  --navy-900: #1a2332;
  --navy-800: #1f2d3f;
  --teal: #40BCC1;
  --teal-400: #5CCDD3;
  --teal-dark: #2E9EA3;
  --ink: #111827;
  --muted: #64748b;
  --muted-2: #475569;
  --line: #eef1f4;
  --soft: #f8fafc;
  --font-display: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, sans-serif;
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
.page-landing a { color: inherit; text-decoration: none; }
.page-landing a:hover { text-decoration: none; }

.tn-container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}
.tn-container--narrow { width: min(640px, calc(100% - 2rem)); }

.tn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none;
  min-height: 44px;
}
.tn-btn--primary {
  background: var(--teal);
  color: var(--navy-950);
  border-radius: 999px;
  padding: .85rem 1.75rem;
  box-shadow: 0 12px 36px rgba(64,188,193,.28);
}
.tn-btn--primary:hover {
  background: var(--teal-400);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(64,188,193,.35);
}
.tn-btn--sm {
  padding: .55rem 1.15rem;
  font-size: .875rem;
  min-height: 40px;
}
.tn-link {
  color: #94a3b8;
  font-size: .9rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: #475569;
}
.tn-link:hover { color: var(--teal); text-decoration-color: var(--teal); }

/* Nav */
.tn-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: #fff;
  padding: .85rem 0;
  transition: box-shadow .25s ease, background .25s ease;
}
.tn-nav.is-scrolled {
  box-shadow: 0 8px 30px rgba(17,24,39,.08);
}
.tn-nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.tn-nav__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  color: var(--navy-950);
}
.tn-nav__logo--light { color: #fff; }
.tn-nav__links {
  display: none;
  align-items: center;
  gap: .15rem;
}
.tn-nav__links a,
.tn-nav__login {
  padding: .5rem .75rem;
  border-radius: .6rem;
  font-size: .875rem;
  font-weight: 500;
  color: #4b5563;
}
.tn-nav__links a:hover,
.tn-nav__login:hover {
  color: var(--teal-dark);
  background: #f9fafb;
}
.tn-nav__actions {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.tn-nav__login { display: none; }
.tn-nav__actions .tn-btn--sm { display: none; }
.tn-nav__burger {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: .6rem;
  background: transparent;
  display: inline-grid;
  place-content: center;
  gap: 5px;
  cursor: pointer;
}
.tn-nav__burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy-950);
  border-radius: 2px;
}
.tn-nav__drawer {
  display: grid;
  gap: .25rem;
  margin-top: .75rem;
  padding-bottom: .5rem;
}
.tn-nav__drawer[hidden] { display: none !important; }
.tn-nav__drawer a {
  padding: .75rem .85rem;
  border-radius: .75rem;
  font-weight: 600;
  color: var(--ink);
}
.tn-nav__drawer a:hover { background: var(--soft); }
.tn-nav__drawer .tn-btn { margin-top: .35rem; }

@media (min-width: 1024px) {
  .tn-nav__links { display: flex; }
  .tn-nav__login,
  .tn-nav__actions .tn-btn--sm { display: inline-flex; }
  .tn-nav__burger,
  .tn-nav__drawer { display: none !important; }
}

/* Hero */
.tn-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy-950), var(--navy-900));
  padding: 7.5rem 0 5.5rem;
}
.tn-hero__orb {
  pointer-events: none;
  position: absolute;
  border-radius: 50%;
}
.tn-hero__orb--a {
  right: -10%;
  top: -10%;
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, rgba(64,188,193,.16), transparent 62%);
}
.tn-hero__orb--b {
  left: -10%;
  bottom: -10%;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(64,188,193,.07), transparent 65%);
}
.tn-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3.5rem;
  align-items: center;
}
@media (min-width: 1024px) {
  .tn-hero__grid {
    grid-template-columns: 7fr 6fr;
    gap: 4.5rem;
  }
}
.tn-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.35rem;
  padding: .28rem .85rem;
  border-radius: 999px;
  border: 1px solid rgba(64,188,193,.25);
  background: rgba(64,188,193,.12);
  color: #99e4e7;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.tn-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}
.tn-hero h1 {
  margin: 0 0 1.15rem;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.875rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: #fff;
}
.tn-hero h1 span { color: var(--teal-400); }
.tn-hero__lead {
  margin: 0 0 1.75rem;
  max-width: 520px;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.65;
}
.tn-hero__cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.35rem;
}
@media (min-width: 640px) {
  .tn-hero__cta {
    flex-direction: row;
    align-items: center;
  }
}
.tn-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.25rem;
  color: #94a3b8;
  font-size: .8125rem;
}

/* Browser + dash */
.tn-hero__visual {
  position: relative;
  width: min(560px, 100%);
  margin: 0 auto;
}
.tn-browser {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 40px 80px -24px rgba(0,0,0,.55);
  background: #fff;
}
.tn-browser__bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  background: var(--navy-800);
}
.tn-browser__bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
}
.tn-browser__bar em {
  margin-left: .65rem;
  padding: .2rem .75rem;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #94a3b8;
  font-size: .72rem;
  font-style: normal;
}
.tn-dash { padding: 1.1rem 1.1rem 1rem; background: linear-gradient(180deg,#fbfcfd,#f3f6f9); }
.tn-dash__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.tn-dash__label { margin: 0; color: var(--muted); font-size: .78rem; }
.tn-dash__value {
  margin: .2rem 0 0;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy-950);
}
.tn-chip {
  flex-shrink: 0;
  padding: .35rem .7rem;
  border-radius: 999px;
  background: rgba(64,188,193,.14);
  color: #0f766e;
  font-size: .72rem;
  font-weight: 700;
}
.tn-dash__kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .55rem;
  margin-bottom: .9rem;
}
.tn-dash__kpis > div {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: .85rem;
  padding: .65rem .7rem;
}
.tn-dash__kpis small {
  display: block;
  color: var(--muted);
  font-size: .7rem;
  margin-bottom: .15rem;
}
.tn-dash__kpis strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
}
.tn-dash__list {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: .9rem;
  overflow: hidden;
}
.tn-dash__item {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
  padding: .72rem .85rem;
  border-top: 1px solid #eef1f4;
}
.tn-dash__item:first-child { border-top: 0; }
.tn-dash__item strong {
  display: block;
  font-size: .84rem;
  color: var(--navy-950);
}
.tn-dash__item em {
  display: block;
  margin-top: .1rem;
  font-style: normal;
  color: var(--muted);
  font-size: .72rem;
}

.tn-status {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
}
.tn-status--paid { background: rgba(16,185,129,.12); color: #059669; }
.tn-status--wait { background: #eef2f6; color: #475569; }
.tn-status--overdue { background: #fde8e6; color: #b42318; }
.tn-status--sent { background: rgba(64,188,193,.14); color: #0f766e; }
.tn-status--voice { background: #e8f0fe; color: #1d4f91; }
.tn-status--promise { background: #fff4d6; color: #8a5b00; }

.tn-float-card {
  position: absolute;
  right: -0.75rem;
  bottom: -1.75rem;
  width: min(264px, calc(100% - 1rem));
  border-radius: .85rem;
  background: #fff;
  padding: 1.1rem;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,.4);
  animation: tnFloat 5.5s ease-in-out infinite;
}
.tn-float-card__label {
  margin: 0 0 .65rem;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94a3b8;
}
.tn-float-card__bubble {
  border-radius: 14px 14px 14px 4px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  padding: .75rem;
  color: #fff;
}
.tn-float-card__bubble p {
  margin: 0;
  font-size: .78rem;
  line-height: 1.4;
}
.tn-float-card__pay {
  margin-top: .65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: .55rem;
  background: rgba(255,255,255,.95);
  color: #0f766e;
  font-size: .75rem;
  font-weight: 800;
  padding: .4rem .65rem;
}
.tn-float-card__ok {
  margin-top: .65rem;
  display: inline-flex;
  align-items: center;
  padding: .28rem .65rem;
  border-radius: 999px;
  border: 1px solid rgba(16,185,129,.25);
  background: rgba(16,185,129,.12);
  color: #059669;
  font-size: .72rem;
  font-weight: 800;
}
@keyframes tnFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Stats */
.tn-stats {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 2.6rem 0;
}
.tn-stats__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  text-align: center;
}
@media (min-width: 768px) {
  .tn-stats__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.tn-stats__num {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--navy-950);
}
.tn-stats__num span {
  font-size: .42em;
  color: var(--teal);
  font-weight: 700;
}
.tn-stats__desc {
  margin: .55rem 0 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.45;
}

/* Sections */
.tn-section { padding: 5rem 0; }
.tn-section--soft { background: var(--soft); }
.tn-section__center {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.tn-section__center h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.875rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--navy-950);
}
.tn-section__center p {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.tn-steps {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .tn-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .tn-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.tn-steps article {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 1rem;
  padding: 1.35rem 1.2rem;
  box-shadow: 0 24px 60px -32px rgba(17,24,39,.12);
}
.tn-steps span {
  display: inline-block;
  margin-bottom: .9rem;
  color: var(--teal);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .85rem;
}
.tn-steps h3 {
  margin: 0 0 .45rem;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.tn-steps p {
  margin: 0;
  color: var(--muted-2);
  font-size: .92rem;
  line-height: 1.45;
}

/* Tabs / workflow */
.tn-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1.75rem;
}
.tn-tabs button {
  border-radius: 999px;
  padding: .75rem 1.45rem;
  font-family: var(--font-display);
  font-size: .94rem;
  font-weight: 700;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: .2s ease;
}
.tn-tabs button:hover { border-color: var(--teal); }
.tn-tabs button.is-active {
  background: var(--navy-950);
  color: #fff;
  border-color: var(--navy-950);
  box-shadow: 0 8px 20px -6px rgba(17,24,39,.4);
}
.tn-tabpanel {
  display: none;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  border: 1px solid #e8edf2;
  background: #fff;
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: 0 24px 60px -32px rgba(17,24,39,.12);
}
.tn-tabpanel.is-active { display: grid; }
.tn-tabpanel[hidden] { display: none !important; }
@media (min-width: 900px) {
  .tn-tabpanel.is-active {
    grid-template-columns: 5fr 7fr;
    padding: 2.75rem;
    gap: 3rem;
  }
}
.tn-tabpanel__metric {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--teal);
}
.tn-tabpanel__metric-label {
  margin: .35rem 0 1.1rem;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
}
.tn-tabpanel h3 {
  margin: 0 0 .75rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.tn-tabpanel > div > p:last-child {
  margin: 0;
  color: var(--muted-2);
  line-height: 1.6;
  font-size: .98rem;
}
.tn-tabpanel__card {
  background: var(--soft);
  border: 1px solid #e8edf2;
  border-radius: 1rem;
  padding: 1.35rem;
}
.tn-tabpanel__card--success {
  text-align: center;
  padding: 2rem 1.35rem;
}
.tn-tabpanel__card ul {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .55rem;
}
.tn-tabpanel__card li {
  position: relative;
  padding-left: 1.35rem;
  color: #334155;
  font-size: .92rem;
}
.tn-tabpanel__card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45rem;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--teal);
}
.tn-flow-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  flex-wrap: wrap;
  margin-bottom: .35rem;
}
.tn-flow-mini span {
  padding: .55rem .9rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e8edf2;
  font-weight: 700;
  font-size: .85rem;
}
.tn-flow-mini i {
  width: 18px;
  height: 2px;
  background: var(--teal);
  display: inline-block;
}
.tn-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid #e8edf2;
}
.tn-status-row:last-child { border-bottom: 0; }
.tn-escalation {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .75rem;
}
.tn-escalation li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  border-radius: .85rem;
  background: #fff;
  border: 1px solid #e8edf2;
}
.tn-escalation strong { font-size: .95rem; }
.tn-escalation em {
  font-style: normal;
  color: var(--muted);
  font-size: .85rem;
}
.tn-success-amount {
  margin: .85rem 0 .35rem;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: #059669;
}

/* Pricing */
.tn-price {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 1.25rem;
  padding: 2.25rem 1.75rem;
  text-align: center;
  box-shadow: 0 24px 60px -32px rgba(17,24,39,.16);
}
.tn-price__amount {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.tn-price__amount span {
  font-size: .35em;
  color: var(--muted);
  font-weight: 600;
}
.tn-price__note {
  margin: .7rem 0 0;
  color: var(--muted);
}
.tn-price ul {
  list-style: none;
  margin: 1.6rem 0 1.6rem;
  padding: 0;
  display: grid;
  gap: .65rem;
  text-align: left;
}
.tn-price li {
  padding: .85rem 1rem .85rem 2.4rem;
  border-radius: .85rem;
  background: var(--soft);
  border: 1px solid #e8edf2;
  position: relative;
  font-weight: 500;
}
.tn-price li::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 50%;
  width: .65rem;
  height: .65rem;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(64,188,193,.15);
}

/* Footer */
.tn-footer {
  background: var(--navy-950);
  color: #94a3b8;
  padding: 3.25rem 0;
}
.tn-footer__row {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
@media (min-width: 768px) {
  .tn-footer__row {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}
.tn-footer p {
  margin: .75rem 0 0;
  max-width: 28rem;
  line-height: 1.55;
}
.tn-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem 1.25rem;
}
.tn-footer__links a {
  color: #94a3b8;
  font-weight: 500;
}
.tn-footer__links a:hover { color: var(--teal-400); }

/* Legal documents */
.tn-legal {
  padding: 4.5rem 0 5rem;
  background:
    radial-gradient(ellipse 70% 50% at 10% 0%, rgba(45, 212, 191, .08), transparent 55%),
    linear-gradient(180deg, var(--navy-950), #0b1220 60%, var(--navy-950));
  color: #e2e8f0;
  min-height: 70vh;
}
.tn-legal__wrap {
  max-width: 46rem;
}
.tn-legal__eyebrow {
  margin: 0 0 .75rem;
  color: var(--teal-400);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.tn-legal h1 {
  margin: 0 0 .75rem;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.15;
  color: #fff;
}
.tn-legal__meta {
  margin: 0 0 2rem;
  color: #94a3b8;
  font-size: .95rem;
}
.tn-legal__content h2 {
  margin: 2rem 0 .85rem;
  font-size: 1.15rem;
  color: #fff;
}
.tn-legal__content h3 {
  margin: 1.25rem 0 .55rem;
  font-size: 1rem;
  color: #e2e8f0;
}
.tn-legal__content p,
.tn-legal__content li {
  color: #cbd5e1;
  line-height: 1.65;
}
.tn-legal__content p { margin: 0 0 1rem; }
.tn-legal__content ol,
.tn-legal__content ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
.tn-legal__content li { margin-bottom: .45rem; }
.tn-legal__content a {
  color: var(--teal-400);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tn-legal__content a:hover { color: #5eead4; }
.tn-legal__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
  font-size: .92rem;
}
.tn-legal__content th,
.tn-legal__content td {
  border: 1px solid rgba(148, 163, 184, .25);
  padding: .7rem .8rem;
  text-align: left;
  vertical-align: top;
}
.tn-legal__content th {
  background: rgba(15, 23, 42, .65);
  color: #fff;
  font-weight: 600;
}
.tn-legal__note {
  margin-top: 2rem !important;
  padding: .9rem 1rem;
  border: 1px solid rgba(45, 212, 191, .35);
  border-radius: 10px;
  background: rgba(45, 212, 191, .08);
  color: #99f6e4 !important;
  font-size: .9rem;
}

@media (prefers-reduced-motion: reduce) {
  .tn-float-card,
  .tn-btn { animation: none !important; transition: none !important; }
}

@media (max-width: 640px) {
  .tn-hero { padding: 6.25rem 0 4.5rem; }
  .tn-float-card {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 1rem;
    animation: none;
  }
  .tn-hero__visual { width: 100%; }
  .tn-dash__item { flex-direction: column; align-items: flex-start; }
  .tn-btn--primary { width: 100%; }
  .tn-section { padding: 3.75rem 0; }
}


/* =========================================================
   Onboarding — Terminovo-style company step
   ========================================================= */
.page-onboarding {
  min-height: 100vh;
  background: #f3f5f7;
  font-family: Inter, system-ui, sans-serif;
  color: #111827;
}
.ob-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid #e8edf2;
}
.ob-top__logo {
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
  color: #111827;
  text-decoration: none;
}
.ob-top__actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.ob-top__avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(64,188,193,.18);
  color: #0f766e;
  font-weight: 700;
  font-size: .85rem;
}
.ob-top__logout {
  color: #64748b;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
}
.ob-top__logout:hover { color: #111827; }

.ob-shell {
  width: min(820px, calc(100% - 2rem));
  margin: 1.5rem auto 3rem;
}
.ob-stepper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  margin: 0 0 1.5rem;
}
.ob-stepper__item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #94a3b8;
  font-size: .88rem;
  font-weight: 600;
}
.ob-stepper__num {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8edf2;
  color: #64748b;
  font-size: .78rem;
  font-weight: 800;
}
.ob-stepper__item.is-active { color: #111827; }
.ob-stepper__item.is-active .ob-stepper__num {
  background: #40BCC1;
  color: #fff;
}
.ob-stepper__item.is-done .ob-stepper__num {
  background: #40BCC1;
  color: #fff;
}
.ob-stepper__line {
  width: 28px;
  height: 2px;
  background: #e5e7eb;
}
.ob-stepper__label {
  display: none;
}
@media (min-width: 720px) {
  .ob-stepper__label { display: inline; }
}

.ob-card {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 18px;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 18px 50px rgba(17,24,39,.06);
}
@media (min-width: 720px) {
  .ob-card { padding: 2.25rem 2rem 1.75rem; }
}
.ob-card h1 {
  margin: 0;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.ob-card__lead {
  margin: .45rem 0 1.5rem;
  color: #64748b;
  font-size: .98rem;
}
.ob-form { display: grid; gap: 1rem; }
.ob-grid-2 {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .ob-grid-2 { grid-template-columns: 1fr 1fr; }
}
.ob-field { display: grid; gap: .4rem; }
.ob-field label,
.ob-entity legend {
  font-size: .88rem;
  font-weight: 600;
  color: #111827;
}
.ob-field label::after,
.ob-entity legend::after {
  content: none;
}
.ob-field input,
.ob-field select,
.ob-form input[type="text"],
.ob-form input[type="email"],
.ob-form input[type="tel"],
.ob-form select {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: .85rem .95rem;
  font: inherit;
  background: #fff;
  color: #111827;
}
.ob-field input:focus,
.ob-field select:focus,
.ob-form input:focus,
.ob-form select:focus {
  outline: 0;
  border-color: #40BCC1;
  box-shadow: 0 0 0 3px rgba(64,188,193,.16);
}
.ob-help {
  margin: 0;
  color: #94a3b8;
  font-size: .82rem;
}
.ob-optional {
  font-weight: 500;
  color: #94a3b8;
}
.ob-help--status {
  color: #0f766e;
  min-height: 1.1em;
}
.ob-field input.is-loading {
  opacity: .72;
}
.ob-entity {
  border: 0;
  margin: .25rem 0 0;
  padding: 0;
}
.ob-entity legend {
  margin-bottom: .75rem;
  padding: 0;
}
.ob-entity__grid {
  display: grid;
  gap: .75rem;
}
@media (min-width: 720px) {
  .ob-entity__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ob-entity__card {
  position: relative;
  display: grid;
  gap: .35rem;
  justify-items: center;
  text-align: center;
  padding: 1.1rem .85rem;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.ob-entity__card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ob-entity__card:has(input:checked) {
  border-color: #40BCC1;
  background: rgba(64,188,193,.06);
  box-shadow: 0 0 0 3px rgba(64,188,193,.12);
}
.ob-entity__icon { color: #64748b; margin-bottom: .2rem; }
.ob-entity__card:has(input:checked) .ob-entity__icon { color: #0f766e; }
.ob-entity__card strong {
  font-size: .92rem;
  color: #111827;
}
.ob-entity__card em {
  font-style: normal;
  color: #94a3b8;
  font-size: .78rem;
  line-height: 1.35;
}
.ob-info {
  margin-top: .25rem;
  padding: .9rem 1rem;
  border-radius: 12px;
  background: #eef8ff;
  border: 1px solid #d6ebf8;
  color: #1d4f91;
  font-size: .9rem;
  line-height: 1.45;
}
.ob-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: .5rem;
}
.ob-continue {
  border: 0;
  border-radius: 12px;
  background: #40BCC1;
  color: #111827;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-weight: 800;
  font-size: .98rem;
  padding: .85rem 1.35rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  box-shadow: 0 10px 24px rgba(64,188,193,.25);
}
.ob-continue:hover { background: #5CCDD3; }
.ob-skip {
  margin: 1.25rem 0 0;
  text-align: center;
}
.ob-skip a {
  color: #64748b;
  font-size: .92rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ob-skip a:hover { color: #0f172a; }
.page-onboarding .form-error,
.page-onboarding .invalid-feedback,
.page-onboarding .ob-field > ul {
  color: #b42318;
  font-size: .85rem;
  margin: 0;
  padding-left: 1rem;
}

/* =========================================================
   App shell — Terminovo-style sidebar layout
   ========================================================= */
.page-app {
  background: #f4f6f8 !important;
  font-family: Inter, "Plus Jakarta Sans", system-ui, sans-serif;
  color: #111827;
  min-height: 100vh;
}
.app-frame {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}
.app-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.1rem .9rem 1rem;
  background: #f7f8fa;
  border-right: 1px solid #e8edf2;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.app-sidebar__brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .15rem .2rem .55rem;
  border-bottom: 1px solid #e8edf2;
  margin-bottom: .35rem;
}
.app-sidebar__brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: #111827;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.app-sidebar__brand:hover { text-decoration: none; }
.app-sidebar__logo-text { color: #6b7280; }
.app-sidebar__logo-text em {
  font-style: normal;
  color: #40BCC1;
}
.app-sidebar__mark {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #40BCC1;
  color: #fff;
  font-size: .85rem;
  font-weight: 800;
}
.app-sidebar__collapse {
  width: 1.6rem;
  height: 1.6rem;
  border: 0;
  border-radius: 8px;
  background: #eef2f6;
  color: #64748b;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s ease, color .15s ease, transform .2s ease;
}
.app-sidebar__collapse:hover {
  background: #e2e8f0;
  color: #111827;
}
.app-sidebar__collapse svg {
  transition: transform .2s ease;
}
.app-sidebar__nav {
  display: grid;
  gap: .15rem;
  flex: 1;
  align-content: start;
}
.app-nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .58rem .7rem;
  border-radius: 10px;
  color: #64748b;
  font-size: .92rem;
  font-weight: 550;
  text-decoration: none;
  min-width: 0;
}
.app-nav-link svg { flex-shrink: 0; opacity: .9; }
a.app-nav-link:hover {
  background: #eef2f6;
  color: #111827;
  text-decoration: none;
}
a.app-nav-link.is-active {
  background: rgba(64,188,193,.12);
  color: #0f766e;
  font-weight: 700;
}
.app-nav-group {
  border-radius: 10px;
}
.app-nav-group summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
  cursor: pointer;
  border-radius: 10px;
  color: #64748b;
}
.app-nav-group summary::-webkit-details-marker { display: none; }
.app-nav-group summary:hover {
  background: #eef2f6;
  color: #111827;
}
.app-nav-group summary .app-nav-link {
  flex: 1;
  pointer-events: none;
}
.app-nav-group[open] > summary {
  color: #111827;
}
.app-nav-chevron {
  flex-shrink: 0;
  margin-right: .55rem;
  opacity: .55;
  transition: transform .15s ease;
}
.app-nav-group[open] > summary .app-nav-chevron {
  transform: rotate(180deg);
}
.app-nav-sub {
  margin: .1rem 0 .35rem .95rem;
  padding: .15rem 0 .15rem .85rem;
  border-left: 1.5px solid #e5e7eb;
  display: grid;
  gap: .05rem;
}
.app-nav-sub a {
  display: block;
  padding: .42rem .55rem;
  border-radius: 8px;
  color: #64748b;
  font-size: .88rem;
  font-weight: 500;
  text-decoration: none;
}
.app-nav-sub a:hover {
  background: #eef2f6;
  color: #111827;
  text-decoration: none;
}
.app-nav-sub a.is-active {
  color: #0f766e;
  font-weight: 700;
  background: rgba(64,188,193,.1);
}
.app-nav-divider {
  height: 1px;
  background: #e8edf2;
  margin: .55rem .35rem;
}
.app-sidebar__foot {
  margin-top: auto;
  display: grid;
  gap: .85rem;
}
.app-setup {
  padding: .85rem .7rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e8edf2;
}
.app-setup__head {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: #94a3b8;
  margin-bottom: .45rem;
}
.app-setup__bar {
  height: 6px;
  border-radius: 999px;
  background: #eef2f6;
  overflow: hidden;
  margin-bottom: .75rem;
}
.app-setup__bar i {
  display: block;
  height: 100%;
  background: #40BCC1;
  border-radius: inherit;
}
.app-setup__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}
.app-setup__list li {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: #64748b;
}
.app-setup__list li.is-done { color: #0f766e; }
.app-setup__list a {
  color: inherit;
  text-decoration: none;
}
.app-setup__list a:hover { color: #111827; text-decoration: underline; }
.app-setup__check {
  width: .85rem;
  height: .85rem;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  flex-shrink: 0;
}
.app-setup__list li.is-done .app-setup__check {
  border-color: #40BCC1;
  background: #40BCC1;
  box-shadow: inset 0 0 0 2px #fff;
}
.app-setup__trial {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: .85rem 0 0;
  color: #0f766e;
  font-size: .78rem;
  font-weight: 600;
}
.app-setup__trial span {
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: #22c55e;
}
.app-sidebar__org {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem .7rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e8edf2;
}
.app-sidebar__avatar {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(64,188,193,.18);
  color: #0f766e;
  font-weight: 800;
  font-size: .78rem;
  flex-shrink: 0;
}
.app-sidebar__org strong {
  display: block;
  font-size: .86rem;
  color: #111827;
  line-height: 1.2;
}
.app-sidebar__org em {
  display: block;
  font-style: normal;
  color: #94a3b8;
  font-size: .72rem;
  margin-top: .15rem;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-sidebar__legal {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: 0 .35rem;
  font-size: .75rem;
  color: #94a3b8;
}
.app-sidebar__legal a { color: #94a3b8; text-decoration: none; }
.app-sidebar__legal a:hover { color: #111827; }

.app-main {
  min-width: 0;
  background: #f4f6f8;
}
.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem .35rem;
}
.app-bar__title {
  margin: 0;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111827;
}
.app-bar__actions {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.app-bar__chip {
  border-radius: 999px;
  padding: .4rem .75rem;
  background: rgba(64,188,193,.12);
  color: #0f766e;
  font-size: .82rem;
  font-weight: 700;
}
.app-bar__cta {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 10px;
  padding: .65rem 1rem;
  background: #40BCC1;
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(64,188,193,.28);
}
.app-bar__cta:hover { background: #35a8ad; text-decoration: none; color: #fff; }
.app-flash { margin: .75rem 1.5rem 0; }
.app-content {
  padding: .85rem 1.5rem 2.5rem;
}

@media (max-width: 980px) {
  .app-frame { grid-template-columns: 1fr; }
  .app-sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid #e8edf2;
  }
}

@media (min-width: 981px) {
  .app-frame {
    transition: grid-template-columns .2s ease;
  }
  .app-frame.is-sidebar-collapsed {
    grid-template-columns: 76px minmax(0, 1fr);
  }
  .app-frame.is-sidebar-collapsed .app-sidebar {
    padding-left: .55rem;
    padding-right: .55rem;
    align-items: center;
  }
  .app-frame.is-sidebar-collapsed .app-sidebar__brand-row {
    flex-direction: column;
    justify-content: center;
    gap: .45rem;
    padding-left: 0;
    padding-right: 0;
  }
  .app-frame.is-sidebar-collapsed .app-sidebar__logo-text,
  .app-frame.is-sidebar-collapsed .app-nav-chevron,
  .app-frame.is-sidebar-collapsed .app-nav-sub,
  .app-frame.is-sidebar-collapsed .app-sidebar__org > span:last-child,
  .app-frame.is-sidebar-collapsed .app-sidebar__legal,
  .app-frame.is-sidebar-collapsed .app-setup {
    display: none;
  }
  .app-frame.is-sidebar-collapsed .app-sidebar__brand {
    justify-content: center;
  }
  .app-frame.is-sidebar-collapsed .app-sidebar__collapse svg {
    transform: rotate(180deg);
  }
  .app-frame.is-sidebar-collapsed .app-sidebar__nav {
    width: 100%;
    justify-items: center;
  }
  .app-frame.is-sidebar-collapsed .app-nav-link {
    justify-content: center;
    gap: 0;
    padding: .62rem;
    font-size: 0;
    line-height: 0;
    width: 2.6rem;
  }
  .app-frame.is-sidebar-collapsed .app-nav-link svg {
    width: 18px;
    height: 18px;
  }
  .app-frame.is-sidebar-collapsed .app-nav-group {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .app-frame.is-sidebar-collapsed .app-nav-group summary {
    justify-content: center;
    width: 2.6rem;
  }
  .app-frame.is-sidebar-collapsed .app-nav-group summary .app-nav-link {
    pointer-events: none;
    padding: .62rem;
  }
  .app-frame.is-sidebar-collapsed .app-nav-group[open] > summary {
    background: #eef2f6;
  }
  .app-frame.is-sidebar-collapsed .app-sidebar__foot {
    align-items: center;
    width: 100%;
  }
  .app-frame.is-sidebar-collapsed .app-sidebar__org {
    justify-content: center;
    gap: 0;
  }
}

/* =========================================================
   Dashboard
   ========================================================= */
.dash { display: grid; gap: 1rem; }
.dash-banners { display: grid; gap: .65rem; }
.dash-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem 1.1rem;
  border-radius: 12px;
  border: 1px solid transparent;
}
.dash-banner strong { display: block; font-size: .95rem; color: #111827; }
.dash-banner p { margin: .2rem 0 0; color: #475569; font-size: .88rem; }
.dash-banner--teal { background: #e7f8f8; border-color: #c7ecec; }
.dash-banner--amber { background: #fff6e8; border-color: #f3e0c0; }
.dash-banner--sky { background: #eef7ff; border-color: #d4e7fb; }
.dash-banner--sand { background: #fff8ef; border-color: #f0e0c8; }
.dash-banner__btn {
  flex-shrink: 0;
  border-radius: 9px;
  padding: .55rem .9rem;
  background: #40BCC1;
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  text-decoration: none;
}
.dash-banner__btn:hover { text-decoration: none; color: #fff; opacity: .92; }
.dash-banner__btn--amber { background: #f0a202; }

.dash-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem 1.6rem;
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(600px 180px at 85% 20%, rgba(64,188,193,.35), transparent 60%),
    linear-gradient(120deg, #163a4a 0%, #1f4d5c 45%, #2a3a6b 100%);
}
.dash-hero--alert {
  background:
    radial-gradient(600px 180px at 85% 20%, rgba(240,162,2,.28), transparent 60%),
    linear-gradient(120deg, #3a1d2a 0%, #4a2a3a 45%, #2a3a6b 100%);
}
.dash-hero__eyebrow {
  margin: 0 0 .35rem;
  opacity: .75;
  font-size: .82rem;
  font-weight: 600;
}
.dash-hero h2 {
  margin: 0;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.dash-hero h2 em { font-style: normal; color: #7ee0e4; }
.dash-hero p {
  margin: .45rem 0 0;
  max-width: 42rem;
  opacity: .82;
  font-size: .95rem;
}
.dash-hero__cta {
  flex-shrink: 0;
  border: 0;
  border-radius: 10px;
  padding: .75rem 1.1rem;
  background: #40BCC1;
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.dash-hero__cta:hover { text-decoration: none; color: #fff; background: #35a8ad; }
.dash-metric__value--sm { font-size: 1.35rem; }

.dash-toolbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.dash-segment {
  display: inline-flex;
  padding: .2rem;
  border-radius: 999px;
  background: #e8edf2;
}
.dash-segment button,
.dash-segment a {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: .4rem .9rem;
  font: inherit;
  font-size: .85rem;
  font-weight: 650;
  color: #64748b;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.dash-segment button.is-active,
.dash-segment a.is-active {
  background: #fff;
  color: #111827;
  box-shadow: 0 1px 3px rgba(15,23,42,.08);
}
.dash-segment button:disabled {
  cursor: default;
}
.dash-segment a:hover { text-decoration: none; color: #111827; }
.dash-year {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 10px;
  padding: .45rem .8rem;
  font-size: .88rem;
  font-weight: 650;
  color: #334155;
}
.dash-period-form {
  display: inline-flex;
  margin: 0;
}
.dash-period-pick {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}
.dash-year--select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 1.7rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .65rem center;
  font: inherit;
  font-size: .88rem;
  font-weight: 650;
  color: #334155;
}
.dash-year--select:hover,
.dash-year--select:focus {
  border-color: #40BCC1;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(64,188,193,.14);
}

.dash-metrics {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.dash-metrics--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.dash-metric {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
  box-shadow: 0 10px 28px rgba(15,23,42,.04);
}
.dash-metric header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #64748b;
  font-size: .88rem;
  font-weight: 600;
}
.dash-metric__icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .78rem;
  font-weight: 800;
}
.dash-metric__icon--ok { background: #e7f8ef; color: #15803d; }
.dash-metric__icon--wallet { background: #e7f8f8; color: #0f766e; }
.dash-metric__icon--warn { background: #eef8ef; color: #15803d; }
.dash-metric__value {
  margin: .85rem 0 .35rem;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111827;
}
.dash-metric__meta {
  margin: 0 0 .85rem;
  color: #94a3b8;
  font-size: .84rem;
}
.dash-metric a {
  color: #0f766e;
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
}
.dash-metric a:hover { text-decoration: underline; }

.dash-split {
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: .85rem;
}
.dash-card {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 14px;
  padding: 1.15rem 1.2rem;
  box-shadow: 0 10px 28px rgba(15,23,42,.04);
}
.dash-card--automation { background: #f6f3ff; border-color: #e8e0ff; }
.dash-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .35rem;
}
.dash-card__head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.dash-card__head a {
  color: #0f766e;
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
}
.dash-card__sub {
  margin: 0;
  color: #64748b;
  font-size: .88rem;
}
.dash-buckets {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}
.dash-buckets li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 0;
  border-bottom: 1px solid #eef2f6;
  font-size: .92rem;
}
.dash-buckets li > span {
  display: grid;
  gap: .15rem;
}
.dash-buckets__count {
  color: #64748b;
  font-size: .8rem;
}
.dash-buckets li:last-child { border-bottom: 0; }
.dash-empty {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: .9rem;
}
.dash-status {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: 999px;
  padding: .25rem .6rem;
  font-size: .75rem;
  font-weight: 700;
}
.dash-status i {
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: currentColor;
}
.dash-status.is-on { background: #e7f8ef; color: #15803d; }
.dash-status.is-off { background: #f1f5f9; color: #64748b; }
.dash-auto-count {
  margin: .85rem 0 .35rem;
  font-size: 1.35rem;
  color: #111827;
}
.dash-auto-count strong { font-size: 1.7rem; font-weight: 800; }
.dash-link {
  display: inline-block;
  margin-top: .9rem;
  color: #0f766e;
  font-weight: 700;
  font-size: .86rem;
  text-decoration: none;
}

.dash-section { display: grid; gap: .75rem; }
.dash-section__label {
  margin: .35rem 0 0;
  color: #94a3b8;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.dash-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
}
.dash-action {
  display: grid;
  place-items: center;
  min-height: 3.2rem;
  padding: .75rem 1rem;
  border-radius: 12px;
  border: 1.5px solid #40BCC1;
  background: #fff;
  color: #0f766e;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  text-align: center;
}
.dash-action:hover { text-decoration: none; background: #f0fbfb; }
.dash-action--primary {
  background: #40BCC1;
  color: #fff;
  border-color: #40BCC1;
}
.dash-action--primary:hover { background: #35a8ad; color: #fff; }
.dash-allclear {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  padding: .55rem .9rem;
  border-radius: 999px;
  background: #e7f8ef;
  color: #15803d;
  font-size: .86rem;
  font-weight: 650;
  width: fit-content;
}
.dash-allclear span {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #22c55e;
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
}

.dash-started p {
  margin: .45rem 0 1rem;
  color: #64748b;
  max-width: 44rem;
}
.dash-started header h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.dash-started header span { color: #60a5fa; }
.dash-started__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.dash-started__grid a {
  display: grid;
  gap: .25rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: #eef7ff;
  border: 1px solid #d6ebf8;
  text-decoration: none;
  color: #111827;
}
.dash-started__grid a:hover { background: #e4f2ff; text-decoration: none; }
.dash-started__grid strong { font-size: .95rem; }
.dash-started__grid span { color: #64748b; font-size: .84rem; }

/* KSeF (dashboard-aligned) */
.ksef-inline-form { display: inline; margin: 0; }
.ksef-inline-form .app-bar__cta {
  border: 0;
  cursor: pointer;
  font: inherit;
}
.ksef-form {
  display: grid;
  gap: .15rem;
  margin-top: .85rem;
}
.ksef-form .form-row {
  margin-bottom: .75rem;
}
.ksef-form .form-row input,
.ksef-form .form-row select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: .7rem .85rem;
  background: #fff;
  font: inherit;
  color: #111827;
}
.ksef-form .form-row textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: .7rem .85rem;
  background: #fff;
  font: inherit;
  color: #111827;
  resize: vertical;
  min-height: 5rem;
}
.ksef-form .form-row input:focus,
.ksef-form .form-row select:focus,
.ksef-form .form-row textarea:focus {
  outline: 2px solid rgba(64,188,193,.35);
  border-color: #40BCC1;
}
.ksef-form .form-row input[readonly] {
  background: #f8fafc;
  color: #0f766e;
  font-weight: 700;
}

.catalog-desc {
  margin-top: .2rem;
  color: #94a3b8;
  font-size: .82rem;
  line-height: 1.35;
}
.catalog-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .35rem;
  white-space: nowrap;
}
.catalog-actions form { display: inline; margin: 0; }
.catalog-action {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  text-decoration: none;
}
.catalog-action:hover { background: #f1f5f9; color: #0f766e; text-decoration: none; }
.catalog-action--danger:hover { background: #fef2f2; color: #dc2626; }
.ksef-form .dash-action {
  justify-self: start;
  min-height: 0;
  padding: .65rem 1.05rem;
  cursor: pointer;
  font: inherit;
  width: auto;
}
.ksef-form .dash-link {
  display: inline-flex;
  align-items: center;
  margin-top: .35rem;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.ksef-form .dash-link:disabled {
  opacity: .45;
  cursor: default;
}
.dash-hero form { margin: 0; }

@media (max-width: 1100px) {
  .dash-metrics,
  .dash-metrics--4,
  .dash-split,
  .dash-actions,
  .dash-started__grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .dash-banner,
  .dash-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .app-bar { padding-inline: 1rem; }
  .app-content { padding-inline: 1rem; }
}

/* =========================================================
   Invoices — sales list (Terminovo-style)
   ========================================================= */
.app-bar__titles { min-width: 0; }
.app-bar__subtitle {
  margin: .2rem 0 0;
  color: #64748b;
  font-size: .92rem;
  font-weight: 500;
}

.inv { display: grid; gap: .85rem; }
.inv-toolbar-top {
  display: flex;
  justify-content: flex-end;
  gap: .65rem;
  flex-wrap: wrap;
}
.inv-outline-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1.5px solid #40BCC1;
  background: #fff;
  color: #0f766e;
  border-radius: 10px;
  padding: .55rem .9rem;
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.inv-outline-btn:hover { background: #f0fbfb; text-decoration: none; }
.inv-outline-btn:disabled { opacity: .55; cursor: default; }
.ksef-import { display: inline-flex; }
.ksef-import-btn.is-loading {
  border-color: #5fd0d4;
  color: #0f766e;
}
.ksef-import-btn.is-loading .ksef-import-btn__icon { display: none; }
.ksef-import-btn__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(95, 208, 212, .28);
  border-top-color: #5fd0d4;
  border-radius: 50%;
  animation: ksef-import-spin .7s linear infinite;
  flex: 0 0 auto;
}
@keyframes ksef-import-spin {
  to { transform: rotate(360deg); }
}
.ksef-import-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, .28);
  backdrop-filter: blur(2px);
}
.ksef-import-overlay[hidden] { display: none !important; }
.ksef-import-overlay__card {
  display: grid;
  justify-items: center;
  gap: .85rem;
  min-width: 220px;
  padding: 1.4rem 1.6rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
  color: #0f172a;
  font-weight: 700;
}
.ksef-import-overlay__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(95, 208, 212, .25);
  border-top-color: #5fd0d4;
  border-radius: 50%;
  animation: ksef-import-spin .7s linear infinite;
}

.inv-panel {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 16px;
  padding: 1rem 1.1rem 1.35rem;
  box-shadow: 0 10px 28px rgba(15,23,42,.04);
}
.inv-tabs {
  display: inline-flex;
  gap: .25rem;
  padding: .25rem;
  border-radius: 12px;
  background: #eef2f6;
  margin-bottom: 1rem;
}
.inv-tabs a {
  border-radius: 10px;
  padding: .55rem 1rem;
  color: #64748b;
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
}
.inv-tabs a.is-active {
  background: #fff;
  color: #111827;
  box-shadow: 0 1px 3px rgba(15,23,42,.08);
}
.inv-tabs a:hover { text-decoration: none; color: #111827; }

.inv-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
.inv-stats article {
  border: 1px solid #e8edf2;
  border-radius: 12px;
  padding: .9rem 1rem;
  background: #fff;
}
.inv-stats header {
  display: flex;
  align-items: center;
  gap: .35rem;
  color: #64748b;
  font-size: .84rem;
  font-weight: 600;
  margin-bottom: .55rem;
}
.inv-stats header span { opacity: .55; font-size: .75rem; }
.inv-stats strong {
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111827;
}

.inv-filters { display: grid; gap: .75rem; margin-bottom: 1rem; }
.inv-filters__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
}
.inv-filters__row--period {
  padding-top: .15rem;
}
.inv-select {
  border: 1.5px solid #40BCC1;
  background: #fff;
  color: #0f766e;
  border-radius: 10px;
  padding: .55rem .8rem;
  font: inherit;
  font-size: .88rem;
  font-weight: 650;
}
.inv-search {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: .55rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: .55rem .85rem;
  background: #fff;
  color: #94a3b8;
}
.inv-search input {
  border: 0;
  outline: 0;
  width: 100%;
  font: inherit;
  color: #111827;
  background: transparent;
}

.inv-empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: .55rem;
  padding: 3rem 1rem 2.5rem;
}
.inv-empty__icon {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #f8fafc;
  margin-bottom: .35rem;
}
.inv-empty h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #111827;
}
.inv-empty p {
  margin: 0;
  color: #64748b;
  max-width: 28rem;
}
.inv-empty__cta {
  margin-top: .65rem;
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  padding: .75rem 1.2rem;
  background: #40BCC1;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(64,188,193,.28);
}
.inv-empty__cta:hover { background: #35a8ad; color: #fff; text-decoration: none; }

.inv-table-wrap { overflow: auto; }
.inv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.inv-table th {
  text-align: left;
  color: #94a3b8;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .65rem .55rem;
  border-bottom: 1px solid #eef2f6;
}
.inv-table td {
  padding: .85rem .55rem;
  border-bottom: 1px solid #eef2f6;
  color: #334155;
}
.inv-table a { color: #0f766e; font-weight: 650; text-decoration: none; }
.inv-table a:hover { text-decoration: underline; }

@media (max-width: 980px) {
  .inv-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .inv-stats { grid-template-columns: 1fr; }
}

/* =========================================================
   Invoice wizard + email verified
   ========================================================= */
.auth-verified { text-align: center; }
.auth-verified__icon {
  width: 3.2rem; height: 3.2rem; margin: 0 auto 1rem;
  border-radius: 50%; border: 2px solid #22c55e; color: #16a34a;
  display: grid; place-items: center; font-size: 1.4rem; font-weight: 800;
}
.auth-verified .auth-submit { display: block; text-align: center; text-decoration: none; margin-top: 1.25rem; }

.wiz { display: grid; gap: 1rem; max-width: 980px; }
.wiz-head { display: flex; align-items: center; gap: .75rem; }
.wiz-head h1 { margin: 0; font-size: 1.55rem; font-weight: 800; letter-spacing: -0.03em; }
.wiz-back { color: #64748b; font-size: 1.2rem; text-decoration: none; }
.wiz-stepper { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: .25rem 0 0; }
.wiz-stepper__item { display: inline-flex; align-items: center; gap: .4rem; color: #94a3b8; font-size: .84rem; font-weight: 650; }
.wiz-stepper__num {
  width: 1.55rem; height: 1.55rem; border-radius: 50%; display: grid; place-items: center;
  background: #e8edf2; color: #64748b; font-size: .72rem; font-weight: 800;
}
.wiz-stepper__item.is-active { color: #111827; }
.wiz-stepper__item.is-active .wiz-stepper__num,
.wiz-stepper__item.is-done .wiz-stepper__num { background: #40BCC1; color: #fff; }
.wiz-stepper__line { width: 28px; height: 2px; background: #e5e7eb; }
.wiz-stepper__line.is-done { background: #40BCC1; }
.wiz-form, .wiz-section { display: grid; gap: 1rem; }
.wiz-section h2 { margin: 0; font-size: 1.2rem; font-weight: 800; }
.wiz-lead { margin: 0; color: #64748b; }
.wiz-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.wiz-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wiz-card {
  display: grid; gap: .35rem; padding: 1rem; border: 1.5px solid #e5e7eb; border-radius: 14px;
  background: #fff; cursor: pointer;
}
.wiz-card input { accent-color: #40BCC1; }
.wiz-card.is-selected,
.wiz-card:has(input:checked) { border-color: #40BCC1; background: rgba(64,188,193,.06); }
.wiz-card--locked { opacity: .72; cursor: default; }
.wiz-card strong { color: #111827; }
.wiz-card span { color: #64748b; font-size: .86rem; }
.wiz-client-bar { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.wiz-client-list { display: grid; gap: .55rem; }
.wiz-client {
  display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem;
  border: 1.5px solid #e5e7eb; border-radius: 12px; background: #fff; cursor: pointer;
}
.wiz-client.is-selected { border-color: #40BCC1; background: #eef7ff; }
.wiz-client input { accent-color: #40BCC1; }
.wiz-client strong { display: block; color: #111827; }
.wiz-client em {
  font-style: normal; margin-left: .4rem; font-size: .72rem; font-weight: 700;
  background: #eef2f6; color: #475569; border-radius: 6px; padding: .1rem .4rem;
}
.wiz-client small { color: #64748b; }
.wiz-check { margin-left: auto; color: #40BCC1; font-weight: 800; opacity: 0; }
.wiz-client.is-selected .wiz-check, .wiz-client:has(input:checked) .wiz-check { opacity: 1; }
.wiz-client-summary {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  padding: .85rem 1rem; border-radius: 12px; background: #f8fafc; border: 1px solid #e8edf2;
}
.wiz-client-summary span { color: #64748b; flex: 1; }
.wiz-client-form__hint {
  margin: 0 0 .15rem;
  padding: .65rem .85rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e8edf2;
  color: #475569;
  font-size: .88rem;
}
html[data-theme="dark"] .wiz-client-form__hint {
  background: #0f172a;
  border-color: #334155;
  color: #94a3b8;
}
.wiz-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: .35rem;
}
.wiz-pager__meta { color: #64748b; font-size: .88rem; font-weight: 600; }
.wiz-pager__links { display: flex; gap: .55rem; flex-wrap: wrap; }
.wiz-due__opts { display: flex; flex-wrap: wrap; gap: .5rem; }
.wiz-due__opts label {
  border: 1.5px solid #e5e7eb; border-radius: 10px; padding: .55rem .9rem; cursor: pointer; font-weight: 700; color: #64748b;
}
.wiz-due__opts label.is-selected, .wiz-due__opts label:has(input:checked) {
  border-color: #40BCC1; color: #0f766e; background: rgba(64,188,193,.08);
}
.wiz-due__opts input { display: none; }
.wiz-due {
  margin-top: 1.1rem;
  display: grid;
  gap: .75rem;
}
.wiz-due > p:first-child {
  margin: 0;
  font-weight: 750;
  color: #111827;
}
.wiz-due__calendar {
  max-width: 280px;
}
.wiz-due__calendar input[type="date"] {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: .85rem .95rem;
  font: inherit;
  background: #fff;
}
.wiz-due__calendar input[type="date"]:focus {
  outline: 2px solid rgba(64,188,193,.35);
  border-color: #40BCC1;
}
.wiz-line {
  display: grid; grid-template-columns: 2fr .7fr .7fr .9fr .7fr auto; gap: .55rem;
  padding: .75rem; border: 1px solid #e8edf2; border-radius: 12px; margin-bottom: .55rem;
  align-items: end;
}
.wiz-line__remove {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: .55rem .35rem;
  align-self: center;
}
.wiz-line__remove:hover { color: #dc2626; }
.wiz-catalog-pick {
  margin-bottom: .35rem;
  max-width: 42rem;
}
.wiz-totals {
  display: flex; justify-content: flex-end; gap: 1.25rem; margin-top: .5rem; flex-wrap: wrap;
}
.wiz-totals span { color: #64748b; display: block; font-size: .8rem; }
.wiz-toggle {
  display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem;
  border: 1px solid #e8edf2; border-radius: 12px; background: #fff;
}
.wiz-toggle em { display: block; font-style: normal; color: #64748b; font-size: .86rem; }
.wiz-nav { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; }
.wiz-nav--preview { align-items: center; }
.wiz-nav__right { display: flex; gap: .55rem; flex-wrap: wrap; }
.wiz-next {
  border: 0; border-radius: 10px; padding: .7rem 1.15rem; background: #40BCC1; color: #fff;
  font-weight: 700; cursor: pointer; box-shadow: 0 8px 20px rgba(64,188,193,.25);
}
.wiz-preview-doc {
  border: 1px solid #e8edf2; border-radius: 16px; padding: 1.25rem; background: #fff;
  box-shadow: 0 10px 28px rgba(15,23,42,.04);
}
.wiz-preview-doc__meta, .wiz-preview-doc__parties, .wiz-preview-sum {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1rem;
}
.wiz-preview-doc__meta span, .wiz-preview-doc__parties span { color: #94a3b8; font-size: .78rem; display: block; }
.wiz-preview-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.wiz-preview-table th { text-align: left; color: #94a3b8; font-size: .75rem; padding: .5rem; border-bottom: 1px solid #eef2f6; }
.wiz-preview-table td { padding: .65rem .5rem; border-bottom: 1px solid #eef2f6; }
.wiz-send { margin-top: 1rem; padding: 1rem; border-radius: 14px; background: #f8fafc; display: grid; gap: .65rem; }
.wiz-send h3 { margin: 0 0 .15rem; }
.wiz-modal[hidden] { display: none !important; }
.wiz-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 1rem; }
.wiz-modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.45); }
.wiz-modal__card {
  position: relative; width: min(480px, 100%); background: #fff; border-radius: 16px;
  padding: 1.25rem; box-shadow: 0 24px 60px rgba(15,23,42,.25); display: grid; gap: 1rem;
}
.wiz-modal__card header { display: flex; justify-content: space-between; gap: 1rem; }
.wiz-modal__card h3 { margin: 0; }
.wiz-modal__card p { margin: .25rem 0 0; color: #64748b; font-size: .9rem; }
.wiz-modal__close { border: 0; background: transparent; font-size: 1.4rem; color: #94a3b8; cursor: pointer; }
.wiz-modal__form { display: grid; gap: .85rem; }
.wiz-modal__actions { display: flex; justify-content: flex-end; gap: .55rem; }
.page-app .wiz .ob-field select,
.page-app .wiz .ob-field textarea,
.page-app .wiz-modal select,
.page-app .wiz-modal textarea {
  width: 100%; border: 1px solid #e5e7eb; border-radius: 12px; padding: .85rem .95rem; font: inherit; background: #fff;
}
@media (max-width: 900px) {
  .wiz-cards, .wiz-cards--3, .wiz-line, .wiz-preview-doc__meta, .wiz-preview-doc__parties { grid-template-columns: 1fr; }
}

/* —— Settings / Business (Terminovo-like) —— */
.sett-tabs {
  display: flex; flex-wrap: wrap; gap: .15rem 1.1rem;
  border-bottom: 1px solid #e8edf2; margin: 0 0 1.25rem; padding: 0 0 .15rem;
}
.sett-tabs a {
  position: relative; padding: .55rem 0 .7rem; color: #64748b; font-weight: 650;
  font-size: .92rem; text-decoration: none;
}
.sett-tabs a:hover { color: #111827; text-decoration: none; }
.sett-tabs a.is-active { color: #0f766e; }
.sett-tabs a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: #40BCC1; border-radius: 2px 2px 0 0;
}
html[data-theme="dark"] .sett-tabs { border-bottom-color: #1f2937; }
html[data-theme="dark"] .sett-tabs a { color: #94a3b8; }
html[data-theme="dark"] .sett-tabs a:hover { color: #f8fafc; }
html[data-theme="dark"] .sett-tabs a.is-active { color: #5fd0d4; }
.sett-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1rem; align-items: start;
}
.sett-col { display: grid; gap: 1rem; }
.sett-card {
  background: #fff; border: 1px solid #e8edf2; border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .03); padding: 1.15rem 1.2rem 1rem;
}
.sett-card__form { display: grid; gap: .95rem; }
.sett-card__head { display: flex; gap: .75rem; align-items: flex-start; }
.sett-card__head h2, .sett-card__head--plain h2 {
  margin: 0; font-size: 1.05rem; font-weight: 800; color: #111827; letter-spacing: -.02em;
}
.sett-card__head p, .sett-card__head--plain p {
  margin: .2rem 0 0; color: #64748b; font-size: .86rem;
}
.sett-card__icon {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: #eef8f8; color: #0f766e; flex-shrink: 0;
}
.sett-logo-row { display: flex; align-items: center; gap: .85rem; }
.sett-logo {
  width: 64px; height: 64px; border-radius: 999px; background: #e8f4f5; color: #0f766e;
  display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; overflow: hidden;
}
.sett-logo img { width: 100%; height: 100%; object-fit: cover; }
.sett-field { display: grid; gap: .35rem; }
.sett-field label { font-weight: 650; font-size: .86rem; color: #334155; }
.sett-field label em { color: #ef4444; font-style: normal; }
.sett-field input {
  width: 100%; border: 1px solid #e5e7eb; border-radius: 12px; padding: .8rem .95rem;
  font: inherit; background: #fff; color: #111827;
}
.sett-field input:focus { outline: 2px solid rgba(64,188,193,.35); border-color: #40BCC1; }
.sett-help { margin: 0; color: #94a3b8; font-size: .8rem; line-height: 1.4; }
.sett-section-label {
  margin-top: .15rem; font-size: .78rem; font-weight: 750; letter-spacing: .04em;
  text-transform: uppercase; color: #94a3b8;
}
.sett-grid-4 {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem;
}
.sett-input-wrap { position: relative; }
.sett-input-wrap input { padding-right: 5.5rem; }
.sett-badge {
  position: absolute; right: .55rem; top: 50%; transform: translateY(-50%);
  font-size: .72rem; font-weight: 750; padding: .22rem .5rem; border-radius: 999px;
}
.sett-badge--ok { background: #dcfce7; color: #166534; }
.sett-iban-check {
  position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
  color: #16a34a; font-weight: 800;
}
.sett-iban-preview {
  border-radius: 12px; padding: .85rem 1rem; background: #eef8f8; color: #0f766e;
  font-weight: 700; letter-spacing: .02em; border: 1px solid #d5ecec;
}
.sett-pills { display: flex; flex-wrap: wrap; gap: .45rem; }
.sett-pill {
  border: 1px solid #d5ecec; background: #f8fbfb; color: #475569; border-radius: 999px;
  padding: .35rem .7rem; font-size: .78rem; font-weight: 650; cursor: pointer;
}
.sett-pill.is-active, .sett-pill:hover { background: #40BCC1; border-color: #40BCC1; color: #fff; }
.sett-card__foot { display: flex; justify-content: flex-end; padding-top: .15rem; }
.sett-btn {
  border: 0; border-radius: 10px; padding: .65rem 1.05rem; font: inherit; font-weight: 700; cursor: pointer;
}
.sett-btn--primary { background: #40BCC1; color: #fff; box-shadow: 0 8px 18px rgba(64,188,193,.25); }
.sett-btn--primary:disabled { opacity: .45; cursor: default; box-shadow: none; }
.sett-btn--ghost {
  background: #fff; color: #334155; border: 1px solid #e5e7eb; display: inline-flex; align-items: center;
}
@media (max-width: 980px) {
  .sett-grid, .sett-grid-4 { grid-template-columns: 1fr; }
}

.bank-import-hint { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid #e8edf2; color: #475569; font-size: .9rem; }
.bank-import-hint h3 { margin: 0 0 .55rem; color: #111827; font-size: .95rem; }
.bank-import-hint pre { background: #f8fafc; border: 1px solid #e8edf2; border-radius: 10px; padding: .85rem; overflow: auto; font-size: .78rem; color: #334155; }
.bank-import-hint ul { margin: .5rem 0 0; padding-left: 1.1rem; }
.bank-tx-summary { display: grid; gap: .75rem; margin-bottom: 1.15rem; padding: .9rem 1rem; border: 1px solid #e8edf2; border-radius: 12px; background: #f8fafc; }
.bank-tx-summary span { display: block; color: #64748b; font-size: .8rem; font-weight: 600; margin-bottom: .2rem; }
.bank-tx-summary strong { font-size: .95rem; color: #111827; font-weight: 650; word-break: break-word; }
.bank-match-form { display: grid; gap: .9rem; }
.bank-remember { display: flex; align-items: flex-start; gap: .55rem; font-size: .88rem; color: #334155; }
.bank-remember input { margin-top: .2rem; }
.bank-match-modal__card { width: min(560px, 100%); max-height: min(90vh, 760px); overflow: auto; }
.bank-match-modal__body { margin-top: 1rem; }
.bank-match-actions { justify-content: space-between; margin-top: .35rem; flex-wrap: wrap; }
.bank-match-actions__right { display: flex; gap: .55rem; flex-wrap: wrap; }
.bank-match-link {
    border: 0;
    background: transparent;
    color: #0f766e;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.bank-match-link:hover { color: #0d9488; }
.bank-match-link--muted { color: #64748b; }
.bank-match-link--muted:hover { color: #334155; }
.bank-tx-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem .85rem;
    justify-content: flex-end;
}

.bank-import-form { display: grid; gap: 1rem; margin-top: .85rem; }
.bank-drop {
  position: relative;
  display: grid;
  place-items: center;
  gap: .45rem;
  min-height: 11rem;
  padding: 1.4rem 1.1rem;
  border: 1.5px dashed #c7d6db;
  border-radius: 16px;
  background: linear-gradient(180deg, #f7fbfb, #f3f7f8);
  color: #475569;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.bank-drop:hover,
.bank-import-form.has-file .bank-drop {
  border-color: #40BCC1;
  background: #f0fbfb;
  box-shadow: 0 0 0 4px rgba(64,188,193,.12);
}
.bank-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.bank-drop__icon {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(64,188,193,.14);
  color: #0f766e;
  margin-bottom: .2rem;
}
.bank-drop strong {
  color: #111827;
  font-size: .98rem;
  font-weight: 750;
}
.bank-drop em {
  font-style: normal;
  color: #94a3b8;
  font-size: .84rem;
}
.bank-import-actions {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  flex-wrap: wrap;
}
.bank-import-actions .dash-action {
  min-height: 0;
  width: auto;
  padding: .7rem 1.1rem;
  cursor: pointer;
  font: inherit;
}
.bank-sample {
  margin: .85rem 0 0;
  padding: .95rem 1rem;
  border-radius: 12px;
  border: 1px solid #e8edf2;
  background: #f8fafc;
  overflow: auto;
  font-size: .8rem;
  line-height: 1.45;
  color: #334155;
  white-space: pre;
}

html[data-theme="dark"] .bank-drop {
  background: linear-gradient(180deg, #0f172a, #111827);
  border-color: #334155;
  color: #94a3b8;
}
html[data-theme="dark"] .bank-drop:hover,
html[data-theme="dark"] .bank-import-form.has-file .bank-drop {
  border-color: #40BCC1;
  background: #0f2a2c;
}
html[data-theme="dark"] .bank-drop strong { color: #f8fafc; }
html[data-theme="dark"] .bank-drop__icon {
  background: rgba(64,188,193,.18);
  color: #5fd0d4;
}
html[data-theme="dark"] .bank-sample {
  background: #0f172a;
  border-color: #1f2937;
  color: #cbd5e1;
}
html[data-theme="dark"] .bank-tx-summary,
html[data-theme="dark"] .bank-import-hint pre {
  background: #0f172a;
  border-color: #1f2937;
  color: #cbd5e1;
}
html[data-theme="dark"] .bank-import-hint,
html[data-theme="dark"] .bank-remember { color: #94a3b8; }
html[data-theme="dark"] .bank-import-hint h3,
html[data-theme="dark"] .bank-tx-summary strong { color: #f8fafc; }
html[data-theme="dark"] .bank-match-link { color: #5eead4; }
html[data-theme="dark"] .bank-match-link:hover { color: #99f6e4; }
html[data-theme="dark"] .bank-match-link--muted { color: #94a3b8; }
html[data-theme="dark"] .bank-match-link--muted:hover { color: #e2e8f0; }

/* Invoice created success modal */
.inv-success .inv-success__card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 1.75rem 1.5rem 1.35rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
  text-align: center;
}
.inv-success__close {
  position: absolute;
  top: .85rem;
  right: .95rem;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}
.inv-success__close:hover { color: #64748b; }
.inv-success__icon {
  width: 4.25rem;
  height: 4.25rem;
  margin: 0 auto .95rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e8f8ef;
  box-shadow: 0 0 0 10px rgba(34, 197, 94, .12);
}
.inv-success__icon span {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #22c55e;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
}
.inv-success h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111827;
}
.inv-success__lead {
  margin: .35rem 0 1.15rem;
  color: #64748b;
  font-size: .92rem;
}
.inv-success__meta {
  margin: 0 0 1rem;
  padding: .35rem .95rem;
  border: 1px solid #e8edf2;
  border-radius: 14px;
  background: #fafbfc;
  text-align: left;
}
.inv-success__meta > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: .7rem 0;
  border-bottom: 1px solid #eef2f6;
}
.inv-success__meta > div:last-child { border-bottom: 0; }
.inv-success__meta dt {
  margin: 0;
  color: #94a3b8;
  font-size: .86rem;
  font-weight: 600;
}
.inv-success__meta dd {
  margin: 0;
  color: #111827;
  font-size: .9rem;
  font-weight: 750;
  text-align: right;
  word-break: break-word;
}
.inv-success__lines {
  text-align: left;
  margin-bottom: 1.15rem;
}
.inv-success__line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .35rem 0;
  color: #334155;
  font-size: .9rem;
}
.inv-success__line strong { color: #111827; font-weight: 700; }
.inv-success__sum {
  margin-top: .55rem;
  padding-top: .65rem;
  border-top: 1px solid #e8edf2;
  display: grid;
  gap: .4rem;
}
.inv-success__sum > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #64748b;
  font-size: .9rem;
}
.inv-success__sum strong { color: #111827; font-weight: 700; }
.inv-success__gross {
  margin-top: .15rem;
  color: #111827 !important;
  font-weight: 800;
}
.inv-success__gross strong {
  color: #40BCC1;
  font-size: 1.05rem;
  font-weight: 800;
}
.inv-success__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}
.inv-success__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 2.75rem;
  padding: .65rem .9rem;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  cursor: pointer;
}
.inv-success__btn--ghost {
  background: #fff;
  color: #0f766e;
  border: 1.5px solid #40BCC1;
}
.inv-success__btn--ghost:hover { background: #f0fbfb; text-decoration: none; color: #0f766e; }
.inv-success__btn--primary {
  background: #40BCC1;
  color: #fff;
  border: 1.5px solid #40BCC1;
  box-shadow: 0 8px 18px rgba(64, 188, 193, .28);
}
.inv-success__btn--primary:hover { background: #35a8ad; }
@media (max-width: 520px) {
  .inv-success__actions { grid-template-columns: 1fr; }
}

/* Theme toggle + dark mode */
.app-bar__icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
}
.app-bar__icon-btn:hover {
  background: #f8fafc;
  color: #0f766e;
  border-color: #c7ecec;
}
.app-bar__icon--moon { display: none; }
html[data-theme="dark"] .app-bar__icon--sun { display: none; }
html[data-theme="dark"] .app-bar__icon--moon { display: block; }

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-deep: #020617;
  --ink: #e2e8f0;
  --muted: #94a3b8;
  --brand: #40BCC1;
  --brand-deep: #5fd0d4;
  --surface: rgba(15, 23, 42, 0.88);
  --line: rgba(148, 163, 184, 0.18);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(1000px 480px at 8% -12%, rgba(64,188,193,.18) 0%, transparent 55%),
    radial-gradient(800px 420px at 92% 0%, rgba(56,189,248,.08) 0%, transparent 50%),
    linear-gradient(180deg, #0b1220, #020617);
  color: var(--ink);
}

html[data-theme="dark"] body.page-app {
  background: #0b1220;
}

html[data-theme="dark"] .app-sidebar {
  background: #111827;
  border-right-color: #1f2937;
}
html[data-theme="dark"] .app-sidebar__logo-text,
html[data-theme="dark"] .app-sidebar__logo-text em { color: #f8fafc; }
html[data-theme="dark"] .app-sidebar__collapse {
  background: #1f2937;
  color: #94a3b8;
  border-color: #334155;
}
html[data-theme="dark"] .app-sidebar__collapse:hover {
  background: #334155;
  color: #f8fafc;
}
html[data-theme="dark"] .app-nav-link,
html[data-theme="dark"] .app-nav-group summary {
  color: #94a3b8;
}
html[data-theme="dark"] a.app-nav-link:hover,
html[data-theme="dark"] .app-nav-group summary:hover {
  background: #1f2937;
  color: #f8fafc;
}
html[data-theme="dark"] a.app-nav-link.is-active {
  background: rgba(64,188,193,.16);
  color: #5fd0d4;
}
html[data-theme="dark"] .app-nav-sub a {
  color: #94a3b8;
}
html[data-theme="dark"] .app-nav-sub a:hover,
html[data-theme="dark"] .app-nav-sub a.is-active {
  color: #e2e8f0;
  background: #1f2937;
}
html[data-theme="dark"] .app-nav-divider { background: #1f2937; }
html[data-theme="dark"] .app-setup {
  background: #0f172a;
  border-color: #1f2937;
}
html[data-theme="dark"] .app-setup__list li { color: #94a3b8; }
html[data-theme="dark"] .app-setup__list li.is-done { color: #5fd0d4; }
html[data-theme="dark"] .app-setup__list a:hover { color: #f8fafc; }
html[data-theme="dark"] .app-setup__bar { background: #1f2937; }
html[data-theme="dark"] .app-setup__check { border-color: #475569; }
html[data-theme="dark"] .app-sidebar__org {
  background: #0f172a;
  border-color: #1f2937;
}
html[data-theme="dark"] .app-sidebar__org strong { color: #f8fafc; }
html[data-theme="dark"] .app-sidebar__org em { color: #94a3b8; }
html[data-theme="dark"] .app-sidebar__avatar {
  background: rgba(64,188,193,.22);
  color: #5fd0d4;
}
html[data-theme="dark"] .app-sidebar__legal,
html[data-theme="dark"] .app-sidebar__legal a { color: #94a3b8; }
html[data-theme="dark"] .app-sidebar__legal a:hover { color: #e2e8f0; }

html[data-theme="dark"] .app-main { background: #0b1220; }
html[data-theme="dark"] .app-bar__title { color: #f8fafc; }
html[data-theme="dark"] .app-bar__subtitle { color: #94a3b8; }
html[data-theme="dark"] .app-bar__icon-btn {
  background: #111827;
  border-color: #334155;
  color: #cbd5e1;
}
html[data-theme="dark"] .app-bar__icon-btn:hover {
  background: #1f2937;
  color: #5fd0d4;
  border-color: #40BCC1;
}
html[data-theme="dark"] .app-bar__chip {
  background: rgba(64,188,193,.16);
  color: #5fd0d4;
}

html[data-theme="dark"] .dash-banner {
  background: #111827;
  border-color: #1f2937;
}
html[data-theme="dark"] .dash-banner strong { color: #f8fafc; }
html[data-theme="dark"] .dash-banner p { color: #94a3b8; }
html[data-theme="dark"] .dash-banner--teal { background: #0f2a2c; border-color: #1a4a4d; }
html[data-theme="dark"] .dash-banner--amber { background: #2a2112; border-color: #4a3a18; }
html[data-theme="dark"] .dash-banner--sky { background: #0f1f2e; border-color: #1c3348; }
html[data-theme="dark"] .dash-banner--sand { background: #2a2112; border-color: #4a3a18; }

html[data-theme="dark"] .dash-hero {
  background: linear-gradient(135deg, #12343a, #0f172a 55%);
  border-color: #1f2937;
}
html[data-theme="dark"] .dash-metric,
html[data-theme="dark"] .dash-card,
html[data-theme="dark"] .inv-panel,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .mod-card,
html[data-theme="dark"] .sett-card {
  background: #111827;
  border-color: #1f2937;
  box-shadow: none;
  color: #e2e8f0;
}
html[data-theme="dark"] .dash-metric header,
html[data-theme="dark"] .dash-metric__meta,
html[data-theme="dark"] .dash-card__sub,
html[data-theme="dark"] .dash-section__label,
html[data-theme="dark"] .sett-help,
html[data-theme="dark"] .catalog-desc { color: #94a3b8; }
html[data-theme="dark"] .dash-metric__value,
html[data-theme="dark"] .dash-card__head h3,
html[data-theme="dark"] .dash-card__head a { color: #f8fafc; }
html[data-theme="dark"] .dash-buckets li { border-bottom-color: #1f2937; color: #cbd5e1; }
html[data-theme="dark"] .dash-buckets__count { color: #94a3b8; }
html[data-theme="dark"] .dash-empty { background: #0f172a; color: #94a3b8; }
html[data-theme="dark"] .dash-action {
  background: #0f172a;
  color: #5fd0d4;
  border-color: #40BCC1;
}
html[data-theme="dark"] .dash-action:hover { background: #12343a; }
html[data-theme="dark"] .dash-action--primary {
  background: #40BCC1;
  color: #fff;
}
html[data-theme="dark"] .dash-segment {
  background: #0f172a;
  border-color: #1f2937;
}
html[data-theme="dark"] .dash-segment a,
html[data-theme="dark"] .dash-segment button { color: #94a3b8; }
html[data-theme="dark"] .dash-segment a.is-active,
html[data-theme="dark"] .dash-segment button.is-active {
  background: #1f2937;
  color: #f8fafc;
}
html[data-theme="dark"] .dash-year--select {
  background: #111827;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] .inv-table th { color: #64748b; border-bottom-color: #1f2937; }
html[data-theme="dark"] .inv-table td { color: #cbd5e1; border-bottom-color: #1f2937; }
html[data-theme="dark"] .inv-table a { color: #5fd0d4; }
html[data-theme="dark"] .inv-search,
html[data-theme="dark"] .inv-select,
html[data-theme="dark"] .ksef-form .form-row input,
html[data-theme="dark"] .ksef-form .form-row select,
html[data-theme="dark"] .ksef-form .form-row textarea,
html[data-theme="dark"] .sett-field input,
html[data-theme="dark"] .form-row input,
html[data-theme="dark"] .form-row select,
html[data-theme="dark"] .form-row textarea {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
html[data-theme="dark"] .inv-search input {
  color: #f8fafc;
}
html[data-theme="dark"] .inv-search input::placeholder {
  color: #64748b;
}
html[data-theme="dark"] .inv-outline-btn {
  background: #111827;
  border-color: #334155;
  color: #cbd5e1;
}
html[data-theme="dark"] .inv-tabs { border-bottom-color: #1f2937; }
html[data-theme="dark"] .inv-tabs a { color: #94a3b8; }
html[data-theme="dark"] .inv-tabs a.is-active {
  color: #5fd0d4;
  border-bottom-color: #40BCC1;
}
html[data-theme="dark"] .inv-empty h2 { color: #f8fafc; }
html[data-theme="dark"] .inv-empty p { color: #94a3b8; }
html[data-theme="dark"] .inv-stats article {
  background: #0f172a;
  border-color: #1f2937;
}
html[data-theme="dark"] .inv-stats strong { color: #f8fafc; }
html[data-theme="dark"] .inv-stats header { color: #94a3b8; }

html[data-theme="dark"] .flash {
  background: #111827;
  border-color: #334155;
  color: #e2e8f0;
}
html[data-theme="dark"] .flash--success { background: #0f2a24; border-color: #1a4a40; }
html[data-theme="dark"] .flash--error { background: #2a1212; border-color: #4a1c1c; }

html[data-theme="dark"] .wiz-modal__card,
html[data-theme="dark"] .inv-success__card {
  background: #111827;
  color: #e2e8f0;
}
html[data-theme="dark"] .wiz-head h1,
html[data-theme="dark"] .wiz-section h2,
html[data-theme="dark"] .wiz-stepper__item.is-active,
html[data-theme="dark"] .wiz-card strong,
html[data-theme="dark"] .wiz-client strong,
html[data-theme="dark"] .wiz-toggle strong,
html[data-theme="dark"] .wiz-modal__card h3 {
  color: #f8fafc;
}
html[data-theme="dark"] .wiz-lead,
html[data-theme="dark"] .wiz-card span,
html[data-theme="dark"] .wiz-client small,
html[data-theme="dark"] .wiz-client-summary span,
html[data-theme="dark"] .wiz-totals span,
html[data-theme="dark"] .wiz-toggle em,
html[data-theme="dark"] .wiz-modal__card p {
  color: #94a3b8;
}
html[data-theme="dark"] .wiz-card,
html[data-theme="dark"] .wiz-client,
html[data-theme="dark"] .wiz-client-summary,
html[data-theme="dark"] .wiz-due__opts label,
html[data-theme="dark"] .wiz-preview-doc,
html[data-theme="dark"] .wiz-send {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
html[data-theme="dark"] .wiz-card.is-selected,
html[data-theme="dark"] .wiz-card:has(input:checked),
html[data-theme="dark"] .wiz-client.is-selected,
html[data-theme="dark"] .wiz-due__opts label.is-selected,
html[data-theme="dark"] .wiz-due__opts label:has(input:checked) {
  background: rgba(64, 188, 193, 0.12);
  border-color: #40BCC1;
}
html[data-theme="dark"] .wiz .ob-field label,
html[data-theme="dark"] .wiz-modal .ob-field label,
html[data-theme="dark"] .wiz-due > p:first-child,
html[data-theme="dark"] .wiz-client-summary strong,
html[data-theme="dark"] .wiz-line label {
  color: #e2e8f0;
}
html[data-theme="dark"] .wiz-line {
  border-color: #334155;
  background: #0f172a;
}
html[data-theme="dark"] .wiz-line__remove { color: #64748b; }
html[data-theme="dark"] .wiz-line__remove:hover { color: #f87171; }
html[data-theme="dark"] .wiz .ob-field input,
html[data-theme="dark"] .wiz .ob-field select,
html[data-theme="dark"] .wiz .ob-field textarea {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
  color-scheme: dark;
}
html[data-theme="dark"] .wiz-pager__meta { color: #94a3b8; }
html[data-theme="dark"] .wiz-client em {
  background: #1f2937;
  color: #94a3b8;
}
html[data-theme="dark"] .wiz-stepper__line { background: #334155; }
html[data-theme="dark"] .wiz-stepper__line.is-done { background: #40BCC1; }
html[data-theme="dark"] .wiz-due__calendar input[type="date"],
html[data-theme="dark"] .wiz .ob-field input,
html[data-theme="dark"] .wiz .ob-field select,
html[data-theme="dark"] .wiz .ob-field textarea,
html[data-theme="dark"] .wiz-modal .ob-field input,
html[data-theme="dark"] .wiz-modal .ob-field select,
html[data-theme="dark"] .wiz-modal .ob-field textarea {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}
html[data-theme="dark"] .wiz-preview-table th,
html[data-theme="dark"] .wiz-preview-table td {
  border-bottom-color: #1f2937;
  color: #cbd5e1;
}
html[data-theme="dark"] .inv-success h2 { color: #f8fafc; }
html[data-theme="dark"] .inv-success__lead { color: #94a3b8; }
html[data-theme="dark"] .inv-success__meta {
  background: #0f172a;
  border-color: #1f2937;
}
html[data-theme="dark"] .inv-success__meta dd,
html[data-theme="dark"] .inv-success__line strong { color: #f8fafc; }
html[data-theme="dark"] .inv-success__sum { border-top-color: #1f2937; }
html[data-theme="dark"] .inv-success__btn--ghost {
  background: #0f172a;
}

html[data-theme="dark"] .badge {
  background: #1f2937;
  color: #cbd5e1;
}
html[data-theme="dark"] .badge--ok { background: #0f2a24; color: #4ade80; }
html[data-theme="dark"] .badge--danger { background: #2a1212; color: #f87171; }
html[data-theme="dark"] .badge--warn { background: #2a2112; color: #fbbf24; }

html[data-theme="dark"] .timeline__item { border-left-color: rgba(64,188,193,.35); }
html[data-theme="dark"] .catalog-action { color: #94a3b8; }
html[data-theme="dark"] .catalog-action:hover { background: #1f2937; color: #5fd0d4; }

html[data-theme="dark"] .rule {
  background: #111827;
  border-color: #1f2937;
  color: #e2e8f0;
}
html[data-theme="dark"] .rule strong { color: #f8fafc; }
html[data-theme="dark"] .rule__meta { color: #94a3b8; }
html[data-theme="dark"] .btn--ghost {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
html[data-theme="dark"] .btn--ghost:hover {
  background: #1f2937;
  border-color: #475569;
  color: #f8fafc;
}

/* Subscription plans */
.billing-plans__grid,
.tn-plans {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
  margin-top: 1.25rem;
}
.billing-plan,
.tn-plan {
  position: relative;
  display: grid;
  gap: .75rem;
  align-content: start;
  padding: 1.15rem 1.1rem 1.2rem;
  border: 1px solid #e8edf2;
  border-radius: 16px;
  background: #fff;
}
.billing-plan.is-recommended,
.tn-plan--featured {
  border-color: #40BCC1;
  box-shadow: 0 12px 28px rgba(64,188,193,.18);
}
.billing-plan.is-current { background: #f0fbfb; }
.billing-plan__badge,
.tn-plan__badge {
  position: absolute;
  top: .75rem;
  right: .75rem;
  border-radius: 999px;
  padding: .2rem .55rem;
  background: #40BCC1;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
}
.billing-plan__badge--current { background: #0f766e; }
.billing-plan h4,
.tn-plan h3 { margin: 0; font-size: 1.15rem; }
.billing-plan__price,
.tn-plan__price {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111827;
}
.billing-plan__price span,
.tn-plan__price span {
  font-size: .85rem;
  font-weight: 600;
  color: #64748b;
}
.tn-plan__lead {
  margin: 0;
  color: #0f766e;
  font-weight: 700;
  font-size: .9rem;
}
.billing-plan ul,
.tn-plan ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .4rem;
}
.billing-plan li,
.tn-plan li {
  color: #475569;
  font-size: .88rem;
  padding-left: 1rem;
  position: relative;
}
.billing-plan li::before,
.tn-plan li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #40BCC1;
  font-weight: 800;
}
.billing-plan li.is-excluded,
.tn-plan li.is-excluded {
  color: #94a3b8;
}
.billing-plan li.is-excluded::before,
.tn-plan li.is-excluded::before {
  content: "-";
  color: #94a3b8;
  font-weight: 700;
}
.tn-plans__note {
  margin: 1.25rem 0 0;
  text-align: center;
  color: #64748b;
  font-size: .9rem;
}
@media (max-width: 980px) {
  .billing-plans__grid,
  .tn-plans { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .billing-plans__grid,
  .tn-plans { grid-template-columns: 1fr; }
}
html[data-theme="dark"] .billing-plan,
html[data-theme="dark"] .tn-plan {
  background: #111827;
  border-color: #1f2937;
}
html[data-theme="dark"] .billing-plan.is-current { background: #0f2a2c; }
html[data-theme="dark"] .billing-plan__price,
html[data-theme="dark"] .tn-plan__price { color: #f8fafc; }
html[data-theme="dark"] .billing-plan li,
html[data-theme="dark"] .tn-plan li { color: #94a3b8; }
