/* ==========================================================================
   Number HRMS Onboarding Portal — Design System & Mobile Responsiveness
   Design Philosophy: Technical Brutalism (Official Number HRMS Ecosystem)
   Tokens: Electric Hazard Yellow (#ffea00), Metallic Carbon & Slate Surfaces
   Typography: Space Grotesk (Display/Headings) + IBM Plex Mono (Code/Statutory)
   ========================================================================== */

:root {
  color-scheme: light;

  /* Official Number HRMS Color Tokens */
  --yellow: #ffea00;
  --yellow-soft: #fff36a;
  --yellow-dim: #8d8200;
  --yellow-deep: #4a4400;

  /* Metallic Slate & Carbon Surfaces */
  --ink: #747779;          /* Page background / canvas */
  --carbon: #c4c6c7;       /* Primary card surface */
  --graphite: #aeb1b2;     /* Subtle container */
  --steel: #8b8f91;        /* Border / hairlines */
  --paper: #111314;        /* Primary typography & ink */
  --muted: #383c3e;        /* Secondary typography */
  --field-bg: #eef0f0;     /* Input fields & code blocks */
  
  /* Semantic Accents & Indicators */
  --line: rgba(15, 17, 18, 0.31);
  --line-soft: rgba(15, 17, 18, 0.16);
  --danger: #a5241c;
  --danger-bg: #fef2f2;
  --danger-border: #ef4444;
  --success: #1d6e32;
  --success-bg: #eaf6ec;
  --success-border: #22c55e;

  /* Typography Stacks */
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Consolas, "Courier New", monospace;

  /* Touch Target & Elevation */
  --touch-target-min: 44px;
  --shadow-brutal: 6px 6px 0 rgba(15, 17, 18, 0.14);
  --shadow-brutal-lg: 8px 8px 0 rgba(15, 17, 18, 0.16);
  --shadow-brutal-sm: 3px 3px 0 rgba(15, 17, 18, 0.18);
}

/* Base Reset & Layout Box */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-width: 320px;
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-width: 320px;
  max-width: 100vw;
  margin: 0;
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--paper);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

p {
  line-height: 1.55;
}

.eyebrow {
  margin: 0 0 6px 0;
  color: var(--yellow-deep);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Number Brand Lockup & Symbols */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand-orb {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border: 5px solid var(--paper);
  border-radius: 50%;
  box-shadow: inset -4px -3px 0 var(--yellow);
  display: inline-block;
  vertical-align: middle;
}

.brand-orb--lg {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-width: 7px;
  box-shadow: inset -6px -5px 0 var(--yellow);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--carbon);
  border: 1px solid var(--steel);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--paper);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Skewed Hazard Grid Accent */
