:root {
  --navy: #0f2d52;
  --navy-deep: #0a1f3a;
  --blue: #1a5fb4;
  --blue-bright: #2b7de9;
  --blue-soft: #e8f1fb;
  --blue-muted: #6b8bb3;
  --slate: #4a5568;
  --slate-light: #718096;
  --border: #d5dde8;
  --bg: #f0f4f8;
  --bg-card: #ffffff;
  --success: #1a7a4c;
  --danger: #b42318;
  --warning: #b54708;
  --radius: 8px;
  --header-h: 68px;
  --footer-h: 76px;
  --sidebar-w: 280px;
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --font-display: "Outfit", "Source Sans 3", sans-serif;
  --shadow: 0 1px 3px rgba(15, 45, 82, 0.06), 0 8px 24px rgba(15, 45, 82, 0.06);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--navy);
  background:
    radial-gradient(1200px 600px at 10% -10%, #d6e6f8 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #e4eef8 0%, transparent 50%),
    var(--bg);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0 0 0.5rem;
}

a {
  color: var(--blue);
}

img {
  max-width: 100%;
  height: auto;
}

/* Fixed chrome */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: var(--footer-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: #e8eef5;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--slate);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: min(280px, 55vw);
  object-fit: contain;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

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

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--navy);
}

.brand-text span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(26, 95, 180, 0.28);
}

.btn-primary:hover:not(:disabled) {
  background: var(--blue-bright);
}

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

.btn-ghost:hover:not(:disabled) {
  background: var(--blue-soft);
  border-color: #b8cce6;
}

.btn-danger {
  background: #fef3f2;
  color: var(--danger);
  border-color: #fecdca;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 1.5rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 1.5rem) 1.5rem calc(var(--footer-h) + 1.75rem);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  align-self: start;
  width: 100%;
  min-width: 0;
  max-width: var(--sidebar-w);
  max-height: calc(100vh - var(--header-h) - var(--footer-h) - 3rem);
  overflow: auto;
}

.sidebar-card,
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.sidebar-card {
  padding: 1.25rem;
}

.sidebar-title {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.stepper {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  position: relative;
  padding-bottom: 0.35rem;
}

.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: calc(0.6rem + 14px - 1px);
  top: calc(0.55rem + 28px);
  bottom: 0;
  width: 2px;
  background: #d9e2ec;
  pointer-events: none;
  z-index: 0;
}

.step-btn {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  box-sizing: border-box;
  width: 100%;
  min-height: 3.15rem;
  margin: 0;
  padding: 0.55rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.step-btn:hover:not(:disabled) {
  background: #f3f7fb;
}

.step-btn:focus {
  outline: none;
}

.step-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.step-btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.step.active .step-btn {
  background: var(--blue-soft);
}

.step-text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: #e8eef5;
  color: var(--slate-light);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.step.active .step-num {
  background: var(--blue);
  color: #fff;
}

.step.done .step-num {
  background: var(--success);
  color: #fff;
}

.step.locked .step-label {
  color: var(--slate-light);
}

.step-label {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-meta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step.done .step-meta {
  color: var(--success);
}

.step.locked .step-meta {
  color: var(--slate-light);
}

.help-box {
  margin-top: 1rem;
  padding: 1rem;
  background: #f5f8fb;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
}

.help-box h3 {
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.help-box p {
  margin: 0.4rem 0 0.85rem;
  font-size: 0.85rem;
  color: var(--slate);
}

.help-box .btn {
  margin-inline: auto;
}

.main-panel {
  padding: 1.75rem 1.85rem 1.5rem;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.page-lead {
  color: var(--slate);
  margin: 0 0 1.5rem;
  max-width: 62ch;
}

.content-block h2 {
  font-size: 1.05rem;
  margin-top: 1.35rem;
}

.content-block p,
.content-block li {
  color: var(--slate);
}

.content-block ul {
  padding-left: 1.2rem;
}

.content-block li {
  margin-bottom: 0.45rem;
}

.ack-bar {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 1.5rem 0 1rem;
  padding: 0.9rem 1rem;
  background: var(--blue-soft);
  border-radius: var(--radius);
  border: 1px solid #c5daf3;
}

.ack-bar input {
  margin-top: 0.25rem;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.15rem;
}

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

.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 650;
  margin-bottom: 0.35rem;
  color: var(--navy);
}

.field .hint {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--slate-light);
  margin-top: 0.25rem;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  color: var(--navy);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.15);
}

.field input[readonly] {
  background: #f4f7fb;
  color: var(--slate);
  cursor: default;
}

.field input[readonly]:focus {
  border-color: var(--border);
  box-shadow: none;
}

.fixed-date {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  font-variant-numeric: tabular-nums;
  color: #7a8699;
  background: #e8edf3;
  cursor: not-allowed;
  user-select: none;
  pointer-events: none;
  opacity: 0.92;
}

.signature-pad-wrap {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(#fff, #fff) padding-box,
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 23px,
      #eef2f7 23px,
      #eef2f7 24px
    );
  background-color: #fff;
  overflow: hidden;
  touch-action: none;
}

.signature-pad-wrap canvas {
  display: block;
  width: 100%;
  height: 180px;
  cursor: crosshair;
}

.signature-pad-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.signature-preview {
  max-width: 360px;
  max-height: 140px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 0.35rem;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  padding-top: 0.35rem;
}

.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  cursor: pointer;
}

