:root {
  /* Core brand palette: Deep Royal Slate & Champagne Gold */
  --navy: #0d1726;
  --navy-2: #162438;
  --navy-3: #22354e;
  --navy-light: #2d4361;
  --gold: #c99b53;
  --gold-2: #ab7f37;
  --gold-light: #dfb770;
  --gold-soft: #fbf7ee;
  --gold-glow: rgba(201, 155, 83, 0.18);
  --ivory: #f8f9fb;
  --surface: #ffffff;
  --surface-subtle: #fcfdfe;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --line-subtle: #edf2f7;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --ok: #16a34a;
  --ok-soft: #f0fdf4;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --shadow-xs: 0 1px 2px rgba(13, 23, 38, 0.04);
  --shadow-sm: 0 2px 6px rgba(13, 23, 38, 0.05);
  --shadow: 0 4px 16px rgba(13, 23, 38, 0.07), 0 1px 3px rgba(13, 23, 38, 0.04);
  --shadow-lg: 0 12px 32px rgba(13, 23, 38, 0.12), 0 2px 6px rgba(13, 23, 38, 0.06);
  --shadow-xl: 0 24px 60px rgba(13, 23, 38, 0.18);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  
  /* Segment semantic accents */
  --seg-flight: #2563eb;
  --seg-hotel: #b45309;
  --seg-activity: #059669;
  --seg-transfer: #7c3aed;
  --seg-meal: #e11d48;
  --seg-note: #475569;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ivory);
  color: var(--text);
  font: 14px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--gold-2);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--gold);
}

.ic {
  width: 18px;
  height: 18px;
  flex: none;
  vertical-align: middle;
}
.hidden { display: none !important; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  margin: 0;
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums;
}
.day-no b, .ed-title, .day-title { font-variant-numeric: lining-nums; }
.trip-meta span { display: flex; align-items: center; gap: 6px; }
.trip-meta .ic { width: 14px; height: 14px; color: var(--gold); }

/* Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  font: 500 13.5px/1 var(--sans);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn:hover {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 3px 10px var(--gold-glow);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn .ic { width: 16px; height: 16px; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border-color: var(--gold);
  color: #1a1204;
  font-weight: 600;
  box-shadow: 0 2px 8px var(--gold-glow);
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border-color: var(--gold-2);
  color: #fff;
  box-shadow: 0 4px 16px rgba(201, 155, 83, 0.35);
}

.btn-navy {
  background: linear-gradient(135deg, var(--navy-2), var(--navy));
  border-color: var(--navy);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(13, 23, 38, 0.2);
}
.btn-navy:hover {
  background: linear-gradient(135deg, var(--navy-3), var(--navy-2));
  border-color: var(--navy-3);
  box-shadow: 0 4px 14px rgba(13, 23, 38, 0.3);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--muted);
}
.btn-ghost:hover {
  background: rgba(13, 23, 38, 0.05);
  border-color: transparent;
  color: var(--navy);
  box-shadow: none;
  transform: none;
}

.btn-danger {
  color: var(--danger);
}
.btn-danger:hover {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
}

.btn-sm {
  height: 30px;
  padding: 0 11px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
}
.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

label.f {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}
label.f.wide, .f-wide { grid-column: 1 / -1; }

input, select, textarea {
  font: 14px var(--sans);
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 8px 12px;
  width: 100%;
  outline: none;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-xs);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 3px var(--gold-glow);
}
textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.55;
}
input[type=checkbox] {
  width: auto;
  accent-color: var(--gold);
  cursor: pointer;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
  color: var(--text-2);
}

/* Shell & Navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
  padding: 0 28px;
  background: rgba(13, 23, 38, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  border-bottom: 1px solid rgba(201, 155, 83, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}
.topbar .brand img { height: 34px; width: auto; }
.topbar .brand span {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--gold-light);
}
.topbar .brand .v2-tag {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0b132b;
  background: linear-gradient(135deg, #dfba73, #c5a059);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 8px rgba(197, 160, 89, 0.35);
  margin-left: 6px;
  border-left: none;
}

.nav {
  display: flex;
  gap: 6px;
  flex: 1;
}
.nav a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  transition: all 0.15s ease;
}
.nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.nav a.on {
  color: #fff;
  background: rgba(201, 155, 83, 0.22);
  border: 1px solid rgba(201, 155, 83, 0.45);
}

.who {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.mode-pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(201, 155, 83, 0.16);
  color: var(--gold-light);
  border: 1px solid rgba(201, 155, 83, 0.28);
  white-space: nowrap;
}
.mode-pill.live {
  background: rgba(22, 163, 74, 0.2);
  color: #86efac;
  border-color: rgba(22, 163, 74, 0.4);
}
.mode-pill.live::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  margin-right: 6px;
  vertical-align: 1px;
  box-shadow: 0 0 8px #4ade80;
}
.topbar .btn-ghost {
  color: rgba(255, 255, 255, 0.75);
}
.topbar .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

main#view { min-height: calc(100vh - 64px); }
.wrap {
  max-width: 1260px;
  margin: 0 auto;
  padding: 36px 28px 64px;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.page-head h1 {
  font-size: 38px;
  line-height: 1.1;
  color: var(--navy);
}
.page-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card-pad { padding: 26px; }
.section-t {
  font-family: var(--serif);
  font-size: 23px;
  margin: 0 0 4px;
  color: var(--navy);
}
.section-s {
  color: var(--muted);
  margin: 0 0 20px;
  font-size: 13px;
}
.empty {
  text-align: center;
  padding: 68px 24px;
  color: var(--muted);
}
.empty h3 {
  font-size: 28px;
  margin-bottom: 8px;
}

/* Dashboard & Cards */
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  align-items: center;
}
.search {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 400px;
}
.search .ic {
  position: absolute;
  left: 12px;
  top: 9px;
  color: var(--muted);
  width: 17px;
  height: 17px;
}
.search input {
  padding-left: 38px;
  background: #ffffff;
  border-radius: var(--radius);
}
.toolbar select {
  width: auto;
  border-radius: var(--radius);
}
.seg-tabs {
  display: inline-flex;
  background: #ffffff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 3px;
  box-shadow: var(--shadow-xs);
}
.seg-tabs button {
  border: 0;
  background: none;
  font: 500 13px var(--sans);
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s ease;
}
.seg-tabs button:hover {
  color: var(--navy);
}
.seg-tabs button.on {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.trips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 22px;
}
.trip-card {
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease;
}
.trip-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 155, 83, 0.45);
  box-shadow: var(--shadow-lg);
}
.trip-cover {
  height: 156px;
  background: linear-gradient(135deg, var(--navy-2), var(--navy)) center/cover;
  position: relative;
}
.trip-cover .status {
  position: absolute;
  top: 12px;
  left: 12px;
}
.trip-cover .days-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(13, 23, 38, 0.86);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.trip-cover .ph-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0.22;
}
.trip-cover .ph-mark img { width: 64px; }
.trip-cover .ph-mark .ic { width: 48px; height: 48px; }
.card-acts {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 5px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.trip-card:hover .card-acts, .trip-card:focus-within .card-acts {
  opacity: 1;
  transform: translateY(0);
}
.card-acts .btn {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.card-acts .btn:hover {
  background: #ffffff;
}
@media (hover: none) { .card-acts { opacity: 1; transform: none; } }

.trip-body {
  padding: 16px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.trip-body h3 {
  font-size: 22px;
  line-height: 1.25;
  margin-bottom: 6px;
  color: var(--navy);
}
.trip-meta {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.trip-foot {
  margin-top: auto;
  padding-top: 12px;
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line-subtle);
  margin-top: 14px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  background: #eef2f6;
  color: var(--muted);
  border: 1px solid transparent;
}
.status.draft { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.status.quoted { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.status.confirmed { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.status.completed { background: #e0e7ff; color: #3730a3; border-color: #c7d2fe; }
.status.cancelled { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.status.template {
  background: var(--navy);
  color: var(--gold-light);
  border-color: rgba(201, 155, 83, 0.4);
}

/* Editor Toolbar & Tabs */
.ed-bar {
  position: sticky;
  top: 64px;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(13, 23, 38, 0.04);
}
.ed-bar-in {
  max-width: 1440px;
  margin: 0 auto;
  padding: 11px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ed-title {
  flex: 1;
  min-width: 220px;
  font: 600 24px/1.2 var(--serif);
  color: var(--navy);
  border: 1px solid transparent;
  background: transparent;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  box-shadow: none;
}
.ed-title:hover {
  background: rgba(13, 23, 38, 0.03);
  border-color: var(--line);
}
.ed-title:focus {
  background: #ffffff;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.ed-bar select {
  width: auto;
  height: 36px;
  padding: 0 12px;
}
.save-state {
  font-size: 12.5px;
  color: var(--muted);
  min-width: 95px;
  text-align: right;
  font-weight: 500;
}
.save-state.dirty {
  color: var(--gold-2);
  font-weight: 600;
}

.ed-tabs {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
}
.ed-tabs button {
  border: 0;
  background: none;
  padding: 10px 16px;
  font: 600 13.5px var(--sans);
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.ed-tabs button:hover {
  color: var(--navy);
}
.ed-tabs button.on {
  color: var(--navy);
  border-bottom-color: var(--gold);
}

.ed-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px;
}
.ed-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.ed-grid > * { min-width: 0; }

.palette {
  position: sticky;
  top: 184px;
  padding: 16px;
  max-height: calc(100vh - 204px);
  overflow-y: auto;
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.palette h4 {
  margin: 0 0 4px;
  font: 700 11px var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
}
.palette p {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--muted);
}
.pal-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.pal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  cursor: grab;
  font-weight: 500;
  user-select: none;
  box-shadow: var(--shadow-xs);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.pal-item:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 14px var(--gold-glow);
  transform: translateY(-1px);
}
.pal-item:active {
  cursor: grabbing;
}
.pal-item .ic { color: var(--c); }
.pal-item small {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}
.pal-tips {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.pal-tips b { color: var(--navy); }

/* Day Editor Cards */
.days {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.day {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.day-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(90deg, var(--gold-soft) 0%, #ffffff 80%);
  border-bottom: 1px solid var(--line);
}
.drag-day {
  cursor: grab;
  color: var(--muted);
  display: grid;
  place-items: center;
  padding: 4px;
  border-radius: 4px;
}
.drag-day:hover {
  background: rgba(13, 23, 38, 0.06);
  color: var(--navy);
}
.drag-day:active { cursor: grabbing; }

.day-no { min-width: 90px; }
.day-no b {
  display: block;
  font: 700 23px/1 var(--serif);
  color: var(--gold-2);
}
.day-no small {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}

.day-title-wrap {
  flex: 1;
  min-width: 180px;
  position: relative;
  display: flex;
  align-items: center;
  cursor: text;
}
.day-title {
  font: 600 18.5px var(--serif);
  color: var(--navy);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line-2);
  border-bottom: 2px solid var(--gold);
  border-radius: 8px 8px 3px 3px;
  padding: 6px 36px 6px 12px;
  box-shadow: none;
}
.day-title:hover {
  background: #ffffff;
  border-color: var(--gold);
}
.day-title:focus {
  background: #ffffff;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.day-title-wrap > .ic {
  position: absolute;
  right: 12px;
  width: 15px;
  height: 15px;
  color: var(--gold-2);
  pointer-events: none;
}

.day-loc {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 240px;
  flex: none;
  height: 36px;
  padding: 0 3px 0 10px;
  background: #ffffff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: all 0.18s ease;
}
.day-loc:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.day-loc > .ic { width: 15px; height: 15px; color: var(--gold-2); }
.day-loc input {
  border: 0;
  padding: 4px 2px;
  font-size: 13px;
  height: 30px;
  min-width: 0;
  flex: 1;
  box-shadow: none !important;
  background: transparent;
}
.day-loc .pinned .ic { width: 14px; height: 14px; }
.day-loc .btn-icon { width: 28px; height: 28px; }
.day-loc .btn-icon .ic { width: 15px; height: 15px; }

.day-actions { display: flex; gap: 4px; }
.day-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.day-img {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.day-img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.day-img-acts {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
}
.day-img-acts .btn {
  background: rgba(13, 23, 38, 0.82);
  color: #fff;
  border-color: transparent;
  backdrop-filter: blur(4px);
}
.day-img-acts .btn:hover {
  background: var(--navy);
}

/* Side panel tabs */
.side-tabs {
  display: flex;
  gap: 3px;
  background: var(--ivory);
  border-radius: var(--radius);
  padding: 3px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
}
.side-tabs button {
  flex: 1;
  border: 0;
  background: none;
  padding: 7px 6px;
  font: 600 12px var(--sans);
  color: var(--muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.side-tabs button:hover { color: var(--navy); }
.side-tabs button.on {
  background: #ffffff;
  color: var(--navy);
  box-shadow: var(--shadow-xs);
}
.side-tabs .count {
  background: var(--gold);
  color: var(--navy);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 10.5px;
  margin-left: 3px;
  font-weight: 700;
}
.side-tabs .count:empty { display: none; }
.side-hint { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.bk-add { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.bk-add .btn-sm .ic { width: 14px; height: 14px; }

.pal-item.bk, .pal-item.lib {
  align-items: flex-start;
  gap: 10px;
  padding: 10px 8px 10px 12px;
}
.pal-item > .ic { margin-top: 2px; }
.bk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bk-main b {
  font-weight: 600;
  font-size: 13px;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bk-main small { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.bk-main small.ok { color: var(--ok); font-weight: 500; }
.bk-main small.warn { color: var(--danger); font-weight: 500; }
.bar {
  display: block;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  background: var(--seg-hotel);
  border-radius: 2px;
}
.pal-item.done {
  background: var(--ivory);
  cursor: default;
  border-color: var(--line-subtle);
}
.pal-item.done .bk-main b { color: var(--muted); }
.pal-item .btn-icon { width: 26px; height: 26px; flex: none; }
.pal-item .btn-icon .ic { width: 14px; height: 14px; }

/* Segment Items in Day */
.seg-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-height: 60px;
  padding: 8px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--radius);
  background: #fbfbfc;
  align-items: stretch;
}
.seg-list:empty::before, .seg-list:not(:has(> :not([hidden])))::before {
  content: 'Drag items here — flights, hotels, activities, transfers…';
  grid-column: 1 / -1;
  align-self: center;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 10px;
}
.seg-list > .seg {
  padding: 10px 8px 10px 12px;
  gap: 10px;
}
.seg-list > .seg .seg-ic { width: 30px; height: 30px; }
.seg-list > .seg .seg-ic .ic { width: 15px; height: 15px; }
.seg-list > .seg .seg-thumb { display: none; }
.seg-list > .seg .seg-time { font-size: 11px; padding: 2px 7px; }
.seg-list > .seg .seg-t { font-size: 13.5px; }
.seg-list > .seg .tag { display: none; }
.seg-list > .seg .btn-icon { width: 26px; height: 26px; }
.seg-list > .seg .btn-icon .ic { width: 14px; height: 14px; }
@media (max-width: 720px) { .seg-list { grid-template-columns: minmax(0, 1fr); } }

/* Single Segment Card */
.seg {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 3.5px solid var(--c);
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.seg:hover {
  box-shadow: var(--shadow);
  border-color: rgba(13, 23, 38, 0.15);
  border-left-color: var(--c);
  transform: translateY(-1px);
}
.seg-ic {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--c) 14%, #ffffff);
  color: var(--c);
  flex: none;
}
.seg-main { flex: 1; min-width: 0; }
.seg-t {
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seg-m {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.seg-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  background: var(--ivory);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.seg-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.seg .btn-icon {
  width: 28px;
  height: 28px;
  flex: none;
  color: var(--muted);
}
.seg .seg-edit:hover { color: var(--navy); background: rgba(13, 23, 38, 0.05); }
.seg .seg-del:hover { color: var(--danger); background: var(--danger-soft); }
.seg.linked { background: #fffdfa; }
.seg .tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-2);
  background: var(--gold-soft);
  border: 1px solid rgba(201, 155, 83, 0.3);
  border-radius: 12px;
  padding: 1px 7px;
  margin-left: 6px;
  vertical-align: 2px;
}
.seg .tag .ic { width: 10px; height: 10px; }
.pal-item.sortable-ghost, .seg.sortable-ghost {
  opacity: 0.4;
  border-style: dashed;
  transform: scale(0.98);
}
.seg-list .pal-item { border-left: 3.5px solid var(--c); }

/* Meals row inside each day */
.day-meals {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-subtle);
}
.day-meals .dm-l {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--navy);
  margin-right: 4px;
}
.day-meals .dm-l .ic { width: 15px; height: 15px; color: var(--seg-meal); }
.day-meals .dm-spec {
  flex: 1;
  min-width: 160px;
  height: 32px;
  padding: 4px 10px;
  font-size: 13px;
}
.wz-meal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 9px;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
  background: #fff;
  transition: all 0.15s ease;
}
.wz-meal:hover {
  border-color: var(--seg-meal);
}
.wz-meal input { width: 15px; height: 15px; accent-color: var(--seg-meal); }
.wz-meal:has(input:checked) {
  border-color: var(--seg-meal);
  background: color-mix(in srgb, var(--seg-meal) 9%, #ffffff);
  color: var(--seg-meal);
  font-weight: 600;
}

.day-notes {
  min-height: 64px;
  font-size: 13px;
  border-radius: var(--radius);
}
.add-day {
  width: 100%;
  height: 52px;
  border: 1.5px dashed var(--gold);
  background: var(--gold-soft);
  border-radius: var(--radius-lg);
  color: var(--gold-2);
  font: 600 14px var(--sans);
  cursor: pointer;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
}
.add-day:hover {
  border-color: var(--gold-2);
  background: rgba(201, 155, 83, 0.14);
  transform: translateY(-1px);
}

/* Modals */
.modal-bg {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(13, 23, 38, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 18px 24px;
  overflow-y: auto;
  animation: modalFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal {
  width: 100%;
  max-width: 640px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  animation: modalSlide 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal.wide { max-width: 860px; }
.modal-h {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
  background: #fafbfe;
}
.modal-h h2 {
  font-size: 26px;
  flex: 1;
  color: var(--navy);
}
.modal-h .seg-ic { width: 40px; height: 40px; }
.modal-b {
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 72vh;
  overflow-y: auto;
}
.modal-f {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 26px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}
.modal-f .left { margin-right: auto; }

@keyframes modalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalSlide {
  from { opacity: 0; transform: scale(0.97) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* "Add to day" picker in modal */
.day-pick {
  flex-direction: row !important;
  align-items: center;
  gap: 12px !important;
  padding: 12px 16px;
  background: var(--gold-soft);
  border: 1px solid rgba(201, 155, 83, 0.35);
  border-radius: var(--radius);
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--navy) !important;
  white-space: nowrap;
}
.day-pick .ic { width: 17px; height: 17px; color: var(--gold-2); }
.day-pick select { flex: 1; min-width: 0; font-weight: 500; }

/* Suggestions and transfers */
.act-sug {
  border: 1px solid #d1fae5;
  border-radius: var(--radius);
  background: #f0fdf4;
  padding: 12px 14px;
}
.act-sug-h {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--navy);
  margin-bottom: 9px;
  font-weight: 600;
}
.act-sug-h .ic { width: 16px; height: 16px; color: var(--seg-activity); }
.act-sug-h .hint { margin-left: auto; }
.sug-search {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #ffffff;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 4px 4px 4px 12px;
  margin-bottom: 9px;
  box-shadow: var(--shadow-xs);
}
.sug-search:focus-within { border-color: var(--seg-activity); box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2); }
.sug-search > .ic { width: 15px; height: 15px; color: var(--seg-activity); }
.sug-search input { border: 0; box-shadow: none !important; padding: 5px 4px; font-size: 13px; background: transparent; }
.sug-search .btn-navy { background: var(--seg-activity); border-color: var(--seg-activity); }

.sug-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 160px;
  overflow-y: auto;
}
.sug-list button {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  border: 1px solid #bbf7d0;
  background: #ffffff;
  border-radius: var(--radius);
  padding: 6px 12px;
  font: 500 12.5px var(--sans);
  color: var(--text);
  cursor: pointer;
  max-width: 270px;
  transition: all 0.15s ease;
}
.sug-list button:hover {
  border-color: var(--seg-activity);
  background: #f0fdf4;
  transform: translateY(-1px);
}
.sug-list button.on {
  background: var(--seg-activity);
  border-color: var(--seg-activity);
  color: #fff;
}
.sug-list button.on small { color: rgba(255, 255, 255, 0.85); }

.tr-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafbfe;
}
.tr-presets > span { font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 4px; }
.tr-presets button {
  border: 1px solid var(--line-2);
  background: #ffffff;
  border-radius: 20px;
  padding: 5px 13px;
  font: 500 12.5px var(--sans);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}
.tr-presets button:hover {
  border-color: var(--seg-transfer);
  color: var(--seg-transfer);
}
.tr-presets button.on {
  background: var(--seg-transfer);
  border-color: var(--seg-transfer);
  color: #fff;
}

/* Photo Chooser Grid */
.ph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  max-height: 52vh;
  overflow-y: auto;
  padding: 2px;
}
.ph {
  border: 2px solid transparent;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--ivory);
  aspect-ratio: 4 / 3;
  transition: all 0.18s ease;
}
.ph:hover {
  border-color: var(--gold);
  transform: scale(1.02);
  box-shadow: var(--shadow-sm);
}
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.share-link { display: flex; gap: 8px; }
.share-link input { font-size: 13px; background: var(--ivory); }

/* Route Wizard */
.wz {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: #fafbfe;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wz-h {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wz-h b {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--navy);
}
.wz-home {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
}
.wz-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wz-row {
  display: grid;
  grid-template-columns: 28px 1.4fr 90px 1.4fr 34px;
  gap: 12px;
  align-items: start;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
  position: relative;
}
.wz-n {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  margin-top: 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.wz-row .btn-icon {
  margin-top: 22px;
}
.wz-ok {
  color: var(--ok);
  font-size: 11.5px;
  font-weight: 500;
  display: flex;
  gap: 4px;
  align-items: center;
  min-height: 16px;
  margin-top: 3px;
}
.wz-ok .ic {
  width: 12px;
  height: 12px;
}

/* Wizard Meals - STRICT SINGLE LINE ROW */
.wz-meals {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap !important;
  font-size: 13px;
  color: var(--navy);
  margin-top: 2px;
  white-space: nowrap !important;
  overflow-x: auto;
}
.wz-meals > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--navy);
  margin-right: 6px;
  white-space: nowrap !important;
  flex-shrink: 0;
}
.wz-meals .ic {
  width: 15px;
  height: 15px;
  color: var(--seg-meal);
  flex-shrink: 0;
}
.wz-meal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 9px;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
  font-size: 12.5px;
  background: #ffffff;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap !important;
  flex-shrink: 0;
}
.wz-meal:hover {
  border-color: var(--gold-2);
  background: rgba(201, 155, 83, 0.05);
}
.wz-meal input {
  width: 15px;
  height: 15px;
  accent-color: var(--seg-meal);
  cursor: pointer;
  margin: 0;
}
.wz-meal:has(input:checked) {
  border-color: var(--seg-meal);
  background: color-mix(in srgb, var(--seg-meal) 12%, #fff);
  color: var(--navy);
  font-weight: 600;
}

/* Hotel Search & Autocomplete Dropdown in Wizard */
.wz-hotel-field {
  position: relative;
}
.wz-hotel-wrap {
  position: relative;
  width: 100%;
}
.share-link .wz-hotel-wrap {
  flex: 1;
}
.share-link .wz-hotel-drop {
  z-index: 200;
}
.wz-hotel-input-box {
  position: relative;
  display: flex;
  align-items: center;
}
.wz-hotel-input-box input {
  padding-right: 32px;
  width: 100%;
}
.wz-h-status {
  position: absolute;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  pointer-events: none;
}
.wz-h-status .ic {
  width: 14px;
  height: 14px;
}
.wz-h-status.ok {
  color: var(--ok);
}
.wz-hotel-addr {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}
.wz-hotel-addr .ic {
  width: 11px;
  height: 11px;
  color: var(--gold-2);
  flex-shrink: 0;
}

/* Autocomplete Dropdown Menu */
.wz-hotel-drop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 300px;
  background: #ffffff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(13, 23, 38, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
  z-index: 150;
  overflow: hidden;
  animation: dropSlide 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dropSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.wz-hdrop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.wz-hdrop-header span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.wz-hdrop-header .ic {
  width: 12px;
  height: 12px;
  color: var(--gold-2);
}
.wz-hdrop-count {
  color: var(--muted);
  font-size: 10.5px;
}
.wz-hdrop-list {
  max-height: 250px;
  overflow-y: auto;
}
.wz-hdrop-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}
.wz-hdrop-item:last-child {
  border-bottom: 0;
}
.wz-hdrop-item:hover, .wz-hdrop-item.active {
  background: #fdfbf7;
  border-left: 3px solid var(--gold);
  padding-left: 10px;
}
.wz-hdrop-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wz-hdrop-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wz-hdrop-rating {
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  padding: 1px 6px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.wz-hdrop-addr {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wz-hdrop-loading, .wz-hdrop-empty {
  padding: 14px 16px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}
.wz-hdrop-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.wz-hdrop-loading .ic {
  width: 14px;
  height: 14px;
  color: var(--gold-2);
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.wz-hdrop-footer {
  padding: 7px 12px;
  font-size: 11px;
  color: var(--gold-2);
  background: var(--gold-soft);
  border-top: 1px solid rgba(201, 155, 83, 0.25);
  text-align: center;
}
.wz-sum {
  font-size: 13.5px;
  color: var(--navy);
  background: var(--gold-soft);
  border: 1px solid rgba(201, 155, 83, 0.3);
  border-radius: var(--radius);
  padding: 11px 14px;
}

/* Toast Notifications */
.toasts {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--navy);
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  animation: toastPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 3.5px solid var(--gold);
  pointer-events: auto;
}
.toast.err { border-left-color: #ef4444; }

@keyframes toastPop {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Client Preview Overlay */
.preview {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #eaebef;
  overflow-y: auto;
}
.pv-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(13, 23, 38, 0.96);
  backdrop-filter: blur(12px);
  color: #fff;
  border-bottom: 1px solid rgba(201, 155, 83, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.pv-bar b {
  font-family: var(--serif);
  font-size: 21px;
  flex: 1;
  color: var(--gold-light);
  font-weight: 600;
}
.pv-body { padding: 36px 20px 70px; }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-art {
  background: radial-gradient(ellipse at 35% 25%, var(--navy-3), var(--navy) 65%);
  color: #fff;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-art img { height: 64px; width: auto; align-self: flex-start; }
.login-art h1 {
  color: #fff;
  font-size: 50px;
  line-height: 1.08;
  font-weight: 500;
  max-width: 500px;
}
.login-art h1 em { color: var(--gold-light); font-style: italic; }
.login-art p { color: rgba(255, 255, 255, 0.75); max-width: 440px; font-size: 15px; }
.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 28px;
  background: #ffffff;
}
.login-form form {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-form h2 { font-size: 34px; color: var(--navy); }
.err-msg { color: var(--danger); font-size: 13px; min-height: 18px; }

/* Settings & Misc */
.brand-preview {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand-preview .light { background: #fff; border-radius: var(--radius); padding: 14px; }
.brand-preview img { height: 56px; width: auto; display: block; }
.team-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.team-row:last-child { border-bottom: 0; }
.team-row .grow { flex: 1; }
.team-row small { color: var(--muted); display: block; margin-top: 1px; }

/* ---------- Version 2.2 Template & Preset Styling ---------- */
.tpl-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.tpl-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.tpl-pill:hover {
  border-color: var(--gold);
  color: var(--text);
  background: #faf8f5;
}
.tpl-pill.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  box-shadow: 0 2px 8px rgba(11, 19, 43, 0.2);
}
.tpl-pill .count {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}
.tpl-pill:not(.active) .count {
  background: var(--line);
  color: var(--text-muted);
}

.tpl-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(11, 19, 43, 0.85);
  color: #fff;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 2;
}
.tpl-cat-badge.international {
  border-color: rgba(223, 186, 115, 0.7);
  color: var(--gold-light);
}
.tpl-cat-badge.domestic {
  border-color: rgba(52, 211, 153, 0.7);
  color: #34d399;
}
.tpl-cat-badge.group {
  border-color: rgba(167, 139, 250, 0.7);
  color: #c4b5fd;
}
.tpl-cat-badge.corporate {
  border-color: rgba(96, 165, 250, 0.7);
  color: #93c5fd;
}

.tpl-card-use-btn {
  margin-top: 10px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Preset rules bar in Pricing & terms tab */
.preset-rules-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: linear-gradient(135deg, #fbf9f4 0%, #f3eee3 100%);
  border: 1px solid rgba(197, 160, 89, 0.4);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.preset-rules-bar .pr-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
}
.preset-rule-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid rgba(197, 160, 89, 0.45);
  color: var(--navy);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}
.preset-rule-btn:hover {
  background: var(--gold);
  color: #1b1407;
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(197, 160, 89, 0.3);
}

/* Template quick cards in New Trip Modal */
.modal-tpl-section {
  margin-bottom: 20px;
  padding: 14px;
  background: #fbf9f5;
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: var(--radius);
}
.modal-tpl-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}
.modal-tpl-card {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.modal-tpl-card:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 14px rgba(197, 160, 89, 0.22);
  transform: translateY(-2px);
}
.modal-tpl-card.selected {
  border-color: var(--gold);
  background: #fdfaf3;
  box-shadow: 0 0 0 2px var(--gold);
}
.modal-tpl-card .tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-dark);
}
.modal-tpl-card strong {
  font-size: 13px;
  color: var(--navy);
  line-height: 1.3;
}
.modal-tpl-card small {
  font-size: 11.5px;
  color: var(--text-muted);
}

@media (max-width: 1000px) {
  .ed-grid { grid-template-columns: minmax(0, 1fr); }
  .palette { position: static; max-height: none; }
  .pal-list { flex-direction: row; flex-wrap: wrap; }
  .pal-tips { display: none; }
  .pal-list .pal-item.bk, .pal-list .pal-item.lib { flex-basis: 100%; }
}
@media (max-width: 760px) {
  .topbar { padding: 0 18px; gap: 14px; }
  .topbar .brand span, .who .name, .mode-pill { display: none; }
  .nav a { padding: 8px 10px; font-size: 13px; }
  .wrap, .ed-wrap { padding: 22px 18px 50px; }
  .ed-bar-in, .ed-tabs { padding-left: 18px; padding-right: 18px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 36px 26px; min-height: 280px; }
  .login-art h1 { font-size: 36px; }
  .day-head { flex-wrap: wrap; }
  .day-title-wrap { order: 3; flex-basis: 100%; }
  .day-loc { order: 4; width: 100%; }
  .page-head h1 { font-size: 32px; }
  .wz-row { grid-template-columns: 28px 1fr 34px; }
  .wz-row label:nth-of-type(2), .wz-row .wz-hotel-field { grid-column: 2 / 3; }
  .wz-home { grid-template-columns: 1fr; }
  .wz-meals { overflow-x: auto; padding-bottom: 4px; }
}
@media (max-width: 480px) {
  .nav { overflow-x: auto; }
  .ed-bar .btn-label { display: none; }
}

@media print {
  html, body {
    background: #fff !important;
    overflow: visible !important;
    height: auto !important;
  }
  .topbar, #topbar, #view, .toasts, .modal-bg:not(.hv-preview-modal-bg), .pv-bar { display: none !important; }
  #preview:not(.hidden), .preview:not(.hidden) {
    display: block !important;
    position: static !important;
    background: #fff !important;
    overflow: visible !important;
  }
  .pv-body { padding: 0 !important; }
}

