:root {
  --gi-ink: #0f172a;
  --gi-muted: #334155;
  --gi-subtle: #475569;
  --gi-paper: #eaeff5;
  --gi-card: #f8fafc;
  --gi-card-inner: #ffffff;
  --gi-teal: #0d9488;
  --gi-teal-dark: #0f5664;
  --gi-coral: #e11d48;
  --gi-amber: #d97706;
  --gi-line: #cbd5e1;
  --gi-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --gi-font: "Noto Sans Thai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --gi-display: "Chakra Petch", sans-serif;
}

* { box-sizing: border-box; }
html {
  background: var(--gi-paper);
  color-scheme: light;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--gi-ink);
  font-family: var(--gi-font);
  line-height: 1.55;
  background: radial-gradient(circle at 85% 10%, rgba(13, 148, 136, 0.06), transparent 32rem),
              radial-gradient(circle at 15% 90%, rgba(14, 165, 233, 0.05), transparent 30rem),
              linear-gradient(180deg, #e4eaf1 0%, #ebf1f7 50%, #e6ecf3 100%);
  min-height: 100vh;
}

.gi-shell {
  max-width: 1840px;
  width: 100%;
  margin: 0 auto;
  padding: 8px 20px 24px;
}

/* Unified Ultra-Compact Topbar (Reduced height by ~80%) */
.gi-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  border-bottom: 1px solid var(--gi-line);
  padding: 4px 0 10px;
  margin-bottom: 8px;
}
.gi-brand-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.gi-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gi-ink);
  text-decoration: none;
}
.gi-brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--gi-teal-dark);
  color: #fff;
  font-family: var(--gi-display);
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(15, 86, 100, 0.25);
}
.gi-brand-text {
  display: flex;
  flex-direction: column;
}
.gi-brand-text strong {
  font: 700 0.95rem var(--gi-display);
  letter-spacing: .02em;
  color: var(--gi-teal-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}
.gi-brand-sep {
  color: var(--gi-line);
  font-weight: 400;
}
.gi-brand-text small {
  color: var(--gi-muted);
  font-size: .68rem;
  font-weight: 600;
}

/* Privacy & Security Banner (Formal Official Notice) */
.gi-privacy-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: .74rem;
  line-height: 1.35;
  max-width: 680px;
}
.gi-privacy-icon {
  font-size: .88rem;
  flex-shrink: 0;
}
.gi-privacy-banner strong {
  font-weight: 700;
  color: #14532d;
}

.gi-topbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.gi-manual-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #86efac;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: .74rem;
  font-weight: 700;
  text-decoration: none;
  transition: all .2s ease;
  box-shadow: 0 1px 3px rgba(22, 101, 52, 0.1);
}
.gi-manual-link-btn:hover {
  background: #dcfce7;
  border-color: #4ade80;
  color: #166534;
  transform: translateY(-1px);
}
.gi-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 99px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: .74rem;
  font-weight: 600;
}
.gi-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: gi-pulse 2s infinite;
}
@keyframes gi-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.gi-view-switcher {
  display: none; /* Desktop split */
}
.gi-view-btn {
  padding: 5px 12px;
  border: 1px solid var(--gi-line);
  background: #fff;
  border-radius: 8px;
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
}
.gi-view-btn.is-active {
  background: var(--gi-teal-dark);
  color: #fff;
  border-color: var(--gi-teal-dark);
}

/* Split-Screen Main Grid: Compact Preview on Left, Spacious Form on Right */
.gi-split-layout {
  display: grid;
  grid-template-columns: minmax(360px, 480px) minmax(580px, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 8px;
}

@media (min-width: 1440px) {
  .gi-split-layout {
    grid-template-columns: minmax(400px, 520px) minmax(720px, 1fr);
    gap: 24px;
  }
}

@media (min-width: 1680px) {
  .gi-split-layout {
    grid-template-columns: minmax(440px, 560px) minmax(860px, 1fr);
    gap: 28px;
  }
}

/* Left Wizard Card */
.gi-wizard-pane {
  background: var(--gi-card);
  border: 1.5px solid var(--gi-line);
  border-radius: 20px;
  padding: 24px 28px;
  box-shadow: var(--gi-shadow);
}

/* Step Tabs */
.gi-steps-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid #cbd5e1;
  margin-bottom: 20px;
}
.gi-step-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 8px;
  background: #edf2f7;
  border: 1.5px solid #cbd5e1;
  border-radius: 11px;
  cursor: pointer;
  text-align: left;
  transition: all .2s ease;
}
.gi-step-tab:hover {
  background: #e2e8f0;
}
.gi-step-tab.is-active {
  background: #f0fdfa;
  border-color: var(--gi-teal);
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.16);
}
.gi-step-tab.is-completed .gi-step-num {
  background: var(--gi-teal);
  color: #fff;
}
.gi-step-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #cbd5e1;
  color: var(--gi-ink);
  font: 700 0.88rem var(--gi-display);
  flex-shrink: 0;
}
.gi-step-tab.is-active .gi-step-num {
  background: var(--gi-teal-dark);
  color: #fff;
}
.gi-step-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.gi-step-info strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gi-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gi-step-info small {
  font-size: 0.74rem;
  color: var(--gi-subtle);
  white-space: nowrap;
}

/* Card Headers */
.gi-card-header {
  margin-bottom: 20px;
}
.gi-card-header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--gi-ink);
}
.gi-card-header p {
  margin: 6px 0 0;
  color: var(--gi-muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.gi-card-subheading {
  margin: 16px 0 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gi-ink);
}

/* Guided Intake Step 1 - Question Box & Patient Section Separation */
.gi-question-box {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 20px;
}
.gi-question-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 38px;
}
.gi-question-title-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.gi-rel-subtext {
  color: #64748b;
  font-size: 0.85rem;
}
.gi-inline-other-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gi-inline-other-wrap[hidden] {
  display: none !important;
}
.gi-question-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0f766e;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  letter-spacing: .02em;
}
.gi-patient-section-header,
.gi-patient-header-row {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1.5px dashed #cbd5e1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.gi-patient-fields-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
@media (max-width: 680px) {
  .gi-patient-fields-row {
    grid-template-columns: 1fr;
  }
}

/* Section Dividers */
.gi-section-divider {
  background: #edf2f7;
  border-left: 4.5px solid var(--gi-teal);
  padding: 12px 16px;
  border-radius: 8px;
  margin: 10px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.gi-section-divider strong {
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--gi-ink);
}
.gi-section-divider small {
  font-size: 0.86rem;
  color: #475569;
}

/* Field Groups & Choice Cards */
.gi-field-group {
  margin-bottom: 20px;
}
.gi-group-label {
  display: block;
  margin-bottom: 8px;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--gi-ink);
}
.gi-required {
  color: var(--gi-coral);
}
.gi-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 960px) {
  .gi-options-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.gi-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gi-radio-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #94a3b8;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
}
.gi-choice-card:hover .gi-radio-circle {
  border-color: #0d9488;
}
.gi-choice-card.is-selected .gi-radio-circle {
  border-color: #0d9488;
  background: #0d9488;
  box-shadow: inset 0 0 0 4px #fff;
}
.gi-choice-card {
  padding: 12px 14px;
  border: 1.5px solid var(--gi-line);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: all .18s ease;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.gi-choice-card:hover {
  border-color: #94a3b8;
  transform: translateY(-1px);
}
.gi-choice-card.is-selected {
  background: #f0fdfa;
  border-color: var(--gi-teal);
  box-shadow: 0 0 0 2px var(--gi-teal);
}
.gi-choice-card strong {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--gi-ink);
}
.gi-choice-card small {
  font-size: 0.82rem;
  color: #475569;
}