.clearance-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.clearance-card {
  position: relative;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.clearance-card:hover {
  border-color: #a8c4e6;
}

.clearance-card.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.clearance-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.clearance-card strong {
  display: block;
  font-size: 0.95rem;
}

.clearance-card span {
  display: block;
  font-size: 0.8rem;
  color: var(--slate-light);
  margin-top: 0.15rem;
}

.clearance-card em {
  display: block;
  font-style: normal;
  font-weight: 700;
  color: var(--blue);
  margin-top: 0.45rem;
}

.secure-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--success);
  margin-bottom: 0.35rem;
}

.fee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0;
}

.fee-table th,
.fee-table td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.75rem;
  text-align: left;
}

.fee-table th {
  background: #f5f8fb;
  font-weight: 650;
}

.terms-list {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
}

.terms-list li {
  margin-bottom: 0.5rem;
  color: var(--slate);
}

.payment-summary {
  background: #f5f8fb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
}

.payment-summary dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
}

.payment-summary dt {
  color: var(--slate-light);
  font-size: 0.88rem;
}

.payment-summary dd {
  margin: 0;
  font-weight: 650;
  text-align: right;
}

#paypal-button-container {
  min-height: 48px;
  margin: 1rem 0;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-error {
  background: #fef3f2;
  color: var(--danger);
  border: 1px solid #fecdca;
}

.alert-success {
  background: #ecfdf3;
  color: var(--success);
  border: 1px solid #a6f4c5;
}

.alert-info {
  background: var(--blue-soft);
  color: var(--navy);
  border: 1px solid #c5daf3;
}

.footer-secure {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  font-weight: 600;
  color: var(--navy);
}

.footer-secure small {
  display: block;
  font-weight: 500;
  color: var(--slate-light);
}

.secure-form-label {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  text-align: left;
  font: inherit;
  font-weight: 600;
  color: inherit;
  cursor: default;
  line-height: 1.2;
}

.secure-form-label:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.discount-unlock-panel {
  position: fixed;
  right: 1.25rem;
  bottom: calc(var(--footer-h) + 0.85rem);
  z-index: 120;
  max-width: min(360px, calc(100vw - 2rem));
  animation: fadeIn 0.28s ease;
}

.discount-unlock-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 45, 82, 0.14);
  padding: 0.9rem 1rem 1rem;
}

.discount-unlock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.discount-unlock-head strong {
  font-size: 0.95rem;
  color: var(--navy);
}

.discount-unlock-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.discount-unlock-row input {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  color: var(--navy);
}

.discount-unlock-row input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.15);
}

.discount-unlock-card .hint {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--slate-light);
}

.discount-unlock-card .hint.is-ok {
  color: var(--success);
}

.discount-unlock-card .hint.is-error {
  color: var(--danger);
}

@media (max-width: 900px) {
  .discount-unlock-panel {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}

.footer-privacy {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  max-width: 70%;
}

.footer-privacy-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.footer-link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.footer-link:hover {
  color: var(--navy);
}

body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(15, 45, 82, 0.55);
  backdrop-filter: blur(4px);
}

.modal-panel {
  display: flex;
  flex-direction: column;
  width: min(960px, 94vw);
  height: min(860px, 88vh);
  background: #fff;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(15, 45, 82, 0.28);
  overflow: hidden;
}

.modal-header {
  flex-shrink: 0;
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
}

.modal-body {
  flex: 1;
  overflow: auto;
  padding: 1.25rem 1.5rem;
  color: var(--slate);
  line-height: 1.55;
}

.privacy-policy-text {
  white-space: pre-wrap;
  font-size: 0.98rem;
}

.modal-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: #f7f9fc;
}

.success-screen {
  text-align: center;
  padding: 2rem 1rem;
}

.success-screen .ref {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.04em;
  margin: 1rem 0;
}

.hidden {
  display: none !important;
}

/* Keep the application form in the DOM for browser autofill while other steps are active */
.page.page-autofill-ready.hidden {
  display: block !important;
  position: absolute;
  left: -10000px;
  top: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Admin */
.admin-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 1.5rem) 1.5rem calc(var(--footer-h) + 1.75rem);
}

