:root {
  color-scheme: dark;
  --void: #080a08;
  --deep: #0d110d;
  --surface: #0f140f;
  --surface-strong: #151c15;
  --gold: #9b8455;
  --gold-text: #c4a96a;
  --gold-lt: rgba(155, 132, 85, 0.12);
  --gold-border: rgba(155, 132, 85, 0.22);
  --sage: #7a9680;
  --sage-bright: #94b49b;
  --sage-lt: rgba(122, 150, 128, 0.1);
  --white: #f4f0e8;
  --cream: rgba(244, 240, 232, 0.86);
  --text: rgba(210, 205, 188, 0.82);
  --muted: rgba(200, 195, 180, 0.48);
  --border: rgba(155, 132, 85, 0.14);
  --border-strong: rgba(155, 132, 85, 0.28);
  --field: rgba(244, 240, 232, 0.045);
  --field-ink: #f4f0e8;
  --warn: #d4946a;
  --danger: #d66f5f;
  --shadow: rgba(0, 0, 0, 0.34);
  --serif: "Cormorant Garamond", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  --display: "Oxanium", "DM Sans", sans-serif;
  --sans: "DM Sans", Inter, system-ui, sans-serif;
}

[data-theme="light"] {
  color-scheme: light;
  --void: #f2eee5;
  --deep: #e9e3d6;
  --surface: #ede7d8;
  --surface-strong: #f8f3e9;
  --white: #1a1a18;
  --cream: rgba(26, 26, 24, 0.86);
  --text: rgba(40, 36, 28, 0.85);
  --muted: rgba(60, 52, 40, 0.52);
  --border: rgba(122, 92, 46, 0.2);
  --border-strong: rgba(122, 92, 46, 0.34);
  --gold: #9b8455;
  --gold-text: #7a5c2e;
  --gold-border: rgba(122, 92, 46, 0.26);
  --gold-lt: rgba(122, 92, 46, 0.08);
  --sage: #4a7a55;
  --sage-bright: #2f5a3a;
  --sage-lt: rgba(74, 122, 85, 0.1);
  --field: rgba(255, 255, 255, 0.48);
  --field-ink: #1a1a18;
  --warn: #b3683d;
  --danger: #a33d34;
  --shadow: rgba(74, 58, 30, 0.14);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 80% at 72% 8%, rgba(20, 36, 22, 0.64), transparent 58%),
    radial-gradient(ellipse 50% 50% at 12% 82%, rgba(155, 132, 85, 0.08), transparent 62%),
    var(--void);
  color: var(--white);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  overflow-x: hidden;
}

[data-theme="light"] body {
  background:
    radial-gradient(ellipse 72% 82% at 70% 6%, rgba(122, 92, 46, 0.09), transparent 58%),
    radial-gradient(ellipse 48% 50% at 10% 84%, rgba(74, 122, 85, 0.1), transparent 62%),
    linear-gradient(180deg, rgba(255, 252, 245, 0.5), rgba(233, 227, 214, 0.16)),
    var(--void);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: 0;
  background-image:
    linear-gradient(rgba(155, 132, 85, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155, 132, 85, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
}

body::after {
  z-index: 9999;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(122, 92, 46, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 92, 46, 0.055) 1px, transparent 1px);
}

[data-theme="light"] body::after {
  opacity: .22;
}

button, input, select, textarea { font: inherit; }
a { color: var(--gold-text); font-weight: 600; }

.app-shell,
.staff-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
}

.panel,
.status-panel,
.staff-login-card,
.metric,
.toolbar,
.report-panel,
.table-panel,
.settings-panel {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 26px 70px var(--shadow);
  backdrop-filter: blur(16px);
}

[data-theme="light"] .panel,
[data-theme="light"] .status-panel,
[data-theme="light"] .staff-login-card,
[data-theme="light"] .metric,
[data-theme="light"] .toolbar,
[data-theme="light"] .report-panel,
[data-theme="light"] .table-panel,
[data-theme="light"] .settings-panel {
  background: rgba(248, 243, 233, 0.72);
  box-shadow: 0 28px 80px rgba(74, 58, 30, 0.12);
}

.panel { overflow: hidden; }

.topbar,
.staff-header {
  position: relative;
  padding: 28px 30px;
  background: linear-gradient(135deg, rgba(155, 132, 85, 0.14), rgba(122, 150, 128, 0.08) 46%, rgba(8, 10, 8, 0.2));
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

[data-theme="light"] .topbar,
[data-theme="light"] .staff-header {
  background:
    linear-gradient(135deg, rgba(155, 132, 85, 0.12), rgba(74, 122, 85, 0.075) 48%, rgba(255, 255, 255, 0.22)),
    rgba(248, 243, 233, 0.58);
}

.staff-header {
  border: 1px solid var(--border);
  border-radius: 4px;
}

.brand-lockup {
  display: grid;
  gap: 8px;
}

.brand-logo-link {
  display: inline-flex;
  width: fit-content;
}

.brand-logo-link.is-disabled {
  cursor: default;
  pointer-events: none;
}

.brand-lockup img,
.login-logo {
  width: 126px;
  height: auto;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.26));
}

