/* ══════════════════════════════════════════════════════════
   GRUPE Dashboard — Gmail / Google Calendar / Amadeus Hybrid
   ══════════════════════════════════════════════════════════ */

/* ── Reset & Base (Google Sans feel) ─────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; height: 100%; }
body {
  font-family: 'Google Sans', 'Segoe UI', Roboto, -apple-system, sans-serif;
  background: #f6f8fc;
  color: #202124;
  line-height: 1.5;
  height: 100%;
}
a { color: #1a73e8; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── App Shell (Gmail-like) ──────────────────────────── */
.app-shell { display: flex; height: 100vh; flex-direction: column; }

/* Top Bar — Google style */
.topbar {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  flex-shrink: 0;
  z-index: 100;
}
.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
}
.topbar-logo .hamburger {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  background: none;
  font-size: 1.2rem;
  color: #5f6368;
}
.topbar-logo .hamburger:hover { background: #f1f3f4; }
.topbar-brand-logo {
  height: 28px;
  width: auto;
  display: block;
  background: #003580;
  padding: 4px 10px;
  border-radius: 6px;
}
.topbar-brand-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #5f6368;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding-left: 4px;
  border-left: 2px solid #e0e0e0;
  margin-left: 4px;
}

/* ── Mode Picker (Group / Individual) ────────────────── */
.mode-picker {
  position: relative;
  display: flex;
  align-items: center;
  padding-left: 4px;
  border-left: 2px solid #e0e0e0;
  margin-left: 4px;
}
.mode-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 14px;
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 600;
  color: #5f6368;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1.3;
}
.mode-btn:hover { background: #f1f3f4; border-color: #dadce0; }
.mode-arrow { font-size: 0.65rem; color: #80868b; }
.mode-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 160px;
  z-index: 200;
  overflow: hidden;
}
.mode-dropdown.open { display: block; }
.mode-option {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  color: #3c4043;
  transition: background 0.1s;
}
.mode-option:hover { background: #f1f3f4; }
.mode-option.active { background: #e8f0fe; color: #1a73e8; font-weight: 600; }

/* Hide group-only elements in individual mode */
body.mode-individual [data-group-only] { display: none !important; }
body.mode-individual .col-pax { display: none !important; }
.topbar-search {
  flex: 1;
  max-width: 720px;
  position: relative;
}
.topbar-search input {
  width: 100%;
  padding: 10px 16px 10px 44px;
  background: #eaf1fb;
  border: none;
  border-radius: 24px;
  font-size: 1rem;
  color: #202124;
  outline: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.topbar-search input:focus {
  background: #fff;
  box-shadow: 0 1px 6px rgba(32,33,36,0.2);
}
.topbar-search::before {
  content: '\1F50D';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: #5f6368;
}
.topbar-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.topbar-agent {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 16px;
  background: #e8f0fe;
  color: #1a73e8;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
}
.topbar-agent:hover { background: #d2e3fc; }

/* ── Language Picker ─────────────────────────────────── */
.lang-picker {
  position: relative;
  display: flex;
  align-items: center;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 16px;
  background: #f1f3f4;
  color: #3c4043;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid #dadce0;
  transition: background 0.15s;
  line-height: 1;
}
.lang-btn:hover { background: #e8eaed; }
.lang-btn .lang-flag { font-size: 1.1rem; line-height: 1; }
.lang-btn .lang-label { font-size: 0.8rem; font-weight: 600; color: #3c4043; }
.lang-btn .lang-arrow { font-size: 0.65rem; color: #80868b; margin-left: 1px; }
.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 140px;
  z-index: 200;
  overflow: hidden;
}
.lang-dropdown.open { display: block; }
.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  color: #3c4043;
  transition: background 0.1s;
}
.lang-option:hover { background: #f1f3f4; }
.lang-option.active { background: #e8f0fe; color: #1a73e8; font-weight: 600; }

/* Portal lang picker (floats in header bar) */
.portal-lang-picker {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}
.portal-lang-picker .lang-dropdown {
  right: 0;
  top: calc(100% + 6px);
}

/* Content area — sidebar + main */
.app-body { display: flex; flex: 1; overflow: hidden; }

/* ── Sidebar (Gmail-like) ────────────────────────────── */
.sidebar {
  width: 256px;
  background: #f6f8fc;
  border-right: none;
  padding: 8px 0;
  overflow-y: auto;
  flex-shrink: 0;
}
.sidebar-compose {
  margin: 4px 12px 12px;
}
.compose-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  height: 56px;
  border-radius: 16px;
  background: #c2e7ff;
  color: #001d35;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s, background 0.2s;
  letter-spacing: 0.2px;
  width: 100%;
}
.compose-btn:hover { box-shadow: 0 2px 6px rgba(0,0,0,0.15); background: #a8d8ff; }
.compose-btn .icon { font-size: 1.3rem; }

.sidebar-nav { list-style: none; }
.sidebar-nav li { }
.sidebar-nav a, .sidebar-nav button {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: 32px;
  border-radius: 0 16px 16px 0;
  font-size: 0.9rem;
  color: #202124;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
  transition: background 0.1s;
}
.sidebar-nav a:hover, .sidebar-nav button:hover { background: #e8eaed; text-decoration: none; }
.sidebar-nav a.active, .sidebar-nav button.active {
  background: #d3e3fd;
  color: #001d35;
  font-weight: 700;
}
.sidebar-nav .icon { width: 20px; text-align: center; font-size: 1.1rem; opacity: 0.7; }
.sidebar-nav .badge {
  margin-left: auto;
  background: #d63031;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 8px;
}
.sidebar-divider { height: 1px; background: #e0e0e0; margin: 8px 16px; }

/* Agent filter in sidebar */
.sidebar-agents { padding: 8px 12px; }
.sidebar-agents h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #5f6368;
  padding: 8px 12px 4px;
  font-weight: 500;
}
.agent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.1s;
}
.agent-row:hover { background: #e8eaed; }
.agent-row.active { background: #d3e3fd; font-weight: 600; }
.agent-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}
.avatar-k { background: #1a73e8; }
.avatar-z { background: #e8710a; }
.avatar-m { background: #0d652d; }
.avatar-all { background: #5f6368; }

/* ── Main Content ────────────────────────────────────── */
.main-content {
  flex: 1;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 0 0 0;
}

/* ── Urgency Toolbar (above inbox) ───────────────────── */
.urgency-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 16px;
  border-bottom: 1px solid #e0e0e0;
  background: #fff;
  min-height: 44px;
}
.urgency-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  color: #5f6368;
  transition: all 0.15s;
  white-space: nowrap;
}
.urgency-tab:hover { background: #f1f3f4; }
.urgency-tab.active { background: #fce8e6; color: #c5221f; }
.urgency-tab.active.tab-today { background: #fef7e0; color: #e37400; }
.urgency-tab.active.tab-week { background: #e8f0fe; color: #1a73e8; }
.urgency-tab.active.tab-later { background: #e6f4ea; color: #137333; }
.urgency-count {
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  display: inline-flex;
  align-items: center; justify-content: center;
  border-radius: 9px;
}
.count-overdue { background: #c5221f; color: white; }
.count-today { background: #e37400; color: white; }
.count-week { background: #1a73e8; color: white; }
.count-later { background: #137333; color: white; }

.urgency-bar .spacer { flex: 1; }
.filter-select {
  padding: 6px 10px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-size: 0.8rem;
  background: white;
  color: #3c4043;
  outline: none;
}

/* ── Inbox Table (Gmail-like rows) ───────────────────── */
.inbox-table { width: 100%; border-collapse: collapse; }
.inbox-header th {
  text-align: left;
  padding: 6px 8px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #80868b;
  font-weight: 500;
  border-bottom: 1px solid #e0e0e0;
  white-space: nowrap;
}
.inbox-table tr {
  cursor: pointer;
  transition: box-shadow 0.1s;
  border-bottom: 1px solid #f1f3f4;
  height: 40px;
}
.inbox-table tbody tr:hover {
  box-shadow: inset 1px 0 0 #dadce0, inset -1px 0 0 #dadce0, 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
  z-index: 1;
  position: relative;
}
.inbox-table td {
  padding: 4px 8px;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inbox-table .col-ref {
  font-weight: 700;
  font-family: 'Roboto Mono', monospace;
  color: #202124;
  width: 120px;
  font-size: 0.8rem;
}
.inbox-table .col-client { font-weight: 600; color: #202124; max-width: 180px; }
.inbox-table .col-route {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.8rem;
  color: #5f6368;
  letter-spacing: 0.5px;
}
.inbox-table .col-pax { text-align: center; color: #5f6368; width: 50px; }
.inbox-table .col-airline { color: #3c4043; max-width: 120px; }
.inbox-table .col-agent {
  text-transform: capitalize;
  font-size: 0.8rem;
  color: #5f6368;
  width: 80px;
}
.inbox-table .col-deadline { width: 160px; }

/* Row states */
.inbox-table tr.row-overdue { border-left: 3px solid #c5221f; }
.inbox-table tr.row-today { border-left: 3px solid #e37400; }
.inbox-table tr.row-unread td { font-weight: 600; }

/* ── Status Chips (Material-style) ───────────────────── */
.status-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.status-inquiry { background: #e8eaed; color: #5f6368; }
.status-quoted { background: #f3e8fd; color: #7627bb; }
.status-deposit_requested { background: #fef7e0; color: #e37400; }
.status-deposit_paid { background: #e6f4ea; color: #137333; }
.status-names_collecting { background: #e8f0fe; color: #1a73e8; }
.status-names_complete { background: #ceead6; color: #0d652d; }
.status-ticketing { background: #fce8e6; color: #c5221f; }
.status-ticketed { background: #ceead6; color: #0d652d; }
.status-travelled { background: #e8eaed; color: #5f6368; }
.status-closed { background: #e8eaed; color: #80868b; }
.status-cancelled { background: #fce8e6; color: #c5221f; }
.status-rejected { background: #fce8e6; color: #c5221f; text-decoration: line-through; }
.status-confirmed { background: #ceead6; color: #0d652d; }

/* Keep .status-badge as alias */
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }

/* ── Deadline Tags ───────────────────────────────────── */
.deadline-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}
.deadline-tag .dl-type {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
}
.dl-overdue { color: #c5221f; }
.dl-today { color: #e37400; }
.dl-week { color: #1a73e8; }
.dl-later { color: #5f6368; }
.dl-done { color: #80868b; text-decoration: line-through; }
/* Keep old classes too */
.deadline-indicator { font-size: 0.85rem; font-weight: 500; white-space: nowrap; }
.deadline-overdue { color: #c5221f; font-weight: 700; }
.deadline-today { color: #e37400; font-weight: 700; }
.deadline-week { color: #1a73e8; }
.deadline-later { color: #137333; }
.deadline-done { color: #80868b; text-decoration: line-through; }

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: white;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}
.card h2 { font-size: 0.9rem; font-weight: 500; color: #202124; margin-bottom: 12px; letter-spacing: 0.2px; }
.card h3 { font-size: 0.85rem; font-weight: 500; color: #5f6368; margin-bottom: 8px; }

/* ── Booking Detail ──────────────────────────────────── */
.detail-container { padding: 0 24px 24px; max-width: 1000px; }
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 0;
  color: #5f6368;
  font-size: 0.85rem;
}
.detail-back:hover { color: #202124; text-decoration: none; }
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 0 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.detail-header h1 {
  font-size: 1.5rem;
  font-weight: 400;
  color: #202124;
}
.detail-header .ref {
  font-family: 'Roboto Mono', monospace;
  color: #5f6368;
  font-size: 0.95rem;
  font-weight: 400;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.info-item .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #80868b;
  letter-spacing: 0.8px;
  font-weight: 500;
}
.info-item .value { font-size: 0.95rem; font-weight: 400; color: #202124; margin-top: 2px; }

/* ── PNR Display (Amadeus terminal style) ────────────── */
.pnr-card {
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 8px;
  position: relative;
  transition: border-color 0.15s;
}
.pnr-card:hover { border-color: #1a73e8; }
.pnr-card.selected {
  border-color: #137333;
  border-width: 2px;
  background: linear-gradient(135deg, #f0faf3 0%, #fff 100%);
}
.pnr-card.selected::before {
  content: 'SELECTED';
  position: absolute;
  top: -1px; right: 12px;
  background: #137333;
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 0 0 4px 4px;
  letter-spacing: 0.5px;
}
.pnr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f3f4;
}
.pnr-code {
  font-family: 'Roboto Mono', 'Courier New', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #202124;
  background: #f1f3f4;
  padding: 2px 10px;
  border-radius: 4px;
}
.pnr-airline { font-weight: 500; color: #3c4043; font-size: 0.95rem; }
.pnr-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  font-size: 0.85rem;
}
.pnr-details .label { color: #80868b; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; display: block; }
.pnr-details .val { color: #202124; font-weight: 500; font-family: 'Roboto Mono', monospace; font-size: 0.9rem; }

/* Amadeus-style command display */
.amadeus-display {
  background: #1a1a2e;
  color: #00ff41;
  font-family: 'Roboto Mono', 'Courier New', monospace;
  font-size: 0.85rem;
  padding: 12px 16px;
  border-radius: 6px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-x: auto;
}
.amadeus-display .cmd { color: #ffdd57; }
.amadeus-display .hl { color: #00b4d8; }

/* ── Activity Log ────────────────────────────────────── */
.activity-feed { }
.activity-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f3f4;
  font-size: 0.8rem;
  align-items: center;
}
.activity-item:last-child { border-bottom: none; }
.activity-time { color: #80868b; white-space: nowrap; min-width: 100px; font-size: 0.75rem; }
.activity-actor {
  font-weight: 600;
  text-transform: capitalize;
  min-width: 70px;
  font-size: 0.8rem;
  color: #3c4043;
}
.activity-text { color: #5f6368; }

/* ── Progress Bar ────────────────────────────────────── */
.progress-bar {
  background: #e8eaed;
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
  margin: 6px 0;
}
.progress-fill {
  height: 100%;
  background: #1a73e8;
  border-radius: 4px;
  transition: width 0.3s;
}

/* ── Buttons (Google Material) ───────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  letter-spacing: 0.2px;
  font-family: inherit;
}
.btn:hover { box-shadow: 0 1px 3px rgba(60,64,67,0.3); }
.btn-primary { background: #1a73e8; color: white; }
.btn-primary:hover { background: #1765cc; }
.btn-success { background: #137333; color: white; }
.btn-success:hover { background: #0d652d; }
.btn-success:disabled { background: #a8d5b5; cursor: default; }
.btn-danger { background: #c5221f; color: white; }
.btn-danger:hover { background: #a8191b; }
.btn-secondary { background: #fff; color: #1a73e8; border: 1px solid #dadce0; }
.btn-secondary:hover { background: #f6f8fc; border-color: #1a73e8; }
.btn-sm { padding: 4px 14px; font-size: 0.8rem; border-radius: 14px; }
.btn-outline { background: transparent; border: 1px solid #dadce0; color: #3c4043; }
.btn-outline:hover { border-color: #1a73e8; color: #1a73e8; background: #e8f0fe; }
.btn-icon {
  width: 36px; height: 36px; padding: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: #5f6368;
}
.btn-icon:hover { background: #f1f3f4; }

/* ── Modal (Google-style) ────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.32);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: white;
  border-radius: 28px;
  padding: 24px;
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 11px 15px -7px rgba(0,0,0,0.2), 0 24px 38px 3px rgba(0,0,0,0.14);
}
.modal h2 { margin-bottom: 20px; font-size: 1.1rem; font-weight: 500; }
.modal .form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

/* ── Forms (Material-style) ──────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #5f6368;
  margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #202124;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: #1a73e8;
  border-width: 2px;
  padding: 9px 13px;
}
.form-group textarea { resize: vertical; min-height: 60px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Email Import Page ───────────────────────────────── */
.import-container { padding: 0 24px; max-width: 900px; }
.import-card {
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 12px;
  background: white;
  transition: border-color 0.15s;
}
.import-card:hover { border-color: #1a73e8; }
.import-card .email-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f3f4;
}
.import-card .from { font-weight: 600; font-size: 0.9rem; color: #202124; }
.import-card .date { color: #80868b; font-size: 0.8rem; }
.import-card .subject { font-weight: 500; margin-bottom: 16px; color: #3c4043; }
.case-card { margin-bottom: 16px; }
.inbox-toolbar { gap: 12px; flex-wrap: wrap; }
.case-detail {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f1f3f4;
}
.case-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr);
  gap: 16px;
}
.message-card {
  border: 1px solid #e8eaed;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fafbfd;
}
.message-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.76rem;
  color: #5f6368;
  margin-bottom: 6px;
}
.message-subject {
  font-weight: 600;
  font-size: 0.9rem;
  color: #202124;
  margin-bottom: 6px;
}
.message-body {
  white-space: pre-wrap;
  color: #3c4043;
  line-height: 1.5;
  font-size: 0.84rem;
  max-height: 240px;
  overflow: auto;
}

.extracted-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px;
}
.extracted-field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  padding: 4px 0;
}
.extracted-field .field-label { color: #80868b; min-width: 90px; font-size: 0.8rem; }
.extracted-field .field-value { font-weight: 500; color: #202124; font-family: 'Roboto Mono', monospace; font-size: 0.85rem; }
.conf-icon { font-size: 0.8rem; }
.conf-high::before { content: '\2705'; }
.conf-medium::before { content: '\26A0\FE0F'; }
.conf-low::before { content: '\2753'; }

.import-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 12px; border-top: 1px solid #f1f3f4; }

.raw-email {
  background: #f1f3f4;
  border-radius: 8px;
  padding: 16px;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.8rem;
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  margin: 12px 0;
  color: #3c4043;
}
.raw-email.visible { display: block; }

/* ── Calendar (Google Calendar-style) ────────────────── */
.calendar-container { padding: 0; }

/* Toolbar — primary row */
.calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid #e8eaed;
}
.calendar-toolbar h2 {
  font-size: 1.25rem;
  font-weight: 400;
  color: #3c4043;
  min-width: 200px;
}
.calendar-nav { display: flex; align-items: center; gap: 2px; }
.calendar-nav button {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: none;
  cursor: pointer;
  color: #5f6368;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.calendar-nav button:hover { background: #f1f3f4; }
.calendar-nav button:focus-visible { outline: 2px solid #1a73e8; outline-offset: 2px; }
.calendar-nav button svg { width: 18px; height: 18px; }
.calendar-today-btn {
  padding: 6px 16px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: white;
  font-size: 0.85rem;
  font-weight: 500;
  color: #3c4043;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.calendar-today-btn:hover { background: #f1f3f4; }
.calendar-today-btn:focus-visible { outline: 2px solid #1a73e8; outline-offset: 2px; }

/* Toolbar — filter chips row */
.calendar-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px;
  border-bottom: 1px solid #e8eaed;
  flex-wrap: wrap;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 16px;
  border: 1px solid #dadce0;
  background: white;
  font-size: 0.78rem;
  font-weight: 500;
  color: #3c4043;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.filter-chip:hover { background: #f1f3f4; }
.filter-chip.active { background: #e8f0fe; color: #1a73e8; border-color: #1a73e8; }
.filter-chip:focus-visible { outline: 2px solid #1a73e8; outline-offset: 2px; }
.chip-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.chip-dot.dot-deposit { background: #c5221f; }
.chip-dot.dot-ticketing { background: #e37400; }
.chip-dot.dot-name_list { background: #1a73e8; }
.chip-dot.dot-agent-k { background: #1a73e8; }
.chip-dot.dot-agent-z { background: #e37400; }
.chip-dot.dot-agent-m { background: #137333; }
.filter-divider {
  width: 1px;
  height: 20px;
  background: #dadce0;
  margin: 0 4px;
}

/* Calendar grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.calendar-header-cell {
  background: #fff;
  color: #70757a;
  padding: 8px 0;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: inset 0 -1px 0 #e8eaed;
}
.calendar-cell {
  background: white;
  min-height: 120px;
  padding: 4px 6px 6px;
  font-size: 0.8rem;
  cursor: pointer;
  border-bottom: 1px solid #e8eaed;
  border-right: 1px solid #f1f3f4;
  transition: background 0.15s;
  overflow: hidden;
}
.calendar-cell:hover { background: #f8f9fa; }
.calendar-cell:hover .day-number { background: #f1f3f4; }
.calendar-cell .day-number {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 500;
  color: #3c4043;
  margin-bottom: 3px;
  transition: background 0.12s;
}
.calendar-cell.other-month { background: #fafbfc; }
.calendar-cell.other-month .day-number { color: #dadce0; }
.calendar-cell.weekend { background: #fafbfc; }
.calendar-cell.weekend.other-month { background: #f6f7f8; }
.calendar-cell.today .day-number { background: #1a73e8; color: white; font-weight: 700; }
.calendar-cell.today:hover .day-number { background: #1a73e8; }
.calendar-cell.cell-has-overdue { background: #fff8f7; }
.calendar-cell.cell-has-overdue .day-number { color: #c5221f; font-weight: 600; }
.calendar-cell.cell-has-overdue.today .day-number { background: #c5221f; color: white; }

/* Legend dots — used in toolbar legend and pills */
.deadline-dot {
  display: block;
  padding: 1px 4px;
  margin: 1px 0;
  border-radius: 2px;
  font-size: 0.65rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: white;
}
.dot-deposit { background: #c5221f; }
.dot-ticketing { background: #e37400; }
.dot-name_list { background: #1a73e8; }

/* Calendar event pills — left-accent bar, two-line, Google Calendar style */
.deadline-pill {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 3px 7px 3px 9px;
  margin: 2px 0;
  border-radius: 4px;
  border-left: 3px solid #dadce0;
  background: white;
  font-size: 0.66rem;
  line-height: 1.4;
  color: #3c4043;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  transition: box-shadow 0.15s, transform 0.1s, background 0.12s;
  overflow: hidden;
}
.deadline-pill:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transform: translateY(-1px);
  background: #f8f9fa;
  color: #3c4043;
}
.deadline-pill:focus-visible { outline: 2px solid #1a73e8; outline-offset: 1px; }
.deadline-pill.pill-deposit { border-left-color: #c5221f; }
.deadline-pill.pill-ticketing { border-left-color: #e37400; }
.deadline-pill.pill-name_list { border-left-color: #1a73e8; }

.pill-line1 {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
}
.pill-line2 {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
}
.pill-agent-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pill-agent-dot.agent-k { background: #1a73e8; }
.pill-agent-dot.agent-z { background: #e37400; }
.pill-agent-dot.agent-m { background: #137333; }
.pill-route {
  font-weight: 700;
  color: #3c4043;
  letter-spacing: 0.01em;
}
.pill-client {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #5f6368;
}
.pill-ref {
  color: #80868b;
  font-size: 0.55rem;
  font-family: 'Roboto Mono', 'SF Mono', monospace;
  letter-spacing: 0.02em;
}
.pill-urgency {
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.urgency-overdue { background: #fce8e6; color: #c5221f; }
.urgency-today { background: #fef7e0; color: #e37400; }
.urgency-soon { background: #e8f0fe; color: #1a73e8; }

/* Overdue pulse dot */
.urgency-overdue::before {
  content: '';
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #c5221f;
  margin-right: 2px;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.4); }
}

/* Completed trip pills — refined */
.deadline-pill.pill-done {
  opacity: 0.5;
  border-left-color: #dadce0;
}
.deadline-pill.pill-done .pill-client {
  text-decoration: line-through;
  text-decoration-color: #80868b;
}
.deadline-pill.pill-done::before {
  content: '\2713';
  font-size: 0.5rem;
  color: #80868b;
  position: absolute;
  top: 3px;
  right: 4px;
}
.deadline-pill.pill-done { position: relative; }
.deadline-pill.pill-done:hover { opacity: 0.65; }

/* ── Day Detail — slide-in side panel ────────────────── */
.day-detail-panel {
  position: fixed;
  top: 56px;
  right: 0;
  width: 400px;
  height: calc(100vh - 56px);
  background: white;
  border-left: 1px solid #e8eaed;
  box-shadow: -2px 0 12px rgba(0,0,0,0.08);
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
  overflow-y: auto;
  padding: 0;
}
.day-detail-panel.visible {
  transform: translateX(0);
}
.day-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e8eaed;
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}
.day-detail-header h3 {
  font-size: 0.95rem;
  font-weight: 500;
  color: #3c4043;
  margin: 0;
}
.day-detail-count {
  font-size: 0.7rem;
  font-weight: 500;
  color: #5f6368;
  background: #f1f3f4;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}
.day-detail-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: none;
  cursor: pointer;
  color: #5f6368;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.day-detail-close:hover { background: #f1f3f4; }
.day-detail-close:focus-visible { outline: 2px solid #1a73e8; outline-offset: 2px; }
.day-detail-close svg { width: 18px; height: 18px; }
.day-detail-body { padding: 12px 16px; }

/* Detail rows */
.deadline-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  margin: 6px 0;
  border-radius: 8px;
  background: #fafbfc;
  border: 1px solid #f0f1f3;
  border-left: 3px solid #dadce0;
  transition: all 0.15s;
}
.deadline-detail-row:hover {
  background: #f4f6f8;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border-left-color: #1a73e8;
}
.deadline-detail-row.detail-border-deposit { border-left-color: #c5221f; }
.deadline-detail-row.detail-border-ticketing { border-left-color: #e37400; }
.deadline-detail-row.detail-border-name_list { border-left-color: #1a73e8; }
.deadline-detail-row:hover.detail-border-deposit { border-left-color: #c5221f; }
.deadline-detail-row:hover.detail-border-ticketing { border-left-color: #e37400; }
.deadline-detail-row:hover.detail-border-name_list { border-left-color: #1a73e8; }

.detail-agent-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  margin-top: 2px;
}
.detail-agent-avatar.avatar-k { background: #1a73e8; }
.detail-agent-avatar.avatar-z { background: #e37400; }
.detail-agent-avatar.avatar-m { background: #137333; }

.deadline-detail-body { flex: 1; min-width: 0; }
.deadline-detail-headline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  margin-bottom: 3px;
  overflow: hidden;
}
.deadline-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.58rem;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.booking-link {
  font-weight: 600;
  color: #1a73e8;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 60px;
  transition: color 0.1s;
}
.booking-link:hover { text-decoration: underline; color: #174ea6; }
.deadline-detail-ref {
  font-size: 0.65rem;
  color: #80868b;
  font-family: 'Roboto Mono', 'SF Mono', monospace;
  background: #f1f3f4;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}
.deadline-detail-route {
  font-size: 0.68rem;
  font-weight: 700;
  color: #174ea6;
  background: #e8f0fe;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.01em;
}
.deadline-detail-sub {
  font-size: 0.76rem;
  color: #5f6368;
  margin-top: 2px;
  line-height: 1.5;
}
.deadline-detail-urgency {
  font-size: 0.7rem;
  font-weight: 500;
  margin-top: 4px;
}
.deadline-detail-urgency.urgency-overdue { color: #c5221f; }
.deadline-detail-urgency.urgency-today { color: #e37400; }
.deadline-detail-urgency.urgency-soon { color: #1a73e8; }
.deadline-detail-urgency.urgency-later { color: #137333; }
.deadline-detail-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  margin-top: 8px;
}

/* Completed booking detail rows */
.deadline-detail-row.detail-done {
  opacity: 0.5;
  border-left-color: #dadce0 !important;
  transition: opacity 0.15s;
}
.deadline-detail-row.detail-done:hover { opacity: 0.7; }
.deadline-detail-row.detail-done .booking-link {
  text-decoration: line-through;
  text-decoration-color: rgba(26,115,232,0.4);
}
.booking-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
}
.booking-status-badge.status-travelled { background: #e6f4ea; color: #137333; }
.booking-status-badge.status-travelled::before { content: '\2713'; font-size: 0.5rem; }
.booking-status-badge.status-closed { background: #f1f3f4; color: #5f6368; }
.booking-status-badge.status-closed::before { content: '\2014'; font-size: 0.5rem; }
.booking-status-badge.status-cancelled { background: #fce8e6; color: #c5221f; }
.booking-status-badge.status-cancelled::before { content: '\2717'; font-size: 0.5rem; }

/* Empty state */
.empty-state-calendar {
  text-align: center;
  padding: 40px 20px;
  color: #80868b;
}
.empty-state-calendar .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.4;
}
.empty-state-calendar .empty-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: #5f6368;
}
.empty-state-calendar .empty-sub {
  font-size: 0.78rem;
  margin-top: 4px;
  color: #80868b;
}
/* ── Portal Form (Clean & friendly) ──────────────────── */
.portal-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px 40px;
}
.portal-header {
  text-align: center;
  padding: 32px 0 24px;
  margin-bottom: 24px;
}
.portal-logo { height: 36px; width: auto; margin-bottom: 12px; }
.portal-header h1 { color: #202124; font-size: 1.5rem; font-weight: 400; }
.portal-header .route-info {
  color: #5f6368;
  font-size: 1.1rem;
  margin-top: 8px;
  font-family: 'Roboto Mono', monospace;
}
.diacritic-preview {
  background: #e6f4ea;
  border: 1px solid #137333;
  border-radius: 4px;
  padding: 4px 10px;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.85rem;
  color: #137333;
  margin-top: 4px;
}

/* ── Pending Email Banner ────────────────────────────── */
.pending-banner {
  background: #e8f0fe;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 16px;
}
.pending-banner .label { font-weight: 500; color: #1a73e8; }
.pending-banner .count-badge { background: #1a73e8; color: white; border-radius: 10px; padding: 2px 10px; font-size: 0.8rem; font-weight: 600; }

/* ── Payment table highlights ────────────────────────── */
.data-table tr[data-status="overdue"] td { color: #c5221f; }
.data-table tr[data-status="paid"] td:first-child { color: #137333; }

/* ── Utility ─────────────────────────────────────────── */
.text-muted { color: #80868b; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.hidden { display: none !important; }

.loading { text-align: center; padding: 40px; color: #80868b; }
.loading::after {
  content: '';
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid #e8eaed;
  border-top-color: #1a73e8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 40px; color: #80868b; font-size: 0.95rem; }

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: #dadce0; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #bdc1c6; }
::-webkit-scrollbar-track { background: transparent; }

/* ── Data table (for booking detail) ─────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 8px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; color: #80868b; border-bottom: 1px solid #e0e0e0; }
.data-table td { padding: 8px; border-bottom: 1px solid #f1f3f4; font-size: 0.85rem; }
.data-table tbody tr:hover { background: #f8f9fa; }
.data-table tr { cursor: pointer; }

/* ── Email Drafts Card ───────────────────────────────── */
.email-draft-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.email-draft-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.email-draft-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #80868b;
}
.email-draft-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.email-draft-btn {
  font-size: 0.8rem !important;
  padding: 4px 12px !important;
  border-color: #dadce0 !important;
  color: #3c4043 !important;
  transition: background 0.15s, border-color 0.15s !important;
}
.email-draft-btn:hover {
  background: #e8f0fe !important;
  border-color: #1a73e8 !important;
  color: #1a73e8 !important;
}

/* ── Email Composer Modal ────────────────────────────── */
.email-modal {
  max-width: 720px !important;
  width: 92vw !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}
.email-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #e0e0e0;
}
.email-modal-header h2 {
  font-size: 1rem;
  font-weight: 500;
  color: #202124;
  margin: 0;
}
.email-modal-close {
  width: 32px; height: 32px;
  border: none;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  color: #5f6368;
  display: flex; align-items: center; justify-content: center;
}
.email-modal-close:hover { background: #f1f3f4; }
.email-composer {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.email-field-row {
  display: flex;
  align-items: flex-start;
  border-bottom: 1px solid #f1f3f4;
  padding: 0 20px;
}
.email-field-row.email-field-body {
  flex: 1;
  border-bottom: none;
  padding: 0;
}
.email-field-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #80868b;
  min-width: 68px;
  padding: 12px 0;
  flex-shrink: 0;
}
.email-field-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-size: 0.9rem;
  font-family: inherit;
  color: #202124;
  padding: 12px 0;
  background: transparent;
  overflow: hidden;
  text-overflow: ellipsis;
}
.email-field-textarea {
  flex: 1;
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 0.875rem;
  font-family: 'Roboto Mono', 'Courier New', monospace;
  color: #202124;
  line-height: 1.6;
  padding: 16px 20px;
  background: #fafafa;
  min-height: 360px;
}
.email-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 20px;
  border-top: 1px solid #e0e0e0;
  background: #fff;
  border-radius: 0 0 8px 8px;
}

/* ── Toast Notifications ─────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
}
.toast {
  background: #323232;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.875rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  animation: toastIn 0.3s ease;
  max-width: 400px;
}
.toast.toast-success { background: #137333; }
.toast.toast-error { background: #c5221f; }
.toast.toast-out { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(16px); } }

/* ── Sidebar overlay (mobile) ────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: 56px;
  background: rgba(0,0,0,0.32);
  z-index: 49;
}
.sidebar-overlay.active { display: block; }

/* ── Mobile Responsive ───────────────────────────────── */
@media (max-width: 900px) {
  .topbar-logo { min-width: auto; }
  .topbar-brand-label { display: none; }
  .mode-picker { border-left: none; margin-left: 0; padding-left: 0; }
  .mode-btn { font-size: 0.85rem; padding: 4px 8px; }
  .topbar-search input { padding-left: 14px; }
  .topbar-search::before { display: none; }
  .calendar-toolbar h2 { min-width: auto; font-size: 1rem; }
}

@media (max-width: 768px) {
  /* Sidebar: collapse on mobile, slide-in when .open */
  .sidebar {
    position: fixed;
    left: -280px;
    top: 56px;
    bottom: 0;
    width: 256px;
    z-index: 50;
    background: #f6f8fc;
    transition: left 0.25s ease;
    box-shadow: none;
    border-right: 1px solid #e0e0e0;
  }
  .sidebar.open {
    left: 0;
    box-shadow: 4px 0 16px rgba(0,0,0,0.1);
  }

  /* Main content: full width */
  .main-content {
    border-radius: 0;
  }

  /* Topbar: compact */
  .topbar { padding: 6px 10px; gap: 8px; }
  .topbar-logo { gap: 6px; min-width: auto; }
  .topbar-brand-label { display: none; }
  .mode-picker { border-left: none; margin-left: 0; padding-left: 0; }
  .mode-btn { font-size: 0.8rem; padding: 3px 6px; }
  .topbar-search input { padding: 8px 12px; font-size: 0.9rem; }
  .topbar-search::before { display: none; }
  .topbar-agent span:last-child { display: none; }

  /* Urgency bar: scroll horizontal */
  .urgency-bar {
    overflow-x: auto;
    padding: 4px 8px;
    -webkit-overflow-scrolling: touch;
  }
  .urgency-tab { padding: 6px 10px; font-size: 0.75rem; }
  .filter-select { font-size: 0.75rem; }

  /* Inbox table: horizontal scroll */
  .inbox-table { display: block; overflow-x: auto; }
  .inbox-table .col-ref { width: auto; min-width: 95px; font-size: 0.75rem; }
  .inbox-table .col-agent { display: none; }
  .inbox-table .col-airline { display: none; }
  .inbox-table td { padding: 6px 6px; font-size: 0.8rem; }

  /* Forms: single column on mobile */
  .form-row { grid-template-columns: 1fr; gap: 0; }

  /* Modal: full-width mobile */
  .modal { width: 96%; border-radius: 16px; padding: 20px; max-height: 88vh; }

  /* Booking detail */
  .detail-container { padding: 0 12px 24px; }
  .detail-header { flex-direction: column; gap: 8px; }
  .detail-header h1 { font-size: 1.2rem; }
  .flex.gap-1 { flex-wrap: wrap; }

  /* PNR details: 2 col on mobile */
  .pnr-details { grid-template-columns: 1fr 1fr; }

  /* Passenger buttons: stack */
  .flex.gap-1 { gap: 6px; }
  .btn-sm { font-size: 0.75rem; padding: 4px 10px; }

  /* Calendar: compact cells */
  .calendar-cell { min-height: 60px; padding: 2px 4px; }
  .calendar-cell .day-number { width: 22px; height: 22px; font-size: 0.75rem; }
  .deadline-pill { font-size: 0.6rem; padding: 1px 3px; }
  .calendar-toolbar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .calendar-toolbar h2 { min-width: auto; font-size: 1rem; }
  .calendar-filters { padding: 6px 12px; gap: 6px; }

  /* Day detail panel: full width on mobile */
  .day-detail-panel { width: 100%; }

  /* Import page */
  .import-container { padding: 0 12px; }
  .extracted-fields { grid-template-columns: 1fr; }
  .case-detail-grid { grid-template-columns: 1fr; }

  /* Email modal: full-width */
  .email-modal { width: 98vw !important; max-height: 92vh; }

  /* Portal: slightly narrower padding */
  .portal-container { padding: 0 12px 32px; }

  /* Pending banner */
  .pending-banner { margin: 8px 8px; flex-wrap: wrap; gap: 8px; }

  /* Toast: centered on mobile */
  .toast-container { left: 12px; right: 12px; bottom: 16px; }
  .toast { max-width: none; }
}

@media (max-width: 480px) {
  .topbar { height: 48px; }
  .topbar-brand-logo { height: 22px; }
  .topbar-search { display: none; }
  .lang-label { display: none; }
  .lang-btn { padding: 4px 8px; }

  /* Calendar: very compact */
  .calendar-cell { min-height: 44px; }
  .deadline-pill { display: none; }
  .calendar-cell.has-deadlines .day-number { position: relative; }
  .calendar-cell.has-deadlines .day-number::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #c5221f;
  }

  /* Info grid: single column */
  .info-grid { grid-template-columns: 1fr; gap: 8px; }

  /* PNR details: single column */
  .pnr-details { grid-template-columns: 1fr; }

  /* Booking buttons row */
  .email-draft-btns { flex-direction: column; }
  .email-draft-btn { width: 100%; text-align: left; }
}