/* Purpose Radio List */
.gi-purpose-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #edf2f7;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
}
.gi-radio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.96rem;
  color: var(--gi-ink);
  transition: background .15s ease;
}
.gi-radio-row:hover {
  background: #e2e8f0;
}
.gi-radio-row input[type="radio"] {
  accent-color: var(--gi-teal);
  width: 18px;
  height: 18px;
}
.gi-sub-input {
  margin-left: 30px;
  margin-bottom: 6px;
}
.gi-sub-input input {
  width: 100%;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.92rem;
}

/* Medical Exam Checkbox Grid */
.gi-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  background: #edf2f7;
  padding: 14px;
  border-radius: 14px;
  border: 1.5px solid #cbd5e1;
}
.gi-exam-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.96rem;
  color: #1e293b;
  transition: all 0.18s ease;
  user-select: none;
  box-sizing: border-box;
}
.gi-exam-checkbox:hover {
  background: #f0fdfa;
  border-color: #0d9488;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.08);
}
.gi-exam-checkbox.is-checked,
.gi-exam-checkbox:has(input[type="checkbox"]:checked) {
  background: #f0fdfa;
  border-color: #0d9488;
  color: #0f766e;
  font-weight: 600;
  box-shadow: 0 0 0 1px #0d9488;
}
.gi-exam-checkbox input[type="checkbox"] {
  accent-color: var(--gi-teal, #0d9488);
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}
.gi-exam-checkbox span {
  flex: 1;
  line-height: 1.4;
}

/* Delivery Options - 3 Modern Cards in One Row */
.gi-delivery-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 860px) {
  .gi-delivery-options {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.gi-radio-box {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  padding: 16px 18px;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  cursor: pointer;
  background: #ffffff;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.gi-radio-box:hover {
  border-color: #0d9488;
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.08);
}

.gi-radio-box input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gi-radio-box:has(input:focus-visible) {
  outline: 2px solid var(--gi-teal);
  outline-offset: 2px;
}

.gi-radio-box.is-selected {
  border-color: var(--gi-teal);
  background: linear-gradient(180deg, #f0fdfa 0%, #f8fafc 100%);
  box-shadow: 0 0 0 2px var(--gi-teal), 0 8px 20px -4px rgba(13, 148, 136, 0.18);
}

.gi-delivery-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.gi-delivery-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f1f5f9;
  font-size: 1.25rem;
  transition: all .2s ease;
}

.gi-radio-box:hover .gi-delivery-icon-badge {
  background: #e2e8f0;
}

.gi-radio-box.is-selected .gi-delivery-icon-badge {
  background: #ccfbf1;
  color: #0f766e;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.2);
}

.gi-radio-box .gi-radio-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #94a3b8;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
}

.gi-radio-box:hover .gi-radio-circle {
  border-color: var(--gi-teal);
}

.gi-radio-box.is-selected .gi-radio-circle {
  border-color: var(--gi-teal);
  background: var(--gi-teal);
  box-shadow: inset 0 0 0 4px #fff;
}

.gi-radio-box strong {
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--gi-ink);
  line-height: 1.35;
}

.gi-radio-box small {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.45;
}

.gi-radio-box.is-selected small {
  color: #334155;
}
.gi-postal-custom-panel {
  background: #edf2f7;
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  padding: 16px;
  margin-top: 10px;
}

