/* Fairlead Proxy — design system */

:root {
  --navy-950: #10140f;
  --navy-900: #171d18;
  --navy-800: #28322a;
  --ink: #171d18;
  --text: #3f4a42;
  --muted: #6b766d;
  --line: #e5e0d3;
  --line-strong: #d3cbb9;
  --surface: #f6f3ea;
  --surface-2: #eee9dc;
  --blue: #1f5c4a;
  --blue-dark: #174536;
  --blue-deep: #12241d;
  --blue-soft: #e9efe9;
  --blue-ring: rgba(31, 92, 74, 0.24);
  --green: #256b4f;
  --green-soft: #e6efe7;
  --amber: #8a5a12;
  --amber-soft: #f7eeda;
  --red: #a33a2a;
  --red-soft: #f6e5e0;
  --teal: #2c5f6b;
  --teal-soft: #e5edee;
  --white: #ffffff;
  --shadow-sm: 0 1px 0 rgba(23, 29, 24, 0.04);
  --shadow-md: 0 1px 2px rgba(23, 29, 24, 0.05), 0 14px 30px -26px rgba(23, 29, 24, 0.4);
  --shadow-lg: 0 1px 2px rgba(23, 29, 24, 0.06), 0 26px 50px -40px rgba(23, 29, 24, 0.45);
  --radius-sm: 5px;
  --radius-md: 7px;
  --radius-lg: 9px;
  --radius-xl: 12px;
  --font: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --display: "Palatino Linotype", "Iowan Old Style", "Book Antiqua", Palatino, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --container: 1160px;
  --container-wide: 1240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: #fffdf7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { transition: none !important; animation: none !important; }
}

h1, h2, h3, h4, h5, h6, p, ul, ol, dl, figure, blockquote {
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0;
}

h4, h5, h6 {
  font-family: var(--font);
  font-weight: 700;
}

ul, ol {
  list-style: none;
  padding: 0;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

button {
  cursor: pointer;
}

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

::selection {
  background: rgba(31, 92, 74, 0.16);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--navy-900);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
  text-decoration: none;
}

.container,
.container-wide {
  width: 100%;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.container { max-width: var(--container); }
.container-wide { max-width: var(--container-wide); }

.page-narrow { max-width: 1000px; }
.page-medium { max-width: 1120px; }
.page-tiny { max-width: 640px; }

.page-admin {
  padding-top: 30px;
  padding-bottom: 64px;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 0.94em; }
.nowrap { white-space: nowrap; }

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
}

.text-link .icon { width: 15px; height: 15px; }

.tag {
  display: inline-block;
  background: var(--surface-2);
  color: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-family: var(--mono);
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--ink);
  word-break: break-word;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover { text-decoration: none; }

.btn .icon { width: 17px; height: 17px; }

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

.btn.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: none;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: fairlead-spin 0.7s linear infinite;
}

.btn--primary {
  background: var(--blue);
  color: #fff;
}

.btn--primary:hover {
  background: var(--blue-dark);
}

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

.btn--secondary:hover {
  border-color: var(--ink);
  background: transparent;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: transparent;
}

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

.btn--danger {
  background: var(--red);
  color: #fff;
}

.btn--danger:hover {
  background: #981b12;
}

.btn--danger-text {
  color: var(--red);
}

.btn--admin-primary {
  background: var(--blue);
  color: #fff;
}

.btn--admin-primary:hover {
  background: var(--blue-dark);
}

.btn--admin-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.btn--admin-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn--sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn--xs { min-height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 5px; }
.btn--lg { min-height: 50px; padding: 0 26px; font-size: 15.5px; }
.btn--block { width: 100%; }

.btn.is-disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

.inline-form { display: inline-flex; margin: 0; }

/* ---------- Brand & header ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.brand:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
}

.brand-mark svg { width: 32px; height: 32px; }

.brand-text { display: inline-flex; align-items: center; }

.brand-tag {
  margin-left: 9px;
  padding-left: 9px;
  border-left: 1px solid var(--line-strong);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand--light { color: #f7f3e8; }
.brand--light .brand-tag {
  color: rgba(247, 243, 232, 0.6);
  border-left-color: rgba(247, 243, 232, 0.28);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 253, 247, 0.97);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
  backdrop-filter: blur(10px) saturate(1.08);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
}

.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a.is-active { color: var(--blue); }
.site-nav .nav-cta { margin-left: 6px; }
.site-nav a.nav-cta,
.site-nav a.nav-cta:hover { color: #fff; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.account-user {
  position: relative;
  display: flex;
  align-items: center;
  flex: none;
}

.account-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  list-style: none;
}

.account-toggle::-webkit-details-marker { display: none; }
.account-toggle > .icon {
  width: 12px;
  height: 12px;
  color: var(--muted);
  transition: transform 150ms ease, color 120ms ease;
}
.account-toggle:hover > .icon { color: var(--ink); }
.account-user[open] .account-toggle > .icon { transform: rotate(180deg); color: var(--ink); }

.account-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: #f7f3e8;
  font-size: 13px;
  font-weight: 600;
  transition: background-color 120ms ease, box-shadow 120ms ease;
}

.account-toggle:hover .account-avatar { background: var(--blue-dark); }
.account-user[open] .account-avatar {
  background: var(--blue-dark);
  box-shadow: 0 0 0 3px var(--blue-ring);
}

.account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 70;
  min-width: 248px;
  padding: 6px;
  background: #fffdf7;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.account-menu-id {
  padding: 7px 10px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.account-menu-id strong {
  display: block;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-id span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu a,
.account-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}

.account-menu a:hover,
.account-menu button:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
.account-menu .icon { width: 14px; height: 14px; opacity: 0.7; }
.account-menu form { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 58px 0 68px;
  background: var(--surface) url("/img/hero-routes.png") right -30px center / cover no-repeat;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    96deg,
    rgba(246, 243, 234, 0.96) 0%,
    rgba(246, 243, 234, 0.84) 34%,
    rgba(246, 243, 234, 0.28) 60%,
    rgba(246, 243, 234, 0) 82%
  );
  pointer-events: none;
}

.hero > .container { position: relative; z-index: 1; }

@media (max-width: 860px) {
  .hero {
    background: var(--surface) url("/img/hero-routes.png") right -30px bottom / 135% auto no-repeat;
  }
  .hero::after {
    background: linear-gradient(
      180deg,
      rgba(246, 243, 234, 0.97) 0%,
      rgba(246, 243, 234, 0.82) 32%,
      rgba(246, 243, 234, 0.42) 62%,
      rgba(246, 243, 234, 0.25) 100%
    );
  }
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 46px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
}

.eyebrow-dot {
  width: 22px;
  height: 2px;
  background: #b0612f;
}

.eyebrow--hero {
  color: var(--muted);
  margin-bottom: 20px;
}

.eyebrow--center { justify-content: center; }

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.15rem, 7vw, 4.15rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  font-weight: 600;
  max-width: 24ch;
}

.hero h1 .accent {
  color: var(--blue-dark);
  font-style: italic;
  display: block;
}

.lede {
  font-size: 17.5px;
  line-height: 1.68;
  color: var(--muted);
  max-width: 56ch;
  margin-top: 20px;
}

.lede--center { margin-left: auto; margin-right: auto; text-align: center; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.trust-row li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
}

.trust-row .icon {
  width: 15px;
  height: 15px;
  color: var(--blue);
}

.hero-visual {
  position: relative;
  padding: 0;
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
}

.stock-preview {
  background: #fffdf8;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 20px 40px -34px rgba(23, 29, 24, 0.4);
}

.preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.preview-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.stock-list {
  display: grid;
  margin: 0 0 16px;
}

.stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.stock-row:last-child { border-bottom: 0; }

.stock-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.stock-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.stock-spec { font-size: 11.5px; color: var(--muted); }

.stock-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  text-align: right;
  flex: none;
}

.stock-price {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.stock-side .pill { font-size: 10px; }

.stock-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.preview-caption {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 14px;
  font-style: italic;
}

/* ---------- Sections ---------- */

