@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

.layoverloop-logo {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: #000000;
  white-space: nowrap;
}

.layoverloop-logo .loop {
  color: rgb(184, 150, 12);
}

.layoverloop-promo {
  position: relative;
  margin: 0 0 1rem;
}

.layoverloop-promo .layoverloop-banner {
  margin: 0;
}

.layoverloop-dismiss {
  position: absolute;
  z-index: 2;
  top: 0.4rem;
  right: 0.4rem;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(138, 107, 8, 0.22);
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.82);
  color: #6d5707;
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.layoverloop-dismiss:hover {
  background: #fff;
  border-color: rgba(138, 107, 8, 0.45);
  color: #4e3d04;
}

.layoverloop-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.15rem;
  margin: 0 0 1rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 93% 8%, rgba(184, 150, 12, 0.2), transparent 32%),
    linear-gradient(135deg, #fffdf7, #fbf0cf);
  border: 1px solid #e5d197;
  border-left: 4px solid rgb(184, 150, 12);
  border-radius: calc(var(--radius-sm) + 2px);
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.layoverloop-banner::after {
  content: "";
  position: absolute;
  right: -2.5rem;
  bottom: -5rem;
  width: 13rem;
  height: 13rem;
  border: 1px dashed rgba(184, 150, 12, 0.38);
  border-radius: 50%;
  transform: rotate(-14deg);
  pointer-events: none;
}

.layoverloop-banner:hover {
  border-color: #cdb36b;
  box-shadow: 0 14px 30px -24px rgba(138, 105, 0, 0.65);
  transform: translateY(-1px);
}

.layoverloop-banner-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.layoverloop-kicker {
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a6b08;
}

.layoverloop-banner .layoverloop-logo {
  font-size: 1.55rem;
  line-height: 1.1;
}

.layoverloop-headline {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2.3vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: #000;
}

.layoverloop-copy {
  max-width: 44rem;
  color: var(--ink-2);
  font-size: 0.79rem;
  line-height: 1.45;
}

.layoverloop-meta {
  margin-top: 0.14rem;
  color: #7b6108;
  font-size: 0.61rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.layoverloop-cta {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 0.56rem 0.88rem;
  border: 1px solid rgb(184, 150, 12);
  border-radius: 999px;
  background: rgb(184, 150, 12);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 750;
  white-space: nowrap;
  box-shadow: 0 10px 20px -14px rgba(120, 92, 0, 0.9);
}

.layoverloop-banner:hover .layoverloop-cta {
  background: #9d7f0b;
  border-color: #9d7f0b;
}

.app-footer {
  width: min(var(--shell), calc(100% - 2rem));
  margin: 2rem auto 0;
  padding: 1.1rem 0 1.8rem;
  border-top: 1px solid var(--line);
}

.app-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 1.4rem;
  flex-wrap: wrap;
}

.app-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  text-decoration: none;
  color: var(--muted);
}

.app-footer-brand .layoverloop-logo {
  font-size: 1.02rem;
}

.app-footer-tagline {
  font-size: 0.71rem;
  color: var(--muted);
}

