/* PackMate Design System
   Tokens: #1A2940 primary · #E07B39 accent · #2D8B57 success · #F4F6F9 bg · #FFFFFF card
   Font: DM Sans (300–700)
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --primary:     #1A2940;
  --primary-light: #253654;
  --accent:      #E07B39;
  --accent-hover:#C96A28;
  --success:     #2D8B57;
  --danger:      #D94F4F;
  --bg:          #F4F6F9;
  --card:        #FFFFFF;
  --muted:       #6B7A8D;
  --border:      #E2E7EE;
  --text:        #1A2940;
  --shadow-sm:   0 1px 3px rgba(26,41,64,.08);
  --shadow-md:   0 4px 16px rgba(26,41,64,.12);
  --shadow-lg:   0 8px 32px rgba(26,41,64,.16);
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --nav-height:  64px;
  --transition:  .2s ease;
}

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

html { font-size: 16px; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
}

/* ── Typography ─────────────────────────────── */
h1 { font-size: 1.5rem;  font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1rem;    font-weight: 600; line-height: 1.4; }
p, li { font-size: .9375rem; line-height: 1.6; }
.text-muted  { color: var(--muted); font-size: .875rem; }
.text-sm     { font-size: .8125rem; }
.text-xs     { font-size: .75rem; }
.font-600    { font-weight: 600; }
.font-500    { font-weight: 500; }

/* ── Layout helpers ──────────────────────────── */
.page-content { padding: 20px 16px 32px; max-width: 640px; margin: 0 auto; }
.stack        { display: flex; flex-direction: column; }
.stack-sm     { gap: 8px; }
.stack-md     { gap: 16px; }
.stack-lg     { gap: 24px; }
.row          { display: flex; align-items: center; }
.row-between  { display: flex; align-items: center; justify-content: space-between; }
.gap-sm       { gap: 8px; }
.gap-md       { gap: 12px; }

/* ── Cards ───────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-body    { padding: 16px; }
.card-header  { padding: 14px 16px; border-bottom: 1px solid var(--border); }

/* ── Buttons ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: inherit; font-size: .9375rem; font-weight: 600; line-height: 1;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  padding: 12px 20px; transition: background var(--transition), transform var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(.97); }

.btn-primary  { background: var(--primary);  color: #fff; }
.btn-primary:hover  { background: var(--primary-light); }
.btn-accent   { background: var(--accent);   color: #fff; }
.btn-accent:hover   { background: var(--accent-hover); }
.btn-ghost    { background: transparent;     color: var(--primary); border: 1.5px solid var(--border); }
.btn-ghost:hover    { background: var(--bg); }
.btn-danger   { background: var(--danger);   color: #fff; }
.btn-sm       { padding: 8px 14px; font-size: .8125rem; border-radius: 6px; }
.btn-icon     { padding: 10px; border-radius: 50%; }
.btn-full     { width: 100%; }

/* ── FAB ─────────────────────────────────────── */
.fab {
  position: fixed; bottom: calc(var(--nav-height) + 20px + env(safe-area-inset-bottom));
  right: 20px; z-index: 100;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  box-shadow: var(--shadow-lg); font-size: 24px; font-weight: 300;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--transition), background var(--transition);
  text-decoration: none;
}
.fab:hover { transform: scale(1.08) rotate(90deg); background: var(--accent-hover); }

/* ── Bottom Nav ──────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(26,41,64,.08);
  display: flex; align-items: stretch; z-index: 200;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; text-decoration: none; color: var(--muted); font-size: .6875rem; font-weight: 500;
  transition: color var(--transition);
}
.bottom-nav a.active { color: var(--accent); }
.bottom-nav a svg, .bottom-nav a .nav-icon { width: 22px; height: 22px; }

/* ── Top header ──────────────────────────────── */
.page-header {
  background: var(--primary); color: #fff;
  padding: 20px 16px 16px;
  padding-top: calc(20px + env(safe-area-inset-top));
}
.page-header h1 { color: #fff; }
.page-header p  { color: rgba(255,255,255,.65); font-size: .875rem; margin-top: 4px; }

/* ── Progress bar ────────────────────────────── */
.progress-bar-track {
  height: 6px; background: var(--border); border-radius: 3px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; background: var(--success); border-radius: 3px;
  transition: width .5s ease;
}
.progress-label { font-size: .8125rem; color: var(--muted); margin-top: 4px; }

/* ── Trip card ────────────────────────────────── */
.trip-card { cursor: pointer; transition: box-shadow var(--transition); }
.trip-card:hover { box-shadow: var(--shadow-md); }
.trip-card-header {
  background: var(--primary); color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.trip-card-header h3 { color: #fff; }
.trip-badge {
  font-size: .6875rem; font-weight: 600; padding: 3px 8px; border-radius: 12px;
  background: rgba(255,255,255,.15); color: #fff; letter-spacing: .5px; text-transform: uppercase;
}
.trip-badge.active   { background: var(--accent); }
.trip-badge.planning { background: rgba(255,255,255,.2); }
.trip-badge.done     { background: var(--success); }

/* ── Traveler avatar ─────────────────────────── */
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: .75rem; font-weight: 700;
  color: #fff; flex-shrink: 0;
}
.avatar-sm { width: 24px; height: 24px; font-size: .625rem; }
.avatar-lg { width: 44px; height: 44px; font-size: 1rem; }

.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -8px; border: 2px solid var(--card); }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ── Form elements ───────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: .875rem; font-weight: 500; color: var(--text); }
.input, .select, .textarea {
  font-family: inherit; font-size: .9375rem; color: var(--text);
  background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 14px; outline: none; transition: border-color var(--transition);
  width: 100%;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); background: var(--card); }
