:root {
  --af-navy: #0a2540;
  --af-blue: #003580;
  --af-light: #eaf2ff;
  --af-border: #dae1e5;
  --af-text: #1a1a1a;
  --af-muted: #4d5a68;
  --af-success: #1a9e47;
  --af-bg: #f4f7fb;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(10, 37, 64, 0.1);
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 19px;
  line-height: 1.45;
  color: var(--af-text);
  background: var(--af-bg);
  min-height: 100vh;
}

.app {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 16px 40px;
  padding-bottom: max(40px, env(safe-area-inset-bottom));
}

.app-header { text-align: center; margin-bottom: 14px; }
.app-logo-img {
  display: block;
  width: min(220px, 72vw);
  height: auto;
  margin: 0 auto;
}
.app-tagline { margin: 8px 0 0; color: var(--af-muted); font-size: .95rem; }

.progress-wrap { margin: 14px 0 18px; }
.progress-label { font-size: .9rem; color: var(--af-muted); margin-bottom: 8px; }
.progress-bar { height: 10px; background: #dde5ee; border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #003580, var(--af-navy));
  transition: width .25s ease;
}

.card {
  background: #fff;
  border: 2px solid var(--af-navy);
  border-radius: var(--radius);
  padding: 22px 18px;
  box-shadow: var(--shadow);
}

h1, h2 { margin: 0 0 10px; color: var(--af-navy); line-height: 1.25; }
h1 { font-size: clamp(1.35rem, 4vw, 1.7rem); }
h2 { font-size: clamp(1.15rem, 3.5vw, 1.4rem); }
.lead, .muted { color: var(--af-muted); margin: 0 0 14px; }
.error-banner {
  background: #fff3f3; border: 2px solid #e35d71; color: #8b1a2b;
  padding: 12px 14px; border-radius: 12px; margin-bottom: 14px;
}

.field { margin: 0 0 14px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--af-navy); }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px; border: 2px solid var(--af-border);
  border-radius: 12px; font: inherit; background: #fff;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: #003580;
}
.hint { font-size: .88rem; color: var(--af-muted); margin-top: 6px; }

.option-grid, .chip-grid, .product-grid {
  display: grid; gap: 12px; margin: 12px 0 18px;
}
.option-grid { grid-template-columns: 1fr; }
@media (min-width: 560px) {
  .option-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: 1fr 1fr; }
}

.choice-btn, .chip-btn, .product-card {
  display: block; width: 100%; text-align: left;
  border: 2px solid var(--af-border); background: #fff;
  border-radius: 14px; padding: 14px 16px; cursor: pointer; font: inherit;
}
.choice-btn:hover, .chip-btn:hover, .product-card:hover { border-color: #003580; }
.choice-btn.is-selected, .chip-btn.is-selected, .product-card.is-selected {
  border-color: var(--af-navy); background: var(--af-light);
}
.choice-btn strong { display: block; color: var(--af-navy); margin-bottom: 4px; }
.choice-btn span { color: var(--af-muted); font-size: .92rem; }

.product-card { padding: 10px; }
.product-card img {
  width: 100%; aspect-ratio: 1; object-fit: contain;
  background: #f8fafc; border-radius: 10px; margin-bottom: 8px;
}
.product-card .title { font-size: .95rem; font-weight: 700; color: var(--af-navy); }
.product-card .sku { font-size: .8rem; color: var(--af-muted); }

.phone-row { display: grid; grid-template-columns: minmax(8rem, 11rem) 1fr; gap: 10px; }

.nav-row {
  display: flex; flex-wrap: wrap; gap: 14px 18px;
  margin-top: 28px; justify-content: space-between;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 20px; border-radius: 12px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary { background: var(--af-navy); color: #fff; }
.btn-primary:hover { background: #061a2c; color: #fff; }
.btn-secondary { background: #fff; color: var(--af-navy); border-color: var(--af-border); }
.btn-wa { background: #25d366; color: #fff; border-color: transparent; }
.btn-wa:hover { background: #1fb855; color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-text {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: transparent;
  border: none;
  color: var(--af-muted);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  min-height: 44px;
}
.btn-text:hover { color: var(--af-navy); }

.resource-links {
  display: grid; gap: 12px; margin: 16px 0;
}
.resource-links a {
  display: block; padding: 14px 16px; border-radius: 12px;
  background: var(--af-light); color: var(--af-navy);
  font-weight: 700; text-decoration: none; border: 1px solid rgba(10,37,64,.12);
}
.resource-links a:hover { background: #dce9fb; }

.ticket-badge {
  display: inline-block; margin: 8px 0 14px; padding: 8px 14px;
  background: var(--af-light); color: var(--af-navy);
  font-weight: 900; letter-spacing: .04em; border-radius: 999px;
}

.file-list { margin: 10px 0 0; padding-left: 1.1rem; color: var(--af-muted); font-size: .92rem; }

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 148px;
  padding: 22px 16px;
  margin: 4px 0 8px;
  border: 2px dashed rgba(10, 37, 64, .35);
  border-radius: 16px;
  background: linear-gradient(180deg, #f7faff 0%, #eef4fb 100%);
  color: var(--af-navy);
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.dropzone:hover, .dropzone:focus-within {
  border-color: var(--af-navy);
  background: #eaf2ff;
}
.dropzone.is-dragover {
  border-color: var(--af-navy);
  border-style: solid;
  background: #dce9fb;
  box-shadow: inset 0 0 0 2px rgba(0, 53, 128, .15);
}
.dropzone.is-full {
  opacity: .65;
  cursor: default;
  pointer-events: none;
}
.dropzone-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  border-radius: 12px;
  background:
    linear-gradient(var(--af-navy), var(--af-navy)) center 14px / 18px 2px no-repeat,
    linear-gradient(var(--af-navy), var(--af-navy)) 21px 10px / 2px 18px no-repeat,
    #d7e6fb;
  border: 2px solid rgba(10, 37, 64, .18);
}
.dropzone-title {
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--af-navy);
}
.dropzone-sub {
  font-size: .88rem;
  color: var(--af-muted);
  max-width: 22rem;
}
@media (max-width: 560px) {
  .dropzone {
    min-height: 160px;
    padding: 26px 18px;
  }
  .dropzone-sub { display: none; } /* drag hint is desktop-only */
}
.dropzone-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}

.file-list-cards {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
}
.file-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 2px solid var(--af-border);
  border-radius: 12px;
  background: #fff;
}
.file-chip-meta {
  font-size: .9rem;
  color: var(--af-muted);
  overflow-wrap: anywhere;
  min-width: 0;
}
.file-chip-meta strong { color: var(--af-navy); }
.file-chip-remove {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: #8b1a2b;
  font: inherit;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 8px 4px;
  min-height: 44px;
}