.app-footer-meta {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

:root {
  --ink: #10222e;
  --ink-2: #334b5b;
  --muted: #5b7181;
  --line: #d8e2e8;
  --line-strong: #c3d2da;
  --paper: #f1f5f7;
  --paper-2: #e8eff2;
  --surface: #ffffff;
  --surface-2: #f7fafb;
  --brand: #123c50;
  --brand-2: #1d6d7f;
  --brand-3: #2f8fa1;
  --brand-soft: #e3f2f4;
  --brand-ink: #0a2836;
  --amber: #8a5800;
  --amber-soft: #fff2d6;
  --danger: #a13030;
  --danger-soft: #fde6e4;
  --ok: #17664a;
  --ok-soft: #def3e9;
  --focus: rgba(29, 109, 127, 0.55);
  --shadow-sm: 0 1px 2px rgba(16, 34, 46, 0.05);
  --shadow: 0 1px 2px rgba(16, 34, 46, 0.05), 0 18px 42px -26px rgba(16, 34, 46, 0.32);
  --shadow-lift: 0 2px 4px rgba(16, 34, 46, 0.05), 0 24px 48px -28px rgba(16, 34, 46, 0.4);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shell: 1140px;
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", ui-sans-serif, system-ui, "Helvetica Neue",
    Arial, sans-serif;
  --font-mono:
    ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(18, 60, 80, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 60, 80, 0.028) 1px, transparent 1px),
    radial-gradient(ellipse 70rem 32rem at 50% -8rem, rgba(47, 143, 161, 0.16), transparent 70%);
  background-size:
    48px 48px,
    48px 48px,
    100% 100%;
  background-position: center top;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1 {
  font-size: 1.22rem;
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.15rem);
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

h4 {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

h5 {
  font-size: 0.7rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

strong {
  font-weight: 680;
}

code,
kbd,
samp {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

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

button {
  cursor: pointer;
}

a {
  color: var(--brand-2);
  text-underline-offset: 2px;
}

::selection {
  background: rgba(47, 143, 161, 0.24);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.65rem 1rem;
  border-radius: 0 0 var(--radius-xs) 0;
  z-index: 100;
  font-weight: 650;
}

.skip-link:focus {
  left: 0;
  top: 0;
}

.install-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.65rem max(1rem, calc((100% - var(--shell)) / 2));
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.4;
}

.install-banner-text {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.install-banner-text strong {
  font-size: 0.84rem;
  font-weight: 700;
}

.install-banner-text span {
  color: rgba(255, 255, 255, 0.8);
}

.install-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.install-banner .button.primary {
  background: #fff;
  color: var(--brand);
  border-color: #fff;
  box-shadow: none;
}

.install-banner .button.primary:hover {
  background: #eef7f8;
}

.install-banner .button.ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.install-banner .button.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.market-heading-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.market-live-note {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  color: var(--ok);
  font-size: 0.72rem;
  font-weight: 700;
}

.market-live-help {
  margin: -0.25rem 0 0.85rem;
}

.app-header {
  width: min(var(--shell), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.4rem 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-mark {
  position: relative;
  width: 2.9rem;
  height: 2.9rem;
  flex: 0 0 auto;
  border-radius: 0.95rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(150deg, #16465d, #0d2c3c 62%, #0a2431);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 10px 22px -12px rgba(10, 40, 54, 0.8);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.5rem;
  width: 1rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(101, 205, 218, 0.9), transparent);
  transform: translateX(-50%);
}

.brand h1 {
  max-width: 17rem;
}

.brand-sub {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 550;
  letter-spacing: 0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.66rem;
  font-weight: 750;
  color: var(--brand-2);
  margin-bottom: 0.35rem;
}

.header-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 1 auto;
}

.icon-button {
  padding: 0.42rem;
  min-width: 2.35rem;
}

.icon-button img {
  display: block;
  width: 18px;
  height: 18px;
  opacity: 0.78;
}

.icon-button:hover img {
  opacity: 1;
}

.header-actions .button.icon-button[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
}

.header-actions .button.icon-button[aria-pressed="true"] img {
  filter: invert(1);
  opacity: 1;
}

.empty-state .button {
  justify-self: start;
}

.user-chip {
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  max-width: 13rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.login-shell {
  min-height: calc(100vh - 6.5rem);
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-card {
  position: relative;
  width: min(28.5rem, 100%);
  padding: 2rem 1.75rem 1.6rem;
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-3), #7fc7cf);
}

.login-card::after {
  content: "777";
  position: absolute;
  right: -0.4rem;
  top: 0.4rem;
  font-family: var(--font-mono);
  font-size: 6.5rem;
  font-weight: 700;
  letter-spacing: -0.06em;
  color: rgba(18, 60, 80, 0.045);
  pointer-events: none;
  line-height: 1;
}

.login-card h2 {
  margin-bottom: 0.5rem;
}

.login-card .muted {
  font-size: 0.86rem;
  line-height: 1.55;
}

.login-card .stack {
  margin-top: 1.3rem;
}

.app-shell {
  width: min(var(--shell), calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 4rem;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0.32rem;
  margin: 0 0 1.1rem;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 24px -22px rgba(10, 40, 54, 0.6);
  backdrop-filter: blur(14px);
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab-short {
  display: none;
}

.tab {
  flex: 1 0 auto;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  padding: 0.62rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 650;
  white-space: nowrap;
  transition:
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

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

.tab[aria-current="page"] {
  background: var(--brand);
  color: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 8px 18px -12px rgba(10, 40, 54, 0.9);
}

.view {
  animation: view-in 200ms ease-out;
}

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

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.4rem 0 1rem;
}

.section-heading.compact {
  margin: 0 0 0.75rem;
  align-items: center;
}

.notice {
  position: relative;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-3);
  background: linear-gradient(180deg, #f7fcfd, #f1f8fa);
  color: #294c5a;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

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

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

.fine-print {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 0.8rem;
  padding: 0.95rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.filters .date-range-label {
  grid-column: 1 / -1;
}

.filter-compensation {
  align-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.55rem;
  padding-bottom: 0;
  line-height: 1.2;
  transform: translateY(9px);
}

.filter-compensation input {
  margin: 0;
}

.filter-compensation span {
  line-height: 1;
  transform: translateY(3px);
}

.filter-divider {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--line);
  margin: 0.1rem 0;
}

.filter-reset {
  grid-column: 1 / -1;
  justify-self: end;
  align-self: end;
  padding-bottom: 0.55rem;
}

.date-range {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.date-range input {
  min-width: 0;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  font-size: 0.8rem;
}

.date-range-arrow {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: var(--brand-3);
}

.date-range-arrow svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.date-range-label .form-error {
  min-height: 0;
  font-size: 0.68rem;
}

.continent-chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

label {
  display: grid;
  gap: 0.34rem;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--ink-2);
}

label > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  letter-spacing: 0.01em;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 0.58rem 0.7rem;
  min-height: 2.55rem;
  font-size: 0.9rem;
  box-shadow: inset 0 1px 1px rgba(16, 34, 46, 0.03);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #8498a5;
}

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

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(29, 109, 127, 0.55);
  outline-offset: 1px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-3);
  box-shadow: inset 0 1px 1px rgba(16, 34, 46, 0.02), 0 0 0 1px var(--brand-3);
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235b7181' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 0.72rem;
}

textarea {
  resize: vertical;
  min-height: 4.2rem;
  line-height: 1.45;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--brand-2);
  width: 1.1rem;
  height: 1.1rem;
  min-height: auto;
  box-shadow: none;
}

.checkline {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 500;
  color: var(--ink-2);
  line-height: 1.42;
}

.checkline input {
  width: 1.12rem;
  min-height: 1.12rem;
  margin-top: 0.16rem;
  flex: 0 0 auto;
}

.checkline strong {
  color: var(--ink);
  font-weight: 650;
}

.stack {
  display: grid;
  gap: 0.8rem;
}

.stack > .button {
  justify-self: start;
  min-width: 11rem;
}

.login-card .stack > .button,
.onboarding-card .stack > .button {
  justify-self: stretch;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  align-items: center;
}

.button {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.62rem 0.95rem;
  font-weight: 650;
  font-size: 0.84rem;
  letter-spacing: 0.005em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.55rem;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease,
    transform 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

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

.button.primary {
  background: linear-gradient(180deg, #16465d, #123c50);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 10px 20px -14px rgba(10, 40, 54, 0.9);
}

.button.primary:hover {
  background: linear-gradient(180deg, #1a526c, #123c50);
}

.button.secondary {
  background: var(--brand-soft);
  border-color: #bcdde2;
  color: #0b4757;
}

.button.secondary:hover {
  background: #d8edf1;
  border-color: #a6d2da;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
  color: var(--ink-2);
}

.button.ghost:hover {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink);
}

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

.button.danger:hover {
  background: #fbdcda;
}

.button.small {
  padding: 0.38rem 0.66rem;
  min-height: 2.05rem;
  font-size: 0.76rem;
  border-radius: 9px;
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--brand-2);
  font-weight: 650;
  font-size: 0.78rem;
  text-decoration: underline;
  text-decoration-color: rgba(29, 109, 127, 0.4);
  text-underline-offset: 3px;
  padding: 0.25rem 0;
  text-align: left;
}

.text-button:hover {
  color: var(--brand);
  text-decoration-color: currentColor;
}

.market-summary {
  min-height: 1.2rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.75rem;
}

.card-grid {
  display: grid;
  gap: 0.9rem;
}

.offer-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.1rem 1rem 1.2rem;
  display: grid;
  gap: 0.85rem;
  overflow: hidden;
  transition:
    box-shadow 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.offer-card:hover {
  border-color: #c9d8e0;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.offer-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand-3), var(--brand-2) 55%, var(--brand));
}

.offer-card:focus-within {
  border-color: var(--brand-3);
  box-shadow: 0 0 0 3px var(--focus);
}

.offer-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.offer-duty {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.duty-code {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  color: var(--brand);
  line-height: 1.1;
}

.route {
  font-weight: 650;
  font-size: 0.95rem;
  letter-spacing: 0.035em;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.offer-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.75rem;
  flex-wrap: wrap;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.offer-date {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--ink);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.offer-date::before {
  content: "Dates";
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  border-radius: 999px;
  padding: 0.3rem 0.58rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  white-space: nowrap;
  background: #eef3f5;
  color: var(--ink-2);
  border: 1px solid transparent;
  line-height: 1.2;
}

.badge.fit,
.badge.possible,
.badge.conflict {
  border-color: rgba(16, 34, 46, 0.06);
}

.badge.fit::before,
.badge.possible::before,
.badge.conflict::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.badge.fit {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge.possible {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge.conflict {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.expiring {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: #e2bd75;
}

.badge.expiring::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.badge.neutral {
  background: #edf2f5;
  color: #46606f;
}

.badge.compensation {
  background: linear-gradient(135deg, #fff6d4, #ffe39c);
  color: #613d00;
  border-color: #e6bd4e;
  box-shadow: 0 4px 12px -8px rgba(140, 90, 0, 0.65);
  font-weight: 700;
}

.offer-meta {
  display: grid;
  gap: 0.5rem;
  color: var(--ink-2);
  font-size: 0.81rem;
  line-height: 1.45;
}

.offer-meta strong {
  color: var(--ink);
  font-weight: 650;
}

.offer-meta .fine-print {
  font-size: 0.71rem;
}

.match-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.8rem;
  background: var(--surface-2);
  display: grid;
  gap: 0.4rem;
  font-size: 0.8rem;
  box-shadow: inset 3px 0 0 rgba(47, 143, 161, 0.28);
}

.match-box .reason {
  color: var(--ink-2);
  line-height: 1.45;
}

.match-box .fine-print {
  font-size: 0.7rem;
}

.offer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.offer-footer .button {
  margin-left: auto;
}

.empty-state {
  border: 1px dashed #b9cbd4;
  background: rgba(255, 255, 255, 0.62);
  border-radius: var(--radius);
  padding: 1.4rem;
  color: var(--muted);
  font-size: 0.86rem;
  display: grid;
  gap: 0.35rem;
}

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

.upload-card,
.roster-card,
.panel,
.admin-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.upload-card {
  margin-bottom: 1rem;
}

.roster-list,
.review-list {
  display: grid;
  gap: 1rem;
}

.roster-card {
  display: grid;
  gap: 0.95rem;
}

.roster-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.roster-image-wrap {
  display: grid;
  gap: 0.35rem;
}

.roster-image-viewport {
  position: relative;
  height: 22rem;
  overflow: hidden;
  touch-action: none;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: grab;
}

.roster-image-viewport.dragging {
  cursor: grabbing;
}

.roster-image {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.roster-zoom-controls {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  display: flex;
  gap: 0.28rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 9px;
  backdrop-filter: blur(6px);
}

.roster-zoom-button {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.45rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
  font-weight: 650;
}

.roster-zoom-button:hover {
  border-color: var(--brand-3);
  color: var(--brand);
}

.roster-zoom-button.reset {
  font-size: 0.68rem;
  font-weight: 650;
}

.duty-table {
  display: grid;
  gap: 0.6rem;
}

.duty-row {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: grid;
  gap: 0.6rem;
  background: var(--surface-2);
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.duty-row:hover {
  border-color: var(--line-strong);
}

.duty-row.uncertain {
  border-color: #e2bd75;
  background: #fffbef;
  box-shadow: inset 3px 0 0 #d9a33e;
}

.duty-row.selected {
  border-color: #7fc4cf;
  background: #f2fafb;
  box-shadow: inset 3px 0 0 var(--brand-3);
}

.select-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 650;
  color: var(--ink);
}

.select-line input {
  width: 1.12rem;
  min-height: 1.12rem;
}

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

.field-grid label {
  font-size: 0.68rem;
}

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

.uncertain-fields input,
.uncertain-fields select {
  border-color: #d9a94e;
  background: #fffdf6;
}

.warning-line {
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 600;
}

.warning-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--amber);
  font-size: 0.78rem;
  display: grid;
  gap: 0.2rem;
}

.admin-block {
  margin-bottom: 1rem;
}

.count-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  padding: 0.33rem 0.66rem;
  border: 1px solid #cbe4e8;
  line-height: 1.2;
}

.review-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.review-grid {
  display: grid;
  gap: 0;
}

.review-visual {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  padding: 0.8rem;
  display: grid;
  gap: 0.65rem;
}

.image-frame {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #dbe5e9;
  min-height: 10rem;
  border: 1px solid var(--line);
}

.image-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 21rem;
  object-fit: contain;
}

.bbox-highlight {
  position: absolute;
  border: 3px solid #f0a91c;
  background: rgba(240, 169, 28, 0.16);
  border-radius: 5px;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.crop-canvas {
  width: 100%;
  max-height: 12rem;
  object-fit: contain;
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
}

.review-fields {
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
}

.caption-box {
  border-left: 3px solid var(--brand-3);
  padding-left: 0.65rem;
  color: var(--ink-2);
  font-size: 0.8rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.connection-grid {
  display: grid;
  gap: 0.95rem;
}

.panel {
  display: grid;
  gap: 0.8rem;
  align-content: start;
}

.state-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.8rem;
  background: var(--surface-2);
  font-size: 0.81rem;
  display: grid;
  gap: 0.3rem;
}

.state-box .state-line {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
}

.state-box .state-line span:last-child {
  color: var(--ink-2);
  text-align: right;
  overflow-wrap: anywhere;
}

.status-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  background: #9aa8ad;
  flex: 0 0 auto;
}

.status-dot.connected {
  background: #1f9b63;
  box-shadow: 0 0 0 3px rgba(31, 155, 99, 0.16);
}

.status-dot.qr {
  background: #d59a1d;
  box-shadow: 0 0 0 3px rgba(213, 154, 29, 0.16);
}

.status-dot.error,
.status-dot.disconnected {
  background: #c55050;
  box-shadow: 0 0 0 3px rgba(197, 80, 80, 0.14);
}

.qr-wrap {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  padding: 0.8rem;
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}

.qr-wrap img {
  width: min(20rem, 100%);
  image-rendering: pixelated;
  border-radius: 6px;
}

.group-choice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  background: var(--surface-2);
}

.group-choice input {
  width: 1.1rem;
  min-height: 1.1rem;
  margin-top: 0.16rem;
}

.form-error {
  min-height: 1rem;
  color: var(--danger);
  font-size: 0.77rem;
  font-weight: 550;
}

.file-field {
  border: 1px dashed #a9bec8;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.file-field:hover {
  border-color: var(--brand-3);
  background: #f3fafb;
}

.file-field input {
  border: 0;
  background: transparent;
  padding: 0.4rem 0;
  min-height: auto;
  box-shadow: none;
  font-size: 0.8rem;
}

.toast-stack {
  position: fixed;
  z-index: 100;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  display: grid;
  gap: 0.45rem;
  pointer-events: none;
}

.toast {
  background: var(--brand-ink);
  color: #fff;
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: var(--shadow-lift);
  border-left: 3px solid #62c3ce;
  animation: toast-in 180ms ease-out;
  pointer-events: auto;
}

.toast.error {
  background: #5f2626;
  border-left-color: #f0a9a2;
}

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

hr {
  border: 0;
  border-top: 1px solid var(--line);
  width: 100%;
  margin: 0.2rem 0;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.secret-panel {
  border: 1px solid #e0b84e;
  background: #fff9e8;
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  display: grid;
  gap: 0.55rem;
  justify-items: start;
}

.secret-code {
  display: block;
  width: 100%;
  overflow-wrap: anywhere;
  padding: 0.75rem;
  border-radius: 8px;
  background: #11293a;
  color: #eaf7f9;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  border: 1px solid #0a1f2c;
}

.account-list {
  display: grid;
  gap: 0.55rem;
}

.account-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.7rem;
  background: var(--surface-2);
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: flex-start;
  font-size: 0.81rem;
}

.account-item .account-meta {
  display: grid;
  gap: 0.22rem;
  color: var(--ink-2);
  min-width: 0;
}

.account-item strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.account-item .action-row {
  margin-top: 0;
}

.info-dot {
  display: inline-grid;
  place-items: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid #a9d8df;
  font-size: 0.62rem;
  font-weight: 750;
  font-style: normal;
  cursor: help;
  position: relative;
  vertical-align: middle;
  margin-left: 0.28rem;
  user-select: none;
  transition:
    background 150ms ease,
    color 150ms ease;
}

.info-dot:hover,
.info-dot:focus-visible {
  background: var(--brand-2);
  color: #fff;
  border-color: var(--brand-2);
}

.help-panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.79rem;
  color: var(--ink-2);
  line-height: 1.5;
}

.help-panel summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 650;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.help-panel summary::-webkit-details-marker {
  display: none;
}

.help-panel summary::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 150ms ease;
  flex: 0 0 auto;
  margin-left: 0.1rem;
}

.help-panel[open] summary::before {
  transform: rotate(45deg);
}

.help-panel ul {
  margin: 0.65rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
}

.help-panel li::marker {
  color: var(--brand-3);
}

.queue-status {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  margin-bottom: 1rem;
}

.queue-status .status-dot {
  margin-top: 0.24rem;
  width: 0.68rem;
  height: 0.68rem;
}

.queue-status .status-dot.working,
.queue-status .status-dot.queued {
  background: #d59a1d;
  box-shadow: 0 0 0 4px rgba(213, 154, 29, 0.14);
}

.queue-status .status-dot.done {
  background: #1f9b63;
  box-shadow: 0 0 0 4px rgba(31, 155, 99, 0.14);
}

.queue-status .status-dot.issues,
.queue-status .status-dot.unavailable {
  background: #c55050;
  box-shadow: 0 0 0 4px rgba(197, 80, 80, 0.14);
}

.queue-status-main {
  display: grid;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
}

.queue-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.progress-track {
  width: 100%;
  height: 0.4rem;
  border-radius: 999px;
  background: #e2eaee;
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-2), #4ab3bd);
  transition: width 300ms ease;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 2.8rem;
}

.password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  display: grid;
  place-items: center;
  opacity: 0.62;
  transition:
    opacity 150ms ease,
    background 150ms ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  opacity: 1;
  background: var(--paper-2);
}

.password-toggle img {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  filter: invert(28%) sepia(14%) saturate(700%) hue-rotate(160deg);
}

.referral-chip {
  display: inline-block;
  padding: 0.12rem 0.42rem;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 0.69rem;
  letter-spacing: 0.04em;
  border: 1px solid #cbe4e8;
}

.modal-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  background: rgba(10, 30, 42, 0.55);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 1rem;
  animation: backdrop-in 160ms ease-out;
}

@keyframes backdrop-in {
  from {
    opacity: 0;
  }
}

.modal-card {
  width: min(34rem, 100%);
  max-height: min(90vh, 46rem);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 32px 80px -32px rgba(10, 30, 42, 0.6);
  padding: 1.2rem;
  display: grid;
  gap: 0.9rem;
  animation: modal-in 180ms ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
}

.onboarding-card {
  position: relative;
  max-width: 42rem;
  margin: 2rem auto;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.9rem;
  overflow: hidden;
}

.onboarding-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-3), #7fc7cf);
}

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

