:root {
  color-scheme: light;
  --brand-950: #063d39;
  --brand-900: #075f57;
  --brand-800: #087066;
  --brand-700: #0b7a6f;
  --brand-600: #118d80;
  --brand-500: #22a596;
  --brand-300: #8ad7ca;
  --brand-200: #b9e8df;
  --brand-100: #dcf4ef;
  --brand-50: #effaf7;
  --gold-700: #8b520d;
  --gold-600: #aa6510;
  --gold-500: #c77b18;
  --gold-300: #efbd69;
  --gold-100: #fff0cf;
  --gold-50: #fff9ec;
  --ink-950: #10201c;
  --ink-900: #172723;
  --ink-800: #263a34;
  --ink-700: #3f554e;
  --ink-600: #5c7069;
  --ink-500: #657870;
  --ink-300: #bdc9c4;
  --ink-200: #d8e1dc;
  --ink-100: #e9efec;
  --ink-50: #f6f8f7;
  --white: #ffffff;
  --danger-700: #9d2119;
  --danger-600: #b82b22;
  --danger-100: #fee7e5;
  --danger-50: #fff4f3;
  --warning-700: #945f0a;
  --warning-100: #ffefc2;
  --warning-50: #fff9e8;
  --success-700: #176b48;
  --success-100: #dff3e8;
  --success-50: #f1fbf5;
  --info-700: #285d8f;
  --info-100: #e1effc;
  --info-50: #f2f8fe;
  --page: #f3f7f4;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --line: #dce5e0;
  --line-strong: #c7d4ce;
  --focus: 0 0 0 4px rgba(11, 122, 111, 0.16);
  --shadow-xs: 0 1px 2px rgba(10, 42, 35, 0.05);
  --shadow-sm: 0 8px 24px rgba(10, 42, 35, 0.07);
  --shadow-md: 0 18px 46px rgba(10, 42, 35, 0.11);
  --shadow-lg: 0 28px 70px rgba(10, 42, 35, 0.16);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --content: 1220px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
  color: var(--ink-900);
  font-family: var(--font);
  min-height: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
}

body::before {
  background:
    radial-gradient(circle at 5% 5%, rgba(84, 189, 170, 0.15), transparent 28rem),
    radial-gradient(circle at 96% 10%, rgba(239, 189, 105, 0.13), transparent 24rem);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

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

a {
  color: var(--brand-800);
}

:where(a, button, [role="button"]):focus-visible {
  border-radius: var(--radius-sm);
  outline: 3px solid rgba(11, 122, 111, 0.28);
  outline-offset: 3px;
}

img,
svg {
  display: block;
}

h1,
h2,
h3,
h4,
p,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--ink-950);
  line-height: 1.16;
}

h1 {
  font-size: clamp(1.85rem, 4vw, 3.35rem);
  letter-spacing: -0.045em;
}

h2 {
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  letter-spacing: -0.025em;
}

h3 {
  font-size: 1.05rem;
}

p {
  line-height: 1.55;
}

