/* ---------- Design tokens ---------- */
:root {
  --ink: #15161A;
  --ink-soft: #6B7280;
  --ink-faint: #9CA3AF;
  --bg: #F1E9D8;
  --card: #FFFFFF;
  --accent: #9DB53F;
  --accent-dark: #7E9330;
  --accent-tint: #F0F5DC;
  --mint: #14B8A6;
  --mint-tint: #E3FBF6;
  --peach: #F5A25D;
  --peach-tint: #FFF1E2;
  --blue: #4C8DFF;
  --blue-tint: #EAF1FF;
  --rust: #FF5A3C;
  --rust-dark: #E0472B;
  --line: #E7DFC9;
  --line-soft: #EFE9D9;
  --danger-bg: #FDE4E1;
  --danger-ink: #C3402A;
  --dark-panel: #1C1F16;

  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --shadow-sm: 0 1px 2px rgba(21,22,26,0.04), 0 1px 1px rgba(21,22,26,0.03);
  --shadow-md: 0 6px 16px rgba(21,22,26,0.06), 0 2px 4px rgba(21,22,26,0.04);
  --shadow-lg: 0 16px 32px rgba(21,22,26,0.10), 0 4px 8px rgba(21,22,26,0.05);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

h1, h2 { font-family: var(--font-display); margin: 0; font-weight: 800; }

button {
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform 0.12s var(--ease), opacity 0.12s var(--ease), background-color 0.15s var(--ease);
}
button:active { transform: scale(0.97); }

input, select {
  font-family: var(--font-body);
  font-size: 16px;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-tint);
}

::selection { background: var(--accent-tint); color: var(--accent-dark); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Icon badge palette (used for both itinerary types and expense categories) ---------- */

.badge-flight { background: var(--accent-tint); color: var(--accent-dark); }
.badge-train { background: var(--mint-tint); color: #0D8577; }
.badge-museum { background: var(--peach-tint); color: #C36F1F; }
.badge-hotel { background: var(--blue-tint); color: #2A5FCC; }
.badge-other { background: var(--line-soft); color: var(--ink-soft); }

/* ---------- Trip list screen ---------- */

.brand-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 34px 20px 20px;
}

.brand-mark {
  font-size: 22px;
  color: var(--accent);
}

.brand-header h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex: 1;
}

.text-link-btn {
  background: var(--card);
  border: none;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.text-link-btn:active { background: var(--accent-tint); }

.setup-copy {
  color: rgba(245,245,248,0.75);
  font-size: 14.5px;
  line-height: 1.6;
  margin: -4px 0 18px;
}

.trip-list-main {
  padding: 4px 20px 40px;
  max-width: 560px;
  margin: 0 auto;
}

.trip-card {
  background: var(--card);
  border-radius: 24px;
  padding: 20px 22px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-soft);
  cursor: pointer;
  position: relative;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.trip-delete-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--line-soft);
  color: var(--ink-faint);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.trip-delete-btn:hover { background: var(--danger-bg); color: var(--danger-ink); }

.trip-card:hover { box-shadow: var(--shadow-md); }
.trip-card:active { transform: scale(0.98); }

.trip-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  margin: 0 34px 5px 0;
  letter-spacing: -0.01em;
}

.trip-card .trip-card-dates {
  font-size: 12.5px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.new-trip-card {
  background: var(--dark-panel);
  border-radius: 28px;
  padding: 26px 24px;
  margin-top: 22px;
  box-shadow: var(--shadow-lg);
}

.new-trip-card h2 {
  color: white;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.new-trip-card input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 10px;
  background: rgba(255,255,255,0.07);
  color: white;
}

.new-trip-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(157,181,63,0.25);
}

.new-trip-card input::placeholder { color: rgba(255,255,255,0.35); }
.new-trip-card input[type="date"] { color-scheme: dark; }

.date-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-row span { color: rgba(255,255,255,0.3); }
.date-row input { margin-bottom: 0; }

.btn-primary {
  width: 100%;
  padding: 15px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  margin-top: 8px;
  box-shadow: 0 6px 16px rgba(157,181,63,0.35);
}

.btn-primary:hover { background: var(--accent-dark); color: white; }

.btn-secondary {
  padding: 13px 20px;
  border-radius: 999px;
  border: none;
  background: var(--line-soft);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
}

.btn-secondary:hover { background: var(--line); }

.btn-danger {
  padding: 13px 20px;
  border-radius: 999px;
  border: none;
  background: var(--danger-bg);
  color: var(--danger-ink);
  font-weight: 700;
  font-size: 14px;
}

.btn-danger:hover { background: #FBD2CC; }

/* ---------- Trip detail screen ---------- */

.trip-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  background: var(--bg);
  color: var(--ink);
  position: sticky;
  top: 0;
  z-index: 10;
}

.icon-btn {
  background: var(--card);
  border: none;
  color: var(--ink);
  font-size: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.icon-btn:active { background: var(--line-soft); }

.trip-header-info { flex: 1; min-width: 0; }

.trip-header-info h1 {
  font-size: 19px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.015em;
}

.trip-dates {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--ink-faint);
}

.tab-bar {
  display: flex;
  background: var(--dark-panel);
  border-radius: 999px;
  padding: 5px;
  margin: 0 16px 6px;
  position: sticky;
  top: 74px;
  z-index: 9;
  max-width: 528px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: var(--shadow-md);
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  padding: 10px 0;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.tab-btn.active {
  color: var(--ink);
  background: white;
}

.trip-main {
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 16px 112px;
}

.tab-panel { display: none; animation: fade-in 0.2s var(--ease); }
.tab-panel.active { display: block; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.import-status {
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  padding: 6px 0;
  min-height: 20px;
}

.empty-state {
  text-align: center;
  color: var(--ink-faint);
  padding: 64px 24px;
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Next-up hero card ---------- */

.next-up-card {
  background: var(--dark-panel);
  border-radius: 22px;
  padding: 16px 18px;
  color: white;
  margin-bottom: 14px;
  box-shadow: var(--shadow-lg);
}

.next-up-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 10px;
}

.next-up-row { display: flex; align-items: center; gap: 12px; }

.next-up-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.next-up-info { flex: 1; min-width: 0; }

.next-up-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}

.next-up-when {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}

.next-up-navigate {
  background: rgba(255,255,255,0.12);
  color: white;
  font-size: 16px;
  padding: 8px 10px;
  flex-shrink: 0;
}

/* ---------- Date strip ---------- */

.date-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  margin-bottom: 4px;
}

.date-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 44px;
  padding: 8px 4px;
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: var(--card);
  flex-shrink: 0;
}