/* Form Inputs */
.gi-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.gi-span-2 {
  grid-column: 1 / -1;
}
.gi-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gi-field-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.gi-btn-today {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  color: #0f766e;
  border-radius: 6px;
  font: 600 0.82rem var(--gi-font);
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.gi-btn-today:hover {
  background: #ccfbf1;
  color: #115e59;
}
.gi-form-field label {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--gi-ink);
  margin-bottom: 2px;
}
.gi-form-field input,
.gi-form-field select,
.gi-form-field textarea {
  width: 100%;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.98rem;
  color: var(--gi-ink);
  background: #fff;
  min-height: 44px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.gi-form-field textarea {
  min-height: 80px;
}
.gi-form-field input:focus,
.gi-form-field select:focus,
.gi-form-field textarea:focus {
  outline: none;
  border-color: var(--gi-teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}
.gi-field-hint {
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.45;
}

/* Step 5: Review Cards */
.gi-ref-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gi-teal-dark) 0%, #064e3b 100%);
  color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(15, 86, 100, 0.25);
}
.gi-ref-text span {
  display: block;
  font-size: .72rem;
  color: #99f6e4;
  letter-spacing: .06em;
}
.gi-ref-text strong {
  display: block;
  font: 700 1.45rem var(--gi-display);
  letter-spacing: .08em;
  margin: 2px 0 3px;
}
.gi-ref-text small {
  font-size: .68rem;
  color: #ccfbf1;
}
.gi-ref-badge {
  padding: 6px 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: .72rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

/* Pre-Registration Queue Submission Status Card */
.gi-prereg-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}
.gi-prereg-card.is-submitting {
  background: #f8fafc;
  border-color: #93c5fd;
}
.gi-prereg-card.is-submitted {
  background: #f0fdf4;
  border-color: #86efac;
}
.gi-prereg-card.is-failed {
  background: #fef2f2;
  border-color: #fca5a5;
}
.gi-prereg-card.is-skipped {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.gi-prereg-card.is-stale {
  background: #fffbeb;
  border-color: #fde68a;
}
.gi-prereg-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gi-prereg-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}
.gi-prereg-title-group {
  flex: 1;
  min-width: 0;
}
.gi-prereg-title-group strong {
  display: block;
  font-size: 0.92rem;
  color: #0f172a;
  line-height: 1.3;
}
.gi-prereg-title-group small {
  display: block;
  font-size: 0.78rem;
  color: #475569;
  margin-top: 2px;
  line-height: 1.4;
}
.gi-prereg-details {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
  font-size: 0.8rem;
  color: #334155;
  line-height: 1.5;
}
.gi-prereg-card.is-submitted .gi-prereg-title-group strong {
  color: #166534;
}
.gi-prereg-card.is-failed .gi-prereg-title-group strong {
  color: #991b1b;
}
.gi-prereg-card.is-stale .gi-prereg-title-group strong {
  color: #92400e;
}
.gi-btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Electronic Consent Audit Trail Card (Tier 3) */
.gi-audit-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.gi-audit-status-badge.is-unverified {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}
.gi-audit-status-badge.is-unverified .gi-audit-status-icon {
  color: #d97706;
}
.gi-audit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 14px;
}
.gi-audit-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gi-audit-shield {
  font-size: 1.35rem;
  line-height: 1;
}
.gi-audit-header-left strong {
  display: block;
  font-size: 0.88rem;
  color: #0f172a;
}
.gi-audit-header-left small {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 1px;
}
.gi-audit-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 99px;
  background: #ecfdf5;
  color: #065f46;
  border: 1.5px solid #a7f3d0;
  font: 700 0.76rem var(--gi-display);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.gi-audit-status-icon {
  font-weight: 800;
  color: #059669;
}
.gi-audit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.gi-audit-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #ffffff;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
}
.gi-audit-label {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
}
.gi-audit-val {
  font-size: 0.8rem;
  color: #1e293b;
  font-weight: 600;
}
.gi-audit-val.is-code {
  font-family: var(--gi-display);
  font-weight: 700;
  color: #0f766e;
  letter-spacing: 0.05em;
}
.gi-audit-note {
  font-size: 0.74rem;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 8px 12px;
  line-height: 1.5;
}
.gi-privacy-audit-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: #ecfdf5;
  color: #065f46;
  font-weight: 700;
  font-size: 0.76rem;
  border: 1px solid #a7f3d0;
}
@media (max-width: 640px) {
  .gi-audit-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* Step 1 Consent Status Strip */
.gi-consent-status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 10px;
  padding: 9px 14px;
  margin: 10px 0 14px;
  font-size: 0.78rem;
  color: #166534;
}
.gi-css-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gi-css-icon {
  font-size: 1.1rem;
}
.gi-code-inline {
  background: #dcfce7;
  color: #15803d;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-family: var(--gi-display);
}
.gi-btn-view-audit {
  flex-shrink: 0;
  background: #15803d;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font: 700 0.74rem var(--gi-font);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px rgba(21, 128, 61, 0.2);
}
.gi-btn-view-audit:hover {
  background: #166534;
  transform: translateY(-1px);
}
@media (max-width: 640px) {
  .gi-consent-status-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ==========================================================================
   Hero Document Checklist Card (Step 5)
   Prominent, Disciplined, Hospital-Grade Interactive Checklist with Checkbox Controls
   ========================================================================== */
.gi-hero-checklist-card {
  background: #ffffff;
  border: 1.5px solid #0d9488;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.08);
  position: relative;
  overflow: hidden;
}

.gi-hero-checklist-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0d9488 0%, #0f766e 50%, #14b8a6 100%);
}

.gi-hcc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid #f1f5f9;
  margin-bottom: 14px;
}

.gi-hcc-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gi-hcc-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.gi-hcc-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.gi-hcc-subtitle {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.4;
}

.gi-hcc-progress-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.gi-hcc-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  transition: all 0.25s ease;
}

.gi-hcc-progress-badge.is-in-progress {
  background: #f0fdfa;
  border-color: #99f6e4;
  color: #0f766e;
}
.gi-hcc-progress-badge.is-in-progress .gi-hcc-progress-dot {
  background: #0d9488;
}

.gi-hcc-progress-badge.is-complete {
  background: #ecfdf5;
  border-color: #86efac;
  color: #15803d;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}
.gi-hcc-progress-badge.is-complete .gi-hcc-progress-dot {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

/* Interactive Checklist Items List */
.gi-checklist-interactive-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.gi-check-item {
  position: relative;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
}

.gi-check-item:hover {
  background: #ffffff;
  border-color: #0d9488;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
  transform: translateY(-1px);
}

.gi-check-item.is-checked {
  background: #f0fdf4;
  border-color: #86efac;
}

.gi-check-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  width: 100%;
}

.gi-doc-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gi-check-label .gi-check-box {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.18s ease;
}

.gi-check-svg {
  width: 13px;
  height: 13px;
  stroke: #ffffff;
  stroke-width: 2.6;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gi-doc-checkbox:checked + .gi-check-box {
  background: #10b981;
  border-color: #10b981;
}

.gi-doc-checkbox:checked + .gi-check-box .gi-check-svg {
  opacity: 1;
  transform: scale(1);
}

.gi-check-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gi-check-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.gi-check-title {
  font-size: 0.90rem;
  font-weight: 700;
  color: #0f172a;
  transition: color 0.15s ease;
}

.gi-check-item.is-checked .gi-check-title {
  color: #15803d;
}

.gi-check-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.70rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
  letter-spacing: 0.02em;
}

.gi-check-item.is-checked .gi-check-tag {
  background: #dcfce7;
  color: #166534;
}

.gi-check-desc {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.5;
}

.gi-check-item.is-checked .gi-check-desc {
  color: #166534;
}

/* Certification Rule Notice */
.gi-hcc-cert-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  color: #334155;
  font-size: 0.80rem;
  line-height: 1.5;
  margin-top: 4px;
}

.gi-hcc-cert-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: -1px;
}

.gi-hcc-cert-text strong {
  display: inline;
  color: #0f172a;
  font-weight: 700;
}

/* Dynamic Channel Guide (Harmonized) */
.gi-channel-guide {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #1e293b;
}

.gi-channel-guide.is-postal {
  background: #fafaf9;
  border-color: #e2e8f0;
}

.gi-channel-guide strong {
  display: block;
  font-size: 0.90rem;
  color: #0f172a;
  margin-bottom: 4px;
}

.gi-channel-guide ul {
  margin: 8px 0 0;
  padding-left: 20px;
  color: #475569;
}

.gi-channel-guide li {
  margin-bottom: 4px;
}

.gi-channel-pay-highlight {
  margin: 6px 0 4px;
  color: #0f766e;
  background: #f0fdfa;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid #ccfbf1;
  line-height: 1.55;
}

/* Official Link Row (Harmonized) */
.gi-official-link-row {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.76rem;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.gi-official-link-row a {
  color: #0d9488;
  font-weight: 600;
  text-decoration: underline;
}

.gi-official-link-row a:hover {
  color: #0f766e;
}

/* Signature Guidance Card in Step 5 (Harmonized) */
.gi-signature-guide-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.gi-signature-guide-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.gi-signature-guide-header strong {
  font-size: 1.02rem;
  color: #0f172a;
}

.gi-signature-guide-header small {
  font-size: 0.78rem;
  color: #64748b;
}

.gi-signature-spots-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 860px) {
  .gi-signature-spots-grid {
    grid-template-columns: 1fr;
  }
}

.gi-sig-spot-item {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all .15s ease;
}