.onboarding-grid {
  display: grid;
  width: 210px;
  margin-top: 24px;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.onboarding-grid span {
  height: 8px;
  background: var(--yellow);
  transform: skew(-24deg);
}

.onboarding-grid span:nth-child(even) {
  background: #5d6163;
}

/* Top App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #c7c9ca;
  border-top: 3px solid var(--yellow);
  border-bottom: 1px solid var(--steel);
  box-shadow: 0 2px 6px rgba(15, 17, 18, 0.08);
}

.app-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  gap: 12px;
}

.header-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  background: #d4d6d7;
  border: 1px solid var(--steel);
  color: #2b2e30;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.security-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.25);
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(22, 163, 74, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.btn-header-exit {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--paper);
  background: transparent;
  border: 1px solid #727678;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
  min-height: 32px;
}

.btn-header-exit:hover {
  background: #b5b8b9;
  border-color: #555859;
}

/* Main Layout Shell */
.app-main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 24px 16px 40px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

/* Technical Brutalist Card Surface */
.card-surface {
  background: var(--carbon);
  border: 1px solid var(--steel);
  border-top: 3px solid var(--yellow);
  border-radius: 8px;
  box-shadow: var(--shadow-brutal-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

/* Passcode / Auth Split Shell */
.auth-split-wrapper {
  max-width: 920px;
  width: 100%;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(320px, 1fr);
  gap: 20px;
  align-items: stretch;
}

.auth-hero-panel {
  background: #c7c9ca;
  border: 1px solid var(--steel);
  border-top: 3px solid var(--yellow);
  border-radius: 8px;
  box-shadow: var(--shadow-brutal);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-hero-panel::before {
  position: absolute;
  inset: auto -60px -80px auto;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(15, 17, 18, 0.15);
  content: "";
  transform: rotate(45deg);
  pointer-events: none;
}

.auth-hero-title {
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.055em;
  line-height: 1.05;
  margin-top: 14px;
}

.auth-hero-desc {
  font-size: 13px;
  color: #383c3e;
  margin-top: 16px;
  max-width: 440px;
}

.auth-card-panel {
  background: var(--carbon);
  border: 1px solid var(--steel);
  border-top: 3px solid var(--yellow);
  border-radius: 8px;
  box-shadow: var(--shadow-brutal-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Stepper Progress Bar — Desktop & Mobile Adaptive */
.stepper-header {
  margin-bottom: 24px;
}

.stepper-header-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.stepper-header-top h1 {
  font-size: clamp(20px, 3.2vw, 26px);
  letter-spacing: -0.04em;
  margin: 0;
}

.stepper-header-top p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.stepper-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #111314;
  border: 1px solid #333638;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Desktop Stepper Bar (>= 641px) */
.desktop-stepper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.desktop-step-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.desktop-step-bar {
  height: 6px;
  background: #9fa3a5;
  border-radius: 3px;
  transition: background 0.25s ease;
}

.desktop-step-item.active .desktop-step-bar,
.desktop-step-item.completed .desktop-step-bar {
  background: var(--yellow);
  box-shadow: 0 0 0 1px #8c8200;
}

.desktop-step-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #525658;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desktop-step-item.active .desktop-step-label {
  color: var(--paper);
}

.desktop-step-item.completed .desktop-step-label {
  color: var(--yellow-deep);
}

/* Mobile Stepper Bar (<= 640px) */
.mobile-stepper {
  display: none;
  flex-direction: column;
  gap: 8px;
}

.mobile-progress-track {
  width: 100%;
  height: 6px;
  background: #9fa3a5;
  border-radius: 3px;
  overflow: hidden;
}

.mobile-progress-fill {
  height: 100%;
  background: var(--yellow);
  transition: width 0.3s ease;
}

.mobile-stepper-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--paper);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Form Controls & Labels */
.form-step-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 22px;
}

.form-step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--paper);
}

.step-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.form-step-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

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

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

.form-group {
  margin-bottom: 4px;
}

.form-group.col-span-2 {
  grid-column: span 2 / span 2;
}

.form-group.col-span-3 {
  grid-column: span 3 / span 3;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #2b2e30;
  margin-bottom: 6px;
}

.req-star {
  color: var(--danger);
  font-weight: 700;
  margin-left: 2px;
}

.form-input, .form-select, textarea.form-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #686c6e;
  border-radius: 5px;
  background: var(--field-bg);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23383c3e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

textarea.form-input {
  min-height: 80px;
  resize: vertical;
}

.form-input:focus, .form-select:focus, textarea.form-input:focus {
  outline: none;
  border-color: #8c8200;
  background: #ffffff;
  box-shadow: 0 0 0 2px var(--yellow), var(--shadow-brutal-sm);
}

.form-input::placeholder, textarea.form-input::placeholder {
  color: #626668;
}

.font-mono-input {
  font-family: var(--font-mono) !important;
  letter-spacing: 0.08em;
}

.field-error {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--danger);
  margin-top: 4px;
  min-height: 16px;
}

.toggle-pill-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--field-bg);
  border: 1px solid #7d8284;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.toggle-pill-label input[type="checkbox"] {
  accent-color: var(--yellow-deep);
  cursor: pointer;
}

.toggle-pill-label:hover {
  border-color: #383c3e;
  background: #ffffff;
}

/* Upload Dropzone Container */
.doc-upload-box {
  margin-bottom: 16px;
}

.drop-zone {
  border: 2px dashed #7a7e80;
  border-radius: 6px;
  background: rgba(238, 240, 240, 0.7);
  padding: 16px;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: #8c8200;
  background: #fffbe6;
  box-shadow: inset 0 0 0 1px var(--yellow);
}

.drop-zone-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #d4d6d7;
  border: 1px solid var(--steel);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  color: var(--paper);
}