[data-theme="light"] .brand-lockup img,
[data-theme="light"] .login-logo {
  filter: invert(1) contrast(1.08) drop-shadow(0 10px 18px rgba(74, 58, 30, 0.12));
}

.topbar-controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.eyebrow {
  margin: 4px 0 0;
  font-size: 8px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 600;
}

h1, h2 { margin: 0; letter-spacing: 0; }

h1 {
  max-width: 720px;
  color: var(--white);
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 300;
  line-height: 1;
}

h2 {
  color: var(--white);
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 300;
  line-height: 1.1;
}

.language {
  display: grid;
  gap: 7px;
  min-width: 124px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

label {
  display: grid;
  gap: 8px;
  align-content: start;
  color: var(--cream);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.language select,
input,
select,
textarea {
  width: 100%;
  min-height: 45px;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 12px 13px;
  background: var(--field);
  color: var(--field-ink);
  outline: none;
}

input:not([type="checkbox"]):not([type="hidden"]),
select {
  height: 45px;
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: rgba(255, 252, 245, 0.62);
  border-color: rgba(122, 92, 46, 0.24);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-lt);
}

.phone-field {
  display: grid;
  grid-template-columns: minmax(170px, 0.72fr) minmax(150px, 1fr);
  gap: 8px;
}

.phone-field select,
.phone-field input {
  min-width: 0;
}

textarea {
  min-height: 92px;
  resize: vertical;
  text-transform: none;
  letter-spacing: 0;
}

label small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
  background: rgba(8, 10, 8, 0.18);
}

[data-theme="light"] .steps {
  background: rgba(255, 252, 245, 0.34);
}

.step {
  min-height: 66px;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.step:last-child { border-right: 0; }

.step span {
  width: 25px;
  height: 25px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  color: var(--sage);
  font-size: 10px;
  font-weight: 600;
}

.step strong {
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 600;
}

.step.is-active {
  background: var(--gold-lt);
  color: var(--gold-text);
}

.step.is-active span {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--void);
}

form { padding: 32px 30px 0; }
.form-step { display: none; }
.form-step.is-active { display: block; }

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.section-head p,
.status-panel p,
.staff-login-card p {
  margin: 0;
  color: var(--text);
  font-weight: 300;
}

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

.wide { margin-top: 17px; }

.camera-card { display: grid; gap: 14px; }

#camera {
  display: none;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #050705;
  border: 1px solid var(--border);
  border-radius: 4px;
  object-fit: cover;
}

.camera-actions,
.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

button,
.text-button,
.capture-file-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  background: var(--gold);
  color: var(--void);
  padding: 0 18px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transition: border-color .2s ease, background .2s ease, color .2s ease, opacity .2s ease;
}

button:hover,
.text-button:hover,
.capture-file-button:hover {
  opacity: .84;
}

.theme-toggle,
button.secondary,
.text-button,
.capture-file-button {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--gold-text);
}

.capture-file-button.primary-capture-button {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--void);
}

.theme-toggle {
  min-height: 36px;
  padding: 0 13px;
  background: var(--white);
  border-color: var(--white);
  color: var(--void);
}

[data-theme="light"] .theme-toggle {
  background: #1a1a18;
  border-color: #1a1a18;
  color: #f8f3e9;
}

button:disabled {
  opacity: .48;
  cursor: wait;
}

.topbar-controls button.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--void);
}

.file-fallback {
  width: min(100%, 330px);
  padding: 13px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 4px;
  background: var(--gold-lt);
}

.file-fallback.primary-upload {
  border-style: solid;
  border-color: var(--gold);
  background: rgba(155, 132, 85, .2);
}