.hidden,
[hidden] {
  display: none !important;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

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

.subtle {
  color: var(--ink-500);
  font-size: 0.86rem;
}

.eyebrow {
  color: var(--gold-600);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.text-link {
  background: none;
  border: 0;
  color: var(--brand-800);
  font-weight: 760;
  padding: 0;
  text-decoration: none;
}

.text-link:hover {
  color: var(--brand-950);
  text-decoration: underline;
}

.brand-logo {
  height: auto;
  object-fit: contain;
  width: 178px;
}

.brand-logo.brand-logo-light {
  filter: none;
}

.brand-mark {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark img {
  height: 48px;
  object-fit: contain;
  width: 94px;
}

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

.brand-copy strong,
.brand-copy span {
  display: block;
}

.brand-copy strong {
  color: var(--ink-950);
  font-size: 0.96rem;
  font-weight: 850;
}

.brand-copy span {
  color: var(--ink-600);
  font-size: 0.75rem;
  margin-top: 2px;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  overflow: hidden;
}

.auth-brand-panel {
  background:
    linear-gradient(150deg, rgba(4, 71, 64, 0.92), rgba(7, 95, 87, 0.96)),
    radial-gradient(circle at 18% 10%, #22a596, transparent 55%);
  color: white;
  display: none;
  min-height: 100%;
  overflow: hidden;
  padding: clamp(34px, 6vw, 80px);
  position: relative;
}

.auth-brand-panel::before,
.auth-brand-panel::after {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
  position: absolute;
}

.auth-brand-panel::before {
  height: 440px;
  right: -220px;
  top: -160px;
  width: 440px;
}

.auth-brand-panel::after {
  bottom: -260px;
  height: 560px;
  left: -260px;
  width: 560px;
}

.auth-brand-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  max-width: 600px;
  position: relative;
  z-index: 1;
}

.auth-brand-panel .brand-logo {
  width: min(290px, 75%);
}

.auth-promise {
  display: grid;
  gap: 24px;
}

.auth-promise h2 {
  color: white;
  font-size: clamp(2rem, 4.5vw, 4.5rem);
  letter-spacing: -0.055em;
  max-width: 620px;
}

.auth-promise p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.06rem;
  max-width: 490px;
}

.auth-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-feature {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 720;
  gap: 8px;
  padding: 9px 13px;
}

.auth-main {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(24px, 5vw, 64px);
}

.auth-card {
  display: grid;
  gap: 28px;
  max-width: 460px;
  width: 100%;
}

.auth-card-wide {
  max-width: 820px;
}

.auth-mobile-logo {
  margin: 0 auto;
  width: 188px;
}

.auth-heading {
  display: grid;
  gap: 10px;
}

.auth-heading p:not(.eyebrow) {
  color: var(--ink-600);
}

.auth-footnote {
  color: var(--ink-500);
  font-size: 0.78rem;
  text-align: center;
}

.form-stack {
  display: grid;
  gap: 17px;
}

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

.form-section {
  border: 0;
  display: grid;
  gap: 18px;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.form-section + .form-section {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 26px;
}

.form-section legend {
  color: var(--ink-950);
  font-size: 1.12rem;
  font-weight: 850;
  margin-bottom: 4px;
  padding: 0;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field > span,
.field-label {
  color: var(--ink-700);
  font-size: 0.79rem;
  font-weight: 780;
}

.field small {
  color: var(--ink-500);
  font-size: 0.73rem;
  line-height: 1.4;
}

.field-note {
  color: var(--ink-500);
  font-size: 0.76rem;
  line-height: 1.5;
  margin: -4px 0 0;
}

.payment-status-card,
.payment-review-card {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 16px;
}

.payment-status-card {
  background: var(--ink-50);
}

.payment-review-card {
  background: var(--warning-50);
  border-color: #eed89b;
}

.payment-status-card > span:first-child,
.payment-review-card > span:nth-child(2) {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.payment-status-card small,
.payment-status-card span span,
.payment-review-card span span {
  color: var(--ink-500);
  font-size: 0.74rem;
  line-height: 1.4;
}

.payment-status-card strong,
.payment-review-card strong {
  color: var(--ink-900);
  font-size: 0.86rem;
}

.payment-review-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 auto;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.payment-locked .choice-card,
.payment-locked #profileBacFields,
.payment-locked #profileSinpeFields {
  opacity: 0.62;
}

.payment-locked .choice-card {
  cursor: not-allowed;
}

.payment-review-admin {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  padding-top: 18px;
}

.payment-destination-compare {
  align-items: center;
  background: var(--ink-50);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto 1fr;
  padding: 14px;
}

.payment-destination-compare > span:not([aria-hidden]) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.payment-destination-compare small,
.payment-destination-compare span span {
  color: var(--ink-500);
  font-size: 0.72rem;
}

.payment-destination-compare strong {
  color: var(--ink-900);
  font-size: 0.82rem;
}

.table-warning {
  color: var(--warning-700);
  font-weight: 750;
}

.security-card {
  margin-top: 18px;
  max-width: min(100%, 820px);
}

.field-full {
  grid-column: 1 / -1;
}

.input-wrap {
  position: relative;
}

.input-icon {
  color: var(--ink-500);
  height: 19px;
  left: 14px;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 19px;
}

.input-wrap input {
  padding-left: 44px;
}

input,
select,
textarea {
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-900);
  min-height: 48px;
  outline: none;
  padding: 11px 13px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
  width: 100%;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #6f817a;
  opacity: 1;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #aabbb3;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-600);
  box-shadow: var(--focus);
}

input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--danger-600);
}

.checkbox,
.radio-line {
  align-items: flex-start;
  color: var(--ink-700);
  display: flex;
  font-size: 0.84rem;
  gap: 10px;
  line-height: 1.45;
}

.checkbox input,
.radio-line input {
  accent-color: var(--brand-700);
  flex: 0 0 auto;
  min-height: 18px;
  width: 18px;
}

.carry-forward-option {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
}

.carry-forward-option > span {
  display: grid;
  gap: 3px;
}

.carry-forward-option small {
  color: var(--ink-500);
  font-size: 0.73rem;
}

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

.choice-card {
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: grid;
  gap: 5px;
  padding: 14px;
  position: relative;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.choice-card:has(input:checked) {
  background: var(--brand-50);
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(11, 122, 111, 0.1);
}

.choice-card input {
  accent-color: var(--brand-700);
  min-height: 18px;
  position: absolute;
  right: 13px;
  top: 13px;
  width: 18px;
}

.choice-card strong {
  color: var(--ink-900);
  font-size: 0.88rem;
  padding-right: 24px;
}

.choice-card span {
  color: var(--ink-500);
  font-size: 0.75rem;
}

.button {
  align-items: center;
  background: var(--brand-700);
  border: 1px solid var(--brand-700);
  border-radius: var(--radius-sm);
  color: white;
  display: inline-flex;
  font-weight: 780;
  gap: 9px;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button:hover:not(:disabled) {
  background: var(--brand-900);
  border-color: var(--brand-900);
  box-shadow: 0 9px 20px rgba(7, 95, 87, 0.18);
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button svg {
  height: 18px;
  width: 18px;
}

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

.button-secondary:hover:not(:disabled) {
  background: var(--ink-50);
  border-color: #a9bbb3;
  box-shadow: var(--shadow-xs);
}

.button-soft {
  background: var(--brand-50);
  border-color: var(--brand-100);
  color: var(--brand-900);
}

.button-soft:hover:not(:disabled) {
  background: var(--brand-100);
  border-color: var(--brand-200);
  box-shadow: none;
}

.button-danger {
  background: white;
  border-color: #f2c0bc;
  color: var(--danger-700);
}

.button-danger:hover:not(:disabled) {
  background: var(--danger-50);
  border-color: #e89e98;
  box-shadow: none;
}

.button-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-700);
}

.button-ghost:hover:not(:disabled) {
  background: var(--ink-50);
  border-color: transparent;
  box-shadow: none;
}

.button-block {
  width: 100%;
}

.button-small {
  font-size: 0.78rem;
  min-height: 44px;
  padding: 7px 11px;
}

.icon-button {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-700);
  display: inline-flex;
  height: 44px;
  justify-content: center;
  padding: 0;
  width: 44px;
}

.icon-button:hover {
  background: var(--ink-50);
  border-color: var(--line-strong);
}

.icon-button svg {
  height: 19px;
  width: 19px;
}

.button-spinner {
  animation: spin 750ms linear infinite;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  border-top-color: white;
  height: 16px;
  width: 16px;
}

.button-secondary .button-spinner,
.button-soft .button-spinner {
  border-color: rgba(11, 122, 111, 0.25);
  border-top-color: var(--brand-700);
}

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

.form-alert,
.inline-alert {
  align-items: flex-start;
  border: 1px solid;
  border-radius: var(--radius-sm);
  display: flex;
  font-size: 0.83rem;
  gap: 10px;
  line-height: 1.45;
  padding: 12px 14px;
}

.form-alert:empty {
  display: none;
}

.form-alert-error,
.inline-alert-error {
  background: var(--danger-50);
  border-color: #f6c9c5;
  color: var(--danger-700);
}

.inline-alert-warning {
  background: var(--warning-50);
  border-color: #efd999;
  color: var(--warning-700);
}

.inline-alert-info {
  background: var(--info-50);
  border-color: #c9e0f6;
  color: var(--info-700);
}

.app-layout {
  min-height: 100vh;
}

.app-header {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(220, 229, 224, 0.9);
  display: flex;
  height: 76px;
  justify-content: space-between;
  padding: 0 max(22px, calc((100vw - var(--content)) / 2));
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.user-chip {
  align-items: center;
  display: flex;
  gap: 10px;
}

.avatar {
  align-items: center;
  background: linear-gradient(145deg, var(--brand-100), var(--gold-100));
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
  color: var(--brand-900);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 900;
  height: 40px;
  justify-content: center;
  overflow: hidden;
  width: 40px;
}

.avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.user-chip-copy {
  display: none;
}

.user-chip-copy strong,
.user-chip-copy span {
  display: block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip-copy strong {
  font-size: 0.82rem;
}

.user-chip-copy span {
  color: var(--ink-500);
  font-size: 0.7rem;
  margin-top: 2px;
}

.desktop-nav {
  align-items: center;
  display: none;
  gap: 6px;
}

.nav-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--ink-600);
  display: inline-flex;
  font-size: 0.79rem;
  font-weight: 760;
  gap: 7px;
  min-height: 40px;
  padding: 8px 11px;
}

.nav-button:hover,
.nav-button.active {
  background: var(--brand-50);
  color: var(--brand-900);
}

.nav-button svg {
  height: 17px;
  width: 17px;
}

.app-main {
  margin: 0 auto;
  max-width: var(--content);
  padding: 26px 18px 108px;
}

.page-view {
  animation: rise-in 280ms ease both;
  display: grid;
  gap: 20px;
}

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

.page-heading {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
}

.page-heading-copy {
  display: grid;
  gap: 7px;
}

.page-heading-copy p {
  color: var(--ink-600);
  max-width: 700px;
}

.page-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.bottom-nav {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  bottom: 0;
  box-shadow: 0 -12px 35px rgba(10, 42, 35, 0.08);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  left: 0;
  padding: 7px max(8px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  position: fixed;
  right: 0;
  z-index: 35;
}

.bottom-nav .nav-button {
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  font-size: 0.64rem;
  gap: 3px;
  min-height: 52px;
  padding: 6px 3px;
}

.bottom-nav .nav-button svg {
  height: 20px;
  width: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  min-width: 0;
}

.card-pad {
  padding: clamp(18px, 3vw, 26px);
}

.card-header {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 20px 20px 0;
}

.card-header-copy {
  display: grid;
  gap: 5px;
}

.card-header-copy p {
  color: var(--ink-500);
  font-size: 0.82rem;
}

.card-body {
  padding: 20px;
}

.hero-card {
  background:
    radial-gradient(circle at 95% 5%, rgba(239, 189, 105, 0.24), transparent 18rem),
    linear-gradient(145deg, var(--brand-950), var(--brand-800));
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 22px 50px rgba(6, 61, 57, 0.22);
  color: white;
  overflow: hidden;
  padding: clamp(22px, 4vw, 36px);
  position: relative;
}

.hero-card::after {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  content: "";
  height: 280px;
  position: absolute;
  right: -120px;
  top: -160px;
  width: 280px;
}

.hero-grid {
  align-items: end;
  display: grid;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: grid;
  gap: 8px;
}

.hero-copy .eyebrow {
  color: var(--gold-300);
}

.hero-copy h1,
.hero-copy h2,
.hero-copy h3 {
  color: white;
}

.hero-copy p {
  color: rgba(255, 255, 255, 0.72);
}

.hero-amount {
  color: white;
  font-size: clamp(2.25rem, 7vw, 4.6rem);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
  margin: 8px 0;
}

.hero-meta {
  align-items: center;
  color: rgba(255, 255, 255, 0.76);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.81rem;
  gap: 8px 15px;
}

.hero-meta span {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.hero-action {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  display: flex;
  gap: 14px;
  padding: 14px;
}

.hero-action-icon {
  align-items: center;
  background: white;
  border-radius: 12px;
  color: var(--brand-900);
  display: flex;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.hero-action-icon svg {
  height: 25px;
  width: 25px;
}

.hero-action-copy {
  flex: 1;
}

.hero-action-copy strong,
.hero-action-copy span {
  display: block;
}

.hero-action-copy strong {
  color: white;
  font-size: 0.86rem;
}

.hero-action-copy span {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.72rem;
  margin-top: 3px;
}

.hero-action .button {
  background: white;
  border-color: white;
  color: var(--brand-900);
  min-height: 40px;
}

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

.metric-card {
  display: grid;
  gap: 12px;
  padding: 17px;
}

.metric-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.metric-icon {
  align-items: center;
  background: var(--brand-50);
  border-radius: 11px;
  color: var(--brand-800);
  display: flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.metric-icon.gold {
  background: var(--gold-50);
  color: var(--gold-700);
}

.metric-icon.blue {
  background: var(--info-50);
  color: var(--info-700);
}

.metric-icon svg {
  height: 19px;
  width: 19px;
}

.metric-label {
  color: var(--ink-500);
  font-size: 0.75rem;
  font-weight: 690;
}

.metric-value {
  color: var(--ink-950);
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  font-variant-numeric: tabular-nums;
  font-weight: 880;
  letter-spacing: -0.035em;
}

.metric-note {
  color: var(--ink-500);
  font-size: 0.71rem;
}

.content-grid {
  display: grid;
  gap: 18px;
}

.content-grid-main {
  display: grid;
  gap: 18px;
}

.content-grid-aside {
  display: grid;
  gap: 18px;
}

.pill {
  align-items: center;
  background: var(--ink-50);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-700);
  display: inline-flex;
  font-size: 0.69rem;
  font-weight: 800;
  gap: 6px;
  line-height: 1;
  padding: 7px 9px;
  white-space: nowrap;
}

.pill::before {
  background: currentColor;
  border-radius: 50%;
  content: "";
  height: 6px;
  opacity: 0.7;
  width: 6px;
}

.pill-success,
.pill-approved,
.pill-active,
.pill-available,
.pill-paid,
.pill-confirmed {
  background: var(--success-50);
  border-color: #c7e8d4;
  color: var(--success-700);
}

.pill-warning,
.pill-pending,
.pill-open,
.pill-draft {
  background: var(--warning-50);
  border-color: #eed89b;
  color: var(--warning-700);
}

.pill-danger,
.pill-rejected,
.pill-suspended,
.pill-reversed,
.pill-refunded,
.pill-partially-refunded,
.pill-cancelled,
.pill-voided,
.pill-expired,
.pill-failed {
  background: var(--danger-50);
  border-color: #f1c3bf;
  color: var(--danger-700);
}

.pill-info,
.pill-processing,
.pill-scheduled,
.pill-partially-paid,
.pill-allocated {
  background: var(--info-50);
  border-color: #c9e0f6;
  color: var(--info-700);
}

.list {
  display: grid;
}

.list-item {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 13px;
  min-width: 0;
  padding: 15px 20px;
}

.list-item:last-child {
  border-bottom: 0;
}

.visit-activity {
  border-bottom: 1px solid var(--line);
}

.visit-activity:last-child {
  border-bottom: 0;
}

.visit-activity > .list-item {
  border-bottom: 0;
}

.activity-invoices {
  display: grid;
  gap: 8px;
  padding: 0 20px 16px 74px;
}

.activity-invoice {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
}

.activity-invoice > span:first-child {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.activity-invoice > span:last-child {
  color: var(--ink-600);
  font-size: 0.75rem;
  line-height: 1.45;
}

.activity-invoice-empty {
  color: var(--ink-500);
  font-size: 0.78rem;
}

.sale-result-list {
  display: grid;
  gap: 8px;
}

.sale-result {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-900);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 12px 14px;
  text-align: left;
  width: 100%;
}

.sale-result:hover {
  background: var(--brand-50);
  border-color: var(--brand-300);
}

.sale-result span:first-child,
.sale-result small {
  display: block;
}

.sale-result small {
  color: var(--ink-500);
  margin-top: 3px;
}

.table-control {
  border-radius: 8px;
  min-height: 38px;
  min-width: 150px;
  padding: 7px 9px;
}

.list-icon {
  align-items: center;
  background: var(--brand-50);
  border-radius: 11px;
  color: var(--brand-800);
  display: flex;
  flex: 0 0 auto;
  height: 41px;
  justify-content: center;
  width: 41px;
}

.list-icon.gold {
  background: var(--gold-50);
  color: var(--gold-700);
}

.list-icon svg {
  height: 20px;
  width: 20px;
}

.list-copy {
  flex: 1;
  min-width: 0;
}

.list-copy strong,
.list-copy span {
  display: block;
}

.list-copy strong {
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-copy span {
  color: var(--ink-500);
  font-size: 0.73rem;
  margin-top: 4px;
}

.list-value {
  color: var(--ink-950);
  flex: 0 0 auto;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  font-weight: 840;
  text-align: right;
}

.list-value span {
  color: var(--ink-500);
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  margin-top: 4px;
}

.progress-track {
  background: var(--ink-100);
  border-radius: 999px;
  height: 7px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--brand-700), var(--brand-500));
  border-radius: inherit;
  height: 100%;
  min-width: 3px;
  transition: width 350ms ease;
}

.progress-meta {
  color: var(--ink-500);
  display: flex;
  font-size: 0.71rem;
  justify-content: space-between;
  margin-top: 8px;
}

.qr-stage {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(11, 122, 111, 0.06), rgba(199, 123, 24, 0.05)),
    white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  min-height: 440px;
  padding: clamp(22px, 5vw, 44px);
  text-align: center;
}

.qr-frame {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  height: min(72vw, 310px);
  justify-content: center;
  overflow: hidden;
  padding: 18px;
  position: relative;
  width: min(72vw, 310px);
}

.qr-frame::before,
.qr-frame::after {
  border-color: var(--brand-600);
  border-style: solid;
  content: "";
  height: 24px;
  pointer-events: none;
  position: absolute;
  width: 24px;
}

.qr-frame::before {
  border-width: 3px 0 0 3px;
  left: 10px;
  top: 10px;
}

.qr-frame::after {
  border-width: 0 3px 3px 0;
  bottom: 10px;
  right: 10px;
}

.qr-frame img,
.qr-frame svg {
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.qr-placeholder {
  align-items: center;
  color: var(--ink-500);
  display: flex;
  flex-direction: column;
  font-size: 0.77rem;
  gap: 10px;
}

.qr-placeholder svg {
  color: var(--ink-300);
  height: 58px;
  width: 58px;
}

.qr-code-label {
  background: var(--ink-50);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-700);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.77rem;
  letter-spacing: 0.1em;
  padding: 9px 14px;
}

.instruction-grid {
  display: grid;
  gap: 12px;
}

.instruction-step {
  align-items: flex-start;
  display: flex;
  gap: 12px;
}

.step-number {
  align-items: center;
  background: var(--brand-100);
  border-radius: 50%;
  color: var(--brand-900);
  display: flex;
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.instruction-step strong,
.instruction-step span {
  display: block;
}

.instruction-step strong {
  font-size: 0.83rem;
}

.instruction-step span {
  color: var(--ink-500);
  font-size: 0.74rem;
  line-height: 1.45;
  margin-top: 3px;
}

.segmented {
  background: var(--ink-50);
  border: 1px solid var(--line);
  border-radius: 11px;
  display: inline-flex;
  gap: 3px;
  padding: 3px;
}

.segment {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--ink-600);
  font-size: 0.75rem;
  font-weight: 760;
  min-height: 44px;
  padding: 6px 10px;
}

.segment:hover,
.segment.active {
  background: white;
  box-shadow: var(--shadow-xs);
  color: var(--brand-900);
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  border-collapse: collapse;
  font-size: 0.79rem;
  min-width: 720px;
  width: 100%;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 16px;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  background: var(--surface-soft);
  color: var(--ink-500);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 1;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover td {
  background: #fbfdfc;
}

.table-primary {
  color: var(--ink-900);
  font-weight: 780;
}

.table-secondary {
  color: var(--ink-500);
  display: block;
  font-size: 0.68rem;
  margin-top: 3px;
}

.money {
  font-variant-numeric: tabular-nums;
  font-weight: 820;
  white-space: nowrap;
}

.table-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.empty-state {
  align-items: center;
  color: var(--ink-500);
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  min-height: 200px;
  padding: 32px;
  text-align: center;
}

.empty-state-icon {
  align-items: center;
  background: var(--brand-50);
  border-radius: 50%;
  color: var(--brand-700);
  display: flex;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.empty-state-icon svg {
  height: 25px;
  width: 25px;
}

.empty-state strong {
  color: var(--ink-800);
  font-size: 0.9rem;
}

.empty-state p {
  font-size: 0.77rem;
  max-width: 370px;
}

.skeleton {
  animation: pulse 1.35s ease-in-out infinite;
  background: linear-gradient(90deg, var(--ink-50), var(--ink-100), var(--ink-50));
  background-size: 200% 100%;
  border-radius: 8px;
  min-height: 18px;
}

@keyframes pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.status-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 76px);
  padding: 28px 18px;
}

.status-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 22px;
  max-width: 610px;
  padding: clamp(26px, 6vw, 48px);
  text-align: center;
  width: 100%;
}

.status-illustration {
  align-items: center;
  background: var(--warning-50);
  border: 1px solid #f0dda7;
  border-radius: 50%;
  color: var(--warning-700);
  display: flex;
  height: 88px;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  width: 88px;
}

.status-illustration::after {
  animation: halo 2s ease-in-out infinite;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
  inset: -8px;
  opacity: 0.15;
  position: absolute;
}

@keyframes halo {
  50% { inset: -14px; opacity: 0; }
}

.status-illustration svg {
  height: 38px;
  width: 38px;
}

.status-card p {
  color: var(--ink-600);
}

.status-steps {
  display: grid;
  gap: 0;
  text-align: left;
}

.status-step {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}

.status-step:not(:last-child)::after {
  background: var(--line);
  content: "";
  height: 20px;
  left: 14px;
  position: absolute;
  top: 40px;
  width: 1px;
}

.status-step-dot {
  align-items: center;
  background: white;
  border: 2px solid var(--ink-300);
  border-radius: 50%;
  color: var(--ink-500);
  display: flex;
  flex: 0 0 auto;
  height: 29px;
  justify-content: center;
  width: 29px;
}

.status-step.done .status-step-dot {
  background: var(--brand-700);
  border-color: var(--brand-700);
  color: white;
}

.status-step.current .status-step-dot {
  background: var(--warning-50);
  border-color: var(--gold-500);
  color: var(--gold-700);
}

.status-step-copy strong,
.status-step-copy span {
  display: block;
}

.status-step-copy strong {
  font-size: 0.82rem;
}

.status-step-copy span {
  color: var(--ink-500);
  font-size: 0.72rem;
  margin-top: 3px;
}

.scanner-layout {
  display: grid;
  gap: 20px;
}

.scanner-card {
  background:
    radial-gradient(circle at 100% 0, rgba(239, 189, 105, 0.2), transparent 18rem),
    linear-gradient(145deg, var(--brand-950), var(--brand-800));
  border: 0;
  color: white;
  overflow: hidden;
  padding: clamp(22px, 4vw, 34px);
  position: relative;
}

.scanner-card h1,
.scanner-card h2,
.scanner-card p,
.scanner-card .field > span {
  color: white;
}

.scanner-card p {
  color: rgba(255, 255, 255, 0.7);
}

.scanner-input {
  background: white;
  border: 3px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 14px 34px rgba(2, 35, 31, 0.25);
  color: var(--ink-950);
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 780;
  min-height: 68px;
  padding: 15px 18px;
}

.scanner-input:focus {
  border-color: var(--gold-300);
  box-shadow: 0 0 0 5px rgba(239, 189, 105, 0.2), 0 14px 34px rgba(2, 35, 31, 0.25);
}

.scanner-status {
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  font-size: 0.77rem;
  gap: 8px;
  margin-top: 10px;
}

.scanner-dot {
  animation: scanner-pulse 1.4s ease-in-out infinite;
  background: #83e6aa;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(131, 230, 170, 0.5);
  height: 8px;
  width: 8px;
}

@keyframes scanner-pulse {
  70% { box-shadow: 0 0 0 7px rgba(131, 230, 170, 0); }
}

.driver-confirm-card {
  border: 1px solid var(--brand-200);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 20px;
  padding: 22px;
}

.driver-identity {
  align-items: center;
  display: flex;
  gap: 14px;
}

.driver-identity .avatar {
  height: 60px;
  width: 60px;
}

.driver-identity-copy {
  flex: 1;
  min-width: 0;
}

.driver-identity-copy h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-identity-copy p {
  color: var(--ink-500);
  font-size: 0.78rem;
  margin-top: 4px;
}

.active-visit-card {
  border-color: var(--gold-300);
  box-shadow: 0 0 0 3px rgba(199, 123, 24, 0.08);
}

.visit-reference {
  background: var(--gold-50);
  border: 1px dashed var(--gold-300);
  border-radius: 10px;
  color: var(--gold-700);
  display: inline-flex;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 8px 10px;
}

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

.summary-strip > div {
  background: white;
  display: grid;
  gap: 4px;
  padding: 16px;
}

.summary-strip dt {
  color: var(--ink-500);
  font-size: 0.7rem;
  font-weight: 700;
}

.summary-strip dd {
  color: var(--ink-950);
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 860;
}

.admin-shell {
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--brand-950);
  color: white;
  display: none;
  inset: 0 auto 0 0;
  padding: 24px 16px;
  position: fixed;
  width: 250px;
  z-index: 40;
}