.textarea { resize: vertical; min-height: 80px; }
.input-row { display: flex; gap: 10px; }
.input-row .input { flex: 1; }

/* ── Checklist items ─────────────────────────── */
.check-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.check-item:last-child { border-bottom: none; }
.check-item.is-packed  { background: rgba(45,139,87,.04); }
.check-item.is-packed .check-label { color: var(--muted); text-decoration: line-through; }

.checkbox-custom {
  width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border);
  background: var(--card); cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.checkbox-custom.checked {
  background: var(--success); border-color: var(--success);
}
.checkbox-custom.checked::after {
  content: '✓'; color: #fff; font-size: .75rem; font-weight: 700;
}

.check-label { flex: 1; font-size: .9375rem; }
.check-qty   { font-size: .8125rem; color: var(--muted); font-weight: 500; background: var(--bg); padding: 2px 7px; border-radius: 4px; }
.check-hl    { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* ── Section header ──────────────────────────── */
.section-header {
  padding: 10px 16px; background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.section-title { font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }

/* ── Tags ────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .6875rem; font-weight: 600; padding: 3px 8px; border-radius: 12px;
  background: var(--bg); color: var(--muted); border: 1px solid var(--border);
}
.tag.handbagage { background: #FFF3E0; color: #E07B39; border-color: #FFDAA8; }
.tag.medisch    { background: #FFE8E8; color: #D94F4F; border-color: #FFCACA; }
.tag.kind       { background: #E8F5E9; color: var(--success); border-color: #B8DFC4; }

/* ── Wizard ──────────────────────────────────── */
.wizard-steps {
  display: flex; align-items: center; padding: 16px;
  background: var(--card); border-bottom: 1px solid var(--border);
}
.wizard-step {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: .6875rem; font-weight: 600; color: var(--muted);
  position: relative;
}
.wizard-step::before {
  content: ''; position: absolute; top: 14px; left: calc(50% + 14px);
  right: calc(-50% + 14px); height: 2px; background: var(--border);
}
.wizard-step:last-child::before { display: none; }
.wizard-step-dot {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border);
  background: var(--card); display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; color: var(--muted); z-index: 1;
}
.wizard-step.active .wizard-step-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.wizard-step.done .wizard-step-dot   { background: var(--success); border-color: var(--success); color: #fff; }
.wizard-step.done::before            { background: var(--success); }
.wizard-step.active { color: var(--accent); }

/* ── Alerts / Toasts ─────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .9rem; }
.alert-error   { background: #FFE8E8; color: #D94F4F; border: 1px solid #FFCACA; }
.alert-success { background: #E8F5E9; color: var(--success); border: 1px solid #B8DFC4; }
.alert-info    { background: #E8F0FF; color: #3B5BDB; border: 1px solid #C5D3FF; }

/* ── Empty state ─────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-state-icon { font-size: 48px; }
.empty-state h3   { color: var(--text); }
.empty-state p    { color: var(--muted); max-width: 260px; }

/* ── List items ──────────────────────────────── */
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text);
  transition: background var(--transition);
}
.list-item:last-child { border-bottom: none; }
.list-item:hover, .list-item:focus { background: var(--bg); }
.list-item-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}

/* ── Chip row (traveler filters) ─────────────── */
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 20px; font-size: .8125rem; font-weight: 600;
  border: 1.5px solid var(--border); background: var(--card); color: var(--muted);
  cursor: pointer; white-space: nowrap; transition: all var(--transition); text-decoration: none;
}
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Divider ──────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 8px 0; }

/* ── Color picker swatches ───────────────────── */
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer; border: 3px solid transparent;
  transition: border-color var(--transition);
}
.color-swatch.selected { border-color: var(--text); }

/* ── Admin table ─────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th { padding: 10px 12px; text-align: left; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); border-bottom: 2px solid var(--border); }
.data-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }

/* ── Utility ─────────────────────────────────── */
.hidden   { display: none !important; }
.sr-only  { position: absolute; width: 1px; height: 1px; clip: rect(0,0,0,0); overflow: hidden; }
.mt-auto  { margin-top: auto; }
.mb-0     { margin-bottom: 0; }
.mt-16    { margin-top: 16px; }
.mt-24    { margin-top: 24px; }
.p-16     { padding: 16px; }
.p-24     { padding: 24px; }
.text-center { text-align: center; }

/* ── HTMX loading indicator ──────────────────── */
.htmx-indicator { opacity: 0; transition: opacity .15s; }
.htmx-request .htmx-indicator { opacity: 1; }

/* ── Login / register pages ──────────────────── */
.auth-page {
  min-height: 100dvh; padding: 0;
  display: flex; flex-direction: column;
  background: linear-gradient(160deg, var(--primary) 0%, #253654 100%);
}
.auth-card {
  background: var(--card); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin-top: auto; padding: 32px 24px 40px; box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; padding: 48px 24px 32px; color: #fff; }
.auth-logo h1 { font-size: 2rem; color: #fff; }
.auth-logo p  { color: var(--accent); margin-top: 6px; }

/* ── Scrollable content area ─────────────────── */
.scroll-area { overflow-y: auto; -webkit-overflow-scrolling: touch; }