.admin-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.admin-nav a {
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--slate);
  font-weight: 600;
  font-size: 0.9rem;
}

.admin-nav a.active,
.admin-nav a:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}

.stat span {
  display: block;
  font-size: 0.85rem;
  color: var(--slate-light);
}

.stat strong {
  font-family: var(--font-display);
  font-size: 1.75rem;
}

.table-wrap {
  overflow: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.data th,
table.data td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

table.data th {
  background: #f5f8fb;
  font-weight: 650;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #e8eef5;
  color: var(--slate);
}

.fee-admin {
  max-width: 960px;
}

.fee-admin-title {
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  display: grid;
  gap: 1rem;
}

.agsva-sync {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.agsva-sync-meta {
  display: grid;
  gap: 0.2rem;
  font-size: 0.85rem;
  color: var(--slate);
}

.agsva-sync-meta strong {
  color: var(--navy);
  font-size: 0.92rem;
}

.agsva-sync-warn {
  color: #9a3412;
}

.fee-admin-list {
  display: grid;
  gap: 1rem;
}

.fee-admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.15rem 1.35rem 1.25rem;
  display: grid;
  gap: 0.9rem;
}

.fee-admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.fee-admin-key {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--slate-light);
  font-variant-numeric: tabular-nums;
}

.fee-admin-grid {
  display: grid;
  grid-template-columns: minmax(12rem, 0.9fr) minmax(14rem, 1.2fr);
  gap: 0.9rem 1rem;
}

.fee-admin-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(7rem, 1fr)) auto auto;
  gap: 0.9rem 1.15rem;
  align-items: end;
  padding-top: 0.15rem;
  border-top: 1px solid var(--border);
}

.fee-admin-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.65rem;
  padding: 0 0.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
  user-select: none;
}

.fee-admin-check input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--blue);
}

.fee-admin .field {
  margin: 0;
}

.fee-admin .field input[type="text"],
.fee-admin .field input[type="number"] {
  width: 100%;
}

.fee-admin .inc-gst,
.fee-admin .agsva-cost {
  background: #e8edf3;
  color: #7a8699;
  cursor: not-allowed;
}

.fee-admin-note {
  color: var(--slate-light);
  font-size: 0.85rem;
  margin: 1rem 0 0;
}

@media (max-width: 820px) {
  .fee-admin-grid {
    grid-template-columns: 1fr;
  }

  .fee-admin-meta {
    grid-template-columns: 1fr 1fr;
  }

  .fee-admin-check {
    min-height: auto;
    padding-top: 0.35rem;
  }

  .agsva-sync {
    flex-direction: column;
  }
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem calc(var(--footer-h) + 2rem);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1.75rem;
}

.login-card h1 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.login-card-wide {
  max-width: 560px;
}

.login-lead {
  color: var(--slate);
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

.login-foot {
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: var(--slate);
  text-align: center;
}

.login-foot a {
  color: var(--blue);
  font-weight: 600;
}

.security-block {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}

.security-block h2 {
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
}

.mfa-setup {
  margin-top: 0.85rem;
}

.mfa-qr {
  display: block;
  width: 180px;
  height: 180px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 0.75rem;
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.stack > * + * {
  margin-top: 0.9rem;
}

.logo-preview {
  width: auto;
  height: 48px;
  max-width: 220px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 0.35rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0.5rem 1rem;
  font-size: 0.95rem;
}

.detail-grid dt {
  color: var(--slate-light);
}

.detail-grid dd {
  margin: 0;
  font-weight: 600;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
  }

  .stepper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .step {
    padding-bottom: 0.5rem;
  }

  .step:not(:last-child)::before {
    display: none;
  }

  .clearance-options,
  .form-grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .footer-privacy {
    max-width: 100%;
  }

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

  :root {
    --footer-h: 130px;
  }
}

/* User create options */
.user-create-options {
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  background: #f5f8fb;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.toggle-row,
.check-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  margin: 0;
  font-weight: 500;
}

.toggle-copy,
.check-card > span {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.toggle-copy strong,
.check-card strong {
  color: var(--navy);
  font-size: 0.95rem;
}

.toggle {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.toggle-track {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #c9d5e3;
  border: 1px solid #b7c5d6;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 45, 82, 0.2);
  transition: transform 0.15s;
}

.toggle input:checked + .toggle-track {
  background: var(--blue);
  border-color: var(--blue);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(18px);
}

.toggle input:focus-visible + .toggle-track {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.check-card {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.check-card input {
  margin-top: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--blue);
  flex-shrink: 0;
}

.mfa-qr {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}