.section { padding: 72px 0; }
.section--alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head { max-width: 700px; margin-bottom: 38px; }

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.65rem, 3.4vw, 2.3rem);
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-weight: 600;
}

.section-sub {
  font-size: 15.5px;
  color: var(--muted);
  margin-top: 14px;
  max-width: 62ch;
}

/* ---------- Plans ---------- */

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

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fffdf8;
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 24px;
  box-shadow: none;
  transition: border-color 0.15s ease;
}

.plan-card:hover {
  border-color: var(--blue-dark);
}

.plan-head h3 {
  font-family: var(--display);
  font-size: 1.32rem;
  color: var(--ink);
  letter-spacing: 0;
  font-weight: 600;
}

.plan-desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 7px;
  min-height: 42px;
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 16px;
}

.plan-price {
  font-family: var(--display);
  font-size: 2.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1;
}

.plan-per {
  font-size: 12.5px;
  color: var(--muted);
}

.plan-features {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-bottom: 18px;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 6px 0;
  font-size: 13.5px;
  color: var(--text);
}

.plan-features .icon {
  width: 15px;
  height: 15px;
  color: var(--blue);
  margin-top: 3px;
}

.plan-features strong {
  color: var(--ink);
  font-weight: 600;
}

.plan-availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  width: fit-content;
  margin-bottom: 14px;
}

.availability-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.availability--stock { color: var(--green); background: var(--green-soft); border-color: #cfe0d3; }
.availability--low { color: var(--amber); background: var(--amber-soft); border-color: #e8d6b0; }
.availability--out { color: var(--muted); background: var(--surface); border-color: var(--line); }

.plan-note {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  margin-top: 9px;
}

.plans-footnote {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 24px;
  font-size: 12.5px;
  color: var(--muted);
}

.plans-footnote .icon { width: 15px; height: 15px; color: var(--muted); margin-top: 2px; }

/* ---------- Steps ---------- */

.steps {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-strong);
}

.step {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 26px 0;
  box-shadow: none;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 4px 18px;
  align-items: start;
}

.step-num {
  grid-column: 1;
  grid-row: 1 / span 2;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  color: #b0612f;
  line-height: 1.2;
}

.step h3 {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
}

.step p {
  grid-column: 2;
  grid-row: 2;
  font-size: 13.5px;
  color: var(--muted);
  max-width: 60ch;
}

/* ---------- Notice / responsible / support ---------- */

.notice-grid {
  display: grid;
  gap: 20px;
  align-items: stretch;
}

.notice-panel {
  background: var(--blue-deep);
  border: 1px solid #21362c;
  border-radius: var(--radius-md);
  padding: 34px 30px;
  color: #e7ece4;
  position: relative;
}

.panel-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b9cdb9;
  margin-bottom: 12px;
}

.notice-panel h2 {
  font-family: var(--display);
  color: #fbf9f2;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  line-height: 1.24;
  letter-spacing: -0.005em;
  font-weight: 600;
  max-width: 24ch;
}

.notice-panel > p {
  color: #c5d2c3;
  font-size: 14.5px;
  margin-top: 14px;
  max-width: 54ch;
}

.check-list {
  margin-top: 18px;
  position: relative;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 6px 0;
  font-size: 13.5px;
  color: inherit;
}

.check-list .icon {
  width: 15px;
  height: 15px;
  margin-top: 3px;
  color: var(--blue);
}

.notice-panel .check-list .icon { color: #9dbda1; }
.check-list--plain { margin-top: 0; }
.check-list--plain li { color: var(--text); }

.security-panel {
  background: #fffdf8;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: none;
}

.security-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--blue);
  margin-bottom: 16px;
}

.security-icon .icon { width: 20px; height: 20px; }

.security-panel h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 10px;
}

.security-panel p {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 16px;
}

.responsible-grid {
  display: grid;
  gap: 26px;
  align-items: start;
}

.responsible-grid .section-head { margin-bottom: 0; }

.responsible-card {
  background: #fffdf8;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: none;
}

.responsible-card p {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 12px;
}

.support-card {
  display: grid;
  gap: 22px;
  align-items: center;
  background: #fffdf8;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: none;
}