.calendar-weekday {
  text-align: center;
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.25rem 0;
}

.calendar-day {
  min-height: 4.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 0.32rem;
  display: grid;
  align-content: start;
  gap: 0.22rem;
  overflow: hidden;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.calendar-day:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.calendar-day.outside {
  opacity: 0.38;
}

.calendar-day-number {
  font-size: 0.67rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.calendar-duty {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 5px;
  padding: 0.14rem 0.28rem;
  background: #e0f1f3;
  color: #0a4e47;
  font-family: inherit;
  font-size: 0.6rem;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-duty:hover {
  filter: brightness(0.97);
}

.duty-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.duty-edit-grid .wide {
  grid-column: 1 / -1;
}

.duty-row.dismissed {
  opacity: 0.76;
}

.calendar-duty.off {
  background: #ebf0f3;
  color: #4e616e;
}

.calendar-duty.training {
  background: #ece7f7;
  color: #54447a;
}

.calendar-duty.sim {
  background: #ffe6c2;
  color: #784300;
}

.calendar-duty.office {
  background: #e8edf5;
  color: #344a6a;
}

.calendar-duty.sby {
  background: #fff0cf;
  color: #7a4b00;
}

.calendar-duty.unknown {
  background: #fff2d7;
  color: #7a5200;
}

.calendar-duty.selected {
  outline: 2px solid var(--brand-2);
  outline-offset: -2px;
}

.calendar-duty.uncertain {
  background: #fff5df;
  color: #7a4b00;
}

.info-tooltip {
  position: fixed;
  z-index: 200;
  max-width: calc(100vw - 1rem);
  background: var(--brand-ink);
  color: #eef8fa;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  box-shadow: 0 18px 40px -20px rgba(10, 30, 42, 0.8);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: left;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.stat-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  background: var(--surface-2);
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--brand-3);
  opacity: 0.7;
}

.stat-card strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  color: var(--brand);
  line-height: 1.15;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.signup-bars {
  display: grid;
  gap: 0.45rem;
  margin: 0.5rem 0 0.4rem;
}

.signup-bar-row {
  display: grid;
  grid-template-columns: 4.4rem 1fr 2rem;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.signup-bar-track {
  height: 0.48rem;
  background: #e2eaee;
  border-radius: 999px;
  overflow: hidden;
}

.signup-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-2), #55b9c3);
  border-radius: inherit;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.stats-table {
  width: 100%;
  min-width: 58rem;
  border-collapse: collapse;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.stats-table th,
.stats-table td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  vertical-align: top;
}

.stats-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stats-table tbody tr:hover {
  background: #f8fbfc;
}

.stats-table tr.selected-user {
  background: #eef8f9;
}

.stats-table td.wrap {
  white-space: normal;
  min-width: 10rem;
}

.offer-edit-form {
  border: 1px solid #bcdde2;
  background: #f4fafb;
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  margin-top: 0.2rem;
}

.offer-edit-form textarea {
  min-height: 3.4rem;
}

@media (min-width: 640px) {
  .field-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .review-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  }

  .review-visual {
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

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

  .queue-status {
    padding: 0.9rem 1rem;
  }
}

@media (min-width: 960px) {
  .filters {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .filters .date-range-label {
    grid-column: span 2;
  }

  .filter-reset {
    grid-column: span 4;
  }

  .app-header {
    padding-top: 1.7rem;
  }

  .tabs {
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
  }

  .tab {
    flex: 0 0 auto;
    min-width: 9.5rem;
  }

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

  .duty-row {
    grid-template-columns: auto 1fr;
    align-items: start;
  }

  .duty-row .field-grid {
    grid-column: 2;
  }

  .auth-links {
    justify-content: space-between;
  }
}

@media (min-width: 700px) {
  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  #changePasswordForm .field-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .tab {
    padding: 0.58rem 0.72rem;
    font-size: 0.8rem;
  }

  .tab-long {
    display: none;
  }

  .tab-short {
    display: inline;
  }
}

@media (min-width: 640px) and (max-width: 900px) {
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters .date-range-label {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .filters .date-range-label {
    grid-column: 1 / -1;
  }

  .layoverloop-banner {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .layoverloop-cta {
    justify-self: start;
  }

  .app-footer-inner {
    align-items: flex-start;
  }

  .install-banner {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 0.7rem 1rem;
  }

  .install-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .market-heading-actions {
    justify-content: flex-start;
  }

  .roster-image-viewport {
    height: 18rem;
  }

  .app-header {
    align-items: flex-start;
    flex-wrap: wrap;
    padding-top: 1rem;
  }

  .brand-mark {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.8rem;
  }

  .brand h1 {
    max-width: 13rem;
  }

  .brand-sub {
    max-width: 13rem;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .header-actions {
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
    gap: 0.4rem;
  }

  .header-actions .button {
    min-height: 2.15rem;
  }

  .user-chip {
    display: none;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading h2 {
    font-size: 1.6rem;
  }

  .login-card {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .offer-card {
    padding: 1rem 1rem 0.9rem 1.1rem;
  }
}

@media (max-width: 480px) {
  .duty-edit-grid {
    grid-template-columns: 1fr;
  }

  .duty-edit-grid .wide {
    grid-column: auto;
  }

  .calendar-day {
    min-height: 3.8rem;
    padding: 0.22rem;
  }

  .calendar-duty {
    font-size: 0.53rem;
    padding: 0.1rem 0.18rem;
  }

  .filters {
    gap: 0.65rem;
  }

  .button-row {
    gap: 0.4rem;
  }
}

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

  .button:hover,
  .offer-card:hover {
    transform: none;
  }
}

/* ==========================================================================
   Premium polish pass — quiet-luxury aviation refinement
   Tokens, surfaces, focus rings, and the admin traffic panel.
   ========================================================================== */

:root {
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --gold: #a5791a;
  --gold-soft: #f6ead0;
  --gold-ink: #6f4e08;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ink: #0c1e29;
  --ink-2: #2f4652;
  --muted: #566874;
  --line: #e3ded2;
  --line-strong: #d2cab8;
  --paper: #f4f0e7;
  --paper-2: #ece6da;
  --surface: #fffdf8;
  --surface-2: #f9f5ec;
  --brand: #0f3345;
  --brand-2: #195a6b;
  --brand-3: #2f93a4;
  --brand-soft: #e3f0f1;
  --brand-ink: #072330;
  --amber: #8a5b0a;
  --amber-soft: #fbefd2;
  --shadow-sm: 0 1px 2px rgba(7, 35, 48, 0.05);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 2px 4px rgba(7, 35, 48, 0.05),
    0 22px 46px -34px rgba(7, 35, 48, 0.38);
  --shadow-lift: 0 1px 0 rgba(255, 255, 255, 0.85) inset, 0 3px 7px rgba(7, 35, 48, 0.06),
    0 34px 64px -38px rgba(7, 35, 48, 0.5);
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --shell: 1180px;
}

body {
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 64rem 30rem at 50% -10rem, rgba(47, 147, 164, 0.15), transparent 70%),
    radial-gradient(circle at 88% 2%, rgba(165, 121, 26, 0.1), transparent 30%),
    linear-gradient(rgba(15, 51, 69, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 51, 69, 0.02) 1px, transparent 1px);
  background-size:
    100% 100%,
    100% 100%,
    56px 56px,
    56px 56px;
  font-feature-settings: "kern" 1, "liga" 1;
}

h2,
.login-card h2,
.onboarding-card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.06;
}

.eyebrow {
  color: var(--gold-ink);
  letter-spacing: 0.17em;
}

.brand-mark {
  border-radius: 1rem;
  background: linear-gradient(150deg, #174a5c, #0c2a38 58%, #08212c);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 14px 28px -16px rgba(7, 35, 48, 0.85);
}

.brand-mark::after {
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.tabs {
  background: rgba(255, 253, 248, 0.82);
  border-color: rgba(210, 202, 186, 0.9);
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 18px 36px -30px rgba(7, 35, 48, 0.65);
}

.tab {
  border-radius: 12px;
  transition:
    background 200ms var(--ease),
    color 200ms var(--ease),
    box-shadow 200ms var(--ease);
}

.tab[aria-current="page"] {
  background: linear-gradient(180deg, #144a5f, var(--brand));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 20px -12px rgba(7, 35, 48, 0.9);
}

.button {
  border-radius: 12px;
  transition:
    background 200ms var(--ease),
    border-color 200ms var(--ease),
    color 200ms var(--ease),
    box-shadow 200ms var(--ease),
    transform 140ms var(--ease);
}

.button.primary {
  background: linear-gradient(180deg, #175064, var(--brand));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 12px 24px -14px rgba(7, 35, 48, 0.95);
}

.button.primary:hover {
  background: linear-gradient(180deg, #1b5c72, #0d2c3b);
}

.button.secondary {
  background: #eef6f6;
  border-color: #c3dfe1;
  color: #0d4b58;
}

.button.ghost {
  background: rgba(255, 253, 248, 0.78);
}

.button:focus-visible,
.tab:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(165, 121, 26, 0.55);
  outline-offset: 2px;
}

input,
select,
textarea {
  border-radius: 12px;
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: inset 0 1px 1px rgba(7, 35, 48, 0.03);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-3);
  box-shadow: 0 0 0 3px rgba(47, 147, 164, 0.16);
}

.offer-card {
  background: linear-gradient(180deg, #fffefa, var(--surface));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 2px 4px rgba(7, 35, 48, 0.04),
    0 20px 40px -32px rgba(7, 35, 48, 0.36);
}

.offer-card::before {
  width: 3px;
  background: linear-gradient(180deg, var(--gold), var(--brand-3) 40%, var(--brand));
}

.offer-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(120% 80% at 100% 0%, rgba(165, 121, 26, 0.07), transparent 46%);
  opacity: 0;
  transition: opacity 220ms var(--ease);
}

.offer-card:hover::after {
  opacity: 1;
}

.offer-card:hover {
  border-color: #cfc6b2;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 3px 7px rgba(7, 35, 48, 0.06),
    0 32px 58px -36px rgba(7, 35, 48, 0.5);
  transform: translateY(-3px);
}

.duty-code {
  font-size: 1.58rem;
}

.panel,
.admin-block,
.upload-card,
.roster-card,
.login-card,
.traffic-panel {
  background: linear-gradient(180deg, #fffefa, var(--surface));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 2px 4px rgba(7, 35, 48, 0.04),
    0 22px 46px -36px rgba(7, 35, 48, 0.38);
}

.login-card::before {
  background: linear-gradient(90deg, var(--brand), var(--brand-3) 55%, var(--gold));
}

.login-card::after {
  color: rgba(15, 51, 69, 0.04);
}

.stat-card {
  border-radius: 14px;
  padding: 0.9rem 0.95rem;
  background: linear-gradient(180deg, #fffefa, var(--surface-2));
}

.stat-card::before {
  width: 3px;
  background: linear-gradient(180deg, var(--gold), var(--brand-3));
  opacity: 0.82;
}

.stat-card strong {
  font-size: 1.5rem;
}

.stat-card span {
  font-size: 0.71rem;
}

.empty-state {
  border-color: #d6cdba;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.92), rgba(249, 245, 236, 0.72));
}

.badge.compensation {
  background: linear-gradient(135deg, #fdf2cf, #f2d99a);
  border-color: #dfb85a;
  color: #5f3f05;
}

/* Site traffic panel */

.traffic-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-bottom: 0.9rem;
}

.traffic-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.traffic-head h4 {
  font-size: 1rem;
}

.traffic-head .fine-print {
  margin-top: 0.16rem;
}

.traffic-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0.9rem 0 0.85rem;
}

.traffic-metric {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.68rem 0.8rem;
  background: var(--surface-2);
  display: grid;
  gap: 0.14rem;
}

.traffic-metric strong {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  color: var(--brand);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.traffic-metric span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.traffic-chart {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 0.32rem;
  align-items: end;
  height: 8.5rem;
  padding: 0.4rem 0.1rem 0.35rem;
  border-bottom: 1px solid var(--line);
}

.traffic-day {
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  justify-items: stretch;
  gap: 0.35rem;
  height: 100%;
  min-width: 0;
}

.traffic-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  height: 100%;
}

.traffic-bar {
  width: clamp(3px, 38%, 9px);
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  transition: height 320ms var(--ease);
}

.traffic-bar.views {
  background: linear-gradient(180deg, var(--brand-3), var(--brand));
}

.traffic-bar.visitors {
  background: linear-gradient(180deg, #d8b45a, var(--gold));
}

.traffic-day-label {
  text-align: center;
  font-size: 0.58rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.traffic-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.6rem;
  font-size: 0.68rem;
  color: var(--muted);
}

.traffic-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
}

.traffic-swatch {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 3px;
  display: inline-block;
}

.traffic-swatch.views {
  background: linear-gradient(180deg, var(--brand-3), var(--brand));
}

.traffic-swatch.visitors {
  background: linear-gradient(180deg, #d8b45a, var(--gold));
}

@media (min-width: 700px) {
  .traffic-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .traffic-panel {
    padding: 0.9rem;
  }

  .traffic-chart {
    gap: 0.18rem;
    height: 7rem;
  }

  .traffic-day-label {
    font-size: 0.52rem;
  }

  .traffic-day:nth-child(even) .traffic-day-label {
    visibility: hidden;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: #b8ae99;
    --line-strong: #9c907a;
    --muted: #475a66;
  }

  .offer-card,
  .panel,
  .admin-block,
  .traffic-panel,
  .stat-card,
  .traffic-metric {
    border-width: 2px;
  }
}

/* Soften the partner promo so it sits inside the premium palette. */
.layoverloop-banner {
  background:
    radial-gradient(circle at 93% 8%, rgba(165, 121, 26, 0.14), transparent 34%),
    linear-gradient(135deg, #fffdf7, #f7eed8);
  border-color: #e6d7b1;
  border-left-color: var(--gold);
}

.layoverloop-banner::after {
  border-color: rgba(165, 121, 26, 0.3);
}

.layoverloop-banner:hover {
  border-color: #d8c28a;
  box-shadow: 0 16px 34px -26px rgba(111, 78, 8, 0.55);
}

.layoverloop-dismiss {
  border-color: rgba(165, 121, 26, 0.26);
  color: #7a5a12;
}

.layoverloop-dismiss:hover {
  border-color: rgba(165, 121, 26, 0.5);
  color: #5f460d;
}

.layoverloop-cta {
  background: #8f6814;
  border-color: #8f6814;
  box-shadow: 0 10px 20px -14px rgba(111, 78, 8, 0.75);
}

.layoverloop-banner:hover .layoverloop-cta {
  background: #7d5a0f;
  border-color: #7d5a0f;
}

/* Mobile refinements for the polish pass. */
.count-chip {
  white-space: nowrap;
}

.traffic-head {
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .layoverloop-banner {
    padding: 0.9rem 1rem;
    gap: 0.7rem;
  }

  .layoverloop-banner .layoverloop-logo {
    font-size: 1.3rem;
  }

  .layoverloop-headline {
    font-size: 1.05rem;
  }

  .layoverloop-copy {
    font-size: 0.75rem;
  }

  .layoverloop-cta {
    padding: 0.48rem 0.75rem;
    font-size: 0.72rem;
  }
}

@media (max-width: 520px) {
  .stats-grid {
    gap: 0.5rem;
  }

  .stat-card {
    padding: 0.72rem 0.78rem;
  }

  .stat-card strong {
    font-size: 1.32rem;
  }

  .traffic-head {
    align-items: center;
  }
}

/* Market UX: watchlist, offer detail, and share card. */

.watchlist-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.9rem;
  overflow: hidden;
}

.watchlist-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 0.8rem 1rem;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
}

.watchlist-summary::-webkit-details-marker {
  display: none;
}

.watchlist-summary-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.watchlist-summary .fine-print {
  margin-left: auto;
}

.watchlist-body {
  border-top: 1px solid var(--line);
  padding: 0 1rem 1rem;
  display: grid;
  gap: 0.8rem;
}

.watchlist-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 0.6rem;
  align-items: end;
  margin-top: 0.85rem;
}

.watchlist-form .form-error {
  grid-column: 1 / -1;
}

.watchlist-form .button {
  align-self: end;
}

.watchlist-help a {
  color: var(--brand-2);
  font-weight: 650;
}

.watchlist-items {
  display: grid;
  gap: 0.5rem;
}

.watch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.62rem 0.78rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.watch-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.watch-copy strong {
  font-size: 0.85rem;
  color: var(--ink);
}

.watch-copy .fine-print {
  font-size: 0.7rem;
}

@media (max-width: 700px) {
  .watchlist-form {
    grid-template-columns: 1fr 1fr;
  }

  .watchlist-form .button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .watchlist-summary .fine-print {
    margin-left: 0;
  }
}

.modal-wide {
  width: min(48rem, 100%);
  max-height: min(92vh, 52rem);
}

.offer-detail {
  display: grid;
  gap: 1rem;
}

.offer-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.offer-detail-title {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.offer-detail-title .duty-code {
  font-size: 2.05rem;
}

.offer-detail-title .route {
  font-size: 1.15rem;
}

.offer-detail-dates {
  margin-top: 0.2rem;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

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

.offer-detail-field {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  background: var(--surface-2);
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.offer-detail-field h5 {
  margin: 0;
}

.offer-detail-field p {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.offer-detail-field.wide {
  grid-column: 1 / -1;
}

.offer-detail-note {
  border-left: 3px solid var(--gold);
  background: var(--surface-2);
  border-radius: 0 12px 12px 0;
  padding: 0.7rem 0.9rem;
  display: grid;
  gap: 0.2rem;
}

.offer-detail-note p {
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.share-section {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  gap: 0.5rem 1rem;
  align-items: start;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.share-section > h5 {
  grid-column: 2;
  grid-row: 1;
}

.share-section > p.fine-print {
  grid-column: 2;
  grid-row: 2;
}

.share-preview {
  grid-column: 1;
  grid-row: 1 / span 3;
  display: flex;
  justify-content: center;
  padding: 0.3rem;
}

.share-preview img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--paper);
}

.share-section .button-row {
  grid-column: 2;
  grid-row: 3;
  align-self: start;
}

@media (max-width: 620px) {
  .offer-detail-grid {
    grid-template-columns: 1fr;
  }

  .modal-wide {
    padding: 1rem;
  }

  .share-section {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .share-section > h5,
  .share-section > p.fine-print,
  .share-preview,
  .share-section .button-row {
    grid-column: 1;
    grid-row: auto;
  }
}

.offer-footer .action-row {
  margin-left: auto;
}

.offer-footer .action-row .button {
  margin-left: 0;
}

/* Custom date picker and duty time range. */

.date-picker-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}

.date-picker-field > input {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 2.15rem;
}

.date-picker-trigger {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}

.date-picker-trigger {
  right: 0.28rem;
}

.date-picker-trigger:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.date-picker-field.is-open .date-picker-trigger {
  background: var(--brand-soft);
  color: var(--brand);
}

.date-picker-trigger-icon {
  display: inline-flex;
}

.date-picker-popover {
  position: fixed;
  z-index: 200;
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 24px 60px -28px rgba(7, 35, 48, 0.5), 0 2px 8px rgba(7, 35, 48, 0.08);
  animation: date-picker-in 160ms var(--ease);
}

@keyframes date-picker-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.99);
  }
}

.date-picker-header {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.date-picker-selects {
  display: flex;
  flex: 1;
  justify-content: center;
  gap: 0.2rem;
  min-width: 0;
}

.date-picker-select {
  width: auto;
  min-height: auto;
  padding: 0.25rem 0.2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ink);
  appearance: auto;
}

.date-picker-select:hover {
  border: 0;
  background: var(--surface-2);
}

.date-picker-select:focus {
  border: 0;
  box-shadow: 0 0 0 2px var(--focus);
}

.date-picker-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}

.date-picker-nav:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.date-picker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.15rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.15rem;
}

.date-picker-blank {
  aspect-ratio: 1;
}

.date-picker-day {
  aspect-ratio: 1;
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 140ms var(--ease), color 140ms var(--ease);
}

.date-picker-day:hover {
  background: var(--surface-2);
}

.date-picker-day.is-today {
  box-shadow: inset 0 0 0 1px var(--gold);
}

.date-picker-day.is-selected {
  background: var(--brand);
  color: #fff;
  box-shadow: none;
  font-weight: 700;
}

.date-picker-day:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.date-picker-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
}

.date-picker-footer .text-button {
  font-size: 0.74rem;
}

/* Duty check-in / check-out time range. */

.time-range-field {
  display: grid;
  gap: 0.35rem;
}

.time-range-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.time-range-row label {
  flex: 1 1 7rem;
  min-width: 0;
}

.time-range-row input[type="time"] {
  min-height: 2.55rem;
}

.time-range-sep {
  padding-bottom: 0.72rem;
  color: var(--muted);
  font-weight: 650;
}

.time-range-clear {
  position: relative;
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.55rem;
  height: 2.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 1.15rem;
  cursor: pointer;
}

.time-range-clear:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.offer-edit-form {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

@media (min-width: 640px) {
  .offer-edit-form .field-grid .date-field {
    grid-column: span 2;
  }
}

.offer-edit-form .button.danger {
  margin-left: auto;
}

.is-highlighted {
  animation: telegram-highlight 1.3s ease 2;
}

@keyframes telegram-highlight {
  0%,
  100% {
    box-shadow: var(--shadow-sm);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(165, 121, 26, 0.35), var(--shadow);
  }
}

/* Scroll-aware floating navigation. */

.tabs-sentinel {
  height: 1px;
  margin-bottom: -1px;
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.tab-icon,
.tab-icon svg {
  display: inline-flex;
  flex: 0 0 auto;
}

.tab-icon svg {
  width: 17px;
  height: 17px;
}

body.nav-bottom .tabs {
  position: fixed;
  top: auto;
  bottom: max(0.85rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  margin: 0;
  padding: 0.32rem;
  border-radius: 18px;
  z-index: 70;
  background: rgba(255, 253, 248, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 18px 40px -18px rgba(7, 35, 48, 0.4);
  backdrop-filter: blur(16px);
  animation: nav-pop 220ms var(--ease);
}

body.nav-bottom .tab {
  flex: 0 0 auto;
  min-width: 0;
  width: 3.15rem;
  height: 2.9rem;
  padding: 0;
  border-radius: 14px;
}

body.nav-bottom .tab-label {
  display: none;
}

body.nav-bottom .tab-icon svg {
  width: 21px;
  height: 21px;
}

body.nav-bottom #main {
  padding-top: var(--tabs-flow, 4rem);
}

body.nav-bottom .app-shell {
  padding-bottom: 6.5rem;
}

@keyframes nav-pop {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.nav-bottom .tabs {
    animation: none;
  }
}

/* Theme toggle icons. */
.theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-icon svg {
  width: 18px;
  height: 18px;
}
html:not([data-theme="dark"]) .theme-icon-sun {
  display: none;
}
html[data-theme="dark"] .theme-icon-moon {
  display: none;
}
.theme-toggle-login {
  position: absolute;
  z-index: 3;
  top: 0.85rem;
  right: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.65);
  color: var(--ink-2);
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.theme-toggle-login:hover {
  background: var(--surface);
  color: var(--ink);
}

/* Dark mode: deep twilight navy with warm ivory text and gold accents. */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ece6da;
  --ink-2: #c9d1d7;
  --muted: #9fadb8;
  --line: #273a46;
  --line-strong: #354a58;
  --paper: #0b141b;
  --paper-2: #101d26;
  --surface: #13222d;
  --surface-2: #182a36;
  --brand: #8fdce6;
  --brand-2: #5ec0cc;
  --brand-3: #8fdce6;
  --brand-soft: #12313a;
  --brand-ink: #071018;
  --amber: #e3b86a;
  --amber-soft: #2b2414;
  --danger: #f19a9a;
  --danger-soft: #3a1e1e;
  --ok: #8ad9ad;
  --ok-soft: #163121;
  --gold: #d8b45a;
  --gold-soft: #2a2414;
  --gold-ink: #e8c87a;
  --focus: rgba(143, 220, 230, 0.55);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -28px rgba(0, 0, 0, 0.85);
  --shadow-lift: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 28px 60px -30px rgba(0, 0, 0, 0.95);
}

html[data-theme="dark"] body {
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 64rem 30rem at 50% -10rem, rgba(47, 147, 164, 0.18), transparent 70%),
    radial-gradient(circle at 88% 2%, rgba(216, 180, 90, 0.1), transparent 30%),
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size:
    100% 100%,
    100% 100%,
    56px 56px,
    56px 56px;
}

html[data-theme="dark"] .theme-toggle-login {
  background: rgba(19, 34, 45, 0.7);
}

html[data-theme="dark"] .tabs {
  background: rgba(19, 34, 45, 0.86);
  border-color: var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 36px -30px rgba(0, 0, 0, 0.9);
}

html[data-theme="dark"] body.nav-bottom .tabs {
  background: rgba(19, 34, 45, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 40px -18px rgba(0, 0, 0, 0.8);
}

html[data-theme="dark"] .tab:hover {
  background: var(--surface-2);
  color: var(--ink);
}

html[data-theme="dark"] .tab[aria-current="page"] {
  background: linear-gradient(180deg, #8fdce6, #5ec0cc);
  color: #06181f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 10px 20px -12px rgba(0, 0, 0, 0.8);
}

html[data-theme="dark"] .tab[aria-current="page"] .tab-icon {
  color: #06181f;
}

html[data-theme="dark"] .button.primary {
  background: linear-gradient(180deg, #8fdce6, #5ec0cc);
  color: #06181f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 12px 24px -14px rgba(0, 0, 0, 0.8);
}

html[data-theme="dark"] .button.primary:hover {
  background: linear-gradient(180deg, #a6e6ee, #6fcdd8);
}

html[data-theme="dark"] .button.secondary {
  background: var(--brand-soft);
  border-color: var(--line-strong);
  color: var(--brand-2);
}

html[data-theme="dark"] .button.secondary:hover {
  background: #173b45;
}

html[data-theme="dark"] .button.ghost {
  background: rgba(19, 34, 45, 0.7);
  border-color: var(--line);
  color: var(--ink-2);
}

html[data-theme="dark"] .button.ghost:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--ink);
}

html[data-theme="dark"] .button.danger {
  background: var(--danger-soft);
  border-color: #5a2b2b;
  color: var(--danger);
}

html[data-theme="dark"] .user-chip {
  background: rgba(19, 34, 45, 0.8);
  border-color: var(--line);
  color: var(--ink-2);
}

html[data-theme="dark"] .skip-link {
  background: var(--brand-ink);
  color: var(--brand-3);
}

html[data-theme="dark"] .install-banner {
  background: linear-gradient(90deg, #123c4a, #1a5c6b);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #0f1c25;
  border-color: var(--line-strong);
  color: var(--ink);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #7b8a95;
}

html[data-theme="dark"] input:hover,
html[data-theme="dark"] select:hover,
html[data-theme="dark"] textarea:hover {
  border-color: #47606f;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  border-color: var(--brand-3);
  box-shadow: 0 0 0 3px rgba(143, 220, 230, 0.18);
}

html[data-theme="dark"] .offer-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .admin-block,
html[data-theme="dark"] .upload-card,
html[data-theme="dark"] .roster-card,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .traffic-panel {
  background: linear-gradient(180deg, #162733, #13222d);
  border-color: var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 22px 46px -36px rgba(0, 0, 0, 0.9);
}

html[data-theme="dark"] .offer-card:hover {
  border-color: #3c5563;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 3px 7px rgba(0, 0, 0, 0.3),
    0 32px 58px -36px rgba(0, 0, 0, 0.95);
}

html[data-theme="dark"] .offer-card::after {
  background: radial-gradient(120% 80% at 100% 0%, rgba(216, 180, 90, 0.08), transparent 46%);
}

html[data-theme="dark"] .stat-card {
  background: linear-gradient(180deg, #172a36, #14242f);
  border-color: var(--line);
}

html[data-theme="dark"] .traffic-metric {
  background: var(--surface-2);
  border-color: var(--line);
}

html[data-theme="dark"] .stat-card strong,
html[data-theme="dark"] .traffic-metric strong {
  color: var(--brand);
}

html[data-theme="dark"] .empty-state {
  border-color: var(--line-strong);
  background: rgba(19, 34, 45, 0.6);
  color: var(--muted);
}

html[data-theme="dark"] .empty-state strong {
  color: var(--ink);
}

html[data-theme="dark"] .notice {
  background: linear-gradient(180deg, #122a2e, #10252a);
  color: var(--ink-2);
  border-color: var(--line);
  border-left-color: var(--brand-3);
}

html[data-theme="dark"] .help-panel {
  background: rgba(19, 34, 45, 0.65);
  border-color: var(--line);
  color: var(--ink-2);
}

html[data-theme="dark"] .filters {
  background: var(--surface);
  border-color: var(--line);
}

html[data-theme="dark"] .badge {
  background: var(--surface-2);
  color: var(--ink-2);
  border-color: var(--line);
}

html[data-theme="dark"] .badge.neutral {
  background: var(--surface-2);
  color: var(--ink-2);
}

html[data-theme="dark"] .badge.fit {
  background: var(--ok-soft);
  color: var(--ok);
}

html[data-theme="dark"] .badge.possible,
html[data-theme="dark"] .badge.expiring {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: #5d4a24;
}

html[data-theme="dark"] .badge.conflict {
  background: var(--danger-soft);
  color: var(--danger);
}

html[data-theme="dark"] .badge.compensation {
  background: linear-gradient(135deg, #3a2f14, #2a2414);
  border-color: #6b5522;
  color: var(--gold-ink);
}

html[data-theme="dark"] .match-box {
  background: var(--surface-2);
  border-color: var(--line);
}

html[data-theme="dark"] .match-box .reason {
  color: var(--ink-2);
}

html[data-theme="dark"] .duty-row.uncertain {
  border-color: #6b5522;
  background: #1f1b10;
}

html[data-theme="dark"] .duty-row.selected {
  border-color: #2f6b76;
  background: #10262c;
}

html[data-theme="dark"] .calendar-day:hover {
  background: var(--surface);
}

html[data-theme="dark"] .calendar-duty {
  background: rgba(143, 220, 230, 0.16);
  color: #bceef4;
}

html[data-theme="dark"] .calendar-duty.off {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5dc;
}

html[data-theme="dark"] .calendar-duty.training {
  background: rgba(167, 139, 250, 0.18);
  color: #d6c9ff;
}

html[data-theme="dark"] .calendar-duty.sim {
  background: rgba(251, 191, 36, 0.18);
  color: #ffd98a;
}

html[data-theme="dark"] .calendar-duty.office {
  background: rgba(96, 165, 250, 0.18);
  color: #bcd8ff;
}

html[data-theme="dark"] .calendar-duty.sby {
  background: rgba(251, 146, 60, 0.18);
  color: #ffc69a;
}

html[data-theme="dark"] .layoverloop-banner {
  background:
    radial-gradient(circle at 93% 8%, rgba(216, 180, 90, 0.14), transparent 34%),
    linear-gradient(135deg, #1a1a12, #141d24);
  border-color: #4a3f22;
  border-left-color: var(--gold);
}

html[data-theme="dark"] .layoverloop-headline,
html[data-theme="dark"] .layoverloop-banner .layoverloop-logo {
  color: var(--ink);
}

html[data-theme="dark"] .layoverloop-copy {
  color: var(--ink-2);
}

html[data-theme="dark"] .layoverloop-meta {
  color: var(--gold-ink);
}

html[data-theme="dark"] .layoverloop-cta {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1205;
}

html[data-theme="dark"] .layoverloop-banner:hover .layoverloop-cta {
  background: #e6c472;
  border-color: #e6c472;
}

html[data-theme="dark"] .layoverloop-dismiss {
  background: rgba(19, 34, 45, 0.8);
  border-color: #4a3f22;
  color: var(--gold-ink);
}

html[data-theme="dark"] .login-card::after {
  color: rgba(255, 255, 255, 0.035);
}

html[data-theme="dark"] .login-card::before {
  background: linear-gradient(90deg, var(--brand-3), var(--gold));
}

html[data-theme="dark"] .secret-panel {
  background: var(--gold-soft);
  border-color: #5a4a24;
  color: var(--gold-ink);
}

html[data-theme="dark"] .file-field {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

html[data-theme="dark"] .file-field:hover {
  background: #1b3040;
}

html[data-theme="dark"] .uncertain-fields input,
html[data-theme="dark"] .uncertain-fields select {
  border-color: #6b5522;
  background: #1f1b10;
}

html[data-theme="dark"] .image-frame,
html[data-theme="dark"] .review-visual img,
html[data-theme="dark"] .review-empty {
  background: var(--surface-2);
}

html[data-theme="dark"] .progress-track,
html[data-theme="dark"] .signup-bar-track {
  background: var(--surface-2);
}

html[data-theme="dark"] .stats-table tbody tr:hover {
  background: rgba(143, 220, 230, 0.05);
}

html[data-theme="dark"] .stats-table tr.selected-user {
  background: rgba(143, 220, 230, 0.09);
}

html[data-theme="dark"] .offer-edit-form {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

html[data-theme="dark"] .count-chip {
  border-color: var(--line-strong);
}

html[data-theme="dark"] .date-picker-day.is-selected {
  background: linear-gradient(180deg, #8fdce6, #5ec0cc);
  color: #06181f;
}

html[data-theme="dark"] .date-picker-day.is-today {
  box-shadow: inset 0 0 0 1px var(--gold);
}

/* A clear, solid destructive action in the offer editor. */
.offer-edit-form .button.danger {
  background: #b23b3b;
  border-color: #b23b3b;
  color: #fff;
}
.offer-edit-form .button.danger:hover {
  background: #9c3030;
  border-color: #9c3030;
}
html[data-theme="dark"] .offer-edit-form .button.danger {
  background: #c14a4a;
  border-color: #c14a4a;
  color: #fff;
}

/* Date range preview inside the calendar. */
.date-picker-day.is-in-range {
  background: rgba(47, 147, 164, 0.14);
  color: var(--ink);
}

.date-picker-day.is-range-anchor {
  background: var(--gold-soft);
  color: var(--gold-ink);
  box-shadow: inset 0 0 0 2px var(--gold);
  font-weight: 700;
}

html[data-theme="dark"] .date-picker-day.is-in-range {
  background: rgba(143, 220, 230, 0.14);
}

html[data-theme="dark"] .date-picker-day.is-range-anchor {
  background: #2a2414;
  color: var(--gold-ink);
  box-shadow: inset 0 0 0 2px var(--gold);
}

/* GSAP takes over these animations when loaded. */
html.gsap-motion .view,
html.gsap-motion .toast,
html.gsap-motion body.nav-bottom .tabs {
  animation: none;
}

.date-picker-day.is-range-end {
  background: rgba(47, 147, 164, 0.26);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--brand-3);
}

html[data-theme="dark"] .date-picker-day.is-range-end {
  background: rgba(143, 220, 230, 0.26);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--brand-3);
}

/* Freeze period warning. */
.freeze-slot {
  margin-bottom: 1rem;
}

.freeze-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  color: #f4fbff;
  border: 1px solid rgba(167, 226, 255, 0.5);
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 255, 255, 0.2), transparent 24%),
    radial-gradient(circle at 8% 92%, rgba(124, 219, 255, 0.22), transparent 34%),
    linear-gradient(135deg, #073a63 0%, #0a5a8c 46%, #0e78b2 100%);
  box-shadow:
    0 24px 60px -32px rgba(3, 37, 65, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.freeze-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 80% 10%, #000, transparent 72%);
  mask-image: radial-gradient(circle at 80% 10%, #000, transparent 72%);
  opacity: 0.6;
}

.freeze-card::after {
  content: "❄";
  position: absolute;
  right: -0.4rem;
  bottom: -3rem;
  font-size: 12rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.06);
  pointer-events: none;
  transform: rotate(-12deg);
}

.freeze-flakes {
  position: relative;
  z-index: 1;
  order: 2;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-right: 0.4rem;
}

.freeze-flake {
  display: inline-flex;
  color: rgba(220, 246, 255, 0.9);
}

.freeze-flake svg {
  width: 34px;
  height: 34px;
}

.freeze-flake-1 {
  animation: freeze-spin 26s linear infinite;
}

.freeze-flake-2 {
  animation: freeze-float 6s ease-in-out infinite;
  color: rgba(255, 255, 255, 0.72);
}

.freeze-flake-3 {
  animation: freeze-spin-reverse 34s linear infinite;
  color: rgba(190, 239, 255, 0.8);
}

.freeze-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.42rem;
  min-width: 0;
}

.freeze-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.64rem;
  font-weight: 700;
  color: #bdeaff;
}

.freeze-badge,
.freeze-status-pill {
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  border: 1px solid rgba(184, 235, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  color: #e9f9ff;
}

.freeze-status-pill {
  background: rgba(4, 39, 67, 0.35);
  color: #bdeaff;
}

.freeze-title {
  margin: 0.15rem 0 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.freeze-copy {
  margin: 0;
  color: #dcf4ff;
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 68ch;
}

.freeze-copy strong {
  color: #fff;
}

.freeze-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.freeze-meta span {
  font-size: 0.7rem;
  font-weight: 600;
  color: #d7f2ff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(185, 235, 255, 0.22);
  border-radius: 999px;
  padding: 0.26rem 0.58rem;
}

.freeze-detector {
  margin: 0.25rem 0 0;
  color: #b9dff2;
  font-size: 0.68rem;
  line-height: 1.4;
}

.freeze-preview-note {
  margin: 0.25rem 0 0;
  color: #9fd6ee;
  font-size: 0.68rem;
  font-style: italic;
}

.freeze-card--preview {
  border-style: dashed;
}

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

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

@keyframes freeze-float {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-5px) rotate(4deg);
  }
}

html[data-theme="dark"] .freeze-card {
  background:
    radial-gradient(circle at 88% 16%, rgba(143, 220, 230, 0.18), transparent 26%),
    radial-gradient(circle at 8% 92%, rgba(90, 190, 230, 0.16), transparent 34%),
    linear-gradient(135deg, #062b49 0%, #083f63 48%, #0a557d 100%);
  border-color: rgba(143, 220, 230, 0.4);
  box-shadow:
    0 24px 60px -32px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

@media (max-width: 720px) {
  .freeze-card {
    grid-template-columns: 1fr;
  }

  .freeze-flakes {
    order: -1;
    justify-self: start;
  }

  .freeze-flake svg {
    width: 26px;
    height: 26px;
  }

  .freeze-title {
    font-size: 1.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .freeze-flake {
    animation: none !important;
  }
}

/* Referral hierarchy tree. */
.referral-panel {
  margin-top: 1rem;
}

.referral-tree {
  margin-top: 0.8rem;
  overflow-x: auto;
  padding: 0.2rem 0.1rem 0.5rem;
}

.referral-tree-root,
.referral-children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.referral-tree-root {
  display: grid;
  gap: 0.6rem;
  min-width: min-content;
}

.referral-tree-node {
  position: relative;
}

.referral-person {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 21rem;
  max-width: 42rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.referral-person:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.referral-person.is-admin {
  border-color: #d9c28a;
  box-shadow:
    inset 3px 0 0 var(--gold),
    var(--shadow-sm);
}

.referral-person.is-inactive {
  opacity: 0.68;
}

.referral-avatar {
  width: 2.7rem;
  height: 2.7rem;
  flex: 0 0 auto;
  border-radius: 50%;
}

.referral-avatar svg {
  display: block;
  width: 100%;
  height: 100%;
}

.referral-avatar.is-admin {
  box-shadow:
    0 0 0 2px var(--gold),
    0 0 0 4px rgba(216, 180, 90, 0.16);
}

.referral-identity {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.18rem;
}

.referral-name-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.referral-name-row strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.referral-username {
  color: var(--muted);
  font-size: 0.68rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.referral-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  color: var(--muted);
  font-size: 0.67rem;
  font-variant-numeric: tabular-nums;
}

.referral-invite {
  margin: 0;
  color: var(--brand-2);
  font-size: 0.67rem;
}

.referral-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.3rem;
  max-width: 9rem;
}

.referral-badges .badge {
  padding: 0.14rem 0.42rem;
  font-size: 0.6rem;
}

.referral-summary {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  cursor: pointer;
  list-style: none;
}

.referral-summary::-webkit-details-marker {
  display: none;
}

.referral-summary .referral-person {
  flex: 1;
}

.referral-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  margin-top: 0.8rem;
  color: var(--muted);
  transition: transform 160ms var(--ease);
}

.referral-chevron svg {
  width: 16px;
  height: 16px;
}

.referral-branch[open] > .referral-summary .referral-chevron {
  transform: rotate(90deg);
}

.referral-children {
  display: grid;
  gap: 0.55rem;
  margin: 0.5rem 0 0 1.55rem;
  padding-left: 1.15rem;
  border-left: 1px solid var(--line);
}

.referral-children > li {
  position: relative;
}

.referral-children > li::before {
  content: "";
  position: absolute;
  left: -1.15rem;
  top: 1.55rem;
  width: 0.95rem;
  height: 1px;
  background: var(--line);
}

@media (max-width: 620px) {
  .referral-tree {
    overflow-x: visible;
  }

  .referral-person {
    min-width: 0;
    width: 100%;
    flex-wrap: wrap;
  }

  .referral-avatar {
    width: 2.4rem;
    height: 2.4rem;
  }

  .referral-badges {
    justify-content: flex-start;
    max-width: none;
  }

  .referral-children {
    margin-left: 0.9rem;
    padding-left: 0.85rem;
  }

  .referral-children > li::before {
    left: -0.85rem;
    width: 0.7rem;
  }
}

.referral-row {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.referral-row .referral-person {
  flex: 1;
}

.referral-chevron-placeholder {
  visibility: hidden;
}

/* Pyramidal referral tree layout. */
.referral-tree-root,
.referral-children {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.referral-tree-root {
  min-width: min-content;
}

.referral-tree-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.referral-tree-root > .referral-tree-node {
  padding-top: 0;
}

.referral-tree-root > .referral-tree-node::before {
  display: none;
}

.referral-node-wrap {
  position: relative;
  z-index: 1;
}

.referral-tree-node.has-children > .referral-node-wrap::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: 1.6rem;
  background: var(--line);
}

.referral-children {
  position: relative;
  margin: 1.6rem 0 0;
  padding: 0;
  border-left: 0;
}

.referral-children::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--bus-left, 0);
  width: var(--bus-width, 100%);
  height: 1px;
  background: var(--line);
}

.referral-children > .referral-tree-node {
  padding-top: 1.6rem;
}

.referral-children > .referral-tree-node::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 1.6rem;
  background: var(--line);
}

.referral-tree-node.is-collapsed > .referral-children {
  display: none;
}

.referral-children > li::before {
  content: none;
}

.referral-person {
  min-width: 18rem;
  max-width: 24rem;
}

.referral-toggle {
  position: absolute;
  right: -0.55rem;
  bottom: -0.55rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition:
    background 160ms var(--ease),
    color 160ms var(--ease),
    border-color 160ms var(--ease);
}

.referral-toggle:hover {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line-strong);
}

.referral-toggle svg {
  width: 14px;
  height: 14px;
  transform: rotate(90deg);
  transition: transform 180ms var(--ease);
}

.referral-toggle[aria-expanded="false"] svg {
  transform: rotate(0deg);
}

@media (max-width: 620px) {
  .referral-tree {
    overflow-x: auto;
  }

  .referral-tree-root,
  .referral-children {
    gap: 0.8rem;
  }

  .referral-person {
    min-width: 16rem;
    max-width: 20rem;
    width: auto;
  }
}


/* Review date fields use the same DD/MM/YYYY picker. */
.review-fields .field-grid .date-field {
  grid-column: span 2;
}

@media (max-width: 620px) {
  .review-fields .field-grid .date-field {
    grid-column: 1 / -1;
  }
}

.referral-person {
  width: 18rem;
  min-width: 18rem;
  max-width: 18rem;
  align-items: flex-start;
}

.referral-badges {
  justify-content: flex-start;
  max-width: none;
  margin-top: 0.25rem;
}

@media (max-width: 620px) {
  .referral-person {
    width: 16rem;
    min-width: 16rem;
    max-width: 16rem;
  }
}

/* Compact pyramid cards so the full generation row fits. */
.referral-person {
  width: 13rem;
  min-width: 13rem;
  max-width: 13rem;
  padding: 0.5rem 0.55rem;
  gap: 0.5rem;
}

.referral-avatar {
  width: 2.2rem;
  height: 2.2rem;
}

.referral-name-row strong {
  font-size: 0.8rem;
}

.referral-meta {
  gap: 0.3rem 0.4rem;
  font-size: 0.6rem;
}

.referral-invite {
  font-size: 0.6rem;
}

.referral-badges .badge {
  padding: 0.1rem 0.34rem;
  font-size: 0.52rem;
}

@media (max-width: 620px) {
  .referral-person {
    width: 13rem;
    min-width: 13rem;
    max-width: 13rem;
  }
}

/* Global async feedback: floating progress modal, button spinner, top activity line. */
.global-activity {
  position: fixed;
  inset: 0 0 auto;
  z-index: 400;
  height: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms var(--ease);
  overflow: hidden;
}

.global-activity.is-active {
  opacity: 1;
}

.global-activity span {
  display: block;
  width: 34%;
  height: 100%;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(90deg, var(--brand-3), var(--gold));
  animation: activity-run 1.2s ease-in-out infinite;
}

@keyframes activity-run {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(310%);
  }
}

.button-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.45rem;
  vertical-align: -0.14em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: button-spin 0.8s linear infinite;
}

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

.busy-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(6, 20, 29, 0.46);
  backdrop-filter: blur(10px);
}

.busy-backdrop[hidden] {
  display: none;
}

.busy-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1.1rem;
  align-items: center;
  width: min(28rem, 100%);
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 0%, rgba(47, 147, 164, 0.12), transparent 36%),
    linear-gradient(180deg, #fffefa, var(--surface));
  box-shadow:
    0 34px 80px -40px rgba(7, 35, 48, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.busy-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 51, 69, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 51, 69, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(circle at 90% 10%, #000, transparent 68%);
  mask-image: radial-gradient(circle at 90% 10%, #000, transparent 68%);
}

.busy-ring {
  position: relative;
  z-index: 1;
  width: 7rem;
  height: 7rem;
  display: grid;
  place-items: center;
}

.busy-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.busy-track {
  fill: none;
  stroke: var(--line);
  stroke-width: 8;
}

.busy-value {
  fill: none;
  stroke: url(#busyGradient);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 314.16;
  stroke-dashoffset: calc(314.16 - (314.16 * var(--progress, 0) / 100));
  transition: stroke-dashoffset 350ms var(--ease);
}

.busy-ring.is-indeterminate svg {
  animation: busy-spin 1.15s linear infinite;
}

.busy-ring.is-indeterminate .busy-value {
  stroke-dasharray: 78 236;
}

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

.busy-percent {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.busy-percent[hidden],
.busy-check,
.busy-alert {
  display: none;
}

.busy-check,
.busy-alert {
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  color: var(--ok);
}

.busy-check svg {
  width: 2.3rem;
  height: 2.3rem;
}

.busy-alert {
  color: var(--danger);
}

.busy-alert svg {
  width: 2.2rem;
  height: 2.2rem;
}

.busy-card.is-success .busy-check {
  display: inline-flex;
}

.busy-card.is-success .busy-percent,
.busy-card.is-success .busy-alert {
  display: none;
}

.busy-card.is-error .busy-alert {
  display: inline-flex;
}

.busy-card.is-error .busy-percent,
.busy-card.is-error .busy-check {
  display: none;
}

.busy-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}

.busy-copy h3 {
  margin: 0.1rem 0 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.1;
  color: var(--ink);
}

.busy-message {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.86rem;
  line-height: 1.5;
}

.busy-detail {
  margin: 0;
}

.busy-actions {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

html[data-theme="dark"] .busy-card {
  background:
    radial-gradient(circle at 8% 0%, rgba(143, 220, 230, 0.1), transparent 36%),
    linear-gradient(180deg, #162733, #13222d);
  border-color: var(--line);
  box-shadow:
    0 34px 80px -40px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .busy-card::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
}

html[data-theme="dark"] .busy-ring .busy-track {
  stroke: var(--line-strong);
}

@media (max-width: 520px) {
  .busy-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .busy-copy {
    justify-items: center;
  }

  .busy-actions {
    justify-content: center;
  }
}

/* Optional biometrics step shown after account creation. */
.biometric-signup {
  width: min(30rem, 100%);
  max-width: 30rem;
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  padding: 1.5rem;
  text-align: center;
}

.biometric-signup-icon {
  display: grid;
  place-items: center;
  width: 4.8rem;
  height: 4.8rem;
  margin-bottom: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--brand-2);
  background: radial-gradient(circle at 50% 35%, var(--brand-soft), var(--surface-2));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 18px 34px -28px rgba(7, 35, 48, 0.5);
}

.biometric-signup-icon svg {
  width: 2.4rem;
  height: 2.4rem;
}

.biometric-signup h2 {
  margin: 0.1rem 0 0.2rem;
}

.biometric-signup .muted {
  max-width: 27rem;
}

.biometric-actions {
  justify-content: center;
  margin-top: 0.4rem;
}

.biometric-signup.is-success .biometric-signup-icon {
  color: var(--ok);
  background: radial-gradient(circle at 50% 35%, var(--ok-soft), var(--surface-2));
}

html[data-theme="dark"] .biometric-signup-icon {
  background: radial-gradient(circle at 50% 35%, var(--brand-soft), var(--surface-2));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 34px -28px rgba(0, 0, 0, 0.8);
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.brand-name span {
  display: block;
}
