:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #eef3f4;
  --surface-3: #f9fbfb;
  --ink: #16201f;
  --muted: #5f6f70;
  --line: #dbe5e6;
  --line-strong: #b9c9ca;
  --accent: #176f64;
  --accent-strong: #0e4d46;
  --accent-deep: #0a3e39;
  --accent-soft: #e0efeb;
  --indigo: #435d9d;
  --indigo-soft: #e8edf9;
  --amber: #a76213;
  --amber-soft: #f8ead6;
  --blue: #2f6794;
  --blue-soft: #e2eff8;
  --red: #af4242;
  --red-soft: #f8dfdd;
  --green: #27764a;
  --green-soft: #dff0e6;
  --focus-ring: rgba(47, 103, 148, 0.34);
  --surface-hover: #f5fbf9;
  --surface-panel: #fbfcfb;
  --warn-surface: #fffaf2;
  --danger-surface: #fff6f5;
  --hero-panel: #174a47;
  --shadow: 0 18px 48px rgba(22, 32, 31, 0.09);
  --shadow-soft: 0 10px 30px rgba(22, 32, 31, 0.055);
  --radius: 8px;
  --sidebar: 264px;
  --header: 72px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(238, 243, 244, 0.82)),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.app {
  min-height: 100vh;
}

.boot {
  display: grid;
  min-height: 100vh;
  place-items: center;
  gap: 12px;
  color: var(--muted);
}

.boot-mark,
.brand-mark {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-strong), #244f74);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 10px 22px rgba(14, 77, 70, 0.18);
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
}