.support-card h2 {
  font-family: var(--display);
  font-size: clamp(1.45rem, 2.9vw, 1.9rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.support-card .section-sub { font-size: 14.5px; margin-top: 10px; }

.support-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-email {
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line-strong);
  padding: 52px 0 26px;
  margin-top: 20px;
}

.footer-grid {
  display: grid;
  gap: 30px;
}

.footer-brand p {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 14px;
  max-width: 36ch;
}

.footer-col h2 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.footer-col li { margin: 8px 0; }

.footer-col a {
  color: var(--text);
  font-size: 13.5px;
}

.footer-col a:hover { color: var(--blue); }

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Cards, forms ---------- */

.card {
  background: #fffdf8;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: none;
}

.card-title {
  font-size: 1.18rem;
  color: var(--navy-900);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.card-sub {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 20px;
}

.card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.card-head-row h2 {
  font-size: 1.12rem;
  color: var(--navy-900);
}

.form-card .card-title + .alert { margin-top: 16px; }

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}

.field input,
.field select,
.field textarea,
.filters-inline select,
.search-form input {
  width: 100%;
  background: #fffdf8;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea { min-height: 92px; resize: vertical; line-height: 1.5; }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: #bfb6a1; }

.field input:focus,
.field select:focus,
.field textarea:focus,
.filters-inline select:focus,
.search-form input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-ring);
}

.field input[type="file"] {
  background: var(--surface);
  padding: 9px 11px;
  font-size: 13px;
}

.field input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  background: #fffdf8;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
  line-height: 1.5;
}

.file-status { color: var(--green); font-weight: 600; }
.file-status--error { color: var(--red); }

.form-row {
  display: grid;
  gap: 0 16px;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.55;
  cursor: pointer;
}

.checkbox input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--blue);
  flex: none;
}

.checkbox a { font-weight: 600; }

.consent-list {
  display: grid;
  gap: 12px;
  margin: 8px 0 22px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.form-footnote {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
  text-align: left;
}

.form-footnote .icon { width: 14px; height: 14px; margin-top: 2px; color: var(--muted); }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--muted); font-weight: 500; }
.breadcrumb a:hover { color: var(--blue); }

.page-head { margin-bottom: 28px; }
.page-head h1 {
  font-size: clamp(1.85rem, 4vw, 2.7rem);
  letter-spacing: -0.03em;
  color: var(--navy-900);
  line-height: 1.12;
}
.page-head .lede { margin-top: 14px; }
.page-head .muted { margin-top: 8px; font-size: 13.5px; }

/* ---------- Checkout summary ---------- */

.checkout-grid {
  display: grid;
  gap: 20px;
  align-items: start;
}

.checkout-grid > * { min-width: 0; }

.coupon-apply {
  min-height: 44px;
  padding: 0 18px;
  background: var(--surface);
  border-color: var(--line-strong);
  flex: none;
}

.coupon-apply:hover { background: var(--surface-2); border-color: var(--ink); }

.summary-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.summary-kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.summary-card h2 {
  font-size: 1.35rem;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}

.summary-desc {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 8px;
}

.summary-list { margin: 18px 0; }

.summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.summary-list dt { font-size: 13px; color: var(--muted); }
.summary-list dd { font-size: 13.5px; font-weight: 600; color: var(--ink); text-align: right; }
.summary-list .summary-discount { color: var(--green); }

.coupon-form {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fbfcfe;
}

.coupon-form label { font-size: 12px; font-weight: 600; color: var(--ink); display: block; margin-bottom: 6px; }

.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; min-width: 0; }
.coupon-note { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.coupon-note .icon { width: 13px; height: 13px; vertical-align: -2px; color: var(--green); }
.coupon-note--error { color: var(--amber); }
.coupon-note--error .icon { color: var(--amber); }

.summary-note {
  display: flex;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 13px;
  font-size: 12.5px;
  color: var(--muted);
}

.summary-note .icon { color: var(--blue); width: 17px; height: 17px; margin-top: 2px; }

/* ---------- Alerts & pills ---------- */

.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 13.5px;
  margin-bottom: 20px;
  background: var(--surface);
}

.alert p { color: inherit; margin: 0; }
.alert strong { display: block; color: inherit; font-weight: 700; }
.alert p + p { margin-top: 6px; }
.alert-icon { flex: none; margin-top: 1px; }
.alert-icon .icon { width: 19px; height: 19px; }
.alert-list { margin: 6px 0 0; padding-left: 18px; list-style: disc; }
.alert-list li { margin: 3px 0; }
.alert--compact { padding: 10px 12px; font-size: 12.5px; }

