:root {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: #e2e8f0;
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --solar-amber: #f59e0b;
  --solar-amber-dark: #d97706;
  --pea-purple: #7e22ce;
  --mea-orange: #ea580c;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --success-border: #86efac;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fcd34d;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fca5a5;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'IBM Plex Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.hidden {
  display: none !important;
}

.print-only {
  display: none;
}

/* Top Banner */
.top-banner {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  padding: 8px 0;
  font-size: 0.88rem;
  border-bottom: 2px solid var(--solar-amber);
}

.banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.banner-left-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #fbbf24;
  border-radius: 50%;
  animation: pulse 1.6s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(251, 191, 36, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

.banner-text {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.countdown-pill {
  background: #dc2626;
  color: #ffffff;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .banner-inner {
    flex-wrap: wrap;
  }
  .banner-text {
    white-space: normal;
    font-size: 0.82rem;
  }
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 8px 0;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  min-height: 48px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  flex-shrink: 0;
}

.brand-title {
  display: block;
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.25;
}

.brand-accent {
  color: var(--primary);
}

.brand-subtitle {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-slr-nav {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fbbf24;
  border: 1.5px solid #f59e0b;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn-slr-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

.api-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.api-status-badge.live {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
}

.api-status-badge.live .status-dot {
  background: var(--success);
}

/* Hero Section */
.hero-section {
  padding: 28px 0 22px;
}

.eyebrow-tag {
  display: inline-block;
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero-copy h1 {
  font-size: clamp(1.5rem, 3.2vw, 2.3rem);
  line-height: 1.32;
  font-weight: 700;
  margin-bottom: 12px;
  color: #0f172a;
}

.text-danger {
  color: var(--danger);
}

.highlight-underline {
  background: linear-gradient(120deg, rgba(254, 240, 138, 0.85) 0%, rgba(254, 215, 170, 0.85) 100%);
  padding: 0 6px;
  border-radius: 4px;
}

.hero-lead {
  font-size: 1.04rem;
  color: var(--text-muted);
  max-width: 880px;
  margin-bottom: 22px;
}

.pain-points-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.info-pill {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.pill-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.info-pill strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-main);
}

.info-pill span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Workspace Grid */
.workspace-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 24px;
  padding-bottom: 32px;
  align-items: start;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

@media (max-width: 600px) {
  .card {
    padding: 18px 16px;
  }
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.step-badge {
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.card-header h2 {
  font-size: 1.2rem;
  line-height: 1.3;
}

.card-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Form Controls - Mobile-First (min-height 48px, font-size >= 16px to prevent iOS auto-zoom) */
.form-group {
  margin-bottom: 20px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 600px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.96rem;
  margin-bottom: 8px;
}

.req {
  color: var(--danger);
}

.form-control {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  font-size: 16px; /* Strictly >= 16px so mobile browsers do not zoom on focus */
  font-family: inherit;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-main);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.field-hint {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Utility Selector (Touch-Friendly >= 48px) */
.utility-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 580px) {
  .utility-selector {
    grid-template-columns: 1fr;
  }
}

.utility-option input {
  display: none;
}

.utility-box {
  display: flex;
  align-items: center;
  min-height: 58px;
  gap: 12px;
  padding: 12px 14px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}

.utility-option input:checked + .utility-box {
  border-color: var(--primary);
  background: #f0f9ff;
}

.utility-tag {
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: 6px;
  color: #ffffff;
  flex-shrink: 0;
}

.utility-tag.pea {
  background: var(--pea-purple);
}

.utility-tag.mea {
  background: var(--mea-orange);
}

.utility-box strong {
  display: block;
  font-size: 0.94rem;
}

.utility-box small {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Upload Area & Camera Action Buttons (min-height 48px) */
.upload-dropzone {
  border: 2px dashed #94a3b8;
  border-radius: var(--radius-md);
  background: #f8fafc;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upload-dropzone:hover {
  border-color: var(--primary);
  background: #f0f9ff;
}

.upload-icon {
  font-size: 2.3rem;
  margin-bottom: 6px;
}

.upload-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.upload-sub {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.upload-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn-camera-action,
.btn-gallery-action {
  min-height: 48px;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-camera-action {
  background: var(--primary);
  color: #ffffff;
  border: none;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.25);
}

.btn-gallery-action {
  background: #ffffff;
  color: var(--text-main);
  border: 1.5px solid #cbd5e1;
}

.upload-preview-container img {
  max-height: 250px;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 12px;
}

.preview-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
}

.btn-remove-img {
  min-height: 48px;
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

/* Sample Presets (Thumb-friendly >= 48px) */
.sample-section {
  margin-top: 12px;
}

.sample-label {
  display: block;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.demo-preset-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 580px) {
  .demo-preset-btns {
    grid-template-columns: 1fr;
  }
}

.btn-chip {
  min-height: 48px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1.5px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.1s;
}

.btn-chip:active {
  transform: scale(0.98);
}

.btn-chip.warning {
  background: #fffbeb;
  color: #b45309;
  border-color: #fcd34d;
}

.btn-chip.success {
  background: #f0fdf4;
  color: #15803d;
  border-color: #86efac;
}

/* Buttons (All Strictly >= 48px min-height for mobile thumb ergonomics) */
.btn-primary-lg {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.28);
  transition: transform 0.12s, box-shadow 0.12s;
}

.btn-primary-lg:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.35);
}

.btn-primary-lg:disabled {
  opacity: 0.7;
  cursor: wait;
}

.btn-warning-lg {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  font-size: 0.98rem;
  font-weight: 700;
  font-family: inherit;
  color: #ffffff;
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
}

.btn-primary-md {
  min-height: 48px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  color: #ffffff;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary-sm {
  min-height: 48px;
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  color: #0f172a;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-ghost-sm {
  min-height: 48px;
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-ghost-sm:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

/* Spinner */
.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

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

/* Alerts */
.alert-box {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.alert-box.error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.alert-box.success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.alert-box.notice {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

/* Right Column: Empty & Active Audit Cards */
.empty-result-card {
  text-align: center;
  padding: 36px 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.empty-illustration {
  font-size: 2.8rem;
  margin-bottom: 10px;
}

.empty-result-card h3 {
  font-size: 1.18rem;
  margin-bottom: 8px;
}

.empty-result-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.check-list-preview {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.check-list-preview li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #ffffff;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.check-bullet {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e0f2fe;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.check-list-preview strong {
  display: block;
  font-size: 0.92rem;
}

.check-list-preview span {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Active Audit Result Cards */
.audit-result-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.audit-card {
  border-top: 5px solid var(--primary);
}

.audit-card.status-ready {
  border-top-color: var(--success);
}

.audit-card.status-mismatch {
  border-top-color: var(--danger);
}

.audit-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.status-pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-pill.ready {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.status-pill.mismatch {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.status-pill.manual {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}

.lead-id-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.audit-headline {
  font-size: 1.22rem;
  margin-bottom: 6px;
}

.audit-subtext {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.ocr-comparison-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
}

.ocr-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 0.92rem;
  gap: 10px;
}

.ocr-row:last-child {
  border-bottom: none;
}

.ocr-label {
  color: var(--text-muted);
}

.ocr-val {
  text-align: right;
}

.recommendation-note-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
}

.recommendation-note-header {
  font-weight: 700;
  font-size: 0.9rem;
  color: #92400e;
  margin-bottom: 4px;
}

.recommendation-note-box p {
  font-size: 0.92rem;
  color: #78350f;
}

.mismatch-action-area {
  margin-top: 12px;
}

.urgent-warning-banner {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: #991b1b;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 12px;
}

/* Preparation Summary Card */
.prep-pass-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  border: 1px solid #334155;
  position: relative;
  overflow: hidden;
}

.prep-pass-ribbon {
  display: inline-block;
  background: linear-gradient(90deg, #f59e0b, #ea580c);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.prep-pass-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
}

.prep-tag {
  font-size: 0.8rem;
  color: #38bdf8;
  font-weight: 700;
}

.prep-pass-header h4 {
  font-size: 1.12rem;
  color: #ffffff;
}

.prep-pass-header p {
  font-size: 0.82rem;
  color: #cbd5e1;
}

.prep-qr-box {
  background: #ffffff;
  padding: 6px;
  border-radius: 8px;
  flex-shrink: 0;
}

.prep-pass-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

@media (max-width: 520px) {
  .prep-pass-details {
    grid-template-columns: 1fr;
  }
}

.prep-pass-details small {
  display: block;
  font-size: 0.78rem;
  color: #94a3b8;
}

.prep-pass-details strong {
  font-size: 0.95rem;
  color: #f8fafc;
}

.prep-pass-footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.prep-pass-footer button {
  flex: 1 1 220px;
}

.prep-pass-footer .btn-ghost-sm {
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.25);
}

.prep-pass-footer .btn-ghost-sm:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-dialog.modal-lg {
  max-width: 780px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
}

.modal-header h3 {
  font-size: 1.12rem;
}

.modal-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-close {
  min-width: 48px;
  min-height: 48px;
  background: #f1f5f9;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

/* Printable Official Transfer Form Sheet */
.printable-sheet {
  border: 1px solid #cbd5e1;
  padding: 24px;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
}

.doc-header {
  text-align: center;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.doc-header h2 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.doc-header p {
  font-size: 0.88rem;
  color: #334155;
}

.doc-meta-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.doc-section {
  margin-bottom: 16px;
}

.doc-section h4 {
  font-size: 0.96rem;
  background: #f1f5f9;
  padding: 6px 10px;
  border-left: 4px solid #0284c7;
  margin-bottom: 10px;
}

.doc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  font-size: 0.9rem;
}

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

.doc-checklist {
  list-style: none;
  font-size: 0.9rem;
}

.doc-checklist li {
  padding: 5px 0;
}

.doc-sign-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
  text-align: center;
  font-size: 0.9rem;
}

/* Official Resources & References Section */
.official-resources-section {
  padding-bottom: 56px;
}

.official-resources-card {
  border-top: 5px solid var(--pea-purple);
}

.resources-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.resources-header h2 {
  font-size: 1.25rem;
  line-height: 1.35;
  margin-bottom: 4px;
}

.resources-header p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

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

.resource-card-link {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #ffffff;
  text-decoration: none;
  color: var(--text-main);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 120px;
}

.resource-card-link:hover,
.resource-card-link:focus {
  border-color: var(--primary);
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.resource-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.resource-icon-box.pea-bg {
  background: #f3e8ff;
}

.resource-icon-box.status-bg {
  background: #e0f2fe;
}

.resource-icon-box.doc-bg {
  background: #fef3c7;
}

.resource-icon-box.inverter-bg {
  background: #dcfce7;
}

.resource-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.resource-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  margin-bottom: 6px;
}

.resource-content h3 {
  font-size: 1.04rem;
  line-height: 1.35;
  margin-bottom: 6px;
  color: var(--text-main);
}

.resource-content p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  flex: 1;
}

.resource-cta {
  min-height: 48px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.official-disclaimer-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-left: 5px solid #475569;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.9rem;
  color: #334155;
}

.disclaimer-icon {
  font-size: 1.25rem;
  line-height: 1.2;
  flex-shrink: 0;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 24px 0;
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-inner strong {
  color: #f8fafc;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-admin-link {
  min-height: 48px;
  padding: 8px 12px;
  background: none;
  border: none;
  color: #94a3b8;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
}

.footer-admin-link:hover {
  color: #f8fafc;
}

/* Floating Action Button: Back to Road2569 Main Portal & SLR SkillHub */
.road2569-fab-wrapper {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  user-select: none;
  touch-action: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.road2569-fab-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.92);
  color: #67e8f9;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(6, 182, 212, 0.35);
  box-shadow: 0 10px 25px -5px rgba(8, 51, 68, 0.55), 0 4px 10px -2px rgba(6, 182, 212, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: grab;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.road2569-fab-btn.slr-fab-btn {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 10px 25px -5px rgba(120, 53, 15, 0.5), 0 4px 10px -2px rgba(245, 158, 11, 0.22);
}

.road2569-fab-btn.slr-fab-btn:hover {
  background: #1e293b;
  color: #fef3c7;
  border-color: #fbbf24;
  box-shadow: 0 12px 28px -4px rgba(245, 158, 11, 0.35);
}

.road2569-fab-icon.slr-fab-icon {
  background: rgba(120, 53, 15, 0.8);
  border-color: rgba(245, 158, 11, 0.55);
  color: #fbbf24;
}

.road2569-fab-btn:hover {
  background: #1e293b;
  color: #a5f3fc;
  border-color: #22d3ee;
  box-shadow: 0 12px 28px -4px rgba(6, 182, 212, 0.3);
  transform: scale(1.04);
}

.road2569-fab-btn:active {
  cursor: grabbing;
}

.road2569-fab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(8, 51, 68, 0.85);
  border: 1px solid rgba(6, 182, 212, 0.45);
  color: #22d3ee;
  transition: transform 0.2s ease;
}

.road2569-fab-btn:hover .road2569-fab-icon {
  transform: translateX(-2px);
}

.road2569-fab-label {
  letter-spacing: 0.025em;
  white-space: nowrap;
}

/* Print Media Rule */
@media print {
  .no-print {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  body {
    background: #ffffff;
  }
  .printable-sheet {
    border: none;
    padding: 0;
  }
}