.auth-panel {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px;
  background:
    linear-gradient(180deg, #ffffff, #f8faf9);
  border-right: 1px solid var(--line);
}

.auth-brand,
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-copy {
  min-width: 0;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.brand-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  margin: 48px 0;
}

.auth-title {
  margin: 0 0 8px;
  font-size: 31px;
  line-height: 1.12;
}

.auth-subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-value-list {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
}

.auth-value-list div {
  display: grid;
  min-height: 44px;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 13px;
}

.auth-value-list strong {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 12px;
}

.auth-aside {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background:
    linear-gradient(135deg, rgba(224, 239, 235, 0.62), rgba(226, 239, 248, 0.72)),
    var(--bg);
}

.auth-snapshot {
  width: min(720px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: surface-rise 260ms ease-out;
}

.snapshot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-panel);
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.snapshot-card {
  min-height: 164px;
  padding: 22px;
  background: var(--surface);
}

.snapshot-card.wide {
  grid-column: span 2;
}

.mini-table {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.mini-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.sidebar-scrim {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 24px;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.nav {
  display: grid;
  gap: 4px;
}

.nav-button {
  display: grid;
  min-height: 44px;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  padding: 9px 10px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-button:hover {
  background: var(--surface-2);
  color: var(--ink);
  transform: translateX(1px);
}

.nav-button.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-weight: 750;
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-dot {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1;
}

.nav-badge {
  display: inline-flex;
  min-width: 24px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 850;
}

.nav-button.active .nav-badge {
  background: #ffffff;
}

.sidebar-footer {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.quota-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
}

.quota-heading {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.quota-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 260ms ease;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  min-height: var(--header);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 247, 248, 0.9);
  backdrop-filter: blur(12px);
}

.mobile-menu {
  display: none;
}

.topbar-title {
  min-width: 0;
}

.topbar-title p {
  max-width: 560px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.eyebrow {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 2px 0 0;
  font-size: 24px;
  line-height: 1.2;
}

h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.topbar-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.hamburger {
  display: grid;
  width: 18px;
  height: 14px;
  gap: 4px;
}

.hamburger::before,
.hamburger::after,
.hamburger {
  border-top: 2px solid currentColor;
}

.hamburger::before,
.hamburger::after {
  content: "";
  display: block;
}

.content {
  display: grid;
  gap: 20px;
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 28px;
  animation: page-in 180ms ease-out;
}

.view-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.view-head p {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.command-center {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: 18px;
  align-items: stretch;
}

.focus-panel,
.quick-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.focus-panel {
  display: grid;
  align-content: space-between;
  min-height: 296px;
  padding: 22px;
  color: #f8fbfa;
  background:
    linear-gradient(135deg, rgba(15, 64, 59, 0.98), rgba(35, 76, 104, 0.98)),
    var(--hero-panel);
}

.focus-panel .eyebrow,
.focus-panel .list-meta,
.focus-panel .focus-copy {
  color: rgba(248, 251, 250, 0.78);
}

.focus-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.focus-head h2 {
  max-width: 760px;
  margin-top: 4px;
  font-size: 30px;
  line-height: 1.16;
}

.focus-head p {
  max-width: 760px;
  margin: 8px 0 0;
  color: rgba(248, 251, 250, 0.76);
  line-height: 1.55;
}

.focus-body {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 28px;
}

.focus-copy {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.progress-ring {
  --value: 0;
  display: grid;
  flex: 0 0 auto;
  width: 112px;
  height: 112px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, #184f54 72%, transparent 73%),
    conic-gradient(#b7e0d6 calc(var(--value) * 1%), rgba(255, 255, 255, 0.18) 0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.progress-ring span {
  color: #ffffff;
  font-size: 24px;
  font-weight: 850;
}

.quick-card {
  display: grid;
  align-content: start;
}

.focus-lanes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(248, 251, 250, 0.78);
  font-size: 13px;
}

.focus-lanes strong {
  color: #ffffff;
}

.focus-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.focus-proof span {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 8px 10px;
  color: rgba(248, 251, 250, 0.9);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.panel-head.compact {
  min-height: 54px;
  padding: 14px 16px;
}

.quick-intake {
  display: grid;
  gap: 13px;
  padding: 16px;
}

.quick-promise,
.process-hints {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--muted);
  background: var(--surface-3);
  line-height: 1.45;
}

.quick-promise strong {
  color: var(--ink);
}

.process-hints {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.process-hints span {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  padding: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.process-hints strong {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 12px;
}

.quick-intake textarea {
  min-height: 110px;
}

.compact-file {
  min-height: 72px;
  padding: 12px;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.insight-card {
  display: grid;
  min-height: 116px;
  align-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px;
  color: var(--muted);
  background: var(--surface);
  text-align: left;
  box-shadow: 0 1px 0 rgba(22, 32, 31, 0.03);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.insight-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--surface-3);
  box-shadow: var(--shadow-soft);
}

.insight-card strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.insight-card small {
  color: var(--muted);
  line-height: 1.45;
}

.insight-card.warn {
  border-color: #ead6bb;
  background: var(--warn-surface);
}

.insight-card.risk {
  border-color: #ecc9c6;
  background: var(--danger-surface);
}

.insight-card.info {
  border-color: #cfd9f3;
  background: #f6f8ff;
}

.flow-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.flow-step {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--muted);
  background: var(--surface);
  text-align: left;
  box-shadow: 0 1px 0 rgba(22, 32, 31, 0.03);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.flow-step:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 10px 26px rgba(22, 32, 31, 0.07);
}

.flow-step.active {
  color: var(--ink);
  background: var(--surface-3);
}

.flow-count {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 16px;
  font-weight: 850;
}

.flow-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.flow-copy strong {
  color: var(--ink);
  font-size: 14px;
}

.flow-copy small {
  color: var(--muted);
  line-height: 1.35;
}

.usage-callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(224, 239, 235, 0.78), rgba(232, 237, 249, 0.72)),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.usage-callout.attention {
  border-color: #ead6bb;
  background:
    linear-gradient(135deg, rgba(248, 234, 214, 0.72), rgba(224, 239, 235, 0.78)),
    var(--surface);
}

.usage-callout h2 {
  margin-top: 4px;
}

.usage-callout p {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.usage-meter {
  display: grid;
  gap: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.44fr);
  gap: 18px;
  align-items: start;
}

.large-panel .panel-body {
  padding: 14px;
}

.side-stack {
  display: grid;
  gap: 18px;
}

.compact-list .list-item {
  min-height: 58px;
}

.card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(22, 32, 31, 0.03), 0 10px 28px rgba(22, 32, 31, 0.04);
}

.card {
  padding: 18px;
}

.panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-3);
}

.panel-body {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.metric {
  display: grid;
  gap: 14px;
  min-height: 132px;
}

.metric-value {
  font-size: 34px;
  font-weight: 850;
  line-height: 1;
}

.metric-label,
.label,
label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pill,
.status,
.tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.pill {
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
}

.status.live,
.tag.done {
  color: var(--green);
  background: var(--green-soft);
}

.status.local,
.tag.pending {
  color: var(--amber);
  background: var(--amber-soft);
}

.tag.risk,
.status.danger {
  color: var(--red);
  background: var(--red-soft);
}

.tag.info {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field-hint,
.file-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.form-alert {
  border: 1px solid #e5bfbc;
  border-radius: var(--radius);
  padding: 11px 12px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
}

textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 111, 100, 0.14);
}

.file-input {
  display: grid;
  gap: 8px;
  min-height: 124px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface-3);
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease;
}

.file-input:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
}

.file-input input {
  max-width: 320px;
}

.button,
.icon-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 13px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.button.primary {
  color: #ffffff;
  background: var(--accent-strong);
  box-shadow: 0 10px 18px rgba(14, 77, 70, 0.18);
}

.button.primary:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
}