.drop-zone-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--paper);
}

.drop-zone-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #55585a;
  margin-top: 2px;
}

.file-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: #d4d6d7;
  border: 1px solid var(--steel);
  border-left: 4px solid var(--yellow);
  border-radius: 4px;
  margin-top: 8px;
  box-shadow: 2px 2px 0 rgba(15, 17, 18, 0.08);
}

.file-chip-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--paper);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip-remove {
  background: transparent;
  border: none;
  color: #a5241c;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  min-height: 28px;
  min-width: 28px;
}

.file-chip-remove:hover {
  background: #fef2f2;
}

/* Review Summary Cards */
.review-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.review-card {
  background: #d4d6d7;
  border: 1px solid var(--steel);
  border-top: 2px solid var(--yellow);
  border-radius: 6px;
  padding: 16px;
  box-shadow: var(--shadow-brutal-sm);
}

.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 8px;
}

.review-card-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--paper);
}

.btn-edit-step {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #4a4400;
  background: var(--yellow);
  border: 1px solid #8c8200;
  border-radius: 3px;
  padding: 3px 8px;
  cursor: pointer;
  text-decoration: none;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}

.btn-edit-step:hover {
  background: var(--yellow-soft);
}

.review-dl {
  display: grid;
  gap: 8px;
  font-size: 12px;
}

.review-dl-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed var(--line-soft);
  padding-bottom: 4px;
}

.review-dl-row dt {
  color: #45494b;
  font-size: 11px;
  flex-shrink: 0;
}

.review-dl-row dd {
  font-weight: 600;
  color: var(--paper);
  text-align: right;
  word-break: break-word;
}

.review-dl-row dd.font-mono {
  font-family: var(--font-mono);
}

/* Callout & Declaration Boxes */
.callout-box {
  background: #d4d6d7;
  border: 1px solid var(--steel);
  border-left: 4px solid var(--yellow);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.declaration-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 12px;
  color: #2b2e30;
  line-height: 1.5;
}

.declaration-checkbox {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  accent-color: #4a4400;
  cursor: pointer;
}

/* Action Buttons & Wizard Nav */
.button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid #5f6365;
  border-radius: 5px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
  white-space: nowrap;
}

.btn-primary {
  color: #000000;
  background: var(--yellow);
  border-color: #8c8200;
  box-shadow: var(--shadow-brutal-sm);
}

.btn-primary:hover:not(:disabled) {
  background: var(--yellow-soft);
  transform: translateY(-1px);
  box-shadow: 4px 4px 0 rgba(15, 17, 18, 0.22);
}

.btn-primary:active:not(:disabled) {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(15, 17, 18, 0.2);
}

.btn-secondary {
  color: var(--paper);
  background: #b5b8b9;
  border-color: #727678;
  box-shadow: var(--shadow-brutal-sm);
}

.btn-secondary:hover:not(:disabled) {
  background: #d6d8d8;
  transform: translateY(-1px);
}

.btn-dark {
  color: #eef0f0;
  background: #303436;
  border-color: #1a1c1e;
  box-shadow: var(--shadow-brutal-sm);
}

.btn-dark:hover:not(:disabled) {
  background: #111314;
}

.btn-success {
  color: #ffffff;
  background: #15803d;
  border-color: #166534;
  box-shadow: var(--shadow-brutal-sm);
}

.btn-success:hover:not(:disabled) {
  background: #16a34a;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none !important;
  box-shadow: none !important;
}

/* Wizard Navigation Bar */
.wizard-nav-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Alert Boxes */
.alert-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

.alert-box--error {
  border: 1px solid #b91c1c;
  border-left: 4px solid #ef4444;
  background: #fef2f2;
  color: #991b1b;
}

.alert-box--success {
  border: 1px solid #15803d;
  border-left: 4px solid #22c55e;
  background: #f0fdf4;
  color: #166534;
}

/* Success Screen Stylings */
.success-card {
  max-width: 600px;
  margin: auto;
  text-align: center;
  background: var(--carbon);
  border: 1px solid var(--steel);
  border-top: 3px solid var(--yellow);
  border-radius: 8px;
  box-shadow: var(--shadow-brutal-lg);
  padding: 40px 32px;
}

