.flight-pass .btn-icon-small {
  align-self: flex-end;
}
/* Swiss Minimalist Design System */
:root {
  --bg: #ffffff;
  --bg-secondary: #f8f8f8;
  --text: #000000;
  --text-secondary: #333333;
  --border: #000000;
  --border-light: #e0e0e0;
  --accent: #ff3b30;
  /* International Orange */
  --muted: #888888;
  --font-main: 'Jost', sans-serif;
  --font-mono: 'Jost', monospace;
  /* Card backgrounds */
  --card-bg: #ffffff;
  --card-shadow: rgba(0, 0, 0, 0.08);
  --input-bg: #ffffff;
}

/* Dark Mode */
[data-theme="dark"] {
  --bg: #0d0d0d;
  --bg-secondary: #1a1a1a;
  --text: #f5f5f5;
  --text-secondary: #cccccc;
  --border: #333333;
  --border-light: #2a2a2a;
  --accent: #ff5a4f;
  --muted: #888888;
  --card-bg: #1a1a1a;
  --card-shadow: rgba(0, 0, 0, 0.3);
  --input-bg: #252525;
}

/* Dark mode specific overrides */
[data-theme="dark"] .flight-pass {
  background: linear-gradient(135deg, #1e2a3a 0%, #0d1a2a 100%);
  border-color: #2a3a4a;
}

[data-theme="dark"] .hotel-voucher {
  background: linear-gradient(135deg, #2a2520 0%, #1a1510 100%);
  border-color: #3a3530;
}

[data-theme="dark"] .flight-pass .flight-header,
[data-theme="dark"] .hotel-voucher .hotel-header {
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .extra-card {
  background: var(--card-bg);
  border-color: var(--border);
}

[data-theme="dark"] .pill {
  background: var(--bg-secondary);
  border-color: var(--border);
}

[data-theme="dark"] .table-card {
  background: var(--card-bg);
}

[data-theme="dark"] .gastos-table th {
  background: var(--bg-secondary);
}

[data-theme="dark"] .gastos-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .itinerary-tab {
  background: var(--bg-secondary);
  border-color: var(--border);
}

[data-theme="dark"] .itinerary-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
}

[data-theme="dark"] .place-form input {
  background: var(--card-bg);
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .place-form input::placeholder {
  color: var(--muted);
}

[data-theme="dark"] .place-form button,
[data-theme="dark"] .place-form button[type="submit"],
[data-theme="dark"] .place-form .btn-ghost {
  background: #f5f5f5 !important;
  color: #0d0d0d !important;
  border: none !important;
}

[data-theme="dark"] .place-form button:hover,
[data-theme="dark"] .place-form button[type="submit"]:hover,
[data-theme="dark"] .place-form .btn-ghost:hover {
  background: var(--accent) !important;
  color: #fff !important;
}

[data-theme="dark"] .map-status-pill {
  background: var(--bg-secondary);
  border-color: var(--border);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport height for mobile */
  display: flex;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

/* Layout */
.app {
  display: flex;
  width: 100%;
  height: 100%;
}

/* Sidebar */
.sidebar {
  width: 260px;
  border-right: 2px solid var(--border);
  padding: 32px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  flex-shrink: 0;
}

.sidebar-header {
  margin-bottom: 48px;
}

.sidebar-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.sidebar-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.sidebar-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.btn-new-trip {
  --primary-color: #ff3b30;
  --hovered-color: #c84747;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  padding: 0;
}

.btn-new-trip p {
  margin: 0;
  position: relative;
  font-size: 16px;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.btn-new-trip::after {
  position: absolute;
  content: "";
  width: 0;
  left: 0;
  bottom: -6px;
  background: var(--hovered-color);
  height: 2px;
  transition: 0.3s ease-out;
}

.btn-new-trip svg {
  width: 18px;
  color: var(--primary-color);
  transition: 0.2s ease;
}

.btn-new-trip:hover::after {
  width: 100%;
}

.btn-new-trip:hover svg {
  transform: translateX(4px);
  color: var(--hovered-color);
}

.btn-new-trip:hover,
.btn-new-trip:focus {
  background: none;
  border: none;
  color: var(--hovered-color);
}

.trip-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
}

/* Sidebar user section */
.sidebar-user {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-email {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}

.guest-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: rgba(255, 59, 48, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

.sidebar-user-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-theme-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
}

.btn-theme-toggle:hover {
  background: var(--bg-secondary);
}

.theme-icon-dark {
  display: none;
}

[data-theme="dark"] .theme-icon-light {
  display: none;
}

[data-theme="dark"] .theme-icon-dark {
  display: inline;
}

.btn-logout {
  padding: 10px 16px;
  font-size: 11px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
}

.btn-logout:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.trip-item {
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: 0.2s;
  opacity: 0.6;
}

.trip-item:hover {
  opacity: 1;
}

.trip-item.active {
  opacity: 1;
  border-bottom: 2px solid var(--accent);
}

/* Main Content */
.main {
  flex: 1;
  padding: 48px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Header Section */
.main-header {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--border);
  padding-bottom: 16px;
}

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

.main-title {
  font-size: 64px;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -2px;
}

.main-subtitle {
  font-size: 14px;
  font-weight: 600;
  margin-top: 16px;
  color: var(--muted);
}

.chip-dates {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Summary */
.summary-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.pill-total {
  min-width: 200px;
}

.pill {
  /* Renamed conceptually to summary-box in CSS but keeping class for now or refactoring HTML */
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: 0.2s;
}

.pill:hover {
  background: var(--text);
  color: var(--bg);
}

.pill:hover .pill-label {
  color: var(--bg);
}

.pill-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
}

.pill-value {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
}

/* Toolbar / Forms */
.toolbar {
  margin-bottom: 32px;
  padding: 20px;
  border: 2px solid var(--border);
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  background: var(--bg-secondary);
}

.toolbar-left,
.toolbar-right {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

.field-inline {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-inline label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

input,
select {
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border);
  padding: 8px 0;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  outline: none;
  min-width: 120px;
  color: var(--text);
}

input::placeholder {
  color: var(--muted);
}

input:focus,
select:focus {
  border-color: var(--accent);
}

/* Buttons */
button {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
  padding: 10px 20px;
  font-family: var(--font-main);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  cursor: pointer;
  transition: 0.2s;
}

button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.btn-icon-small {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  padding: 0;
  cursor: pointer;
}

.btn-icon-small:hover {
  color: var(--accent);
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

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

.btn-ghost {
  border: none;
  padding: 8px;
}

.btn-ghost:hover {
  background: transparent;
  color: var(--accent);
}

/* Bento / Lists */
.table-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 32px 32px;
  border: 2px solid var(--border);
  border-radius: 40px;
  background: var(--card-bg);
  margin-bottom: 64px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.08);
}

.table-header-subtitle {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.bento-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: 32px;
  background: var(--card-bg);
  min-width: 0; /* Prevent flex child overflow */
  overflow: hidden;
}

.bento-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.bento-column-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-collapse-all {
  font-size: 14px;
  padding: 6px 8px;
  min-height: 32px;
  opacity: 0.6;
}

.btn-collapse-all:hover {
  opacity: 1;
}

.bento-column-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.bento-column-total {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
}

.bento-column-title {
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bento-column-title::before {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  background: var(--accent);
}

.bento-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0; /* Prevent flex child overflow */
}

.bento-card {
  border: 2px solid var(--border);
  border-radius: 24px;
  padding: 16px;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bento-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.bento-header-main {
  flex: 1;
}

.bento-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bento-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}

.bento-row-footer {
  display: flex;
  justify-content: flex-end;
}

.bento-amount {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.flight-pass {
  background: #f5eedf;
  border-radius: 28px;
  border: 2px solid #d9d1c2;
  padding: 18px 20px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

/* Collapsed card header (shared by flight & hotel) */
.card-collapsed-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 4px 0;
}

.card-collapsed-route {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.card-collapsed-code {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card-collapsed-arrow {
  font-size: 14px;
  color: var(--muted);
}

.card-collapsed-hotel {
  font-size: 20px;
}

.card-collapsed-name {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.card-collapsed-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.card-collapsed-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.card-collapsed-total {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.card-expand-btn {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 8px;
  background: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.card-expand-btn:hover {
  background: rgba(255,255,255,0.8);
}

.card-expand-icon {
  font-size: 10px;
  transition: transform 0.2s;
}

/* Expanded content wrapper */
.card-expanded-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Collapsed state */
.flight-pass.is-collapsed,
.hotel-voucher.is-collapsed {
  padding: 14px 16px;
  gap: 0;
}

.flight-pass.is-collapsed .card-collapsed-header,
.hotel-voucher.is-collapsed .card-collapsed-header {
  display: flex;
}

.flight-pass.is-collapsed .card-expanded-content,
.hotel-voucher.is-collapsed .card-expanded-content {
  display: none;
}

.flight-pass.is-collapsed .card-expand-icon,
.hotel-voucher.is-collapsed .card-expand-icon {
  transform: rotate(-90deg);
}

/* Collapse button (shown when expanded) */
.card-collapse-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 8px;
  background: rgba(255,255,255,0.6);
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s;
}

.card-collapse-btn:hover {
  background: rgba(255,255,255,0.9);
  color: var(--text);
}

/* Hide collapse button when already collapsed */
.flight-pass.is-collapsed .card-collapse-btn,
.hotel-voucher.is-collapsed .card-collapse-btn {
  display: none;
}

.flight-pass-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  gap: 12px;
  min-width: 0;
}

.flight-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.flight-number-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  max-width: 80px;
}

.flight-number-block input {
  text-align: right;
}

.flight-pass-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.flight-pass-row .airport {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flight-pass-row .code {
  font-size: 48px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
}

.flight-pass-row .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.flight-pass-plane {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--muted);
}

.flight-pass-divider {
  border-top: 2px dashed var(--border);
  margin: 4px 0;
}

.flight-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 12px;
  font-weight: 700;
  font-size: 14px;
}

.flight-total-line span:first-child {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 11px;
  color: var(--muted);
}

.flight-total-line span:last-child {
  font-size: 20px;
  letter-spacing: 0.05em;
}

.flight-pass-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.flight-pass-footer label {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.flight-pass-footer input {
  border: none;
  border-bottom: 2px solid var(--border);
  background: transparent;
  padding: 4px 0;
  font-size: 12px;
  font-weight: 600;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: var(--text);
}
.flight-input,
.flight-number-block input,
.flight-mini-input {
  border: none;
  border-bottom: 2px solid var(--border);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 0;
  max-width: 100%;
  min-width: 0;
  color: var(--text);
}

.flight-mini-input {
  font-size: 11px;
  text-transform: capitalize;
}

.flight-schedule {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flight-time-input {
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 2px 0;
  font-size: 16px;
  font-weight: 700;
  min-width: 60px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.flight-time-input::placeholder {
  color: var(--muted);
}

.flight-date-input {
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 2px 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.flight-date-input:focus,
.flight-time-input:focus {
  border-bottom-color: var(--accent);
}

.flight-number-block label {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #7c7464;
}

.flight-info {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.hotel-voucher {
  background: #fdf7eb;
  border-radius: 28px;
  border: 2px solid #c5a978;
  padding: 18px 20px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  color: var(--text);
}

.voucher-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.voucher-badge {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  font-weight: 600;
}

.voucher-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hotel-name {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex: 1;
  color: var(--text);
}

.hotel-name-input {
  font-size: 32px;
  font-weight: 800;
  border: none;
  background: transparent;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  letter-spacing: 0.04em;
  color: var(--text);
}

.hotel-name-input:focus {
  outline: none;
  border-bottom: 2px solid var(--border);
}

.hotel-icon {
  font-size: 28px;
}

.voucher-dates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.voucher-dates input {
  border: none;
  border-bottom: 2px solid var(--border);
  background: transparent;
  padding: 4px 0;
  font-size: 12px;
  font-weight: 600;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: var(--text);
}

.voucher-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.voucher-details label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.voucher-details input,
.voucher-details select {
  border: none;
  border-bottom: 2px solid var(--border);
  background: transparent;
  padding: 4px 0;
  font-size: 12px;
  font-weight: 600;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: var(--text);
}

.voucher-footer {
  display: flex;
  justify-content: flex-end;
}

/* Expenses Table */
.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.table-controls h3 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

#tableBody {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.gastos-section {
  width: 100%;
}

.gastos-table-wrap {
  width: 100%;
}

/* Mobile card list - hidden on desktop */
.gastos-mobile-list {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.gasto-card {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gasto-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.gasto-card-concept {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: transparent;
  padding: 2px 0;
  min-width: 0;
  min-height: auto;
}

.gasto-card-concept:focus {
  border-bottom: 1px solid var(--accent);
}

.gasto-card-total {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.gasto-card-details {
  display: flex;
  gap: 12px;
  align-items: center;
}

.gasto-card-field {
  display: flex;
  align-items: center;
  gap: 4px;
}

.gasto-card-field label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.gasto-card-field input {
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  padding: 2px 0;
  font-size: 13px;
  font-weight: 600;
  width: 50px;
  min-height: auto;
}

.gasto-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gasto-card-notes {
  flex: 1;
  font-size: 11px;
  border: none;
  background: transparent;
  padding: 2px 0;
  color: var(--muted);
  min-width: 0;
  min-height: auto;
}

.gasto-card-notes::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.gastos-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.gastos-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.gastos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  border: 2px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
}

.gastos-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.gastos-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}

.gastos-table tr:last-child td {
  border-bottom: none;
}

.gastos-table input,
.gastos-table select {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  font-size: 12px;
  outline: none;
}

.gastos-table .amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.totals {
  display: flex;
  gap: 24px;
  font-size: 13px;
}

.totals .label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

.totals .value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.save-status {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.extras-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  margin-top: 32px;
}

/* Mobile-first stack layout for extras */
.extras-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
}

/* Itinerary Component */
.extra-itinerary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.itinerary-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}

.itinerary-tabs::-webkit-scrollbar {
  display: none;
}

.itinerary-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
  min-width: 60px;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.itinerary-tab:hover {
  background: var(--bg-secondary);
}

.itinerary-tab.is-active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.itinerary-tab .tab-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.itinerary-tab .tab-date {
  font-size: 10px;
  opacity: 0.7;
}

.itinerary-tab .tab-count {
  font-size: 14px;
  font-weight: 800;
}

.itinerary-tab.is-active .tab-label,
.itinerary-tab.is-active .tab-date,
.itinerary-tab.is-active .tab-count {
  color: var(--bg);
}

.itinerary-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.day-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.day-date {
  font-size: 12px;
  color: var(--muted);
}

/* Itinerary Places List */
.itinerary-places {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
}

.itinerary-place {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
  cursor: grab;
  transition: all 0.15s ease;
}

.itinerary-place:hover {
  border-color: var(--accent);
}

.itinerary-place.is-dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.place-order {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

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

.place-info-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.place-info-notes {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.place-actions-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.place-reorder {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.place-reorder button {
  width: 24px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-secondary);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.place-reorder button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Unassigned section */
.itinerary-unassigned {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.unassigned-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 10px;
}

.unassigned-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.unassigned-place {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
}

.unassigned-place .place-info {
  flex: 1;
}

.unassigned-place .place-info-title {
  font-size: 12px;
}

.btn-assign-day {
  font-size: 10px;
  padding: 6px 10px;
  min-height: 28px;
  border-radius: 6px;
  white-space: nowrap;
}

/* Empty state */
.itinerary-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.extra-card {
  border-radius: 32px;
  border: 2px solid var(--border);
  background: var(--card-bg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.08);
}

.extra-title {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.extra-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.extra-subtitle {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.5);
  margin-top: 4px;
}

.extra-tag {
  border: 1px solid #d2c6b8;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #a28c71;
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 18px;
  border: 2px solid var(--border);
  background: var(--card-bg);
}

.todo-item.done {
  opacity: 0.7;
}

.map-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.map-canvas {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 24px;
  background: #f7f3ea;
  height: 880px;
  overflow: hidden;
}

.map-view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-view.leaflet-container {
  font-family: var(--font-main);
  background: #f7f3ea;
}

.place-url-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-status-pill {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 6px 14px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
}

.map-status-pill.is-hidden {
  display: none;
}

.map-status-pill::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--muted);
  animation: mapSpin 0.8s linear infinite;
  display: none;
}

.map-status-pill.is-loading::after {
  display: inline-block;
}

@keyframes mapSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.leaflet-control-attribution {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.4);
}

.leaflet-control-zoom {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.leaflet-control-zoom a {
  color: #4e473a;
  background: #fdf7eb;
  border: none;
}

.leaflet-bar a:hover {
  background: #e7d7c4;
  color: #111;
}

/* Numbered markers for itinerary */
.numbered-marker {
  background: transparent;
}

.marker-number {
  width: 28px;
  height: 28px;
  background: #111;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-main);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border: 2px solid #fff;
}

.place-form {
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-secondary);
}

.place-form input {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
}

.place-form input::placeholder {
  color: var(--muted);
}

.place-form input:focus {
  border-color: var(--accent);
  outline: none;
}

.place-form button[type="submit"],
.place-form .btn-ghost {
  background: var(--text) !important;
  color: var(--bg) !important;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.place-form button[type="submit"]:hover,
.place-form .btn-ghost:hover {
  background: var(--accent) !important;
  color: var(--bg) !important;
}

.place-form.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.place-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.place-form-hint {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0;
}

.places-list {
  border: 2px solid var(--border);
  border-radius: 24px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
}

.places-empty {
  padding: 24px 12px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.place-row {
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.place-row-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.place-title {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.place-meta {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.5);
}

.place-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.place-actions a {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a7753a;
}

.place-notes {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.8);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =============================================
   MOBILE RESPONSIVE STYLES
   ============================================= */

/* Mobile Header (hidden on desktop) */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  z-index: 1000;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.mobile-brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.burger-btn {
  width: 40px;
  height: 40px;
  padding: 8px;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.burger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}

.burger-btn:hover {
  background: transparent;
}

/* Sidebar overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.is-visible {
  display: block;
  opacity: 1;
}

/* Sidebar close button (hidden on desktop) */
.sidebar-close {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
}

.sidebar-close:hover {
  color: var(--accent);
  background: transparent;
}

/* =============================================
   TABLET BREAKPOINT (768px - 1024px)
   ============================================= */
@media (max-width: 1024px) {
  .main {
    padding: 32px;
  }

  .main-title {
    font-size: 48px;
  }

  .pill {
    height: 120px;
    padding: 16px;
  }

  .pill-value {
    font-size: 32px;
  }

  .extras-grid {
    grid-template-columns: 1fr;
  }

  .map-canvas {
    height: 400px;
  }
}

/* =============================================
   MOBILE BREAKPOINT (< 768px)
   ============================================= */
@media (max-width: 768px) {
  /* Show mobile header */
  .mobile-header {
    display: flex;
  }

  /* Hide desktop sidebar header title (we have it in mobile header) */
  .sidebar-header .sidebar-title,
  .sidebar-header .sidebar-subtitle {
    display: none;
  }

  .sidebar-close {
    display: block;
    position: relative;
    top: auto;
    right: auto;
    margin-left: auto;
  }

  .sidebar-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
  }

  /* Sidebar becomes slide-out drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding: 24px;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  /* Main content adjustments */
  .app {
    flex-direction: column;
  }

  .main {
    padding: 72px 16px 24px; /* Account for mobile header */
    width: 100%;
  }

  /* Header */
  .main-title {
    font-size: 32px;
    letter-spacing: -1px;
  }

  .header-top {
    flex-direction: column;
    gap: 16px;
  }

  .header-actions {
    width: 100%;
  }

  /* Summary pill */
  .summary-row {
    flex-direction: column;
    gap: 12px;
  }

  .pill {
    height: auto;
    min-height: 60px;
    padding: 12px 16px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .pill-total {
    min-width: unset;
    width: 100%;
  }

  .pill-value {
    font-size: 24px;
  }

  /* Toolbar stacks vertically */
  .toolbar {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  .toolbar-left,
  .toolbar-right {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .field-inline {
    width: 100%;
  }

  .field-inline input,
  .field-inline select {
    width: 100%;
    min-width: unset;
  }

  /* Bento grid to single column */
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-column {
    padding: 12px;
  }

  /* Table card */
  .table-card {
    padding: 16px;
    border-radius: 24px;
    margin-bottom: 32px;
  }

  /* Gastos: Hide table, show cards on mobile */
  .gastos-table-wrap {
    display: none;
  }

  .gastos-mobile-list {
    display: flex;
  }

  /* Extras grid */
  .extras-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 24px;
  }

  .extras-stack {
    gap: 16px;
    margin-top: 24px;
  }

  .itinerary-tabs {
    margin: 0 -12px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .extra-card {
    padding: 16px;
    border-radius: 24px;
  }

  /* Map */
  .map-canvas {
    height: 300px;
    border-radius: 16px;
  }

  .place-form {
    padding: 12px;
    border-radius: 16px;
  }

  .place-form-grid {
    grid-template-columns: 1fr;
  }

  /* Flight pass cards */
  .flight-pass {
    padding: 14px 16px;
    border-radius: 20px;
  }

  .flight-pass-row .code {
    font-size: 32px;
  }

  .flight-pass-footer {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .flight-pass-row {
    flex-wrap: wrap;
    gap: 12px;
  }

  .flight-pass-row .airport {
    flex: 1;
    min-width: 100px;
  }

  .flight-pass-plane {
    order: -1;
    width: 100%;
    justify-content: center;
    border: none;
    height: auto;
    padding: 8px 0;
  }

  .flight-schedule {
    flex-direction: row;
    gap: 8px;
  }

  .flight-time-input,
  .flight-date-input {
    font-size: 12px;
    min-width: 50px;
  }

  /* Hotel voucher cards */
  .hotel-voucher {
    padding: 14px 16px;
    border-radius: 20px;
  }

  .hotel-name-input {
    font-size: 24px;
  }

  .voucher-dates {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .voucher-details {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* Better touch targets */
  button {
    min-height: 44px;
    padding: 12px 16px;
  }

  .btn-ghost {
    padding: 10px 12px;
  }

  .btn-icon-small {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  input,
  select {
    min-height: 44px;
    padding: 10px 0;
    font-size: 16px; /* Prevents iOS zoom */
  }

  /* Todo items */
  .todo-item {
    padding: 12px;
  }

  /* Places list */
  .places-list {
    padding: 10px;
    border-radius: 16px;
  }

  .place-row {
    padding: 10px 12px;
    border-radius: 14px;
  }

  .place-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Trip list in sidebar */
  .trip-item {
    padding: 12px 0;
  }

  /* Status pill */
  .map-status-pill {
    font-size: 10px;
    padding: 8px 12px;
  }

  /* Chip dates */
  .chip-dates {
    font-size: 12px;
  }

  /* Table footer totals */
  .table-footer {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .totals {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Save status */
  .save-status {
    font-size: 10px;
  }

  /* New trip button */
  .btn-new-trip p {
    font-size: 14px;
  }

  .btn-new-trip svg {
    width: 16px;
  }
}

/* =============================================
   SMALL MOBILE (< 400px)
   ============================================= */
@media (max-width: 400px) {
  .main {
    padding: 64px 12px 20px;
  }

  .main-title {
    font-size: 26px;
  }

  .pill-value {
    font-size: 22px;
  }

  .flight-pass-row .code {
    font-size: 26px;
  }

  .flight-pass-footer {
    grid-template-columns: 1fr;
  }

  .voucher-details {
    grid-template-columns: 1fr;
  }

  .hotel-name-input {
    font-size: 20px;
  }

  .bento-column-title {
    font-size: 14px;
  }

  .extra-title {
    font-size: 14px;
  }
}