.alert--error { background: var(--red-soft); border-color: #f6d5d2; color: #8d1c13; }
.alert--warning { background: var(--amber-soft); border-color: #f8e2bd; color: #7a4700; }
.alert--success { background: var(--green-soft); border-color: #c4e9dc; color: #0b6047; }
.alert--neutral { background: var(--surface); border-color: var(--line); color: var(--text); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.pill--green { background: var(--green-soft); color: var(--green); border-color: #cfe0d3; }
.pill--blue { background: var(--blue-soft); color: var(--blue); border-color: #cfdccf; }
.pill--amber { background: var(--amber-soft); color: var(--amber); border-color: #e8d6b0; }
.pill--red { background: var(--red-soft); color: var(--red); border-color: #ead2cb; }
.pill--teal { background: var(--teal-soft); color: var(--teal); border-color: #d3e0e2; }
.pill--neutral { background: var(--surface-2); color: var(--muted); border-color: var(--line); }

/* ---------- Payment ---------- */

.payment-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 28px;
  padding-bottom: 4px;
}

.payment-progress li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.progress-dot {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 10.5px;
  font-weight: 700;
  background: #fff;
}

.payment-progress li.is-done {
  background: var(--green-soft);
  border-color: #c9e9dd;
  color: var(--green);
}

.payment-progress li.is-done .progress-dot { background: var(--green); border-color: var(--green); color: #fff; }

.payment-progress li.is-current {
  background: var(--blue-soft);
  border-color: #cfdccf;
  color: var(--blue);
  font-weight: 600;
}

.payment-progress li.is-current .progress-dot { background: var(--blue); border-color: var(--blue); color: #fff; }

.payment-grid {
  display: grid;
  gap: 20px;
  align-items: start;
}

.pay-card { padding: 26px; }

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

.pay-amount {
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1;
  margin: 8px 0 8px;
}

.pay-pkg { font-size: 12.5px; color: var(--muted); }

.pay-details { margin: 4px 0 18px; }

.pay-details div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.pay-details dt { font-size: 12.5px; color: var(--muted); }
.pay-details dd { font-size: 13.5px; font-weight: 600; color: var(--ink); text-align: right; }

.copy-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.copy-row code { font-size: 13px; }

.qr-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  padding: 18px;
  margin: 18px 0;
  text-align: center;
}

.qr-image {
  width: 208px;
  height: 208px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--line);
  object-fit: contain;
}

.qr-caption { font-size: 12px; color: var(--muted); }

.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 8px;
  color: var(--muted);
  font-size: 12.5px;
  max-width: 260px;
}

.qr-placeholder .icon { width: 26px; height: 26px; color: var(--blue); }

.pay-warning {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid #e8d6b0;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 12px;
}

.pay-warning .icon { width: 15px; height: 15px; margin-top: 1px; }

.secure-note {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 12.5px;
}

.secure-note strong { color: var(--ink); }
.secure-note p { color: var(--muted); margin-top: 4px; }

/* ---------- Order status ---------- */

.order-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.order-head h1 {
  font-family: var(--mono);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
  color: var(--navy-900);
  line-height: 1.1;
}

.order-head .muted { font-size: 13px; margin-top: 8px; }

.order-layout {
  display: grid;
  gap: 18px;
  align-items: start;
}

.order-main,
.order-aside {
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
}

.order-main > .action-card,
.order-main > .credentials-card { margin-bottom: 0; }

.order-aside { align-self: start; }
.order-aside > .card { margin-bottom: 0; }
.order-support { margin-top: 0; }

.order-live-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.order-live-note .icon { width: 13px; height: 13px; }

.order-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.order-summary-head h2 { font-size: 1.3rem; color: var(--navy-900); letter-spacing: -0.02em; }
.order-amount { font-size: 1.5rem; font-weight: 800; color: var(--navy-900); letter-spacing: -0.03em; }

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list dt { font-size: 12.5px; color: var(--muted); flex: none; }
.detail-list dd { font-size: 13.5px; font-weight: 600; color: var(--ink); text-align: right; word-break: break-word; }
.detail-list div:last-child { border-bottom: 0; }

.inline-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 14px;
  background: var(--teal-soft);
  color: var(--teal);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 600;
}

.inline-note .icon { width: 15px; height: 15px; margin-top: 1px; }

.timeline {
  position: relative;
  padding-left: 26px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 12px;
  width: 2px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -26px;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--line-strong);
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--line-strong);
}

.timeline-item--done .timeline-dot { background: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.timeline-item--current .timeline-dot { background: #fff; box-shadow: 0 0 0 2px var(--blue); }
.timeline-item--attention .timeline-dot { background: var(--red); box-shadow: 0 0 0 1px var(--red); }

.timeline-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.timeline-title h3 { font-size: 13.5px; color: var(--navy-900); }
.timeline-title time { font-size: 11.5px; color: var(--muted); }
.timeline-content p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.timeline-item--current .timeline-title h3 { color: var(--blue); }
.timeline-item--attention .timeline-title h3 { color: var(--red); }

.action-card { margin-bottom: 20px; }
.action-card h2 { font-size: 1.15rem; color: var(--navy-900); margin-bottom: 8px; }
.action-card > p { font-size: 13.5px; color: var(--muted); }
.action-card > p + p { margin-top: 8px; }
.action-card .btn { margin-top: 14px; }
.action-card--info { background: var(--surface); border-color: var(--line-strong); }

.credentials-card { margin-bottom: 20px; }

.credentials-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.credentials-head h2 { font-size: 1.25rem; color: var(--navy-900); }
.credentials-head .card-sub { margin-bottom: 0; }

.credentials-table td { vertical-align: middle; }

.secret-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.secret {
  letter-spacing: 1.5px;
  min-width: 88px;
  text-align: left;
}

.credentials-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
}

.credentials-note .icon { width: 14px; height: 14px; margin-top: 2px; }

.support-inline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-top: 4px;
}

.support-inline h3 { font-size: 14.5px; color: var(--navy-900); }
.support-inline p { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---------- Track / auth-like / error ---------- */

.backdrop--paper main {
  padding: 36px 0 76px;
  background:
    linear-gradient(
      180deg,
      rgba(246, 243, 234, 0.5) 0%,
      rgba(246, 243, 234, 0.66) 55%,
      rgba(246, 243, 234, 0.8) 100%
    ),
    url("/img/auth-paper.png") center top / cover no-repeat,
    var(--surface);
}

.auth-like { padding-top: 22px; }
.auth-like > .eyebrow--center { display: flex; justify-content: center; }
.auth-like h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); color: var(--ink); letter-spacing: -0.01em; text-align: center; }
.auth-like .lede { margin-bottom: 24px; }
.auth-like .alert { margin-top: 20px; }
.auth-like .form-card { margin-top: 6px; }
.auth-like .track-recovery { margin-top: 16px; }
.auth-like .track-recovery .card-title { font-size: 1.05rem; color: var(--navy-900); }
.auth-like > .muted { text-align: center; margin-top: 16px; }
.auth-like > .muted + .muted { margin-top: 6px; }

.checkout-identity {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 18px;
}

.checkout-identity > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.checkout-identity strong { color: var(--navy-900); }

.account-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 8px;
  margin-bottom: 22px;
}

.account-head h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 6px 0 4px;
}

.account-head .muted { margin: 0; }
.account-footnote { margin-top: 18px; }

/* ---------- Verify card ---------- */

.verify-card .card-head-row { margin-bottom: 8px; }

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-chip--pending { color: #8a5a12; background: #fbf5e9; border-color: #ecdcbe; }
.status-chip--ok { color: #12604a; background: #eef6f1; border-color: #cfe2d6; }

.verify-copy { margin-bottom: 16px; max-width: 56ch; }

.verify-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.verify-form .field { margin-bottom: 0; }

.verify-form .field label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input.code-input {
  width: 168px;
  font-family: var(--mono);
  font-size: 1.3rem;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  text-align: center;
  padding: 9px 0;
  color: var(--navy-900);
}

.field input.code-input::placeholder { color: #cfc8b8; }

.verify-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.verify-hint { margin: 0; max-width: 46ch; }
.verify-foot .btn { flex-shrink: 0; }

@media (max-width: 480px) {
  .field input.code-input { width: 100%; }
  .verify-form .btn { width: 100%; }
}

.error-shell {
  text-align: center;
  padding: 64px 0 40px;
}

.error-code {
  font-family: var(--display);
  font-size: 4.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--blue);
  opacity: 0.3;
  margin-bottom: 10px;
}

.error-shell h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); color: var(--ink); letter-spacing: -0.01em; }
.error-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 26px 0 20px;
}

/* ---------- Policies ---------- */