.gi-sig-spot-item:hover {
  background: #ffffff;
  border-color: #0d9488;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.gi-sig-spot-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f766e;
}

.gi-sig-spot-target {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  background: #f0fdfa;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #ccfbf1;
  width: fit-content;
}

.gi-sig-spot-desc {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.5;
}

.gi-sig-tip {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  font-size: 0.80rem;
  color: #92400e;
  line-height: 1.5;
}

/* Acknowledgment Checkbox Card (Harmonized) */
.gi-ack-card {
  margin-bottom: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  transition: all .2s ease;
}
.gi-ack-card.is-confirmed {
  background: #f0fdf4;
  border-color: #86efac;
}
.gi-ack-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.gi-ack-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.gi-ack-custom-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid #ca8a04;
  background: #fff;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}
.gi-ack-label input[type="checkbox"]:checked + .gi-ack-custom-check {
  background: #16a34a;
  border-color: #16a34a;
}
.gi-ack-label input[type="checkbox"]:checked + .gi-ack-custom-check::after {
  content: "✓";
  color: #fff;
  font-weight: 900;
  font-size: 14px;
}
.gi-ack-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gi-ack-content strong {
  font-size: .88rem;
  color: #854d0e;
}
.gi-ack-card.is-confirmed .gi-ack-content strong {
  color: #166534;
}
.gi-ack-content small {
  font-size: .76rem;
  color: #a16207;
  line-height: 1.45;
}
.gi-ack-card.is-confirmed .gi-ack-content small {
  color: #15803d;
}

/* Locked Guidance Hint: Clean Solid Border */
.gi-ack-locked-hint {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  color: #92400e;
  margin-bottom: 16px;
  transition: all .25s ease;
}
.gi-ack-lock-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fef3c7;
  border: 1.5px solid #fde68a;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.15);
}
.gi-ack-lock-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.gi-ack-lock-text strong {
  font-size: 0.92rem;
  color: #78350f;
}
.gi-ack-lock-text small {
  font-size: 0.8rem;
  color: #b45309;
  line-height: 1.4;
}

/* Dynamic Processing Banner: Shown momentarily when user checks the box */
.gi-ack-processing-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 14px;
  background: #f0fdfa;
  border: 1.5px solid #5eead4;
  color: #0f766e;
  margin-bottom: 16px;
  animation: giPulseSoft 1.5s infinite;
}
.gi-ack-process-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.gi-ack-process-text strong {
  font-size: 0.92rem;
  color: #0d9488;
}
.gi-ack-process-text small {
  font-size: 0.8rem;
  color: #115e59;
}
@keyframes giPulseSoft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.92; transform: scale(0.995); }
}

/* Unlocked Success Notice Strip */
.gi-unlocked-success-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  font-size: 0.82rem;
  line-height: 1.4;
  margin-bottom: 6px;
}
.gi-uss-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  flex-shrink: 0;
}

/* Downloads Hub */
.gi-downloads-hub {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gi-downloads-hub.is-unlocked {
  animation: giPackageSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.gi-downloads-hub .gi-btn-accent {
  width: 100%;
  padding: 14px 20px;
}
.gi-download-secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

/* Buttons */
.gi-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font: 600 0.98rem var(--gi-font);
  cursor: pointer;
  transition: all .18s ease;
  border: 0;
  text-decoration: none;
  justify-content: center;
}
.gi-btn:focus-visible {
  outline: 3px solid rgba(13, 148, 136, 0.4);
  outline-offset: 2px;
}
.gi-btn-primary {
  background: var(--gi-teal-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(15, 86, 100, 0.25);
}
.gi-btn-primary:hover {
  background: #093c44;
  transform: translateY(-1px);
}
.gi-btn-primary:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.gi-btn-accent {
  background: linear-gradient(135deg, #0d9488 0%, #0f5664 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.35);
}
.gi-btn-accent:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.gi-btn-large {
  padding: 15px 24px;
  font-size: 1.05rem;
}
.gi-btn-large strong {
  display: block;
  font-size: 1.05rem;
}
.gi-btn-large small {
  display: block;
  font-size: 0.82rem;
  color: #ccfbf1;
  font-weight: 400;
}
.gi-btn-icon {
  font-size: 1.35rem;
}
.gi-btn-ghost {
  border: 1.5px solid var(--gi-line);
  background: #fff;
  color: var(--gi-muted);
}
.gi-btn-ghost:hover {
  border-color: #94a3b8;
  color: var(--gi-ink);
  background: #f8fafc;
}

/* Wizard Navigation Footer */
.gi-wizard-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1.5px solid #cbd5e1;
}
.gi-nav-spacer {
  flex: 1;
}

/* RIGHT COLUMN: Real-Time Live Preview Pane */
.gi-preview-pane {
  position: sticky;
  top: 12px;
  height: calc(100vh - 24px);
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  background: #0f172a;
  border-radius: 14px;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

/* Preview Topbar */
.gi-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #090d16;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 8px;
  flex-shrink: 0;
}
.gi-page-tabs {
  display: flex;
  gap: 6px;
}
.gi-page-tab {
  padding: 6px 12px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font: 600 .76rem var(--gi-font);
  cursor: pointer;
  transition: all .15s ease;
}
.gi-page-tab:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.gi-page-tab.is-active {
  background: var(--gi-teal);
  color: #fff;
  border-color: var(--gi-teal);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

.gi-preview-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}
.gi-tool-btn {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  cursor: pointer;
  font-size: .82rem;
  display: grid;
  place-items: center;
}
.gi-tool-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.gi-zoom-level {
  font: 600 .7rem var(--gi-display);
  color: #94a3b8;
  min-width: 40px;
  text-align: center;
}

/* Canvas Stage: Reduced black border to minimum, centered, no vertical scroll */
.gi-preview-stage {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #090d16;
}

/* Paper Sheet: Fits exactly 100% vertical height of preview stage */
.gi-paper-elevation {
  position: relative;
  height: 100%;
  max-height: 100%;
  width: auto;
  max-width: 100%;
  aspect-ratio: 595.32 / 841.92;
  background: #ffffff;
  border-radius: 3px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transition: transform .2s ease;
  transform-origin: center center;
}
#gi-live-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #fff;
  object-fit: contain;
}

/* Compact footer */
.gi-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #090d16;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #64748b;
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* Loading Spinner */
.gi-paper-loading {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 10;
  font-size: .86rem;
  color: var(--gi-muted);
}
.gi-paper-loading.is-hidden {
  display: none;
}
.gi-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--gi-teal);
  border-radius: 50%;
  animation: gi-spin .7s linear infinite;
}
@keyframes gi-spin {
  to { transform: rotate(360deg); }
}

