/* ═══════════════════════════════════════════════════════════════
   TICCA Web Form — Core Styles
   Travel Inn of Buford Credit Card Authorization
═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  /* Brand Colors */
  --navy:          #1a2744;
  --navy-mid:      #243358;
  --navy-light:    #2e4070;
  --gold:          #b8965a;
  --gold-light:    #d4af7a;
  --gold-pale:     #f5efe4;

  /* Neutrals */
  --white:         #ffffff;
  --paper:         #fafaf8;
  --paper-warm:    #f7f5f0;
  --rule:          #d8d4cc;
  --rule-light:    #ece9e2;
  --text-primary:  #1a1a1a;
  --text-secondary:#4a4a4a;
  --text-muted:    #7a7a7a;
  --text-placeholder: #aaa9a5;

  /* Status Colors */
  --success:       #2d7a4f;
  --success-bg:    #edf7f2;
  --warning:       #b85a1a;
  --warning-bg:    #fdf2ea;
  --error:         #b81a1a;
  --error-bg:      #fdf0f0;

  /* Typography */
  --font-display:  'Cormorant Garamond', Georgia, serif;
  --font-body:     'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --space-xs:      4px;
  --space-sm:      8px;
  --space-md:      16px;
  --space-lg:      24px;
  --space-xl:      40px;
  --space-xxl:     64px;

  /* Borders */
  --radius-sm:     3px;
  --radius-md:     6px;
  --radius-lg:     12px;
  --border-width:  1px;

  /* Shadows */
  --shadow-paper:  0 2px 24px rgba(26,39,68,0.08), 0 1px 4px rgba(26,39,68,0.04);
  --shadow-input:  0 1px 3px rgba(26,39,68,0.06) inset;
  --shadow-focus:  0 0 0 3px rgba(184,150,90,0.20);
  --shadow-card:   0 4px 20px rgba(26,39,68,0.10);
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--paper-warm);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--gold);
  text-decoration: underline;
}

/* ── Screen System ── */
.screen {
  min-height: 100vh;
}

/* ── Loading Screen ── */
#screen-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
}

.loading-container {
  text-align: center;
  color: var(--white);
}

.loading-logo {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -2px;
  margin-bottom: var(--space-xl);
  color: var(--white);
}

.loading-logo-t {
  color: var(--white);
}

.loading-logo-i {
  color: var(--gold);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto var(--space-lg);
}

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

.loading-text {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.05em;
}

/* ── Error Screen ── */
#screen-error {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-warm);
}

.error-container {
  max-width: 480px;
  text-align: center;
  padding: var(--space-xxl) var(--space-xl);
}

.error-icon {
  font-size: 48px;
  color: var(--warning);
  margin-bottom: var(--space-lg);
}

.error-container h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: var(--space-md);
}

.error-container p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.error-contact {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Success Screen ── */
#screen-success {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
}

.success-container {
  max-width: 520px;
  text-align: center;
  padding: var(--space-xxl) var(--space-xl);
  color: var(--white);
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-xl);
}

.success-container h1 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  color: var(--white);
}

.success-message {
  font-size: 17px;
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-md);
}

.success-detail {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-xl);
}

.success-hotel {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255,255,255,0.1);
  line-height: 1.8;
}

.success-hotel a {
  color: var(--gold-light);
}

.success-close-notice {
  margin-top: var(--space-xl);
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* ── Expiry Banner ── */
.expiry-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: rgba(255,255,255,0.9);
  text-align: center;
  padding: 10px var(--space-md);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.expiry-banner.expiry-warning {
  background: var(--warning);
}

.expiry-banner.expiry-critical {
  background: var(--error);
  animation: pulse-bg 1s ease-in-out infinite alternate;
}

@keyframes pulse-bg {
  from { opacity: 1; }
  to   { opacity: 0.85; }
}

.expiry-icon {
  margin-right: 6px;
}

/* ── Form Layout ── */
.form-page-wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

.form-paper {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-paper);
  overflow: hidden;
}

/* ── Form Header ── */
.form-header {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  background: var(--navy);
}

.hotel-logo-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -1px;
  flex-shrink: 0;
}

.form-header-center {
  text-align: center;
}

.form-hotel-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.form-hotel-address,
.form-hotel-contact {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.05em;
  line-height: 1.6;
}

.form-title-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.form-title-text {
  display: block;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
}

.form-rule {
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
}

/* ── Form Sections ── */
.form-section {
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--rule-light);
}

.form-section:last-child {
  border-bottom: none;
}