.admin-sidebar .brand-logo {
  margin: 0 10px 32px;
  width: 175px;
}

.admin-nav {
  display: grid;
  gap: 5px;
}

.admin-nav .nav-button {
  color: rgba(255, 255, 255, 0.68);
  justify-content: flex-start;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.admin-nav .nav-button:hover,
.admin-nav .nav-button.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.admin-sidebar-footer {
  bottom: 22px;
  left: 16px;
  position: absolute;
  right: 16px;
}

.admin-sidebar-footer .button {
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.82);
  width: 100%;
}

.admin-main-wrap {
  min-height: 100vh;
}

.admin-topbar {
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  display: flex;
  height: 70px;
  justify-content: space-between;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.admin-topbar-title {
  align-items: center;
  display: flex;
  gap: 10px;
}

.admin-topbar-title img {
  height: 40px;
  object-fit: contain;
  width: 78px;
}

.admin-content {
  display: grid;
  gap: 22px;
  margin: 0 auto;
  max-width: 1500px;
  padding: 24px 18px 100px;
}

.admin-bottom-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow-x: auto;
}

.toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  justify-content: space-between;
}

.toolbar-group {
  align-items: end;
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 10px;
}

.toolbar .field {
  min-width: min(100%, 180px);
}

.search-field {
  flex: 1;
  min-width: min(100%, 240px) !important;
}