/* Focus Highlight Box */
.gi-focus-box {
  position: absolute;
  border: 2px solid var(--gi-teal);
  background: rgba(13, 148, 136, 0.16);
  border-radius: 3px;
  pointer-events: none;
  box-shadow: 0 0 14px rgba(13, 148, 136, 0.55);
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Calibration Toolbar & Controls */
.gi-tool-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 4px;
}
.gi-preview-tools .gi-tool-btn {
  width: auto;
  min-width: 28px;
  padding: 4px 8px;
  font-size: .76rem;
  font-weight: 600;
}
#gi-drag-mode-toggle.is-active,
#gi-all-fields-toggle.is-active {
  background: #0d9488;
  color: #fff;
  border-color: #14b8a6;
  box-shadow: 0 0 8px rgba(20, 184, 166, 0.5);
}
#gi-live-canvas.is-calibrating {
  cursor: grab;
}
#gi-live-canvas.is-dragging {
  cursor: grabbing !important;
}

/* Floating Drag HUD Badge */
.gi-drag-hud {
  position: absolute;
  pointer-events: none;
  z-index: 20;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.9);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font: 700 .74rem var(--gi-display);
  letter-spacing: .04em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  white-space: nowrap;
  transform: translate(12px, -24px);
}

/* Preview Footer */
.gi-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: .74rem;
}
.gi-preview-footer strong {
  color: #38bdf8;
}

/* Status Message */
.gi-pdf-message {
  margin-top: 12px;
  min-height: 24px;
  font-size: .84rem;
  color: var(--gi-teal-dark);
  font-weight: 600;
}
.gi-pdf-message.is-error {
  color: var(--gi-coral);
}

/* Site Footer */
.gi-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--gi-line);
  color: var(--gi-subtle);
  font-size: .74rem;
}

/* Responsive Breakpoints */
@media (max-width: 1023px) {
  .gi-view-switcher {
    display: inline-flex;
    gap: 4px;
  }
  .gi-split-layout {
    grid-template-columns: 1fr;
  }
  .gi-preview-pane {
    position: static;
    height: 640px;
  }
  .gi-split-layout[data-view="form"] .gi-preview-pane {
    display: none;
  }
  .gi-split-layout[data-view="preview"] .gi-wizard-pane {
    display: none;
  }
}

@media (max-width: 640px) {
  .gi-shell {
    padding: 12px 14px 28px;
  }
  .gi-wizard-pane {
    padding: 18px 16px;
  }
  .gi-steps-nav {
    grid-template-columns: repeat(3, 1fr);
  }
  .gi-options-grid,
  .gi-form-grid,
  .gi-download-secondary-grid,
  .gi-checkbox-grid {
    grid-template-columns: 1fr;
  }
  .gi-preview-pane {
    height: 520px;
  }
}

/* Remember Applicant Profile Box */
.gi-remember-box {
  margin-top: 6px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08) 0%, rgba(15, 23, 42, 0.03) 100%);
  border: 1px solid rgba(13, 148, 136, 0.35);
  border-radius: 12px;
  transition: all 0.2s ease;
}
.gi-remember-box:hover {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.12) 0%, rgba(15, 23, 42, 0.06) 100%);
  border-color: rgba(13, 148, 136, 0.55);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.08);
}
.gi-remember-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.gi-remember-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.gi-remember-custom-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 6px;
  border: 2px solid #0d9488;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}
.gi-remember-label input[type="checkbox"]:checked + .gi-remember-custom-check {
  background: #0d9488;
  border-color: #0d9488;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.35);
}
.gi-remember-label input[type="checkbox"]:checked + .gi-remember-custom-check::after {
  content: "✓";
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}
.gi-remember-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.gi-remember-title {
  font-size: 1.04rem;
  font-weight: 700;
  color: #0f172a;
}
.gi-remember-subtitle {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.45;
}

/* Payment Box (PromptPay QR & SCB Bank Transfer) */
.gi-payment-box {
  margin-top: 16px;
  padding: 18px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}
.gi-payment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.gi-bank-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .95rem;
  color: #0f172a;
}
.gi-fee-tag {
  background: #f0fdf4;
  color: #15803d;
  font-size: .78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid #86efac;
}

/* 2-Column Payment Grid */
.gi-payment-grid {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 860px) {
  .gi-payment-grid {
    grid-template-columns: 1fr;
  }
}