.file-fallback span {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.file-fallback input {
  width: 100%;
  min-height: 0;
  padding: 8px 0 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.uppy-id-uploader {
  max-width: 100%;
  overflow: hidden;
}

.uppy-id-uploader .uppy-Dashboard-inner {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  background: var(--surface);
  border-color: var(--border-strong);
  border-radius: 4px;
  font-family: var(--sans);
}

.uppy-id-uploader .uppy-Dashboard-innerWrap,
.uppy-id-uploader .uppy-Dashboard-AddFiles,
.uppy-id-uploader .uppy-Dashboard-AddFilesPanel,
.uppy-id-uploader .uppy-Dashboard-AddFiles-list {
  max-width: 100% !important;
  min-width: 0 !important;
}

.uppy-id-uploader .uppy-Dashboard-AddFiles-title,
.uppy-id-uploader .uppy-Dashboard-note {
  color: var(--text);
}

@media (max-width: 700px) {
  .uppy-id-uploader .uppy-Dashboard-inner {
    height: 260px !important;
  }

  .uppy-id-uploader .uppy-Dashboard-AddFiles-title {
    max-width: 100%;
    padding: 0 14px;
    font-size: 15px;
    line-height: 1.35;
    white-space: normal;
  }

  .uppy-id-uploader .uppy-Dashboard-AddFiles-list {
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 12px;
  }

  .uppy-id-uploader .uppy-DashboardTab {
    width: 82px;
    min-width: 82px;
  }
}

.capture-file-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.sumsub-frame {
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-top: 16px;
  min-height: 620px;
  overflow: hidden;
  background: var(--surface-strong);
}

.sumsub-frame iframe {
  border: 0;
  width: 100%;
}

.compliance-note,
label small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 8px;
}

.id-progress {
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  padding: 12px 14px;
  text-transform: uppercase;
}

.captures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.capture {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-strong);
  position: relative;
}

.capture.is-checking {
  border-color: var(--gold);
}

.capture.is-rejected {
  border-color: var(--danger);
}

.capture.is-review {
  border-color: var(--warn);
}

.capture img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.capture span {
  display: block;
  padding: 9px 10px;
  color: var(--muted);
}

.capture.is-checking span,
.capture.is-review span {
  color: var(--gold);
}

.capture.is-rejected span {
  color: var(--danger);
}

.capture > small {
  border-top: 1px solid var(--border);
  color: var(--muted);
  display: block;
  font-size: 11px;
  line-height: 1.45;
  padding: 0 10px 42px;
}

.capture.is-rejected > small {
  color: var(--danger);
}

.capture-placeholder {
  align-items: center;
  aspect-ratio: 4 / 3;
  color: var(--muted);
  display: grid;
  font-family: var(--mono);
  justify-items: center;
  letter-spacing: .08em;
  padding: 18px;
  text-transform: uppercase;
}

.capture-placeholder small {
  color: var(--gold);
  font-size: 11px;
  margin-top: 8px;
}

.remove-capture {
  border: 0;
  border-radius: 0;
  bottom: 0;
  font-size: 11px;
  min-height: 0;
  padding: 8px 10px;
  position: absolute;
  right: 0;
}

.consent {
  grid-template-columns: 22px 1fr;
  align-items: start;
  padding: 16px;
  background: var(--sage-lt);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.consent input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.signature-wrap {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

#signaturePad {
  width: 100%;
  height: 220px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: color-mix(in srgb, var(--surface-strong) 76%, white);
  touch-action: none;
}

[data-theme="light"] #signaturePad {
  background: rgba(255, 252, 245, 0.74);
}

.form-actions {
  margin: 32px -30px 0;
  padding: 18px 30px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border);
  background: rgba(8, 10, 8, 0.14);
}

[data-theme="light"] .form-actions {
  background: rgba(255, 252, 245, 0.36);
}

.status-panel {
  padding: 24px;
  align-self: start;
  position: sticky;
  top: 20px;
}

.status-panel h2 { margin-bottom: 18px; }

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.status-row span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.status-row strong { color: var(--warn); }
.status-row strong.is-done { color: var(--sage-bright); }

#submitStatus {
  margin-top: 18px;
  line-height: 1.55;
}

.success-state {
  padding: 58px 30px;
  text-align: center;
}

.success-mark {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 18px;
  background: var(--gold);
  color: var(--void);
  font-size: 30px;
  font-weight: 900;
}

.success-state p:not(.success-mark) {
  margin: 10px auto 0;
  max-width: 520px;
  color: var(--muted);
}

.success-actions {
  justify-content: center;
  margin-top: 24px;
}

.confirm-summary {
  width: min(520px, 100%);
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.confirm-summary div {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px;
  background: var(--surface-strong);
  text-align: left;
}

.confirm-summary dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.confirm-summary dd {
  margin: 6px 0 0;
  color: var(--white);
  font-weight: 600;
}

.staff-login-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.staff-login-card {
  width: min(460px, 100%);
  padding: 30px;
}

.staff-login-card h1 {
  margin: 4px 0 10px;
  font-size: clamp(38px, 6vw, 58px);
}

.staff-login-card form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding: 0;
}

.staff-login-card .text-button {
  margin-top: 16px;
}