.policy-card { padding: 34px; }
.policy-intro { font-size: 15.5px; color: var(--text); }
.policy-section { margin-top: 26px; }
.policy-section h2 { font-size: 1.15rem; color: var(--navy-900); margin-bottom: 8px; }
.policy-section p { font-size: 14px; color: var(--muted); margin: 9px 0; }
.policy-list { list-style: disc; padding-left: 20px; margin: 10px 0; }
.policy-list li { font-size: 14px; color: var(--muted); margin: 6px 0; }

/* ---------- Admin header ---------- */

.admin-body { background: #f4f1e8; }

.admin-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--navy-900);
  border-top: 2px solid #b0612f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-header-top {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 14px;
  min-height: 56px;
}

.admin-header-top .brand { align-self: center; }

.admin-nav {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-left: 18px;
}

.admin-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  padding: 0 12px;
  border-radius: 0;
  white-space: nowrap;
  box-shadow: inset 0 -2px 0 transparent;
  transition: color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.admin-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.admin-nav a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 -2px 0 #c97a4a;
}

.nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-sm);
  background: #b0612f;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
}

.admin-user {
  position: relative;
  display: flex;
  align-items: center;
  align-self: stretch;
  margin-left: auto;
}

.admin-user-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  list-style: none;
}

.admin-user-toggle::-webkit-details-marker { display: none; }
.admin-user-toggle > .icon {
  width: 12px;
  height: 12px;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 150ms ease, color 120ms ease;
}
.admin-user-toggle:hover > .icon { color: rgba(255, 255, 255, 0.9); }
.admin-user[open] .admin-user-toggle > .icon { transform: rotate(180deg); color: #fff; }

.admin-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #b0612f;
  color: #fff7ec;
  font-size: 12px;
  font-weight: 600;
  transition: background-color 120ms ease, box-shadow 120ms ease;
}

.admin-user-toggle:hover .admin-avatar { background: #c97a4a; }
.admin-user[open] .admin-avatar {
  background: #c97a4a;
  box-shadow: 0 0 0 3px rgba(201, 122, 74, 0.24);
}

.admin-user-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 70;
  min-width: 236px;
  padding: 6px;
  background: #fffdf7;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}

.admin-user-email {
  display: block;
  padding: 7px 10px 9px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-menu a,
.admin-user-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.admin-user-menu a:hover,
.admin-user-menu button:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
.admin-user-menu .icon { width: 14px; height: 14px; opacity: 0.7; }
.admin-user-links {
  padding: 4px 0;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.admin-user-links a.is-active { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.admin-user-menu form { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }

.nav-toggle--dark {
  border-color: rgba(255, 255, 255, 0.25);
  background: transparent;
}

.nav-toggle--dark .nav-toggle-bars,
.nav-toggle--dark .nav-toggle-bars::before,
.nav-toggle--dark .nav-toggle-bars::after { background: #fff; }

/* ---------- Admin page ---------- */

.admin-page-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.admin-page-head h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.05rem);
  letter-spacing: -0.028em;
  color: var(--navy-900);
  line-height: 1.15;
}

.page-sub { font-size: 13.5px; color: var(--muted); margin-top: 8px; max-width: 75ch; }
.admin-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 22px;
}

.stat-card {
  display: block;
  background: #fffdf8;
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 15px 18px 14px;
  box-shadow: none;
  color: var(--text);
}

a.stat-card:hover {
  text-decoration: none;
  border-color: var(--blue);
}

.stat-card--blue { border-top-color: var(--blue); }
.stat-card--teal { border-top-color: var(--teal); }
.stat-card--green { border-top-color: var(--green); }
.stat-card--amber { border-top-color: var(--amber); }

.stat-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.2;
  margin: 5px 0 4px;
}

.stat-hint { font-size: 11.5px; color: var(--muted); line-height: 1.4; }

.checks-card { margin-bottom: 22px; }

.checks-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.checks-head h2 { font-size: 1.1rem; color: var(--navy-900); }

.checks-list { margin-top: 4px; }

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #ece6d8;
}

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

.check-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex: none;
  margin-top: 1px;
}

.check-mark .icon { width: 14px; height: 14px; }
.check-item--ok .check-mark { background: var(--green-soft); color: var(--green); }
.check-item--warn .check-mark { background: var(--amber-soft); color: var(--amber); }
.check-item strong { font-size: 13px; color: var(--ink); display: block; }
.check-item p { font-size: 12px; color: var(--muted); margin-top: 2px; }

.checks-foot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ece6d8;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- Admin tables ---------- */

.table-wrap {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -2px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.table th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: var(--surface);
}

.table td {
  padding: 11px 12px;
  border-bottom: 1px solid #ece6d8;
  font-size: 13px;
  vertical-align: middle;
}