.section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--navy);
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ── Form Grid ── */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.form-row:last-child {
  margin-bottom: 0;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field-group--full    { flex: 1 1 100%; }
.field-group--half    { flex: 1 1 calc(50% - 8px); min-width: 200px; }
.field-group--third   { flex: 1 1 calc(33.333% - 11px); min-width: 160px; }
.field-group--quarter { flex: 1 1 calc(25% - 12px); min-width: 120px; }
.field-group--sixth   { flex: 1 1 calc(16.666% - 14px); min-width: 100px; }
.field-group--eighth  { flex: 1 1 calc(12.5% - 14px); min-width: 80px; }

/* ── Field Inputs ── */
.field-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.required {
  color: var(--error);
  margin-left: 2px;
}

.field-input {
  width: 100%;
  height: 42px;
  padding: 0 var(--space-md);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-input);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  text-transform: uppercase;
}

.field-input:focus {
  border-color: var(--gold);
  box-shadow: var(--shadow-focus);
}

.field-input::placeholder {
  color: var(--text-placeholder);
}

.field-input.is-error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(184,26,26,0.12);
}

.field-input.is-valid {
  border-color: var(--success);
}

.field-input--card {
  font-family: 'Courier New', monospace;
  font-size: 15px;
  letter-spacing: 0.1em;
}

.field-input--initials {
  width: 80px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.field-value-readonly {
  height: 38px;
  padding: 0 var(--space-md);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--paper-warm);
  border: 1px solid var(--rule-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  font-weight: 500;
}

/* ── Card Type Selector ── */
.card-type-selector {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.card-type-option {
  cursor: pointer;
}

.card-type-option input {
  display: none;
}

.card-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 2px solid var(--rule);
  color: var(--text-muted);
  background: var(--white);
  transition: all 0.15s;
  cursor: pointer;
}

.card-type-option input:checked + .card-type-badge {
  border-color: var(--navy);
  color: var(--navy);
  background: rgba(26,39,68,0.06);
}

.card-type-badge.visa  { border-color: #1a1f71; }
.card-type-badge.mc    { border-color: #eb001b; }
.card-type-badge.amex  { border-color: #007bc1; }
.card-type-badge.disc  { border-color: #f76f20; }

.card-account-type {
  display: flex;
  gap: var(--space-lg);
  margin-left: var(--space-md);
}

.radio-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.radio-inline input {
  accent-color: var(--navy);
}

/* ── Checkboxes ── */
.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-option input {
  accent-color: var(--navy);
  width: 15px;
  height: 15px;
}

.checkbox-sub {
  color: var(--text-muted);
  font-style: italic;
  font-size: 12px;
}

/* ── Agreement Box ── */
.agreement-box {
  background: var(--gold-pale);
  border: 1px solid rgba(184,150,90,0.3);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-top: var(--space-md);
}

.agreement-box--terms {
  background: rgba(26,39,68,0.04);
  border-color: rgba(26,39,68,0.15);
}

.agreement-label {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  cursor: pointer;
}

.agreement-checkbox {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--navy);
  cursor: pointer;
}

.agreement-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Stay Table ── */
.stay-table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-md);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
}

.stay-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.stay-table th {
  background: var(--navy);
  color: rgba(255,255,255,0.9);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
}

.stay-table td {
  padding: 9px 10px;
  text-align: center;
  border-bottom: 1px solid var(--rule-light);
  color: var(--text-primary);
}

.stay-table tbody tr:nth-child(even) td {
  background: var(--paper);
}

.stay-table tbody tr:last-child td {
  border-bottom: none;
}

.stay-total-row td {
  background: var(--gold-pale) !important;
  border-top: 2px solid var(--gold);
  font-weight: 600;
}

.stay-total-label {
  text-align: right !important;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.stay-total-amount {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
}

.stay-footnotes {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.stay-footnotes p {
  margin-bottom: 4px;
}

.stay-guest-row {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.stay-guest-row .field-group {
  flex: 1 1 200px;
}

/* ── Terms Section ── */
.form-section--terms {
  background: linear-gradient(to bottom, var(--paper), var(--white));
}

.terms-notice {
  background: rgba(184,150,90,0.1);
  border-left: 3px solid var(--gold);
  padding: var(--space-md) var(--space-lg);
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: var(--space-lg);
}

.terms-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.terms-body p {
  margin-bottom: var(--space-md);
}

/* ── Standing Authorization ── */
.standing-auth-box {
  margin: var(--space-lg) 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.standing-auth-header {
  background: var(--navy);
  color: var(--white);
  padding: var(--space-sm) var(--space-lg);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.optional-tag {
  font-size: 10px;
  padding: 2px 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.standing-auth-body {
  padding: var(--space-lg);
  background: var(--paper);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.standing-auth-body p {
  margin-bottom: var(--space-md);
}

.standing-auth-body ul {
  margin: 0 0 var(--space-md) var(--space-lg);
}

.standing-auth-body li {
  margin-bottom: 6px;
}

.inline-select {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  cursor: pointer;
}

.standing-auth-initial {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--rule-light);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.standing-auth-note {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── QR Panel ── */
.qr-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-xl);
  align-items: start;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  margin-bottom: var(--space-md);
}

.qr-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: var(--space-sm);
}

.qr-instructions {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.qr-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.qr-step {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--rule-light);
  transition: all 0.3s;
}

.qr-step.completed {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--success);
}

.qr-step-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: var(--text-muted);
}

.qr-step.completed .qr-step-icon {
  color: var(--success);
}

.qr-timer {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.qr-timer.warning {
  color: var(--warning);
  font-weight: 500;
}

.qr-code-container {
  width: 200px;
  height: 200px;
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.qr-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* ── Captured Images ── */
.captured-panel {
  margin-bottom: var(--space-md);
}

.captured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

.captured-item {
  background: var(--success-bg);
  border: 1px solid var(--success);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
}

.captured-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--success);
  margin-bottom: 6px;
}

.captured-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.captured-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* No blur — images are actual captures, show them clearly */
}

/* Card images on desktop preview get mild blur for privacy */
#captured-card_front .captured-thumb img,
#captured-card_back .captured-thumb img {
  filter: blur(3px);
}

.captured-status {
  font-size: 12px;
  color: var(--success);
  font-weight: 500;
}

/* ── Upload Fallback ── */
.upload-fallback {
  margin-top: var(--space-md);
}

.btn-link {
  background: none;
  border: none;
  color: var(--navy);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-body);
}

.btn-link:hover {
  color: var(--gold);
}

.file-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  padding: var(--space-sm);
  background: var(--paper);
  border: 1px dashed var(--rule);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ── Signature ── */
.signature-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.signature-canvas-wrapper {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--white);
  overflow: hidden;
}

.signature-canvas {
  display: block;
  width: 100%;
  height: 120px;
  cursor: crosshair;
  touch-action: none;
}

.btn-clear-sig {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-muted);
  padding: 3px 8px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s;
}