.date-chip-day {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.date-chip-num {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.date-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(157,181,63,0.35);
}

.date-chip.active .date-chip-day,
.date-chip.active .date-chip-num { color: var(--ink); }

.events-count-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 2px 10px;
}

#events-count-header {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ---------- Itinerary rows (boarding-pass style) ---------- */

.stops-list { display: flex; flex-direction: column; gap: 12px; }

.stop-card {
  display: flex;
  background: var(--card);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-soft);
  position: relative;
  transition: box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
  cursor: pointer;
}

.stop-card:hover { box-shadow: var(--shadow-md); }
.stop-card:active { transform: scale(0.99); }

/* Colored side stripe with rotated type label + dark icon circle —
   the "AIRLINES" boarding-pass tab from the reference. */
.stop-stripe {
  width: 54px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.stripe-flight { background: var(--accent); }
.stripe-train { background: var(--mint); }
.stripe-museum { background: var(--peach); }
.stripe-hotel { background: var(--blue); }
.stripe-other { background: var(--line); }

.stripe-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--ink);
  opacity: 0.75;
}

.stripe-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--dark-panel);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.stop-main { flex: 1; min-width: 0; padding: 16px 16px 14px; position: relative; }

/* Origin → destination two-column header, like a real boarding pass */
.stop-route-cols {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 22px;
}

.stop-route-side { flex: 1; min-width: 0; }
.stop-route-side-end { text-align: right; }

.stop-route-main {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.stop-route-sub {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.stop-route-connector {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--line-soft);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* Fallback single-title header for tickets with no clean origin/destination
   pair (museums, hotels) */
.stop-title-fallback { padding-right: 22px; }

.stop-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.stop-place {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 3px;
}

.stop-divider {
  height: 1px;
  background: var(--line);
  margin: 14px 0 0;
}

/* Departure / arrival time columns */
.stop-time-cols {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 14px;
}

.stop-time-side-end { text-align: right; }

.stop-time-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.stop-time-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.stop-time-single {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  padding-top: 12px;
}

/* Seats / Terminal / Gate style grid — label above, bold value below */
.stop-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.stop-detail-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: capitalize;
  margin-bottom: 3px;
}

.stop-detail-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
}