.table tbody tr:hover { background: #fbf8f0; }
.table tbody tr:last-child td { border-bottom: 0; }
.table--compact td { padding: 9px 12px; font-size: 12.5px; }
.table--compact th { padding: 8px 12px; }

.table-link { font-weight: 600; color: var(--blue); font-size: 12.5px; }
.table-link:hover { text-decoration: underline; }

.cell-stack { display: flex; flex-direction: column; line-height: 1.4; }
.cell-stack strong { font-size: 13px; color: var(--ink); font-weight: 600; }
.cell-stack span { font-size: 11.5px; color: var(--muted); }

.cell-action { text-align: right; white-space: nowrap; }
.table th.cell-action { text-align: right; }

/* Customer account tables stack into labelled rows on phones. */
@media (max-width: 640px) {
  .table--stack { min-width: 0; }
  .table--stack thead { display: none; }
  .table--stack,
  .table--stack tbody,
  .table--stack tr,
  .table--stack td {
    display: block;
    width: 100%;
  }
  .table--stack tr { padding: 8px 0; border-bottom: 1px solid #ece6d8; }
  .table--stack tbody tr:hover { background: none; }
  .table--stack tr:last-child { border-bottom: 0; }
  .table--stack td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 5px 12px;
    border: 0;
    text-align: right;
  }
  .table--stack td::before {
    content: attr(data-label);
    flex: none;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
  }
  .table--stack td:last-child {
    justify-content: flex-end;
    padding-top: 9px;
  }
  .table--stack td:last-child::before { content: none; }
}

.action-row { display: inline-flex; gap: 6px; align-items: center; }

.bulk-card { margin-bottom: 22px; }

.bulk-card > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.bulk-card > summary::-webkit-details-marker { display: none; }
.bulk-card > summary > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.bulk-card > summary strong { font-size: 14px; color: var(--ink); }
.bulk-card[open] > summary { margin-bottom: 14px; }

.orders-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.filter-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.filter-tab {
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  border: 1px solid transparent;
}

.filter-tab:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
.filter-tab.is-active { background: var(--blue-soft); color: var(--blue); border-color: #cfdccf; }

.search-form { display: flex; gap: 8px; align-items: center; }
.search-form input { min-width: 0; width: 100%; height: 38px; padding: 0 12px; font-size: 13px; }
.search-form .btn { flex: none; }

.filters-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters-inline select {
  width: auto;
  padding: 6px 9px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
  background: #fffdf8;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.pagination-label { font-size: 12px; color: var(--muted); }

.empty-state {
  text-align: center;
  padding: 38px 20px;
  color: var(--muted);
}

.empty-state .icon { width: 32px; height: 32px; margin: 0 auto 10px; color: var(--line-strong); }
.empty-state h3 { font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.empty-state p { font-size: 12.5px; max-width: 46ch; margin: 0 auto; }
.empty-state--compact { padding: 24px 16px; }

/* ---------- Admin order detail ---------- */

.admin-detail-grid { display: grid; gap: 20px; align-items: start; }
.admin-detail-main { display: grid; gap: 20px; }
.admin-detail-side { display: grid; gap: 20px; }

.admin-detail-main .card,
.admin-detail-side .card { min-width: 0; }

.admin-detail-main .card > h2,
.side-card h2 {
  font-size: 1.1rem;
  color: var(--navy-900);
  margin-bottom: 12px;
}

.order-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.order-title-row h1 { font-family: var(--mono); letter-spacing: -0.03em; }

.detail-list--two div { padding: 9px 0; }
.detail-list--two dd { max-width: 32ch; }

.proof-panel { margin-bottom: 8px; }
.proof-image {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  margin: 0 auto;
}

.proof-file {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
}

.proof-file .icon { width: 26px; height: 26px; color: var(--blue); }
.proof-file strong { font-size: 13px; color: var(--ink); }
.proof-file p { font-size: 12px; color: var(--muted); margin-top: 2px; }

.proof-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.proof-checklist {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.proof-checklist h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; }
.proof-checklist .check-list li { font-size: 12.5px; padding: 4px 0; }

.action-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.action-head h2 { margin-bottom: 0; }

.action-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.action-divider::before,
.action-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.mini-stats div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
}

.mini-stats dt { font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin: 0; }
.mini-stats dd { font-family: var(--display); font-size: 16px; font-weight: 600; color: var(--ink); margin: 0; }

.side-card { padding: 20px; }
.side-card h2 { margin-bottom: 10px; }
.side-card .btn { margin-top: 8px; }

.plain-list { padding-left: 18px; list-style: disc; }
.plain-list li { font-size: 12.5px; color: var(--muted); margin: 7px 0; }

.audit-list { list-style: none; padding: 0; }

.audit-list li {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #ece6d8;
}

.audit-list li:last-child { border-bottom: 0; padding-bottom: 0; }

.audit-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  flex: none;
  margin-top: 6px;
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.audit-list strong { font-size: 12.5px; color: var(--ink); }
.audit-list p { font-size: 12px; color: var(--muted); margin-top: 2px; word-break: break-word; }
.audit-meta { font-size: 11px; color: #8d8574; }

.audit-detail { max-width: 380px; word-break: break-word; font-size: 12.5px; }

.label-optional { font-size: 11px; font-weight: 500; color: var(--muted); }
.label-required { font-size: 11px; font-weight: 600; color: var(--red); }

.monitor-card { margin-bottom: 22px; }
.monitor-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 10px;
}
.monitor-item {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  color: var(--text);
}
a.monitor-item:hover { border-color: var(--blue); text-decoration: none; }
.monitor-item--ok { border-left-color: var(--green); }
.monitor-item--info { border-left-color: var(--blue); }
.monitor-item--warn { border-left-color: var(--amber); background: #fffdf6; }
.monitor-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.monitor-value {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 3px 0 2px;
}
.monitor-detail { font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.monitor-activity {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.monitor-activity h3 {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 4px;
}
.monitor-feed { list-style: none; padding: 0; }
.monitor-feed li {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #ece6d8;
}
.monitor-feed li:last-child { border-bottom: 0; padding-bottom: 0; }
.monitor-feed strong { display: block; font-size: 12px; color: var(--ink); }
.monitor-feed-detail { display: block; font-size: 11.5px; color: var(--muted); word-break: break-word; }
.monitor-feed .audit-meta { font-size: 10.5px; }

.check-gate {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 4px 0 16px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.check-gate legend {
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.check-gate .checkbox { font-size: 12.5px; }

.form-row--host { grid-template-columns: 1fr; }

/* ---------- Email center ---------- */

.email-body-input { min-height: 220px; font-family: var(--mono); font-size: 13.5px; }

.email-vars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 10px;
}

.email-var {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 11px;
  color: var(--muted);
}

.email-var code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
}

.email-ai {
  margin: 6px 0 22px;
  padding: 18px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.email-ai h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: var(--navy-900);
}

.email-ai h3 .icon { width: 18px; height: 18px; color: var(--muted); }
.email-ai .card-head-row { margin-bottom: 10px; }

.email-send-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.email-delete-form { margin-top: 18px; }

.email-preview summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  list-style: none;
}

.email-preview summary::-webkit-details-marker { display: none; }
.email-preview summary::before { content: '+ '; }
.email-preview[open] summary::before { content: '– '; }

.email-preview-body {
  margin: 10px 0 0;
  padding: 12px;
  max-height: 260px;
  overflow: auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 380px;
}

.email-preview-error {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--red);
  max-width: 380px;
  word-break: break-word;
}

.badge-demo {
  display: inline-block;
  margin-left: 5px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 5px;
  border-radius: 4px;
  vertical-align: 1px;
}

/* ---------- Auth ---------- */

.minimal-body { background: #fffdf7; }

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  background:
    linear-gradient(180deg, rgba(246, 243, 234, 0.58) 0%, rgba(255, 253, 247, 0.86) 70%),
    url("/img/auth-paper.png") center top / cover no-repeat,
    linear-gradient(180deg, var(--surface) 0%, #fffdf7 62%);
}

.auth-shell { width: 100%; max-width: 430px; }
.auth-brand { display: flex; justify-content: center; margin-bottom: 24px; }
.auth-card { padding: 30px; box-shadow: none; }

.auth-head { text-align: center; margin-bottom: 22px; }

.auth-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--blue);
  margin-bottom: 14px;
}

.auth-icon .icon { width: 20px; height: 20px; }
.auth-head h1 { font-size: 1.55rem; color: var(--ink); letter-spacing: -0.005em; }
.auth-head p { font-size: 13px; color: var(--muted); margin-top: 5px; }

.auth-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 16px;
  justify-content: center;
  text-align: center;
}

.auth-note .icon { width: 14px; height: 14px; margin-top: 1px; }

.auth-back {
  display: block;
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}

.auth-back:hover { color: var(--blue); }

/* ---------- Toast ---------- */

.toast-live {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--ink);
  color: #fbf9f2;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-width: calc(100vw - 40px);
}

.toast-live:empty { display: none; }

/* ---------- Responsive ---------- */

@media (max-width: 999px) {
  .nav-toggle { display: inline-flex; }

  .header-actions { gap: 10px; }
  .account-menu { min-width: 232px; }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #fffdf7;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .site-nav[data-open] { display: flex; }
  .site-nav a { padding: 11px 12px; border-radius: 8px; font-size: 14.5px; }
  .site-nav a:hover { background: var(--surface); }
  .site-nav .nav-cta { margin: 8px 0 2px; min-height: 42px; }

  .admin-header-top { gap: 10px; }
  .admin-header-top .nav-toggle { order: 2; margin-left: auto; }
  .admin-user { order: 3; margin-left: 6px; }

  .admin-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 65;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-left: 0;
    padding: 8px 20px 14px;
    background: var(--navy-950);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 30px -22px rgba(0, 0, 0, 0.65);
  }

  .admin-nav[data-open] { display: flex; }
  .admin-nav a { min-height: 40px; padding: 10px; border-radius: 8px; }
  .admin-nav a.is-active { background: rgba(255, 255, 255, 0.11); box-shadow: none; }
}