/* SCB Direct Transfer Hero Card (Official Srinagarind Hospital Account) */
.gi-scb-hero-card {
  background: #ffffff;
  border: 2px solid #4e148c;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(78, 20, 140, 0.12);
  display: flex;
  flex-direction: column;
}
.gi-scb-card-header {
  width: 100%;
  background: linear-gradient(135deg, #4e148c 0%, #36096d 100%);
  color: #ffffff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gi-scb-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.gi-scb-emblem {
  background: #fbbf24;
  color: #36096d;
  font-weight: 900;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.gi-scb-tag {
  background: rgba(255, 255, 255, 0.18);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.gi-scb-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  flex: 1;
}
.gi-scb-beneficiary-name {
  background: #fbf7ff;
  border: 1px solid #e9d5ff;
  border-radius: 10px;
  padding: 10px 14px;
  text-align: left;
}
.gi-scb-label {
  font-size: 0.76rem;
  color: #6b21a8;
  font-weight: 600;
  display: block;
}
.gi-scb-name-val {
  font-size: 1.05rem;
  color: #3b0764;
  font-weight: 800;
  margin-top: 2px;
  display: block;
}
.gi-scb-acc-box {
  background: #faf5ff;
  border: 1.5px solid #c084fc;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: center;
}
.gi-scb-acc-label {
  font-size: 0.76rem;
  color: #7e22ce;
  font-weight: 600;
  display: block;
}
.gi-scb-number-row {
  margin: 6px 0 10px;
}
.gi-scb-acc-digits {
  font-family: "Courier New", Courier, monospace, monospace;
  font-size: 1.65rem;
  font-weight: 900;
  color: #3b0764;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 2px rgba(78, 20, 140, 0.1);
}
.gi-btn-copy-acc-large {
  width: 100%;
  padding: 10px 14px;
  background: linear-gradient(135deg, #4e148c 0%, #36096d 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(78, 20, 140, 0.25);
  transition: all 0.2s ease;
}
.gi-btn-copy-acc-large:hover {
  background: linear-gradient(135deg, #3b0764 0%, #200445 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(78, 20, 140, 0.35);
}
.gi-btn-copy-acc-large.is-copied {
  background: #15803d !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(21, 128, 61, 0.3) !important;
}
.gi-scb-amount-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: #166534;
  font-weight: 600;
}
.gi-scb-amount-val {
  font-size: 1.15rem;
  color: #15803d;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.gi-scb-meta-details {
  font-size: 0.76rem;
  color: #475569;
  line-height: 1.5;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.gi-scb-proof-link-wrap {
  margin-top: 2px;
  text-align: center;
}
.gi-scb-proof-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #7c3aed;
  text-decoration: underline;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.gi-scb-proof-btn:hover {
  background: #f3e8ff;
}

/* Account Warning Alert (Explaining why central KKU QR should not be scanned) */
.gi-account-warning-alert {
  background: #fffbeb;
  border: 1.5px solid #f59e0b;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.gi-account-warning-alert .gi-alert-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.gi-account-warning-alert .gi-alert-content {
  font-size: 0.78rem;
  color: #92400e;
  line-height: 1.5;
}
.gi-account-warning-alert .gi-alert-content strong {
  display: block;
  font-size: 0.84rem;
  color: #78350f;
  margin-bottom: 2px;
}
.gi-account-warning-alert .gi-alert-content p {
  margin: 0;
}

/* 3-Step Transfer Guide Card */
.gi-transfer-steps-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.8rem;
}
.gi-transfer-steps-card strong {
  color: #0f172a;
}
.gi-steps-list {
  margin: 8px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #334155;
  line-height: 1.5;
}
.gi-steps-list li strong {
  color: #0f172a;
}
.gi-steps-list li em {
  font-style: normal;
  font-weight: 600;
  color: #4e148c;
}

/* Bank Column Right */
.gi-bank-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gi-physical-proof-notice {
  padding: 12px 14px;
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  font-size: .78rem;
  color: #78350f;
  line-height: 1.6;
}
.gi-physical-proof-notice strong {
  color: #92400e;
  display: block;
  margin-bottom: 4px;
}
.gi-physical-proof-notice ul {
  margin: 0;
  padding-left: 18px;
}
.gi-physical-proof-notice li {
  margin-bottom: 4px;
}
.gi-proof-help {
  margin-top: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  font-size: .74rem;
  color: #334155;
  line-height: 1.55;
}
.gi-proof-help strong {
  color: #1e293b;
  display: block;
  margin-bottom: 4px;
}
.gi-proof-help ul {
  margin: 0;
  padding-left: 18px;
}
.gi-proof-help li {
  margin-bottom: 4px;
}
.gi-proof-help a {
  color: #2563eb;
  text-decoration: underline;
  font-weight: 600;
}
/* Payment Preference Selection & Dynamic Package Generator */
.gi-payment-section {
  margin-top: 18px;
}
.gi-pay-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  .gi-pay-mode-grid {
    grid-template-columns: 1fr;
  }
}
.gi-pay-mode-card {
  position: relative;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.gi-pay-mode-card:hover {
  border-color: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.12);
}
.gi-pay-mode-card:focus-visible {
  outline: 2px solid #0284c7;
  outline-offset: 2px;
}
.gi-pay-mode-card.is-selected {
  border-color: #0284c7;
  background: linear-gradient(145deg, #f0f9ff 0%, #ffffff 100%);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.16);
}
.gi-pay-mode-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.gi-pay-mode-icon {
  font-size: 1.35rem;
}
.gi-pay-mode-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}
.gi-badge-recom {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.gi-badge-counter {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.gi-badge-exempt {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.gi-pay-mode-radio-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.gi-pay-mode-card.is-selected .gi-pay-mode-radio-circle {
  border-color: #0284c7;
  background: #0284c7;
}
.gi-pay-mode-card.is-selected .gi-pay-mode-radio-circle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}
.gi-pay-mode-card strong {
  font-size: 0.92rem;
  color: #0f172a;
  line-height: 1.35;
}
.gi-pay-mode-card.is-selected strong {
  color: #0284c7;
}
.gi-pay-mode-card small {
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.45;
}

/* Builder Status Indicator (เหมือนกำลังสร้างชุดจ่าย) */
.gi-pay-building-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px 20px;
  margin: 14px 0 18px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1.5px dashed #0284c7;
  border-radius: 14px;
  color: #0369a1;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}
.gi-pay-building-indicator[hidden] {
  display: none !important;
}
.gi-pay-building-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(2, 132, 199, 0.25);
  border-top-color: #0284c7;
  border-radius: 50%;
  animation: giSpin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes giSpin {
  to { transform: rotate(360deg); }
}

/* Package Panels Animation & Layout */
.gi-pay-package-panel {
  transition: opacity 0.25s ease;
}
.gi-pay-package-panel[hidden] {
  display: none !important;
}
.gi-pay-package-panel.is-active {
  animation: giPackageSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes giPackageSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Specific Guide Box Themes */
.gi-counter-guide-box,
.gi-cheque-guide-box,
.gi-exempt-guide-box {
  margin-top: 14px;
  padding: 18px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}
.gi-counter-guide-box {
  border-color: #bae6fd;
  background: linear-gradient(180deg, #f8fafc 0%, #f0f9ff 100%);
}
.gi-cheque-guide-box {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}
.gi-exempt-guide-box {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f8fafc 0%, #f0fdf4 100%);
}

.gi-guide-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.gi-guide-box-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.96rem;
  color: #0f172a;
}
.gi-guide-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.gi-guide-feature-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.gi-feature-label {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}
.gi-feature-value {
  font-size: 0.9rem;
  color: #0f172a;
  font-weight: 700;
  line-height: 1.35;
}
.gi-feature-sub {
  font-size: 0.74rem;
  color: #64748b;
  line-height: 1.4;
}

/* Embedded Citizen Guide & FAQ */
.gi-embedded-guide {
  margin: 32px 0 20px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  padding: 24px;
}
.gi-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid #f1f5f9;
}
.gi-guide-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gi-guide-icon {
  font-size: 1.8rem;
  width: 44px;
  height: 44px;
  background: #f0fdf4;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #bbf7d0;
}
.gi-guide-title-box h3 {
  font-size: 1.15rem;
  color: #0f172a;
  font-weight: 700;
}
.gi-guide-title-box p {
  font-size: 0.8rem;
  color: #64748b;
}
.gi-guide-full-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0284c7;
  text-decoration: none;
  background: #e0f2fe;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #bae6fd;
  transition: all .2s;
}
.gi-guide-full-link:hover {
  background: #0284c7;
  color: #ffffff;
}
.gi-quick-tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.gi-tip-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  font-size: 0.82rem;
}
.gi-tip-card h4 {
  font-size: 0.95rem;
  color: #0f172a;
  margin: 6px 0 8px;
}
.gi-tip-icon {
  font-size: 1.4rem;
}
.gi-tip-card ul {
  padding-left: 18px;
  color: #475569;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gi-faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gi-faq-detail {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}
.gi-faq-detail summary {
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  font-size: 0.88rem;
  color: #1e293b;
  transition: background .2s;
}
.gi-faq-detail summary:hover {
  background: #f1f5f9;
  color: #0369a1;
}
.gi-faq-detail[open] {
  background: #ffffff;
  border-color: #cbd5e1;
}
.gi-faq-detail[open] summary {
  border-bottom: 1px solid #f1f5f9;
  color: #0369a1;
}
.gi-faq-body {
  padding: 14px 16px;
  font-size: 0.84rem;
  color: #334155;
  line-height: 1.6;
}

/* ==========================================================================
   Multi-Draft Storage Tray & Control Bar
   ========================================================================== */
.gi-draft-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: #edf2f7;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.gi-draft-left, .gi-draft-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.gi-draft-badge {
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 5px;
}
.gi-draft-select {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 12px;
  min-width: 200px;
  cursor: pointer;
  outline: none;
  transition: border-color .15s;
}
.gi-draft-select:focus {
  border-color: var(--gi-teal);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
}
.gi-draft-btn-add {
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  color: #0d9488;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all .15s;
}
.gi-draft-btn-add:hover {
  background: #ccfbf1;
  border-color: #5eead4;
}
.gi-draft-btn-danger {
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  color: #e11d48;
  background: transparent;
  border: 1px solid #fecdd3;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  transition: all .15s;
}
.gi-draft-btn-danger:hover {
  background: #ffe4e6;
  border-color: #fda4af;
}
.gi-draft-btn-clear {
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all .15s;
}
.gi-draft-btn-clear:hover {
  background: #dcfce7;
  border-color: #86efac;
}

/* ==========================================================================
   Pre-Flight Requirements & Delivery Channel Guide (Step 1)
   ========================================================================== */
.gi-preflight-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-left: 4px solid var(--gi-teal);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 12px 0 16px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
.gi-preflight-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.gi-preflight-icon {
  font-size: 1.3rem;
}
.gi-preflight-header strong {
  font-size: 0.96rem;
  color: #0f172a;
  display: block;
}
.gi-preflight-header small {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
}
.gi-preflight-selection-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
}
.gi-preflight-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #0f172a;
  background: #ffffff;
  font-size: 0.8rem;
  line-height: 1.25;
}
.gi-preflight-chip b {
  font-weight: 800;
}
.gi-preflight-chip.is-relationship {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: #115e59;
}
.gi-preflight-chip.is-delivery {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #075985;
}
.gi-preflight-chip.is-payment {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}
.gi-preflight-list {
  margin: 0 0 14px;
  padding-left: 20px;
  font-size: 0.84rem;
  color: #334155;
  line-height: 1.6;
}
.gi-preflight-list li {
  margin-bottom: 4px;
}
.gi-preflight-list li strong {
  color: #0f172a;
}