.chart-card {
  min-height: 300px;
}

.bar-chart {
  align-items: end;
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(8, minmax(24px, 1fr));
  height: 190px;
  padding-top: 20px;
}

.bar-column {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 7px;
  height: 100%;
  justify-content: flex-end;
}

.bar-value {
  color: var(--ink-600);
  font-size: 0.64rem;
  font-weight: 730;
}

.bar {
  background: linear-gradient(180deg, var(--brand-500), var(--brand-800));
  border-radius: 7px 7px 3px 3px;
  min-height: 4px;
  transition: height 400ms ease;
  width: min(100%, 44px);
}

.bar-label {
  color: var(--ink-500);
  font-size: 0.65rem;
}

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

.quick-action {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-800);
  display: flex;
  font-size: 0.78rem;
  font-weight: 760;
  gap: 10px;
  min-height: 58px;
  padding: 12px;
  text-align: left;
}

.quick-action:hover {
  background: var(--brand-50);
  border-color: var(--brand-200);
  color: var(--brand-900);
}

.quick-action svg {
  color: var(--brand-700);
  height: 20px;
  width: 20px;
}

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

.detail-item {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px;
}

.detail-item dt {
  color: var(--ink-500);
  font-size: 0.68rem;
  font-weight: 720;
}

.detail-item dd {
  color: var(--ink-900);
  font-size: 0.82rem;
  font-weight: 760;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.dialog {
  background: transparent;
  border: 0;
  height: 100%;
  margin: 0 0 0 auto;
  max-height: none;
  max-width: min(100%, 560px);
  padding: 0;
  width: 100%;
}

.dialog::backdrop {
  backdrop-filter: blur(3px);
  background: rgba(8, 27, 23, 0.48);
}

.dialog-panel {
  animation: slide-in 220ms ease both;
  background: white;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  height: 100%;
}

@keyframes slide-in {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

.dialog-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px 20px;
}

.dialog-body {
  display: grid;
  flex: 1;
  gap: 20px;
  overflow-y: auto;
  padding: 22px 20px;
}

.dialog-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
}