.success-icon-orb {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: #15803d;
  color: #ffffff;
  border: 4px solid var(--paper);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 4px 0 rgba(15, 17, 18, 0.15);
}

.ref-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 20px;
  background: #d4d6d7;
  border: 1px solid var(--steel);
  border-radius: 6px;
  margin: 20px 0;
  box-shadow: var(--shadow-brutal-sm);
}

.ref-badge-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #55585a;
}

.ref-badge-code {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--paper);
  letter-spacing: 0.05em;
  user-select: all;
}

.steps-timeline {
  text-align: left;
  background: #d4d6d7;
  border: 1px solid var(--steel);
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 24px;
}

.steps-timeline h3 {
  font-size: 13px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.steps-timeline ol {
  padding-left: 20px;
  font-size: 12px;
  color: #383c3e;
}

.steps-timeline ol li {
  margin-bottom: 8px;
  line-height: 1.45;
}

.steps-timeline ol li strong {
  color: var(--paper);
}

/* Institutional Footer */
.app-footer {
  margin-top: auto;
  padding: 24px 16px;
  text-align: center;
  border-top: 1px solid var(--steel);
  background: #c7c9ca;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #45494b;
  margin: 0;
}

/* Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.w-full { width: 100%; }

/* ==========================================================================
   Responsive & Multi-Viewport Media Queries
   ========================================================================== */

/* Tablets and small laptops (<= 860px) */
@media (max-width: 860px) {
  .auth-split-wrapper {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
  
  .auth-hero-panel {
    padding: 24px 20px;
  }
  
  .review-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Devices & Small Screens (<= 640px) */
@media (max-width: 640px) {
  /* Prevent iOS Safari 16px auto-zoom on form inputs */
  .form-input, .form-select, textarea.form-input {
    font-size: 16px !important;
    min-height: 46px;
  }

  .app-main {
    padding: 14px 12px 28px;
  }

  .card-surface {
    padding: 18px 14px;
    border-radius: 6px;
    box-shadow: 4px 4px 0 rgba(15, 17, 18, 0.12);
  }

  /* Form Grids collapse to single column */
  .form-grid-2, .form-grid-3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-group.col-span-2, .form-group.col-span-3 {
    grid-column: span 1 / span 1;
  }

  /* Stepper switch: hide 5 columns, show compact progress bar */
  .desktop-stepper {
    display: none;
  }

  .mobile-stepper {
    display: flex;
  }

  .stepper-header-top h1 {
    font-size: 19px;
  }

  /* Sticky Bottom Thumb-Zone Action Bar for Mobile */
  .wizard-nav-footer {
    position: sticky;
    bottom: 0;
    z-index: 90;
    background: #b5b8b9;
    border-top: 2px solid var(--steel);
    box-shadow: 0 -4px 14px rgba(15, 17, 18, 0.2);
    padding: 12px 14px max(12px, env(safe-area-inset-bottom));
    margin: 20px -14px -18px;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
  }

  .wizard-nav-footer .button {
    flex: 1;
    min-height: 48px; /* High thumb ergonomics */
    font-size: 13px;
  }

  .wizard-nav-footer .btn-secondary {
    flex: 0 0 auto;
    padding: 10px 16px;
  }

  .app-header-inner {
    padding: 8px 12px;
    gap: 8px;
  }

  .header-brand-group {
    gap: 6px;
  }

  .brand-badge {
    display: none;
  }

  .security-badge {
    padding: 3px 6px;
    font-size: 9px;
    gap: 4px;
  }

  .security-text {
    font-size: 9px;
    letter-spacing: 0.02em;
  }

  .btn-header-exit {
    padding: 4px 8px;
    font-size: 10px;
    min-height: 28px;
  }
}

/* Extra Compact Devices (<= 380px - iPhone SE / Galaxy Fold) */
@media (max-width: 380px) {
  .security-text {
    display: none;
  }

  .security-badge {
    padding: 4px 6px;
  }

  .brand-lockup {
    font-size: 14px;
  }

  .card-surface {
    padding: 14px 10px;
  }

  .wizard-nav-footer {
    margin: 16px -10px -14px;
    padding: 10px 10px max(10px, env(safe-area-inset-bottom));
  }
}