/* Channel Compare Grid */
.gi-channel-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
}
@media (max-width: 820px) {
  .gi-channel-compare {
    grid-template-columns: 1fr;
  }
}
.gi-channel-col {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
}
.gi-channel-col.is-postal {
  background: #fdfaf5;
  border-color: #fed7aa;
}
.gi-channel-col-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.gi-col-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #334155;
}
.gi-col-badge.is-postal {
  background: #ffedd5;
  color: #c2410c;
}
.gi-channel-col-header strong {
  font-size: 0.86rem;
  color: #0f172a;
}
.gi-channel-col-desc {
  margin: 0 0 8px;
  font-size: 0.76rem;
  color: #64748b;
}
.gi-channel-col-points {
  margin: 0;
  padding-left: 16px;
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.5;
}
.gi-channel-col-points li {
  margin-bottom: 4px;
}

.gi-preflight-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}
.gi-btn-download-auth-empty {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all .15s;
}
.gi-btn-download-auth-empty:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
}
.gi-preflight-ready-note {
  font-size: 0.78rem;
  font-weight: 600;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 4px;
}
.gi-preflight-ready-note .gi-check-icon {
  background: #22c55e;
  color: #ffffff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  font-size: 11px;
}

/* ==========================================================================
   Modals: Privacy & Data Retention, Printable Envelope
   ========================================================================== */
.gi-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 9999;
}
.gi-modal-backdrop[hidden] {
  display: none !important;
}
.gi-modal-card {
  background: #ffffff;
  border-radius: 14px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: giModalPop .2s ease-out;
}
.gi-modal-card.is-wide {
  max-width: 780px;
}
@keyframes giModalPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.gi-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.gi-modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #0f172a;
}
.gi-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.gi-modal-close:hover {
  color: #0f172a;
}
.gi-modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.6;
}
.gi-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.gi-policy-card {
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 14px;
}
.gi-policy-card.is-secure {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.gi-policy-card.is-secure h4 {
  margin: 0 0 6px;
  color: #15803d;
  font-size: 0.95rem;
}
.gi-policy-card.is-retention {
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.gi-policy-card.is-retention h4 {
  margin: 0 0 8px;
  color: #b45309;
  font-size: 0.95rem;
}
.gi-retention-events {
  margin: 0;
  padding-left: 18px;
  font-size: 0.82rem;
  color: #451a03;
}
.gi-retention-events li {
  margin-bottom: 6px;
}
.gi-modal-drafts-list {
  margin-top: 14px;
  padding: 12px;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: 0.82rem;
}
.gi-draft-chip-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 6px;
}

/* ==========================================================================
   Printable Envelope Label Sheet
   ========================================================================== */
.gi-envelope-sheet {
  background: #ffffff;
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  padding: 24px;
  font-family: var(--gi-font);
  color: #0f172a;
}
.gi-env-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
}
.gi-env-sender {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 12px;
  font-size: 0.82rem;
  line-height: 1.5;
}
.gi-env-recipient {
  background: #ffffff;
  border: 2px solid #0f172a;
  border-radius: 6px;
  padding: 14px;
  font-size: 0.88rem;
  line-height: 1.6;
}
.gi-env-recipient h4 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #0f172a;
  border-bottom: 1.5px solid #0f172a;
  padding-bottom: 4px;
}
.gi-env-reminders {
  margin-top: 14px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 0.78rem;
  color: #92400e;
}
.gi-env-reminders ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

@media print {
  body * {
    visibility: hidden;
  }
  #gi-envelope-modal, #gi-envelope-modal * {
    visibility: visible;
  }
  #gi-envelope-modal {
    position: absolute;
    inset: 0;
    background: transparent !important;
    padding: 0;
  }
  .gi-modal-card {
    box-shadow: none;
    max-width: 100%;
    border: none;
  }
  .gi-modal-header, .gi-modal-footer, .gi-modal-body > p {
    display: none !important;
  }
  .gi-envelope-sheet {
    border: 2px dashed #000;
    margin: 0;
    padding: 20px;
    page-break-inside: avoid;
  }
}

/* ==========================================================================
   Welcome Onboarding Modal (3 Crucial Sections to prevent mistakes)
   ========================================================================== */