.toast-region {
  display: grid;
  gap: 9px;
  max-width: min(390px, calc(100vw - 28px));
  pointer-events: none;
  position: fixed;
  right: 14px;
  top: 88px;
  z-index: 100;
}

.toast {
  align-items: flex-start;
  animation: toast-in 220ms ease both;
  background: var(--ink-950);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  color: white;
  display: flex;
  font-size: 0.8rem;
  gap: 10px;
  line-height: 1.45;
  padding: 13px 15px;
  pointer-events: auto;
}

.toast.success {
  background: var(--success-700);
}

.toast.error {
  background: var(--danger-700);
}

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

.registration-shell {
  min-height: 100vh;
  padding: 20px;
}

.registration-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto 22px;
  max-width: 980px;
}

.registration-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 28px;
  margin: 0 auto;
  max-width: 980px;
  padding: clamp(22px, 5vw, 48px);
}

.registration-intro {
  display: grid;
  gap: 10px;
  max-width: 680px;
}

.registration-intro p {
  color: var(--ink-600);
}

.success-panel {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 40px 10px;
  text-align: center;
}

.success-icon {
  align-items: center;
  background: var(--success-100);
  border-radius: 50%;
  color: var(--success-700);
  display: flex;
  height: 84px;
  justify-content: center;
  width: 84px;
}