.button.secondary {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--surface);
}

.button.secondary:hover {
  background: var(--surface-2);
  transform: translateY(-1px);
}

.button.ghost {
  color: var(--muted);
  background: transparent;
}

.button.ghost:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.button.danger {
  color: #ffffff;
  background: var(--red);
}

.button.danger.subtle {
  border-color: #e5bfbc;
  color: var(--red);
  background: var(--red-soft);
}

.button.danger.subtle:hover {
  background: #f2cfcc;
}

.button.full {
  width: 100%;
}

.modal-backdrop {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(22, 32, 31, 0.38);
}

.payment-modal {
  display: grid;
  width: min(820px, 100%);
  max-height: min(92vh, 880px);
  gap: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.payment-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payment-summary > div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-3);
}

.payment-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.qr-card {
  display: grid;
  gap: 10px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-3);
  text-align: center;
}

.qr-card img {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: 6px;
  background: #ffffff;
}

.qr-card figcaption {
  font-weight: 850;
}

.icon-button {
  width: 44px;
  padding: 0;
  border-color: var(--line);
  color: var(--muted);
  background: var(--surface);
}

.icon-button:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.icon-button.mobile-menu {
  display: none;
}

.button:active,
.icon-button:active,
.segment:active,
.nav-button:active,
.flow-step:active,
.insight-card:active {
  transform: scale(0.985);
}

.form.is-busy .button[type="submit"]::before,
.quick-intake.is-busy .button[type="submit"]::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 760ms linear infinite;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.segment {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
}

.segment.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(22, 32, 31, 0.08);
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 64px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.list-item:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--surface-3);
  box-shadow: 0 8px 20px rgba(22, 32, 31, 0.04);
}

.list-main {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.list-title {
  font-weight: 800;
  line-height: 1.35;
}

.list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.task-item {
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

.task-check {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.task-check input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: var(--accent);
}

.task-item.done .list-title {
  color: var(--muted);
  text-decoration: line-through;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

tbody tr:hover {
  background: var(--surface-3);
}

.pack-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 16px;
}

.assist-strip {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  color: var(--muted);
  background: var(--surface-3);
  line-height: 1.5;
}

.assist-strip strong {
  color: var(--ink);
}

.pack-summary {
  display: grid;
  gap: 14px;
}

.summary-block {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
}

.pack-summary.compact {
  gap: 10px;
}

.hide-when-compact {
  display: none;
}

.summary-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.check-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--muted);
  line-height: 1.5;
}