@media (max-width: 420px) {
  .admin-header-top { gap: 10px; }
  .admin-header-top .brand-tag { display: none; }
}

@media (max-width: 799px) {
  .credentials-table { min-width: 0; }

  .credentials-table thead { display: none; }

  .credentials-table,
  .credentials-table tbody,
  .credentials-table tr,
  .credentials-table td {
    display: block;
    width: 100%;
  }

  .credentials-table tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }

  .credentials-table tr:last-child { border-bottom: 0; }

  .credentials-table td {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border: 0;
  }

  .credentials-table td::before {
    content: attr(data-label);
    flex: 0 0 82px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .credentials-table td[data-label="Password"] { flex-wrap: wrap; }
}

@media (min-width: 640px) {
  .container, .container-wide { padding-left: 28px; padding-right: 28px; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .form-row--host { grid-template-columns: 1fr 120px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .orders-toolbar { flex-direction: row; align-items: center; justify-content: space-between; }
  .search-form { max-width: 300px; }
  .admin-page-head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .order-head { flex-direction: row; align-items: flex-start; justify-content: space-between; }
  .support-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .support-email { width: 100%; text-align: left; }
  .support-inline { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 800px) {
  .hero { padding: 76px 0 86px; }
  .hero-grid { grid-template-columns: 1.06fr 0.94fr; gap: 54px; }
  .hero h1 { font-size: clamp(2.8rem, 4.8vw, 4rem); }
  .plans-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); column-gap: 40px; }
  .notice-grid { grid-template-columns: 1.35fr 1fr; }
  .responsible-grid { grid-template-columns: 0.85fr 1.15fr; gap: 40px; }
  .support-card { grid-template-columns: 1.4fr auto; padding: 36px; }
  .support-email { text-align: right; }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
  .checkout-grid { grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr); gap: 24px; }
  .checkout-grid > .form-card { grid-column: 1; grid-row: 1; }
  .checkout-grid > .summary-card { grid-column: 2; grid-row: 1; position: sticky; top: 88px; }
  .order-layout { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; }
  .order-main { grid-column: 1; grid-row: 1; }
  .order-aside { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 88px; }
  .order-support { grid-column: 1; grid-row: 2; }
  .card { padding: 28px; }
  .form-layout { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); }
  .form-layout--wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); }
  .detail-list--two { display: grid; grid-template-columns: 1fr 1fr; column-gap: 30px; }
  .detail-list--two div { border-bottom: 1px solid var(--line); }
  .proof-panel { display: flex; flex-direction: column; }
  .admin-detail-grid { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr); }
  .payment-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1099px) and (min-width: 1000px) {
  .table th,
  .table td { padding-left: 9px; padding-right: 9px; }
}

@media (min-width: 1000px) {
  .section { padding: 88px 0; }
  .section-head { margin-bottom: 42px; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .admin-nav { display: flex; }
  .nav-toggle--dark { display: none; }
  .page-admin { padding-top: 34px; }
}

@media (min-width: 1024px) {
  .hero-grid { gap: 64px; }
}

@media (max-width: 420px) {
  .pay-amount { font-size: 2.2rem; }
  .policy-card { padding: 22px; }
  .plan-card { padding: 22px; }
  .card { padding: 20px; }
  .step { grid-template-columns: 34px minmax(0, 1fr); gap: 4px 12px; }
}

/* Settings and admin accounts */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 18px; }
.settings-grid > .card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.settings-grid > .card form { display: flex; flex-direction: column; gap: 12px; }
.settings-grid > .card form .btn { align-self: flex-start; }
.settings-grid .mini-stats dd,
.settings-grid .mono { overflow-wrap: anywhere; }
.qr-preview { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.qr-preview img { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); padding: 8px; }
.admin-row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0; }
.admin-row-actions > .inline-form .btn--xs,
.admin-row-actions > .pw-reset .pw-reset-toggle { padding: 0 7px; }
.pw-reset { position: relative; }
.pw-reset > summary { list-style: none; cursor: pointer; }
.pw-reset > summary::-webkit-details-marker { display: none; }
.pw-reset-toggle { color: var(--blue); }
.pw-reset-toggle:hover { color: var(--blue-dark); background: var(--blue-soft); }
.pw-reset[open] { flex-basis: 100%; display: flex; flex-direction: column; align-items: flex-end; }
.pw-reset[open] .pw-form { width: 100%; }
.pw-reset[open] .pw-reset-toggle { color: var(--blue-dark); background: var(--blue-soft); }
.pw-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 8px 0 2px;
  border-top: 1px dashed var(--line);
}
.pw-form input {
  flex: 0 1 160px;
  min-width: 120px;
  padding: 6px 9px;
  font-size: 12.5px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--text);
}
.pw-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-ring); }
.action-sep { width: 1px; height: 14px; margin: 0 3px; background: var(--line-strong); }
@media (min-width: 800px) {
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid > .card:first-child { grid-column: 1 / -1; }
}