.login-logo {
  margin-bottom: 8px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.metric {
  padding: 18px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.metric strong {
  font-family: var(--display);
  font-size: 34px;
  line-height: 1;
  color: var(--gold-text);
}

.toolbar {
  padding: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
}

.toolbar label {
  width: min(300px, 100%);
}

.report-panel {
  margin-top: 14px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.report-panel h2 {
  margin: 4px 0 0;
  font-size: 18px;
  color: var(--ink);
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.settings-panel {
  margin-top: 18px;
  padding: 0;
  overflow: hidden;
}

.settings-head {
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.settings-head h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 22px;
}

.settings-form {
  padding: 22px;
  display: grid;
  gap: 22px;
}

.settings-form fieldset {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.settings-form legend {
  padding: 0 8px;
  color: var(--sage);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}

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

.settings-wide {
  grid-column: 1 / -1;
}

.schedule-grid {
  margin-top: 14px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.schedule-block {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}

.schedule-default {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: grid;
  gap: 12px;
}

.schedule-day {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: grid;
  gap: 10px;
}

.schedule-day strong {
  color: var(--cream);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

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

.schedule-closed {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

.schedule-closed input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  flex: 0 0 18px;
}

.email-chip-input {
  min-height: 54px;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.email-chip-list {
  display: contents;
}

.email-chip {
  min-height: 32px;
  padding: 0 9px;
  gap: 8px;
  border-color: var(--sage);
  background: var(--sage-lt);
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
}

.email-chip-input input {
  min-width: 240px;
  flex: 1;
  border: 0;
  min-height: 36px;
  padding: 0 6px;
  background: transparent;
}

.team-list {
  padding: 0 22px 22px;
  display: grid;
  gap: 10px;
}

.team-row {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.team-row strong,
.team-row span {
  display: block;
}

.team-row strong {
  color: var(--cream);
}

.table-panel {
  margin-top: 14px;
  overflow-x: auto;
}

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

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

th {
  color: var(--sage);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  background: var(--sage-lt);
}

[data-theme="light"] th {
  background: rgba(74, 122, 85, 0.085);
}

td strong,
td span {
  display: block;
}

td strong {
  color: var(--cream);
  font-weight: 600;
}

td span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 12px;
}

.pill {
  display: inline-flex;
  width: fit-content;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  text-transform: uppercase;
  font-size: 8px;
  letter-spacing: .15em;
  font-weight: 600;
}

.pill.ready {
  color: var(--sage-bright);
  background: var(--sage-lt);
  border: 1px solid rgba(122, 150, 128, 0.22);
}

.pill.incomplete {
  color: var(--warn);
  background: rgba(212, 148, 106, 0.12);
  border: 1px solid rgba(212, 148, 106, 0.2);
}

.attention-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.attention-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.attention-badge.danger {
  color: #9a3f22;
  background: #f8e3de;
  border: 1px solid #b94e35;
}

.attention-badge.warn {
  color: #8c651b;
  background: #fff5d8;
  border: 1px solid #c89f45;
}

.file-cell {
  display: table-cell;
}

.file-cell a { white-space: nowrap; }

.status-actions {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.status-cell .mark-ready-button,
.file-cell .card-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 8px;
}

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

.empty-state,
.staff-note {
  color: var(--muted);
}

.empty-state {
  margin: 0;
  padding: 24px;
}

.staff-note {
  margin: 14px 2px 0;
  font-size: 12px;
}

@media (max-width: 860px) {
  .app-shell,
  .staff-shell {
    width: 100%;
    padding: 0;
    grid-template-columns: 1fr;
  }

  .panel,
  .status-panel,
  .toolbar,
  .table-panel,
  .settings-panel,
  .staff-header {
    border-radius: 0;
    box-shadow: none;
    border-left: 0;
    border-right: 0;
  }

  .topbar,
  .staff-header {
    padding: 22px 18px;
    align-items: flex-start;
  }

  .topbar-controls {
    align-items: stretch;
  }

  .brand-lockup img,
  .login-logo {
    width: 110px;
  }

  form { padding: 24px 18px 0; }
  .grid,
  .settings-grid { grid-template-columns: 1fr; }

  .form-actions {
    margin-left: -18px;
    margin-right: -18px;
    padding: 14px 18px;
  }

  .step {
    flex-direction: column;
    gap: 5px;
    padding: 10px 4px;
    min-height: 70px;
  }

  .step strong {
    width: min-content;
    min-width: 64px;
    text-align: center;
    font-size: 8px;
  }

  .confirm-summary { grid-template-columns: 1fr; }
  .status-panel { position: static; }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 14px;
  }

  .toolbar {
    margin: 0;
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar label { width: 100%; }
  .phone-field { grid-template-columns: 1fr; }
  .staff-note { margin: 14px; }
}

@media (max-width: 560px) {
  body { font-size: 12px; }

  .topbar,
  .staff-header {
    display: grid;
  }

  .topbar-controls {
    width: 100%;
    justify-content: space-between;
  }

  .language {
    flex: 1;
    min-width: 120px;
  }

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

  .form-actions button,
  .form-actions [type="submit"] {
    width: 100%;
    padding: 0 10px;
  }

  #submitButton {
    grid-column: 1 / -1;
  }
}