.stop-highlight-strip {
  background: var(--accent-tint);
  margin: 14px -16px -14px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stop-code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--card);
  border: none;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.stop-detail-chip {
  background: var(--card);
  color: var(--accent-dark);
  font-weight: 700;
}

.map-link-btn {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--card);
  border: none;
  border-radius: 999px;
  padding: 5px 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background-color 0.15s var(--ease);
}

.map-link-btn:hover { background: #E1EBBC; }

.review-flag {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--peach);
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(245,162,93,0.5);
}

/* ---------- Expenses ---------- */

.expenses-summary {
  background: var(--dark-panel);
  color: white;
  border-radius: 26px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
}

.expenses-summary .total-label {
  font-size: 11.5px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.expenses-summary .total-amount {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  margin: 6px 0 16px;
  letter-spacing: -0.02em;
}

.category-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-chip {
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  padding: 6px 13px;
  font-family: var(--font-mono);
}

.expenses-list { display: flex; flex-direction: column; gap: 8px; }

.expense-row {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  padding: 13px 15px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s var(--ease), transform 0.1s var(--ease);
  cursor: pointer;
}

.expense-row:hover { box-shadow: var(--shadow-md); }
.expense-row:active { transform: scale(0.99); }

.expense-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.expense-info { flex: 1; min-width: 0; }
.expense-info .expense-title { font-weight: 700; font-size: 14px; }
.expense-info .expense-sub { font-size: 12px; color: var(--ink-faint); margin-top: 1px; }

.expense-amount {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14.5px;
}

/* ---------- Checklist ---------- */

.checklist-type-row {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.checklist-type-btn {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.checklist-type-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(157,181,63,0.35);
}

.checklist-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }

.checklist-row {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 13px 15px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s var(--ease);
  cursor: pointer;
}

.checklist-row:hover { box-shadow: var(--shadow-md); }

.checklist-row .check-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.checklist-row.done .check-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.checklist-row.done .check-text {
  text-decoration: line-through;
  color: var(--ink-faint);
}

.check-text { flex: 1; font-size: 14px; font-weight: 500; }

.check-delete {
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 16px;
  padding: 4px;
  border-radius: 8px;
}

.check-delete:hover { color: var(--danger-ink); background: var(--danger-bg); }

.checklist-add-row {
  display: flex;
  gap: 8px;
  position: sticky;
  bottom: 16px;
}

.checklist-add-row input {
  flex: 1;
  padding: 14px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-md);
}

/* ---------- FAB ---------- */

.fab {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  padding: 15px 30px;
  border-radius: 999px;
  border: none;
  background: var(--rust);
  color: white;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(255,90,60,0.4), 0 2px 6px rgba(255,90,60,0.25);
  z-index: 20;
  letter-spacing: -0.005em;
}

.fab:hover { background: var(--rust-dark); }
.fab:active { transform: translateX(-50%) scale(0.96); }

/* ---------- Modals ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21,22,26,0.5);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  z-index: 100;
  animation: overlay-in 0.2s var(--ease);
}

@keyframes overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-sheet {
  background: var(--card);
  width: 100%;
  border-radius: 28px 28px 0 0;
  padding: 28px 24px;
  max-height: 88vh;
  overflow-y: auto;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(21,22,26,0.15);
  animation: sheet-in 0.25s var(--ease);
}

@keyframes sheet-in {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-hero {
  height: 96px;
  margin: -28px -24px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.modal-hero-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  color: var(--ink);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.modal-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--dark-panel);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.modal-quick-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 6px;
}

.quick-fact-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 6px 12px;
}

.modal-sheet h2 {
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.015em;
}

.modal-sheet label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 18px;
  margin-bottom: 7px;
}

.modal-sheet input,
.modal-sheet select {
  width: 100%;
  padding: 13px 15px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}

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

.extracted-fields {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-fact-card {
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 12px 14px;
  min-width: 88px;
  flex: 1 1 auto;
}

.detail-fact-icon { font-size: 17px; margin-bottom: 6px; }

.detail-fact-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
  word-break: break-word;
}

.detail-fact-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-faint);
  text-transform: capitalize;
  margin-top: 3px;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 8px;
}

.modal-actions-right { display: flex; gap: 8px; }