.btn-clear-sig:hover {
  color: var(--error);
  border-color: var(--error);
}

.signature-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: italic;
}

/* ── Review Checklist ── */
.review-checklist {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-light);
  font-size: 13px;
}

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

.checklist-item.ok { color: var(--success); }
.checklist-item.missing { color: var(--error); }

.checklist-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ok   .checklist-dot { background: var(--success); }
.missing .checklist-dot { background: var(--error); }

/* ── Submit Section ── */
.form-section--submit {
  background: var(--paper);
}

.submit-row {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.btn-primary {
  height: 52px;
  padding: 0 var(--space-xxl);
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 280px;
}

.btn-primary:hover:not(:disabled) {
  background: var(--navy-mid);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26,39,68,0.25);
}

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

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  height: 36px;
  padding: 0 var(--space-lg);
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--navy);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
}

.submit-notice {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Verification intro ── */
.verification-intro {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.screen-enter {
  animation: fadeIn 0.3s ease-out forwards;
}

/* ── VERSION: 2026-04-20-F | Fixed captured-grid: proper 3-col grid, fixed blur/stacking ── */

/* Guest type toggle */
.guest-type-toggle {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
  padding: 12px 0;
  border-top: 1px solid var(--rule-light);
  border-bottom: 1px solid var(--rule-light);
}
.guest-type-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: .04em;
  white-space: nowrap;
}
.toggle-group {
  display: flex;
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.toggle-option {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.toggle-option input[type="radio"] {
  display: none;
}
.toggle-option span {
  display: block;
  padding: 6px 18px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--white);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.toggle-option input[type="radio"]:checked + span {
  background: var(--navy);
  color: var(--white);
}

/* Captured images grid: 3 per row */
.captured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 12px 0;
}
.captured-item {
  border: 1px solid var(--rule-light);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
  background: var(--paper);
}
.captured-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--rule-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 6px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.captured-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.captured-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: .04em;
}
.captured-status {
  font-size: 11px;
  color: var(--success);
}

/* Phone signature notice */
.phone-sig-notice {
  background: var(--gold-pale);
  border: 1px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Signature canvas phone mode - show as read-only */
.sig-phone-mode canvas {
  opacity: 0.9;
  cursor: default;
}

/* Stay guest row - now 4 columns */
.stay-guest-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 12px 0;
}

/* Section numbering style */
.section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule-light);
}

/* Mobile responsive */
@media (max-width: 700px) {
  .stay-guest-row { grid-template-columns: repeat(2, 1fr); }
  .captured-grid { grid-template-columns: repeat(2, 1fr); }
  .guest-type-toggle { flex-direction: column; align-items: flex-start; gap: 8px; }
  .form-header { flex-direction: column; gap: 10px; text-align: center; }
  .form-header-right { text-align: center; }
  .stay-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .stay-table { min-width: 700px; }
  .field-group--eighth, .field-group--sixth { flex: 1 1 calc(50% - 6px) !important; min-width: 0; }
  .form-row { flex-wrap: wrap; }
  .field-group--half, .field-group--third, .field-group--quarter { flex: 1 1 100% !important; }
  .signature-area { flex-direction: column; }
  .signature-left, .signature-right { width: 100%; }
  .signature-canvas { width: 100%; height: 100px; }
}