.success-icon svg {
  height: 38px;
  width: 38px;
}

.success-panel p {
  color: var(--ink-600);
  max-width: 520px;
}

/* Mobile-first driver experience */
.brand-emblem {
  display: none;
}

.app-boot {
  align-items: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(34, 165, 150, 0.14), transparent 18rem),
    var(--page);
  color: var(--ink-700);
  display: none;
  flex-direction: column;
  font-size: 0.9rem;
  font-weight: 760;
  gap: 14px;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 200;
}

.is-restoring .app-boot {
  display: flex;
}

.app-boot img {
  animation: boot-pulse 1.3s ease-in-out infinite;
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  height: 82px;
  width: 82px;
}

@keyframes boot-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

.auth-mobile-brand {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-mobile-brand > span {
  color: var(--brand-900);
  font-size: 0.75rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-assurances {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  color: var(--ink-600);
  display: grid;
  font-size: 0.78rem;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px 0;
}

.auth-assurances span {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.auth-assurances svg {
  color: var(--brand-700);
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

.hero-balance-label {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: space-between;
}

.hero-live {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.8);
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 760;
  gap: 6px;
  padding: 6px 9px;
}

.hero-live > span {
  background: #8be2b4;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(139, 226, 180, 0.12);
  height: 6px;
  width: 6px;
}

.hero-meta > .pill {
  justify-self: start;
}

.profile-section-tabs {
  background: var(--ink-50);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 4px;
}

.profile-section-tab {
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--ink-600);
  font-size: 0.8rem;
  font-weight: 780;
  min-height: 44px;
  padding: 8px 10px;
}

.profile-section-tab:hover,
.profile-section-tab.active {
  background: white;
  box-shadow: var(--shadow-xs);
  color: var(--brand-900);
}

.profile-form-card > .form-section {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.install-dialog {
  background: transparent;
  border: 0;
  border-radius: 24px;
  margin: auto;
  max-width: min(420px, calc(100vw - 28px));
  padding: 0;
  width: 100%;
}

.install-dialog::backdrop {
  backdrop-filter: blur(5px);
  background: rgba(8, 27, 23, 0.55);
}

.install-dialog-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 18px;
  padding: 22px;
}

.install-dialog-handle {
  background: var(--ink-200);
  border-radius: 999px;
  display: none;
  height: 5px;
  justify-self: center;
  width: 44px;
}

.install-dialog-icon {
  align-items: center;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 18px;
  color: var(--brand-900);
  display: flex;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.install-dialog-icon svg {
  height: 28px;
  width: 28px;
}

.install-dialog-copy {
  display: grid;
  gap: 10px;
}

.install-dialog-copy h2 {
  font-size: 1.55rem;
}

.install-dialog-copy ol {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.install-dialog-copy li {
  align-items: center;
  display: flex;
  gap: 10px;
}

.install-dialog-copy li > span {
  align-items: center;
  background: var(--brand-100);
  border-radius: 50%;
  color: var(--brand-900);
  display: flex;
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.install-dialog-copy li p {
  color: var(--ink-700);
  font-size: 0.85rem;
}

.qr-pass-heading {
  align-items: center;
  display: flex;
  gap: 11px;
  text-align: left;
}

.qr-pass-heading > span:last-child,
.qr-pass-heading strong,
.qr-pass-heading span span {
  display: block;
}

.qr-pass-heading strong {
  color: var(--brand-950);
  font-size: 0.9rem;
}

.qr-pass-heading span span {
  color: var(--ink-500);
  font-size: 0.75rem;
  margin-top: 2px;
}

.qr-verified-mark {
  align-items: center;
  background: var(--success-100);
  border: 1px solid #bfe3cf;
  border-radius: 50%;
  color: var(--success-700);
  display: flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.qr-verified-mark svg {
  height: 19px;
  width: 19px;
}

.qr-security-note {
  align-items: center;
  color: var(--ink-500);
  display: inline-flex;
  font-size: 0.76rem;
  gap: 7px;
}

.qr-security-note svg {
  height: 16px;
  width: 16px;
}

.qr-code-label {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.registration-progress {
  display: grid;
  gap: 11px;
}

.registration-progress-meta {
  align-items: center;
  color: var(--ink-500);
  display: flex;
  font-size: 0.78rem;
  justify-content: space-between;
}

.registration-progress-meta strong {
  color: var(--brand-900);
}

.registration-progress-track {
  background: var(--ink-100);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.registration-progress-track span {
  background: linear-gradient(90deg, var(--brand-800), var(--brand-500));
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 240ms ease;
  width: 25%;
}

.registration-step-dots {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.registration-step-dots li {
  color: var(--ink-500);
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registration-step-dots li::before {
  background: var(--ink-200);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
  content: "";
  display: block;
  height: 12px;
  margin: 0 auto 6px;
  width: 12px;
}

.registration-step-dots li.active {
  color: var(--brand-900);
}

.registration-step-dots li.active::before {
  background: var(--brand-700);
  box-shadow: 0 0 0 3px var(--brand-100);
}

.registration-step-dots li.complete::before {
  background: var(--success-700);
}

.registration-page .registration-step {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.registration-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.registration-actions .registration-next,
.registration-actions #registrationSubmitButton {
  margin-left: auto;
}

.bottom-nav .nav-button-qr {
  background: transparent;
  color: var(--brand-900);
  gap: 0;
  overflow: visible;
  padding-top: 0;
}

.bottom-nav .nav-button-qr:hover,
.bottom-nav .nav-button-qr.active {
  background: transparent;
}

.nav-qr-icon {
  align-items: center;
  background: linear-gradient(145deg, var(--brand-800), var(--brand-950));
  border: 4px solid var(--page);
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(6, 61, 57, 0.3);
  color: white;
  display: flex;
  height: 54px;
  justify-content: center;
  margin: -23px 0 1px;
  transform: rotate(2deg);
  width: 54px;
}

.bottom-nav .nav-button-qr.active .nav-qr-icon {
  background: linear-gradient(145deg, var(--brand-700), var(--brand-900));
  box-shadow: 0 12px 26px rgba(6, 61, 57, 0.38), 0 0 0 4px var(--brand-100);
}

.bottom-nav .nav-button-qr .nav-qr-icon svg {
  height: 25px;
  transform: rotate(-2deg);
  width: 25px;
}

.offline-banner {
  background: var(--warning-700);
  color: white;
  font-size: 0.74rem;
  font-weight: 760;
  left: 0;
  padding: 7px 14px;
  position: fixed;
  right: 0;
  text-align: center;
  top: 0;
  z-index: 120;
}

.offline-banner + .app-layout .app-header,
.offline-banner + .admin-shell .admin-topbar {
  top: 30px;
}

@media (min-width: 680px) {
  .user-chip-copy {
    display: block;
  }

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

  .hero-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  }

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

  .scanner-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  }

  .registration-shell {
    padding: 30px;
  }
}

@media (min-width: 900px) {
  .auth-shell {
    grid-template-columns: minmax(420px, 1.05fr) minmax(430px, 0.95fr);
  }

  .auth-brand-panel {
    display: block;
  }

  .auth-mobile-logo {
    display: none;
  }

  .desktop-nav {
    display: flex;
  }

  .bottom-nav {
    display: none;
  }

  .app-main {
    padding: 34px 22px 60px;
  }

  .content-grid {
    align-items: start;
    grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.75fr);
  }

  .qr-layout {
    align-items: start;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(420px, 1fr) minmax(300px, 0.7fr);
  }
}

@media (min-width: 1080px) {
  .admin-sidebar {
    display: block;
  }

  .admin-main-wrap {
    margin-left: 250px;
  }

  .admin-topbar {
    padding: 0 28px;
  }

  .admin-topbar-title img {
    display: none;
  }

  .admin-content {
    padding: 30px 28px 60px;
  }

  .admin-bottom-nav {
    display: none;
  }

  .dashboard-grid {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.7fr);
  }
}

@media (max-width: 679px) {
  .app-header {
    height: 66px;
    padding: 0 14px;
  }

  .brand-mark img {
    height: 38px;
    width: 76px;
  }

  .brand-copy span {
    display: none;
  }

  .app-main {
    padding-top: 20px;
  }

  .form-grid,
  .choice-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .field-full {
    grid-column: auto;
  }

  .hero-action {
    align-items: stretch;
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .hero-action .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .page-actions,
  .page-actions .button {
    width: 100%;
  }

  .toolbar,
  .toolbar-group,
  .toolbar .field,
  .toolbar .button {
    width: 100%;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .payment-status-card,
  .payment-review-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .payment-review-card > span:nth-child(2) {
    min-width: calc(100% - 52px);
  }

  .payment-destination-compare {
    grid-template-columns: 1fr;
  }

  .payment-destination-compare > span[aria-hidden] {
    transform: rotate(90deg);
  }

  .registration-header .brand-mark .brand-copy {
    display: none;
  }

  .dialog {
    height: calc(100% - 44px);
    margin-top: 44px;
    max-width: none;
  }

  .dialog-panel {
    border-radius: 20px 20px 0 0;
  }

  .toast-region {
    left: 14px;
    right: 14px;
    top: 76px;
  }

  .driver-portal .app-layout {
    min-height: 100dvh;
  }

  .driver-portal .app-header {
    height: auto;
    min-height: calc(64px + env(safe-area-inset-top));
    padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  }

  .driver-portal .brand-wordmark,
  .registration-page .brand-wordmark {
    display: none;
  }

  .driver-portal .brand-emblem,
  .registration-page .brand-emblem {
    border-radius: 12px;
    display: block;
    height: 40px;
    width: 40px;
  }

  .driver-portal .brand-mark,
  .registration-page .brand-mark {
    gap: 9px;
  }

  .driver-portal .brand-copy strong,
  .registration-page .brand-copy strong {
    font-size: 0.88rem;
    line-height: 1.15;
    max-width: 86px;
    white-space: normal;
  }

  .driver-portal .header-actions {
    gap: 7px;
  }

  .driver-portal #installAppButton {
    font-size: 0.74rem;
    padding-inline: 10px;
  }

  .driver-portal .avatar {
    height: 42px;
    width: 42px;
  }

  .driver-portal .app-main {
    padding: 18px 14px calc(108px + env(safe-area-inset-bottom));
  }

  .driver-portal .page-view {
    gap: 16px;
  }

  .driver-portal .page-heading {
    align-items: flex-start;
    gap: 10px;
  }

  .driver-portal .page-heading-copy {
    gap: 5px;
  }

  .driver-portal .page-heading-copy h1 {
    font-size: clamp(1.72rem, 9vw, 2.15rem);
    letter-spacing: -0.045em;
  }

  .driver-portal .page-heading-copy p:not(.eyebrow) {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .driver-portal .hero-card {
    border-radius: 24px;
    box-shadow: 0 18px 38px rgba(6, 61, 57, 0.22);
    padding: 20px;
  }

  .driver-portal .hero-grid {
    gap: 16px;
  }

  .driver-portal .hero-copy {
    gap: 6px;
  }

  .driver-portal .hero-amount {
    font-size: clamp(2.75rem, 15vw, 3.55rem);
    margin: 7px 0 9px;
  }

  .driver-portal .hero-meta {
    align-items: flex-start;
    display: grid;
    font-size: 0.78rem;
    gap: 9px;
  }

  .driver-portal .hero-action {
    border-radius: 18px;
    gap: 10px 12px;
    padding: 12px;
  }

  .driver-portal .hero-action-icon {
    height: 44px;
    width: 44px;
  }

  .driver-portal .hero-action-copy strong {
    font-size: 0.85rem;
  }

  .driver-portal .hero-action-copy span {
    font-size: 0.75rem;
  }

  .driver-portal .hero-action .button {
    font-size: 0.86rem;
    min-height: 46px;
  }

  .driver-portal .metrics-grid {
    gap: 10px;
  }

  .driver-portal .metric-card {
    gap: 8px;
    min-height: 132px;
    padding: 14px;
  }

  .driver-portal .metric-icon {
    border-radius: 10px;
    height: 34px;
    width: 34px;
  }

  .driver-portal .metric-label,
  .driver-portal .metric-note {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .driver-portal .metric-value {
    font-size: clamp(1.32rem, 7vw, 1.65rem);
  }

  .driver-portal .card {
    border-radius: 18px;
  }

  .driver-portal .card-header {
    padding: 17px 16px 0;
  }

  .driver-portal .card-header-copy p,
  .driver-portal .auth-footnote,
  .driver-portal .field-note,
  .driver-portal .field small {
    font-size: 0.8rem;
  }

  .driver-portal .list-item {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
  }

  .driver-portal .list-icon {
    height: 40px;
    width: 40px;
  }

  .driver-portal .list-copy strong {
    font-size: 0.86rem;
    white-space: normal;
  }

  .driver-portal .list-copy span,
  .driver-portal .list-value span {
    font-size: 0.76rem;
    line-height: 1.4;
  }

  .driver-portal .visit-activity .list-value {
    flex-basis: calc(100% - 50px);
    margin-left: 50px;
    text-align: left;
  }

  .driver-portal .activity-invoices {
    gap: 7px;
    padding: 0 16px 14px 66px;
  }

  .driver-portal .activity-invoice {
    padding: 10px;
  }

  .driver-portal .activity-invoice > span:first-child {
    align-items: flex-start;
    gap: 7px;
  }

  .driver-portal .activity-invoice > span:last-child {
    font-size: 0.76rem;
  }

  .driver-portal .segmented {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .driver-portal .segment {
    font-size: 0.78rem;
  }

  .driver-portal .qr-layout {
    display: grid;
    gap: 14px;
  }

  .driver-portal .qr-stage {
    border-radius: 24px;
    gap: 12px;
    min-height: 0;
    padding: 18px;
  }

  .driver-portal .qr-frame {
    border-radius: 22px;
    height: min(calc(100vw - 64px), 286px);
    padding: 16px;
    width: min(calc(100vw - 64px), 286px);
  }

  .driver-portal .qr-code-label {
    font-size: 0.75rem;
    padding: 7px 11px;
  }

  .driver-portal [data-page-view="payouts"] .table-wrap {
    overflow: visible;
    padding: 0 14px 14px;
  }

  .driver-portal [data-page-view="payouts"] .data-table,
  .driver-portal [data-page-view="payouts"] .data-table tbody,
  .driver-portal [data-page-view="payouts"] .data-table tr,
  .driver-portal [data-page-view="payouts"] .data-table td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .driver-portal [data-page-view="payouts"] .data-table thead {
    display: none;
  }

  .driver-portal [data-page-view="payouts"] .data-table tr {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    margin-top: 12px;
    overflow: hidden;
    padding: 7px 12px;
  }

  .driver-portal [data-page-view="payouts"] .data-table td {
    align-items: flex-start;
    border: 0;
    display: flex;
    font-size: 0.8rem;
    gap: 16px;
    justify-content: space-between;
    padding: 7px 0;
    text-align: right;
    white-space: normal;
  }

  .driver-portal [data-page-view="payouts"] .data-table td::before {
    color: var(--ink-500);
    content: attr(data-label);
    flex: 0 0 42%;
    font-size: 0.72rem;
    font-weight: 760;
    text-align: left;
    text-transform: uppercase;
  }

  .driver-portal [data-page-view="payouts"] .data-table td:first-child {
    color: var(--brand-950);
    font-size: 0.9rem;
    padding-top: 10px;
  }

  .driver-portal [data-page-view="payouts"] .data-table td:last-child {
    padding-bottom: 10px;
  }

  .driver-portal .profile-form-card,
  .driver-portal .security-card {
    padding: 18px;
  }

  .driver-portal .profile-save-button,
  .driver-portal .security-card > .button {
    width: 100%;
  }

  .driver-portal .bottom-nav {
    min-height: calc(72px + env(safe-area-inset-bottom));
    padding-bottom: max(7px, env(safe-area-inset-bottom));
  }

  .driver-portal .bottom-nav .nav-button {
    font-size: 0.75rem;
    min-height: 56px;
  }

  .registration-page {
    background:
      radial-gradient(circle at 20% 0%, rgba(34, 165, 150, 0.12), transparent 20rem),
      var(--page);
  }

  .registration-page .registration-shell {
    min-height: 100dvh;
    padding: max(12px, env(safe-area-inset-top)) 0 max(20px, env(safe-area-inset-bottom));
  }

  .registration-page .registration-header {
    padding: 0 14px;
  }

  .registration-page .registration-card {
    border-left: 0;
    border-radius: 24px 24px 0 0;
    border-right: 0;
    box-shadow: 0 -8px 32px rgba(10, 42, 35, 0.07);
    margin-top: 16px;
    padding: 22px 18px 10px;
  }

  .registration-page .registration-card[data-current-step]:not([data-current-step="1"]) .registration-intro {
    display: none;
  }

  .registration-page .registration-intro h1 {
    font-size: 2rem;
  }

  .registration-page .registration-step-dots li {
    font-size: 0.67rem;
  }

  .registration-page .registration-step legend {
    font-size: 1.25rem;
  }

  .registration-page .form-grid,
  .registration-page .choice-grid {
    gap: 14px;
  }

  .registration-page .field > span,
  .registration-page .field-label {
    font-size: 0.84rem;
  }

  .registration-page input,
  .registration-page select,
  .registration-page textarea {
    min-height: 52px;
  }

  .registration-page .registration-actions {
    background: linear-gradient(to top, white 78%, rgba(255, 255, 255, 0));
    bottom: 0;
    margin: 0 -4px;
    padding: 22px 4px max(12px, env(safe-area-inset-bottom));
    position: sticky;
    z-index: 5;
  }

  .registration-page .registration-actions .button {
    flex: 1;
  }

  .registration-page .registration-actions #registrationBackButton {
    flex: 0 0 104px;
  }

  .install-dialog {
    border-radius: 24px 24px 0 0;
    margin: auto 0 0;
    max-width: none;
    width: 100%;
  }

  .install-dialog-panel {
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    padding: 12px 20px max(20px, env(safe-area-inset-bottom));
  }

  .install-dialog-handle {
    display: block;
  }
}

@media (max-width: 350px) {
  .driver-portal #installAppButton {
    display: none !important;
  }

  .driver-portal .app-main {
    padding-left: 11px;
    padding-right: 11px;
  }

  .driver-portal .hero-card {
    padding: 17px;
  }

  .driver-portal .metric-card {
    min-height: 126px;
    padding: 12px;
  }

  .driver-portal .activity-invoices {
    padding-left: 16px;
  }
}

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

@media print {
  .app-header,
  .bottom-nav,
  .admin-sidebar,
  .admin-topbar,
  .admin-bottom-nav,
  .page-actions,
  .toolbar,
  .toast-region {
    display: none !important;
  }

  body,
  html {
    background: white;
  }

  .admin-main-wrap {
    margin: 0;
  }

  .app-main,
  .admin-content {
    max-width: none;
    padding: 0;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
  }
}