/* Settings on phones: stack stats, full-width actions, no sideways scroll */
@media (max-width: 640px) {
  .settings-grid { gap: 14px; }
  .settings-grid > .card { padding: 18px 16px; }
  .settings-grid .card-head-row { flex-wrap: wrap; gap: 6px 10px; }
  .settings-grid .mini-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 10px 0;
  }
  .settings-grid .btn { min-height: 44px; }
  .settings-grid > .card form .btn {
    align-self: stretch;
    width: 100%;
  }
  .settings-grid .payment-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .settings-grid .payment-actions form { min-width: 0; }
  .settings-grid .payment-actions .btn,
  .settings-grid .inline-form .btn { width: 100%; }
  .settings-grid .inline-form { display: flex; }
  .settings-grid .field input,
  .settings-grid .field select,
  .settings-grid .field textarea { font-size: 16px; }
  .settings-grid .manual-qr-preview {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .settings-grid .manual-qr-preview img { width: 120px; height: 120px; }
}

/* Payment result pages */
.payment-result { text-align: center; }
.payment-result-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  border-radius: 50%;
}
.payment-result-icon .icon { width: 26px; height: 26px; }
.payment-result-icon--success { background: var(--green-soft); color: var(--green); }
.payment-result-icon--danger { background: var(--red-soft); color: var(--red); }
.payment-result-icon--info { background: var(--amber-soft); color: var(--amber); }
.payment-receipt { text-align: left; }
.payment-receipt .detail-list dd { font-variant-numeric: tabular-nums; }
.payment-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.payment-result-actions form { margin: 0; }

/* Admin payment management */
.payment-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.payment-actions form { margin: 0; }
.panel-subhead { font-size: 0.95rem; margin: 18px 0 8px; color: var(--navy-900); }
.refund-form { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.refund-form .form-row { margin-bottom: 10px; }

/* Manual UPI payments */
.manual-steps {
  counter-reset: manual-step;
  margin: 6px 0 16px;
  padding-left: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.manual-steps li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 26px;
  line-height: 1.55;
}

.manual-steps li::before {
  counter-increment: manual-step;
  content: counter(manual-step);
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.manual-steps strong, .manual-steps .mono { color: var(--ink); }

.manual-pay-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 12px;
}

.manual-qr {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.manual-qr-open img {
  display: block;
  width: 176px;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  padding: 8px;
}

.manual-qr-open {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: zoom-in;
  border-radius: 12px;
}

.manual-qr-open:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.manual-qr-hint {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.manual-qr-open:hover .manual-qr-hint { color: var(--ink); }

.qr-dialog {
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 0;
  width: min(94vw, 420px);
  max-height: 92vh;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(10, 20, 12, 0.35);
}

.qr-dialog::backdrop { background: rgba(8, 14, 10, 0.72); }

.qr-dialog-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 20px;
  text-align: center;
}

.qr-dialog-card h2 { margin: 0; font-size: 18px; }

.qr-dialog-img {
  display: block;
  width: min(72vw, 300px);
  height: auto;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
}

.qr-dialog-payee { margin: 0; font-size: 14px; }
.qr-dialog-card .muted { margin: 0; }

.qr-dialog-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.qr-dialog-actions .btn,
.qr-dialog-card [data-qr-close] {
  width: 100%;
  justify-content: center;
}

@media (min-width: 480px) {
  .qr-dialog-actions { grid-template-columns: 1fr 1fr; }
}

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

.manual-actions .btn { width: 100%; }

.manual-details { min-width: 0; }

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

.pay-fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  width: 100%;
  padding: 11px 12px;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  appearance: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.pay-fact--copy { cursor: pointer; }
.pay-fact--copy:hover { border-color: var(--blue); background: #fffdf8; }

.pay-fact-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.pay-fact-value {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.pay-fact-value.mono { font-family: var(--mono); font-size: 0.94rem; letter-spacing: -0.01em; }
.pay-fact-ref { white-space: nowrap; font-size: clamp(0.8rem, 3.2vw, 0.94rem); }

.pay-fact-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--blue);
}

.pay-fact-hint .icon { width: 12px; height: 12px; }
.pay-fact.is-copied { border-color: var(--green); background: var(--green-soft); }
.pay-fact.is-copied .pay-fact-hint { color: var(--green); }

.manual-amount-note { margin-top: 12px; }

.proof-form { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line-strong); }
.proof-form .field { margin-bottom: 16px; }
.proof-form .btn { margin-top: 4px; }
.proof-form .form-footnote { margin-top: 10px; }

.dropzone {
  position: relative;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: #f4f3ec;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dropzone:hover,
.dropzone.is-dragging,
.dropzone:focus-within {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.dropzone-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dropzone-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
}

.dropzone-body strong { font-size: 13.5px; color: var(--ink); }
.dropzone-body > span:last-child { font-size: 12px; color: var(--muted); }

.dropzone-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 4px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--blue);
}

.dropzone-icon .icon { width: 18px; height: 18px; }
.dropzone[data-filled] .dropzone-body { display: none; }

.dropzone-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.dropzone-preview img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
}

.dropzone-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dropzone-meta strong {
  font-size: 12.5px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropzone-meta span { font-size: 11.5px; color: var(--muted); }

.form-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--red);
  margin-top: 2px;
}

.manual-qr-preview { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.manual-qr-preview img { border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; padding: 6px; }
.manual-settings-form { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.manual-settings-form .field { margin-bottom: 12px; }

@media (min-width: 800px) {
  .manual-pay-grid {
    grid-template-columns: 176px minmax(0, 1fr);
    column-gap: 22px;
    row-gap: 12px;
    align-items: start;
  }

  .manual-qr { grid-column: 1; grid-row: 1; }
  .manual-details { grid-column: 2; grid-row: 1; }
  .manual-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(2, max-content);
  }

  .manual-actions .btn { width: auto; }
}

@media (max-width: 420px) {
  .pay-facts { gap: 8px; }
  .pay-fact { padding: 10px; }
  .pay-fact-value { font-size: 0.98rem; }
  .dropzone-body { padding: 16px 12px; }
}