@media (max-width: 480px) {
  .captured-grid { grid-template-columns: repeat(2, 1fr); }
  .form-section { padding: 14px 12px; }
  .form-hotel-name { font-size: 16px; }
}

/* ── Stay Card Layout (replaces table rows) ── VERSION: 2026-04-20-R ── */

.stay-table { width: 100%; border-collapse: collapse; }
.stay-table tfoot .stay-total-row td { padding: 8px 4px; }
.stay-total-label {
  text-align: right;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--text-secondary);
  padding-right: 16px !important;
}
.stay-total-amount {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  text-align: right;
  white-space: nowrap;
}

.stay-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 8px;
  background: var(--paper);
}
.stay-card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
}
.stay-card-dates {
  font-size: 11px;
  color: rgba(255,255,255,.7);
  font-weight: 400;
}
.stay-card-row1 {
  display: flex;
  gap: 16px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--rule-light);
  flex-wrap: wrap;
}
.stay-card-row1 strong { color: var(--navy); }
.stay-card-row2 {
  display: flex;
  gap: 0;
  padding: 0;
}
.stay-card-row2 span {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  border-right: 1px solid var(--rule-light);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}
.stay-card-row2 span:last-child { border-right: none; }
.stay-card-row2 label {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .05em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.stay-card-total { color: var(--navy) !important; font-weight: 600 !important; }

@media (max-width: 600px) {
  .stay-card-row2 { flex-direction: column; }
  .stay-card-row2 span { border-right: none; border-bottom: 1px solid var(--rule-light); }
  .stay-card-row2 span:last-child { border-bottom: none; }
}

/* ── Stay Section Redesign ── VERSION: 2026-04-20-V ── */

.stay-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--rule-light);
  gap: 16px;
  flex-wrap: wrap;
}
.stay-header-hotel { flex: 1; }
.stay-hotel-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  font-family: var(--font-display);
}
.stay-header-conf {
  flex: 0 0 auto;
  text-align: right;
}
.stay-cards-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.stay-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.stay-footnotes p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  font-style: italic;
}
.stay-total-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--gold-pale);
  border: 1px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  white-space: nowrap;
}
.stay-total-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--text-secondary);
}
.stay-total-amount {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
}

/* Stay card */
.stay-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--paper);
}
.stay-card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 14px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
}
.stay-card-dates {
  font-size: 11px;
  color: rgba(255,255,255,.65);
  font-weight: 400;
}
.stay-card-row1 {
  display: flex;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--rule-light);
}
.scr1-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 14px;
  border-right: 1px solid var(--rule-light);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.scr1-item:last-child { border-right: none; }
.scr1-item label {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .05em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 3px;
}
.stay-card-row2 {
  display: flex;
  gap: 0;
}
.stay-card-row2 span {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 14px;
  border-right: 1px solid var(--rule-light);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}
.stay-card-row2 span:last-child { border-right: none; }
.stay-card-row2 label {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .05em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 3px;
}
.stay-card-row2 em {
  font-size: 10px;
  color: var(--text-muted);
  font-style: normal;
  margin-left: 2px;
}
.stay-card-total {
  color: var(--navy) !important;
  font-weight: 700 !important;
}

@media (max-width: 600px) {
  .stay-card-row1, .stay-card-row2 { flex-wrap: wrap; }
  .scr1-item, .stay-card-row2 span { flex: 1 1 calc(50% - 1px); border-bottom: 1px solid var(--rule-light); }
  .stay-header-row { flex-direction: column; align-items: flex-start; }
  .stay-header-conf { text-align: left; }
}

/* ── Stay Section v2 ── VERSION: 2026-04-21-H ── */

/* Section label bar with inline confirmation */
.section-label-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule-light);
}
.section-conf-inline {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--text-secondary);
}
.section-conf-inline strong {
  color: var(--navy);
  font-weight: 600;
}

/* Row 1: inline label: value, no wrap */
.stay-card-row1 {
  display: flex;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--rule-light);
  flex-wrap: nowrap;
  overflow: hidden;
}
.scr1-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  border-right: 1px solid var(--rule-light);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.scr1-item:last-child { border-right: none; }
/* Charge type gets more space, qty gets less */
.scr1-item:first-child { flex: 2; }
.scr1-item.scr1-qty    { flex: 0 0 auto; padding: 7px 8px; }

.scr1-item label {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