.check-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.empty {
  display: grid;
  min-height: 150px;
  place-items: center;
  gap: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-3);
  text-align: center;
  line-height: 1.6;
  padding: 18px;
}

.empty > div {
  display: grid;
  gap: 4px;
}

.empty strong {
  color: var(--ink);
  font-size: 15px;
}

.empty span {
  color: var(--muted);
  font-size: 13px;
}

.documents-mobile-list {
  display: none;
}

.document-card {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 16px 18px;
  background: var(--surface);
}

.document-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.plan-card {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 260px;
}

.plan-card.featured {
  border-color: rgba(23, 111, 100, 0.36);
  background:
    linear-gradient(180deg, rgba(224, 239, 235, 0.58), rgba(255, 255, 255, 0.95)),
    var(--surface);
  box-shadow: 0 16px 34px rgba(14, 77, 70, 0.1);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.price-number {
  font-size: 32px;
  font-weight: 850;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
  line-height: 1.5;
}

.toast-root {
  position: fixed;
  z-index: 50;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  line-height: 1.45;
  animation: toast-in 180ms ease-out;
}

.toast.error {
  border-left-color: var(--red);
}

.toast.success {
  border-left-color: var(--green);
}

.hidden {
  display: none !important;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes surface-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1120px) {
  .auth-screen {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    display: none;
  }

  .auth-panel {
    align-items: center;
    border-right: 0;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 20;
    inset: 0 auto 0 0;
    width: min(var(--sidebar), calc(100vw - 56px));
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: var(--shadow);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 15;
    inset: 0;
    display: none;
    border: 0;
    padding: 0;
    background: rgba(15, 32, 34, 0.42);
  }

  .sidebar-scrim.open {
    display: block;
  }

  .icon-button.mobile-menu {
    display: inline-flex;
  }

  .content,
  .topbar {
    padding-right: 18px;
    padding-left: 18px;
  }

  .grid.two,
  .pack-layout,
  .command-center,
  .dashboard-grid,
  .qr-grid,
  .payment-summary {
    grid-template-columns: 1fr;
  }

  .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-strip,
  .insight-grid,
  .usage-callout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .auth-panel {
    padding: 24px 18px;
  }

  .auth-card {
    margin: 36px 0;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    justify-content: stretch;
    width: 100%;
  }

  .topbar-upgrade {
    display: none;
  }

  .topbar-actions .status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .view-head,
  .topbar {
    flex-direction: column;
  }

  .content {
    gap: 16px;
    padding-top: 20px;
  }

  .grid.three,
  .grid.four,
  .flow-strip,
  .insight-grid,
  .usage-callout,
  .process-hints,
  .field-row {
    grid-template-columns: 1fr;
  }

  .focus-panel {
    min-height: auto;
    padding: 18px;
  }

  .focus-head,
  .focus-body {
    display: grid;
    gap: 14px;
    margin-top: 16px;
  }

  .focus-head h2 {
    font-size: 24px;
  }

  .progress-ring {
    width: 88px;
    height: 88px;
  }

  .progress-ring span {
    font-size: 20px;
  }

  .topbar-primary {
    width: 100%;
  }

  .focus-head .tag {
    justify-self: start;
  }

  .focus-proof {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    display: none;
  }

  .documents-mobile-list {
    display: grid;
  }

  .list-item,
  .task-item {
    grid-template-columns: 1fr;
  }

  .task-check {
    display: none;
  }

  .row-actions {
    justify-content: flex-start;
  }

  h1 {
    font-size: 21px;
  }
}

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