.gi-modal-card.is-welcome {
  max-width: 820px;
  max-height: 92vh;
  border: 1px solid #cbd5e1;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
}
.gi-welcome-header {
  padding: 16px 24px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 2px solid var(--gi-teal);
}
.gi-welcome-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gi-welcome-icon {
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.gi-welcome-header h3 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: #ffffff;
}
.gi-welcome-header small {
  font-size: 0.8rem;
  color: #94a3b8;
}
.gi-welcome-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.gi-w-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}
.gi-w-badge.is-official {
  background: #e0f2fe;
  color: #0369a1;
}
.gi-w-badge.is-secure {
  background: #f0fdf4;
  color: #15803d;
}
.gi-welcome-body {
  padding: 20px 24px;
  overflow-y: auto;
  background: #f8fafc;
}
.gi-welcome-intro {
  margin-bottom: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
}
.gi-welcome-intro strong {
  font-size: 0.95rem;
  color: #0f172a;
  display: block;
  margin-bottom: 4px;
}
.gi-welcome-intro p {
  margin: 0;
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.5;
}
.gi-welcome-sections-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gi-welcome-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: border-color .2s;
}
.gi-welcome-card.is-legal {
  border-left: 5px solid #0284c7;
}
.gi-welcome-card.is-fee {
  border-left: 5px solid #d97706;
}
.gi-welcome-card.is-sla {
  border-left: 5px solid #059669;
}
.gi-welcome-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.gi-w-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  flex-shrink: 0;
}
.gi-welcome-card.is-legal .gi-w-num { background: #0284c7; }
.gi-welcome-card.is-fee .gi-w-num { background: #d97706; }
.gi-welcome-card.is-sla .gi-w-num { background: #059669; }

.gi-welcome-card-head strong {
  font-size: 0.96rem;
  color: #0f172a;
  display: block;
}
.gi-welcome-card-head small {
  font-size: 0.78rem;
  color: #64748b;
}
.gi-welcome-card-list {
  margin: 0 0 12px;
  padding-left: 20px;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.6;
}
.gi-welcome-card-list li {
  margin-bottom: 5px;
}
.gi-welcome-card-list li strong {
  color: #0f172a;
}
.gi-welcome-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
  margin-left: auto;
  flex-shrink: 0;
}
.gi-welcome-close-btn:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: #ef4444;
  color: #ffffff;
  transform: scale(1.05);
}
.gi-welcome-ack-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.84rem;
  color: #14532d;
  line-height: 1.45;
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.1);
}
.gi-w-ack-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #16a34a;
  color: #ffffff;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.gi-welcome-check-label {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.5;
  transition: all .2s ease;
  margin-top: 10px;
}
.gi-welcome-check-label:hover {
  background: #f8fafc;
  border-color: var(--gi-teal, #0d9488);
}
.gi-welcome-check-label.is-checked,
.gi-welcome-check-label:has(input:checked) {
  background: #f0fdf4;
  border-color: #22c55e;
  color: #14532d;
  box-shadow: 0 1px 3px rgba(34, 197, 94, 0.15);
}
.gi-welcome-check-label input:checked ~ span {
  color: #0f172a;
  font-weight: 600;
}
.gi-welcome-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #059669;
  flex-shrink: 0;
}
.gi-welcome-footer {
  padding: 18px 24px;
  background: #ffffff;
  border-top: 1.5px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.gi-welcome-btn-main {
  width: 100% !important;
  max-width: 620px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
  transition: all .2s ease;
}
.gi-welcome-btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(13, 148, 136, 0.45);
}
.gi-welcome-btn-main:active {
  transform: translateY(1px);
}
.gi-welcome-btn-main.is-ready {
  background: linear-gradient(135deg, #059669 0%, #0d9488 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.45) !important;
  cursor: pointer !important;
}
.gi-welcome-btn-main.is-ready:hover {
  background: linear-gradient(135deg, #047857 0%, #0f766e 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.55) !important;
}
.gi-welcome-ack-all-label {
  display: none !important;
}
@media (max-width: 768px) {
  .gi-welcome-footer {
    padding: 14px 16px;
  }
  .gi-welcome-btn-main {
    max-width: 100%;
  }
}

/* Distinct Locked vs Unlocked Styling for Welcome Button */
#gi-welcome-btn-proceed.is-locked,
#gi-welcome-btn-proceed:disabled,
.gi-btn-accent:disabled {
  background: #e2e8f0 !important;
  color: #64748b !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  transform: none !important;
  filter: none !important;
  opacity: 0.8 !important;
  transition: all 0.25s ease !important;
}
#gi-welcome-btn-proceed.is-locked strong,
#gi-welcome-btn-proceed:disabled strong {
  color: #475569 !important;
}
#gi-welcome-btn-proceed.is-locked small,
#gi-welcome-btn-proceed:disabled small {
  color: #94a3b8 !important;
}
#gi-welcome-btn-proceed.is-locked:hover,
#gi-welcome-btn-proceed:disabled:hover {
  background: #e2e8f0 !important;
  color: #64748b !important;
  border-color: #cbd5e1 !important;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
  cursor: not-allowed !important;
}

#gi-welcome-btn-proceed:not(:disabled):not(.is-locked) {
  background: linear-gradient(135deg, #0d9488 0%, #0f5664 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #14b8a6 !important;
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4) !important;
  cursor: pointer !important;
  opacity: 1 !important;
  transition: all 0.25s ease !important;
}
#gi-welcome-btn-proceed:not(:disabled):not(.is-locked):hover {
  filter: brightness(1.08) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 26px rgba(13, 148, 136, 0.5) !important;
}
#gi-welcome-btn-proceed:not(:disabled):not(.is-locked) strong {
  color: #ffffff !important;
}
#gi-welcome-btn-proceed:not(:disabled):not(.is-locked) small {
  color: #ccfbf1 !important;
}


/* Official Policy and Regulation Reference Links */
.gi-welcome-ref-links {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.gi-welcome-ref-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
}
.gi-ref-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  padding: 3px 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.gi-ref-pill:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  text-decoration: none;
}
.gi-ref-pill.is-privacy {
  color: #0f766e;
  background: #f0fdfa;
  border-color: #99f6e4;
}
.gi-ref-pill.is-privacy:hover {
  background: #0d9488;
  color: #ffffff;
  border-color: #0d9488;
}

/* Official Regulations Box in Welcome Modal & Privacy Modal */
.gi-welcome-official-box {
  margin-top: 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
}
.gi-welcome-official-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.gi-official-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 860px) {
  .gi-official-links-grid {
    grid-template-columns: 1fr;
  }
}
.gi-official-link-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.gi-official-link-card:hover {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.12);
  transform: translateY(-1px);
}
.gi-olc-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}
.gi-olc-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.gi-olc-content strong {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gi-olc-content small {
  font-size: 0.7rem;
  color: #64748b;
}
.gi-official-link-card:hover .gi-olc-content strong {
  color: #0284c7;
}

/* Pre-flight Card references */
.gi-preflight-refs-bar {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  font-size: 0.76rem;
  color: #64748b;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.gi-preflight-refs-bar .gi-text-link {
  color: #0284c7;
  text-decoration: underline;
  font-weight: 600;
}
.gi-preflight-refs-bar .gi-text-link:hover {
  color: #0369a1;
}
.gi-preflight-refs-bar .gi-dot {
  color: #cbd5e1;
}


