/* ==========================================
   自驾攻略可视化系统设计系统 (Light Theme)
   ========================================== */

:root {
  /* 配色体系 - Google 极简浅色系 */
  --bg-primary: #f8f9fa; /* 纯净的 Google 灰色背景 */
  --bg-secondary: #ffffff; /* 纯白底 */
  --bg-tertiary: #f1f3f4; /* 浅灰面 */
  
  --accent-primary: #1a73e8; /* Google 经典蓝 */
  --accent-secondary: #1e8e3e; /* Google 绿 */
  --accent-orange: #e8710a; /* Google 橙 */
  --accent-purple: #a142f4; /* Google 紫 */
  --accent-pink: #d93025; /* Google 红 */
  
  --glass-bg: #ffffff;
  --glass-border: #dadce0; /* 经典的 Google 细边框灰色 */
  --glass-glow: rgba(26, 115, 232, 0.05);
  
  --text-main: #202124; /* Google 主文本色 */
  --text-muted: #5f6368; /* Google 次要文本色 */
  --text-dark: #202124;
  
  /* 布局与阴影 */
  --header-height: 64px; /* Google 导航高度 */
  --radius-lg: 8px; /* Google 圆角偏小，更硬朗扁平 */
  --radius-md: 4px;
  --radius-sm: 4px;
  
  --shadow-premium: none; /* 去除重度投影 */
  --shadow-glow: none;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition-smooth: all 0.2s ease;
  --transition-fast: all 0.15s ease;
}

/* ==========================================
   全局复位 & 基本样式
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* ==========================================
   顶部状态栏 (Header)
   ========================================== */
.app-header {
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid var(--glass-border);
  position: relative;
  z-index: 1000;
  box-shadow: none;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 24px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

#btn-toggle-plan-sidebar {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: #70757a;
  cursor: pointer;
  padding: 8px 0;
  display: flex;
  align-items: center;
  transition: opacity 0.2s ease;
  margin-left: -8px;
}

#btn-toggle-plan-sidebar:hover {
  opacity: 0.8;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 28px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.15));
}

.logo-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-main);
}

.logo-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 数据汇总卡片组 */
.header-stats {
  display: flex;
  gap: 24px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.02);
  padding: 6px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 2px;
}

/* 头部按钮 */
.header-actions {
  display: flex;
  align-items: center;
}

.btn-header-action {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #abb2b9;
  font-size: 15px;
  transition: all 0.15s ease;
  margin-right: 8px;
}

.btn-header-action i {
  font-weight: 400 !important;
}

.btn-header-action:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #5f6368;
}

.btn-header-action.active-edit,
.btn-header-action.active-edit i {
  color: var(--accent-primary) !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 13.5px;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  transition: var(--transition-fast);
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
  box-shadow: none;
}

.btn-primary:hover {
  background: #1557b0;
  transform: none;
  box-shadow: none;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #9aa0a6;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: 2px;
}

.btn-icon:hover {
  background: rgba(0,0,0,0.04);
  color: #5f6368;
}

.btn-icon-primary {
  color: #1a73e8;
}

.btn-icon-primary:hover {
  background: rgba(26,115,232,0.08);
  color: #1557b0;
}

.btn-secondary {
  background: transparent;
  color: #5f6368;
  border: none;
}

.btn-secondary:hover {
  background: rgba(0,0,0,0.04);
  color: #202124;
}

/* ==========================================
   页面核心双栏布局 (App Layout)
   ========================================== */
.app-layout {
  display: flex;
  flex: 1;
  height: calc(100vh - var(--header-height));
  width: 100vw;
  position: relative;
  overflow: hidden;
}

/* ------------------------------------------
   左侧：地图区域 (Map Section)
   ------------------------------------------ */
.map-section {
  flex: 1;
  height: 100%;
  position: relative;
  border-right: 1px solid var(--glass-border);
}

.map-container {
  width: 100%;
  height: 100%;
  background: #e2e8f0; /* 地图加载前底色 */
}

/* 地图自定义控件 */
.map-overlay-controls {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-control-btn {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-premium);
  transition: var(--transition-fast);
}

.map-control-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.map-control-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 0 8px rgba(26, 115, 232, 0.4);
}

.map-control-btn.active:hover {
  background: #1557b0;
  border-color: #1557b0;
  color: #ffffff;
}

/* ------------------------------------------
   右侧：时间轴与攻略区域 (Guide Section)
   ------------------------------------------ */
.right-layout-container {
  width: 480px;
  height: 100%;
  box-shadow: -10px 0 25px rgba(0, 0, 0, 0.03);
  z-index: 998;
  background-color: var(--bg-secondary);
  border-left: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
}

/* Fixed leftmost drawers popping out from page left edge */
.city-order-sidebar-panel {
  position: fixed !important;
  top: 60px !important;
  left: 0 !important;
  height: calc(100vh - 60px) !important;
  width: 320px !important;
  background: #ffffff !important;
  box-shadow: 4px 0 16px rgba(0,0,0,0.08) !important;
  transform: translateX(-100%) !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 2000 !important;
  border-right: 1px solid var(--glass-border) !important;
}

.city-order-sidebar-panel.visible {
  transform: translateX(0) !important;
}

.right-layout-container.ledger-expanded {
  width: 1000px;
}

.right-layout-container-old.category-breakdown-expanded {
  width: 800px;
}

.right-layout-container-old.city-order-expanded.category-breakdown-expanded {
  width: 1120px;
}

.right-panels-split {
  display: flex;
  flex: 1;
  width: 100%;
  overflow: hidden;
}

.guide-section {
  flex: 1;
  min-width: 320px;
  height: 100%;
  background-color: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.ledger-sidebar {
  width: 520px;
  min-width: 520px;
  height: 100%;
  background: #ffffff;
  border-left: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.ledger-sidebar-hidden {
  display: none !important;
}

.ledger-sidebar-visible {
  display: flex !important;
}

.layout-resizer {
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 1002;
  background: transparent;
  transition: background 0.2s ease;
}

.layout-resizer:hover,
.layout-resizer.is-dragging {
  background: rgba(26, 115, 232, 0.3);
  border-left: 2px solid var(--accent-primary);
}

/* A区域：累计数据头部 (Accumulated Stats Header) */
.accumulated-stats-header {
  padding: 24px 16px 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  z-index: 1001;
}

.stats-header-grid {
  display: grid;
  grid-template-columns: auto auto 1fr; /* 3 cols with custom widths to compress first columns */
  gap: 0;
}

.right-layout-container.ledger-expanded .stats-header-grid {
  grid-template-columns: repeat(6, 1fr); /* 6 cols when expanded */
}

.stats-header-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.2s ease;
}

.stats-header-card:not(:first-child) {
  border-left: 1px solid var(--glass-border);
}

.stats-header-card.editable-card {
  cursor: pointer;
}

.stats-header-card.editable-card:hover {
  background: rgba(236, 72, 153, 0.03);
  transform: translateY(-1px);
}

.stats-header-card .card-lbl {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stats-header-card .card-lbl i {
  opacity: 0.8;
}

.stats-header-card .card-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}

.btn-return-current.floating-return-btn {
  position: absolute;
  top: 12px;
  left: 95px;
  transform: translateX(-50%);
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--accent-primary);
  font-size: 14px;
  width: 32px;
  height: 32px;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.btn-return-current.floating-return-btn:focus,
.btn-return-current.floating-return-btn:active,
.btn-return-current.floating-return-btn:focus-visible {
  outline: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-return-current.floating-return-btn i {
  color: var(--accent-primary);
  font-size: 13px;
}

.btn-return-current.floating-return-btn:hover {
  background: #ffffff;
  color: #1557b0;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateX(-50%) scale(1.05);
}

/* C区域 Tab CSS */
.ledger-c-tabs {
  display: flex;
  background: #ffffff;
  border-bottom: 1px solid var(--glass-border);
  padding: 0 20px;
  gap: 16px;
}

.ledger-c-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 4px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ledger-c-tab-btn:hover {
  color: var(--text-dark);
}

.ledger-c-tab-btn.active {
  color: var(--accent-pink);
  border-bottom-color: var(--accent-pink);
}

/* 快捷页签导航 */
.day-tabs-container-header {
  display: none !important;
  align-items: center;
  flex: 1 1 auto;
  max-width: 50%;
  overflow: hidden;
  margin: 0 16px;
}

.day-tabs-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  width: 100%;
}
.day-tabs-scroll::-webkit-scrollbar {
  display: none; /* Safari & Chrome */
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 20px; /* Google pill style */
  color: #3c4043;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.tab-btn:hover {
  background: #f8f9fa;
  color: #202124;
}

.tab-btn.active {
  background: #e8f0fe;
  color: #1a73e8;
  border: 1px solid #1a73e8;
  box-shadow: none;
}

.tab-day-label {
  font-weight: 600;
}

.tab-city-label {
  font-size: 11px;
  padding: 2px 8px;
  background: #f1f3f4;
  color: #5f6368;
  border-radius: 12px;
  font-weight: 400;
  transition: var(--transition-fast);
}

.tab-btn:hover .tab-city-label {
  background: #e8eaed;
  color: #202124;
}

.tab-btn.active .tab-city-label {
  background: var(--accent-primary);
  color: #ffffff;
}

/* 攻略滚动视口 */
.guide-scroll-container {
  flex: 1;
  overflow-y: auto;
  padding: 40px 20px 20px 20px;
}

/* 欢迎引导卡片 */
.welcome-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  margin-bottom: 24px;
  box-shadow: none;
  border: 1px solid var(--glass-border);
}

.welcome-image-container {
  position: relative;
  height: 180px;
  width: 100%;
}

.welcome-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.welcome-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, #ffffff 15%, transparent);
}

.welcome-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
}

.welcome-text h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.welcome-text p {
  font-size: 12px;
  color: var(--text-muted);
}

/* 每日日程总览卡片 */
/* 每日日程总览区域 */
.day-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0 0 30px 0;
  margin-bottom: 30px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: visible;
  box-shadow: none;
  border-bottom: 1px solid var(--glass-border);
}

.day-card:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.day-card::before {
  display: none;
}

.day-group.active-highlight {
  background: transparent !important; /* 柔和的高亮淡蓝背景 */
  border-radius: var(--radius-lg);
  position: relative;
  margin-top: 12px;
  margin-bottom: 12px;
}

.day-group.active-highlight::after {
  content: none !important;
}

.day-group.active-highlight + .day-group {
  border-top: 1px solid transparent;
}

/* 每日日程卡片头部 */
.day-card-header {
  margin-bottom: 16px;
}

.day-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: rgba(26, 115, 232, 0.06); /* 统一柔和浅蓝 */
  color: var(--accent-primary);
  border: 1px solid rgba(26, 115, 232, 0.12);
}

.day-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.day-route {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

/* 每日公里数/耗时卡 */
.day-meta-chips {
  display: flex;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.03);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.02);
  color: var(--text-muted);
}

.chip i {
  color: var(--text-muted);
}

/* 每日导言 */
.day-intro {
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(37, 99, 235, 0.04);
  padding: 12px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border-left: 3px solid var(--accent-primary);
}

/* ------------------------------------------
   纵向时间轴 (Timeline)
   ------------------------------------------ */
.day-timeline {
  position: relative;
  padding-left: 0;
  margin-bottom: 15px;
}

/* 时间轴垂直连线 */
.day-timeline::before {
  display: none;
}

/* 时间轴左侧时间 */
.timeline-time-left {
  position: absolute;
  left: -65px;
  width: 34px;
  text-align: right;
  top: 4px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.stop-date-badge-left {
  font-size: 8.5px;
  padding: 1px 3px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  white-space: nowrap;
}

.stop-time-text-left {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

/* 时间轴节点 */
.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

/* 移除时间轴节点默认小圆圈 */
.timeline-item::before {
  display: none;
}

/* 连接线上的类别图标徽章 */
.timeline-icon-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: -27px; /* 居中于垂直线上 */
  top: 4px;
  color: #ffffff;
  font-size: 11px;
  z-index: 2;
  border: 2px solid var(--bg-secondary); /* 白色描边隔离连线 */
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  background: var(--text-muted); /* 统一改用默认灰色 */
}

.timeline-content {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 4px 0 10px 0;
  transition: var(--transition-fast);
  cursor: pointer;
}

.timeline-content:hover {
  background: transparent;
  transform: translateX(4px);
}

.timeline-time-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.timeline-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.timeline-time {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* 时间轴细分笔记卡片 */
.timeline-notes-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.timeline-note-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
  background-color: #f8f9fa;
  border: 1px solid #e8eaed;
}

.timeline-note-item .note-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timeline-note-item .note-text {
  color: var(--text-muted);
  margin: 0;
  white-space: pre-wrap; /* 支持折行 */
}

/* 游玩笔记样式 - 默认中性色 */
.timeline-note-item.note-play {
  background-color: #f8f9fa;
  border-color: #e8eaed;
}
.timeline-note-item.note-play .note-label {
  color: var(--text-main);
}

/* 停车笔记样式 - 橙色/黄色调 */
.timeline-note-item.note-parking {
  background-color: rgba(249, 171, 0, 0.03);
  border-color: rgba(249, 171, 0, 0.08);
}
.timeline-note-item.note-parking .note-label {
  color: #b06000;
}

/* 注意事项样式 - 红色调 */
.timeline-note-item.note-tips {
  background-color: rgba(217, 48, 37, 0.02);
  border-color: rgba(217, 48, 37, 0.08);
}
.timeline-note-item.note-tips .note-label {
  color: #d93025;
}

.timeline-note-item.note-empty {
  background-color: #f8f9fa;
  border-color: #e8eaed;
}

/* 时间轴内部插图 */
.timeline-photo {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-top: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* 自驾小贴士 */
.day-tips-box {
  background: rgba(217, 119, 6, 0.05);
  border: 1px solid rgba(217, 119, 6, 0.22);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 12px;
  color: #b45309;
  display: flex;
  gap: 10px;
}

.day-tips-box i {
  font-size: 16px;
  margin-top: 2px;
}

/* 页脚样式 */
.guide-footer {
  text-align: center;
  padding: 20px 0 10px 0;
  border-top: 1px solid var(--glass-border);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 20px;
}

/* ==========================================
   AI Guide Sidebar
   ========================================== */
.guide-ai-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: min(420px, 100%);
  height: 100%;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98)),
    radial-gradient(circle at top right, rgba(26, 115, 232, 0.08), transparent 45%);
  border-left: none;
  border-right: 1px solid rgba(26, 115, 232, 0.12);
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.1);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  padding: 20px 18px 18px;
  gap: 14px;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.guide-ai-sidebar-visible {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.guide-ai-sidebar-hidden {
  transform: translateX(-100%);
  visibility: hidden;
  pointer-events: none;
}

.guide-ai-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding-bottom: 4px;
  flex-wrap: nowrap;
}

.guide-ai-sidebar__eyebrow {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}
.guide-ai-sidebar__header .btn-close-sidebar {
  margin-left: auto;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(15,23,42,0.08);
  background: #fff;
  color: #5f6368;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.15s;
}
.guide-ai-sidebar__header .btn-close-sidebar:hover {
  background: #f1f3f4;
  color: #202124;
}

.guide-ai-sidebar__role-path {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 3px;
  background: #f1f3f4;
  border-radius: 10px;
  overflow: hidden;
  scrollbar-width: none;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.guide-ai-sidebar__role-path::-webkit-scrollbar {
  display: none;
}

.guide-role-seg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #5f6368;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.guide-role-seg:hover {
  background: #e8eaed;
  color: #202124;
}

.guide-role-seg--active {
  background: #ffffff;
  color: #1a73e8;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.guide-role-seg--active:hover {
  background: #ffffff;
  color: #1557b0;
}

.guide-role-seg svg {
  flex-shrink: 0;
}

.guide-role-seg span {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.guide-ai-sidebar__scope-note {
  font-size: 10px;
  line-height: 1.4;
  color: #5f6368;
  flex: 0 0 100%;
  order: 2;
  margin-top: 4px;
}

.guide-ai-sidebar__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.guide-ai-sidebar__mode-toggle {
  display: inline-flex;
  background: #f1f3f4;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
  order: 1;
}

.guide-mode-btn {
  border: none;
  background: transparent;
  color: #5f6368;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.guide-mode-btn-active {
  background: #ffffff;
  color: #1a73e8;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

.guide-source-toggle {
  border: 1px solid #dadce0;
  background: #ffffff;
  color: #70757a;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  order: 1;
}

.guide-source-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.guide-clear-toggle {
  border: 1px solid #dadce0;
  background: #ffffff;
  color: #70757a;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  order: 2;
  transition: all 0.15s ease;
}

.guide-clear-toggle:hover {
  color: #d93025;
  border-color: #fce8e6;
  background-color: #fdf5f5;
}

.guide-watch-toggle {
  border: 1px solid #dadce0;
  background: #ffffff;
  color: #70757a;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  order: 3;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.guide-watch-toggle:hover {
  background: #f1f3f4;
  color: #202124;
}

/* 监听已激活 (Active) */
.guide-watch-toggle.watch-active {
  background: #e6f4ea;
  border-color: #a8dab5;
  color: #137333;
}

.guide-watch-toggle.watch-active:hover {
  background: #d2e9d6;
}

/* 终端离线 (Offline) */
.guide-watch-toggle.watch-offline {
  background: #f1f3f4;
  border-color: #e8eaed;
  color: #b0b3b8;
  cursor: not-allowed;
  opacity: 0.8;
}

/* 呼吸灯小圆点 */
.guide-watch-toggle .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b0b3b8;
  display: inline-block;
  transition: background 0.3s ease;
}

.guide-watch-toggle.watch-active .status-dot {
  background: #1e8e3e;
  animation: watch-pulse 1.5s infinite;
}

@keyframes watch-pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
  100% {
    transform: scale(0.9);
    opacity: 0.6;
  }
}

.guide-ai-sidebar__messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
}

.guide-empty-state {
  padding: 18px 16px;
  background: transparent;
  border: none;
  color: #86868b;
  font-size: 13px;
  line-height: 1.65;
}

.guide-empty-state__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.guide-msg {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-msg--user {
  margin-left: auto;
  background: #1a73e8;
  color: #ffffff;
  border-bottom-right-radius: 6px;
}

.guide-msg--assistant {
  margin-right: auto;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--text-main);
  border-bottom-left-radius: 6px;
}

.guide-msg__role {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
}

.guide-msg__content {
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.guide-source-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-source-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-source-card__meta {
  font-size: 11px;
  color: var(--text-muted);
}

.guide-source-card h4 {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-main);
}

.guide-source-card p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
}

.guide-source-card a {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-primary);
  text-decoration: none;
}

.guide-source-empty {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 4px 0;
}

.guide-ai-sidebar__composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.guide-ai-sidebar__input-container {
  position: relative;
  width: 100%;
}

.guide-ai-sidebar__composer textarea {
  width: 100%;
  display: block;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #f8f9fa;
  padding: 8px 60px 8px 10px;
  resize: none;
  min-height: 48px;
  outline: none;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.guide-ai-sidebar__composer textarea::placeholder {
  color: #9aa0a6;
  font-size: 11px;
}

.guide-ai-sidebar__composer textarea:focus {
  border-color: rgba(26, 115, 232, 0.25);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.08);
  background: #ffffff;
}

.guide-ai-sidebar__status {
  font-size: 11px;
  color: var(--text-muted);
}

.guide-ai-sidebar__status-error {
  color: #d93025;
}

#guide-chat-submit {
  position: absolute;
  right: 12px;
  bottom: 12px;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 6px;
  font-weight: 500;
  background: #1a73e8;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

#guide-chat-submit:hover {
  background: #1557b0;
}

.item-location-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #70757a;
  margin-top: 6px;
  padding: 2px 4px;
}

.item-location-row i.location-icon {
  color: #1a73e8;
  font-size: 12px;
  flex-shrink: 0;
}

.item-location-row .location-text {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}

.item-location-row .nav-btn-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(26, 115, 232, 0.08);
  color: #1a73e8;
  padding: 3px 10px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-left: auto;
  border: 1px solid rgba(26, 115, 232, 0.15);
  cursor: pointer;
}

.item-location-row .nav-btn-link:hover {
  background: rgba(26, 115, 232, 0.15);
  color: #1557b0;
  border-color: rgba(26, 115, 232, 0.3);
}

.item-location-row .nav-btn-link i {
  font-size: 10px;
}

@media (max-width: 960px) {
  .guide-ai-sidebar {
    width: 100%;
    left: 0 !important;
    border-right: none;
    border-left: none;
  }
}

/* ==========================================
   Leaflet 地图元素高级重写
   ========================================== */
/* 自定义 CSS 圆圈标记点 */
.custom-map-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  font-size: 13px;
  border: 2px solid white;
  transition: var(--transition-fast);
  position: relative; /* 确保子元素绝对定位正确 */
}

.custom-map-marker i {
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.custom-map-marker:hover {
  transform: scale(1.2) rotate(10deg);
  z-index: 1000 !important;
}

/* 地图标记与时间轴的序号数字角标 */
.marker-number-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ffffff;
  color: #202124;
  border: 1.5px solid #202124;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 10;
}

.timeline-number-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ffffff;
  color: #202124;
  border: 1.5px solid #202124;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  z-index: 10;
}

/* 地图弹出窗气泡 */
.leaflet-popup-content-wrapper {
  background: #ffffff !important;
  color: var(--text-main) !important;
  border: 1px solid rgba(0,0,0,0.06) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-premium) !important;
}

.leaflet-popup-tip {
  background: #ffffff !important;
  border-left: 1px solid rgba(0,0,0,0.06) !important;
  border-bottom: 1px solid rgba(0,0,0,0.06) !important;
}

.popup-card-content h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 4px;
}

.popup-card-content p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* 地图版权控件美化 */
.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.8) !important;
  color: var(--text-muted) !important;
  font-size: 9px !important;
  border-top-left-radius: 6px;
}
.leaflet-control-attribution a {
  color: var(--accent-primary) !important;
}
.leaflet-bar a {
  background-color: #ffffff !important;
  color: var(--text-main) !important;
  border-color: rgba(0,0,0,0.1) !important;
}
.leaflet-bar a:hover {
  background-color: #f8fafc !important;
  color: var(--accent-primary) !important;
}

/* ==========================================
   滑动面板与编辑器定位 (Sliding Panels & Editor Layout)
   ========================================== */
#day-editor-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 480px;
  height: 100%;
  z-index: 1000;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--glass-border);
  box-shadow: 10px 0 25px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.editor-panel-hidden {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

.editor-panel-visible {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* ------------------------------------------
   时间轴编辑侧边栏 (Day Editor Panel Styles)
   ------------------------------------------ */
.editor-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-secondary);
}

.editor-panel-header h3 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.btn-close-editor {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.btn-close-editor:hover {
  color: var(--accent-pink);
  background-color: rgba(0, 0, 0, 0.05);
}

.editor-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.editor-panel-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: var(--bg-secondary);
}

/* 表单布局 */
.editor-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

input, select, textarea {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13.5px;
  transition: var(--transition-fast);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* 每日日程编辑器特殊分栏布局 */
.day-editor-layout {
  display: flex;
  height: 100%;
  gap: 20px;
  overflow: hidden;
}

.day-sidebar {
  width: 140px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  padding-right: 12px;
}

.day-select-btn {
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-fast);
}

.day-select-btn:hover {
  background: #f1f5f9;
}

.day-select-btn.active {
  background: var(--accent-primary);
  color: white;
  border: none;
}

.day-detail-form {
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 景点表格编辑器 */
.stops-editor-container {
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-md);
  padding: 14px;
  background: #f8fafc;
  margin-top: 10px;
}

.stops-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.stops-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stop-edit-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.stop-edit-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.stop-edit-coords {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex: 1;
}

.btn-remove-stop {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.15);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-remove-stop:hover {
  background: #ef4444;
  color: white;
}



/* ==========================================
   响应式设计 (Responsive Layout)
   ========================================== */
@media (max-width: 1024px) {
  .app-layout {
    flex-direction: column;
    overflow: hidden;
  }
  
  .map-section {
    height: 40vh;
    min-height: 250px;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
  }
  
  .guide-section {
    width: 100%;
    min-width: 100%;
    flex: 1;
    height: auto;
    box-shadow: none;
    overflow: hidden;
  }
  
  .right-layout-container {
    width: 100% !important;
  }
  
  .header-stats {
    display: none; /* 小屏隐藏汇总数据 */
  }
}

@media (max-width: 768px) {
  /* Shorten transit cost elements on mobile */
  .transit-cost-full {
    display: none !important;
  }
  .transit-cost-short {
    display: inline !important;
  }
  .transit-buffer-full {
    display: none !important;
  }
  .transit-buffer-short {
    display: inline !important;
  }
  .transit-btn-text {
    display: none !important;
  }
  .transit-info {
    gap: 3px !important;
    padding: 2px 6px !important;
  }

  /* Mobile View Toggles */
  .mobile-view-tabs {
    display: flex !important;
    border-bottom: 1px solid var(--glass-border);
    background: #ffffff;
  }
  .mobile-view-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
  }
  .mobile-view-tab.active {
    color: var(--accent-primary);
    border-bottom: 2px solid var(--accent-primary);
    background-color: rgba(26, 115, 232, 0.04);
  }
  
  body.mobile-view-timeline-active .map-section {
    display: none !important;
  }
  body.mobile-view-timeline-active .right-layout-container {
    display: flex !important;
    height: calc(100vh - 120px) !important;
    width: 100% !important;
  }
  
  body.mobile-view-map-active .map-section {
    display: block !important;
    height: calc(100vh - 120px) !important;
    width: 100% !important;
    border-bottom: none !important;
  }
  body.mobile-view-map-active .right-layout-container {
    display: none !important;
  }

  .stats-header-card {
    padding: 8px 10px !important;
  }
  .stats-header-card .card-val {
    font-size: 13px !important;
  }
  .stats-header-card .card-lbl {
    font-size: 10px !important;
  }

  .app-header {
    height: auto;
  }
  
  .header-container {
    flex-wrap: wrap;
    height: auto;
    padding: 8px 16px;
    gap: 8px;
  }
  
  .header-left {
    flex: 1 1 auto;
    max-width: 70%;
  }

  .plan-selector-container {
    width: 100%;
    gap: 6px;
    padding: 4px 10px;
  }

  .plan-select {
    max-width: 130px;
    font-size: 13px;
  }
  
  .header-actions {
    margin-left: auto;
    flex: 0 0 auto;
  }
  
  .day-tabs-container-header {
    order: 2; /* 放到第二行 */
    flex: 0 0 100%; /* 满宽 */
    max-width: 100%;
    margin: 4px 0 0 0;
    padding: 6px 0 0 0;
    border-top: 1px solid var(--glass-border);
  }
  
  .day-tabs-scroll {
    padding-bottom: 4px;
  }

  .map-section {
    height: 35vh;
    min-height: 200px;
  }

  #day-editor-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 3000 !important;
    border-right: none;
    box-shadow: none;
  }
}

@media (max-width: 640px) {
  .header-container {
    padding: 8px 12px;
  }
  
  .plan-selector-container label {
    display: none; /* 移动端隐藏“行程计划:”标签，只显示下拉框和图标 */
  }
  
  .btn span {
    display: none; /* 移动端隐藏按钮文字，仅保留图标 */
  }
  
  .btn {
    padding: 8px;
  }
}

/* ==========================================
   计划管理与折叠控制新增样式
   ========================================== */
.plan-selector-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.03);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-left: 20px;
}

.plan-selector-container label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.plan-select {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  outline: none;
  padding-right: 8px;
}

.plan-select option {
  background: var(--bg-secondary);
  color: var(--text-main);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--transition-fast);
  font-size: 14px;
}

/* 编辑模式下显示计划按钮 */
.plan-selector-container .btn-icon {
  display: none !important;
}

body.edit-mode-active .plan-selector-container .btn-icon {
  display: inline-flex !important;
}

.btn-icon:hover {
  color: var(--accent-primary);
  background: rgba(0, 0, 0, 0.05);
}

#btn-delete-plan:hover {
  color: var(--accent-pink);
}

/* 折叠控制与日日程动作 */
.day-card-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.day-card-header-top .day-badge {
  margin-bottom: 0;
}

.day-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-action-day {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 11px;
  width: 24px;
  height: 24px;
  display: none; /* 默认隐藏，编辑模式显示 */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

body.edit-mode-active .btn-action-day {
  display: flex;
}

.btn-edit-day:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-primary);
  border-color: rgba(37, 99, 235, 0.2);
}

.btn-delete-day:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-toggle-collapse {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-fast);
}

.btn-toggle-collapse:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--accent-primary);
  border-color: rgba(37, 99, 235, 0.15);
}

.day-card-body {
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  max-height: 2500px;
  opacity: 1;
  overflow: visible;
  margin-top: 12px;
}

.day-card.collapsed .day-card-body {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
  overflow: hidden;
}

.day-card .icon-expand {
  display: none;
}

.day-card.collapsed .icon-expand {
  display: inline-block;
}

.day-card.collapsed .icon-collapse {
  display: none;
}

.day-card .toggle-text::after {
  content: '收起';
}

.day-card.collapsed .toggle-text::after {
  content: '展开';
}

/* 新增日程天数卡片 */
.add-day-card-container {
  display: none;
  justify-content: center;
  padding: 10px 0 20px 0;
}

body.edit-mode-active .add-day-card-container {
  display: flex;
}

.btn-add-day {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px dashed var(--accent-primary);
  color: var(--accent-primary);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-add-day:hover {
  background: rgba(37, 99, 235, 0.05);
  transform: translateY(-1px);
}

/* 移动端计划选择器适配 */
@media (max-width: 640px) {
  .plan-selector-container {
    margin-left: 0;
    margin-top: 6px;
    padding: 4px 8px;
  }
  .header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* ==========================================
   自驾路书自定义新增样式 (日期、重要提醒与过渡行车停留卡)
   ========================================== */
.stop-date-badge {
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 600;
  margin-right: 6px;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.stop-tips-mini {
  background: #fef7e0; /* Google 浅黄警告背景 */
  color: #b06000; /* Google 深黄文本 */
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  margin-top: 8px;
  font-size: 11.5px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.stop-tips-mini i {
  margin-top: 3px;
  font-size: 12px;
}

.timeline-segment-info {
  position: relative;
  padding-left: 0;
  margin: -14px 0 14px 0;
  z-index: 2;
}

.segment-line-info {
  display: inline-flex;
  gap: 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border: none;
  padding: 4px 10px;
  border-radius: 12px; /* 胶囊圆角 */
  box-shadow: none;
}

.segment-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.segment-stat i {
  color: var(--text-muted);
}

/* 高德地图 Autocomplete 提示框样式重写 */
.amap-sug-result {
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-md) !important;
  background: var(--bg-secondary) !important;
  box-shadow: var(--shadow-premium) !important;
  font-family: var(--font-sans) !important;
  z-index: 10000 !important;
  padding: 6px 0 !important;
  max-width: 300px;
}

.amap-sug-result .sug-key {
  color: var(--text-main) !important;
  font-weight: 600 !important;
}

.amap-sug-result .poi-address {
  color: var(--text-muted) !important;
  font-size: 11px !important;
}

.amap-sug-result .auto-item {
  padding: 8px 14px !important;
  cursor: pointer !important;
  transition: var(--transition-fast) !important;
}

.amap-sug-result .auto-item:hover {
  background-color: rgba(37, 99, 235, 0.05) !important;
}

/* ==========================================
   日程时间轴地点行与行程冲突警告样式
   ========================================== */
.timeline-location-row {
  margin: -2px 0 6px 0;
  display: flex;
  align-items: center;
}

.timeline-segment-info.segment-risk {
  margin: -14px 0 14px 0;
}

.segment-line-info.risk-badge {
  background: #fdf2f2 !important;
  border: none !important;
  color: #d93025 !important; /* Google 红 */
  box-shadow: none;
  animation: pulse-warning 2s infinite;
}

.segment-line-info.risk-badge i {
  color: #ef4444 !important;
}

@keyframes pulse-warning {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* ==========================================
   地点校对候选列表样式与文本域优化
   ========================================== */
.calibration-list {
  margin-top: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.calibration-item {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: var(--transition-fast);
  text-align: left;
}

.calibration-item:last-child {
  border-bottom: none;
}

.calibration-item:hover {
  background: rgba(37, 99, 235, 0.04);
}

.calibration-item.active {
  background: rgba(37, 99, 235, 0.08);
  border-left: 3px solid var(--accent-primary);
}

.calibration-poi-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calibration-poi-addr {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 文本域聚焦与大小优化 */
.stop-edit-item textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

/* 景点右侧游玩时长徽章 */
.stop-stay-badge-right {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
}

/* 时间轴左侧开车出发时间 */
.segment-time-left-departure {
  position: absolute;
  left: -65px;
  width: 34px;
  text-align: right;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

/* 时间轴行车小汽车徽章 */
.timeline-icon-badge-departure {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: -24px;
  top: 50%;
  transform: translateY(-50%);
  color: #ffffff;
  z-index: 2;
  border: 2px solid var(--bg-secondary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  background: var(--text-muted); /* 统一改用默认灰色 */
}

/* 预定状态徽章定义 */
.stop-status-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 待预定呼吸警报闪烁效果 - 统一使用项目的橙色 */
.stop-status-badge.status-pending {
  color: var(--accent-orange);
  background: rgba(232, 113, 10, 0.08);
  border: 1px solid rgba(232, 113, 10, 0.15);
  animation: pulse-booking-pending 2s infinite;
}

.stop-status-badge.status-confirmed {
  color: #1e8e3e;
  background: rgba(30, 142, 62, 0.06);
  border: 1px solid rgba(30, 142, 62, 0.12);
}

@keyframes pulse-booking-pending {
  0% {
    box-shadow: 0 0 0 0 rgba(232, 113, 10, 0.35);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(232, 113, 10, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(232, 113, 10, 0);
  }
}

/* ==========================================
   天气看板 & 安全预警样式 (Weather & Alerts)
   ========================================== */
.weather-board-wrapper {
  margin: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition-smooth);
}

.weather-board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 8px;
}

.weather-board-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dark);
}

.weather-board-refresh {
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  transition: var(--transition-fast);
}

.weather-board-refresh:hover {
  color: var(--accent-primary);
}

.weather-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.weather-card {
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  border: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  position: relative;
  transition: var(--transition-smooth);
}

.weather-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
}

.weather-card-city {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

.weather-card-icon-temp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 4px 0;
}

.weather-card-icon {
  font-size: 20px;
  color: var(--accent-primary);
}

.weather-card-temp {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  font-family: 'Outfit', sans-serif;
}

.weather-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.weather-card-extra {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.8;
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.weather-alerts-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.weather-alert {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: slide-down-fade 0.3s ease-out;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.weather-alert-icon {
  font-size: 14px;
  margin-top: 2px;
  flex-shrink: 0;
}

.weather-alert-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.weather-alert-title {
  font-weight: 700;
}

.weather-alert-msg {
  color: inherit;
  opacity: 0.9;
}

/* 预警类型配色 */
.weather-alert-danger {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}
.weather-alert-danger .weather-alert-icon {
  color: #dc2626;
  animation: alert-blink-red 1.5s infinite;
}

.weather-alert-warning {
  background: rgba(232, 113, 10, 0.08);
  border: 1px solid rgba(232, 113, 10, 0.2);
  color: #b05000;
}
.weather-alert-warning .weather-alert-icon {
  color: var(--accent-orange);
}

.weather-alert-info {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #1d4ed8;
}
.weather-alert-info .weather-alert-icon {
  color: #2563eb;
}

.weather-alert-success {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
  color: #047857;
}
.weather-alert-success .weather-alert-icon {
  color: #10b981;
}

/* 城市小标签 */
.stop-city-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-tertiary); /* 统一柔和灰背景 */
  border: 1px solid var(--glass-border);
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
}

.day-card-weather-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-muted);
}

.day-card-weather-city {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

@keyframes slide-down-fade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes alert-blink-red {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* ==========================================
   优化升级样式：行程计划侧边栏 & 看板 & 城市分组
   ========================================== */

/* 1. 行程计划侧边栏 */
.plan-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.plan-sidebar-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

#sidebar-drawer-overlay {
  background-color: transparent;
  backdrop-filter: none;
  pointer-events: none !important;
}

.day-todo-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #f97316;
  box-shadow: 0 0 6px #f97316;
  margin-left: 2px;
  animation: pulse-dot-indicator 2s infinite;
}

@keyframes pulse-dot-indicator {
  0% { transform: scale(0.95); opacity: 0.85; }
  50% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 10px #f97316; }
  100% { transform: scale(0.95); opacity: 0.85; }
}

.plan-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 340px;
  height: 100%;
  z-index: 1100;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--glass-border);
  box-shadow: 10px 0 25px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.plan-sidebar-hidden {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

.plan-sidebar-visible {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.plan-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-secondary);
}

.plan-sidebar-header h3 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  margin: 0;
}

.btn-close-sidebar {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.btn-close-sidebar:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
}

.btn-manage-city-order-old {
  background: #f1f3f4;
  border: none;
  color: #1a73e8;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.btn-manage-city-order-old:hover {
  background: #e8f0fe;
}

/* Floating top-right button for city order adjustment */
.btn-manage-city-order {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  color: var(--accent-primary);
  font-size: 11px;
  font-weight: 500;
  height: 32px;
  padding: 0 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  outline: none;
}

.btn-manage-city-order:hover {
  background: #ffffff;
  color: #1557b0;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: scale(1.05);
}

.plan-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.plan-list-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan-item {
  padding: 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-smooth);
}

.plan-item:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.plan-item.active {
  background: color-mix(in srgb, var(--accent-primary) 8%, var(--bg-secondary));
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.05);
}

.plan-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.plan-item.active .plan-item-icon {
  background: var(--accent-primary);
  color: #ffffff;
}

.plan-item-info {
  flex: 1;
  min-width: 0;
}

.plan-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan-item-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.plan-sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: var(--bg-secondary);
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 10px;
}

.plan-sidebar-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-outline:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-muted);
}

.btn-danger {
  color: #ef4444;
}
.btn-outline.btn-danger:hover {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
}

/* 2. 行程数据与智能预算看板 */
.stats-dashboard-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
}

.stats-dashboard-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.01);
}

.dashboard-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-title i {
  color: var(--accent-primary);
}

.btn-dashboard-config {
  background: none;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-fast);
}

.btn-dashboard-config:hover {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-main);
  border-color: var(--text-muted);
}

.stats-dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr;
  padding: 16px;
  gap: 16px;
}

@media (max-width: 768px) {
  .stats-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-stats-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-right: 1px solid var(--glass-border);
  padding-right: 16px;
}

@media (max-width: 768px) {
  .dashboard-stats-col {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 16px;
  }
}

.stat-box-large {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, rgba(37, 99, 235, 0.01) 100%);
  border: 1px solid rgba(37, 99, 235, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1.2;
}

.stat-unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 2px;
}

.stat-details-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.icon-blue { background: rgba(37, 99, 235, 0.08); color: var(--accent-primary); }
.icon-green { background: rgba(5, 150, 105, 0.08); color: var(--accent-success); }
.icon-pink { background: rgba(219, 39, 119, 0.08); color: var(--accent-pink); }

.detail-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.detail-label {
  font-size: 10px;
  color: var(--text-muted);
}

.detail-value {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-costs-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cost-summary-box {
  background: linear-gradient(135deg, rgba(219, 39, 119, 0.04) 0%, rgba(219, 39, 119, 0.01) 100%);
  border: 1px solid rgba(219, 39, 119, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.cost-summary-label {
  font-size: 11px;
  color: var(--text-muted);
}

.cost-summary-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent-pink);
  line-height: 1.2;
}

.cost-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cost-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.cost-item:hover {
  background: rgba(0,0,0,0.02);
}

.cost-name {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.cost-name i {
  width: 14px;
  text-align: center;
}

.cost-icon-gas { color: var(--accent-primary); }
.cost-icon-road { color: #64748b; }
.cost-icon-hotel { color: #d97706; }
.cost-icon-food { color: #059669; }
.cost-icon-play { color: #db2777; }

.cost-price {
  font-weight: 600;
  color: var(--text-main);
  cursor: help;
  border-bottom: 1px dotted var(--text-muted);
}

/* 预算调整面板 */
.budget-settings-drawer {
  background: var(--bg-tertiary);
  border-top: 1px solid var(--glass-border);
  padding: 12px 20px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.budget-settings-drawer.hidden-drawer {
  display: none;
}

.settings-drawer-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.setting-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setting-input-group label {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.setting-input-group input {
  padding: 6px 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-main);
  font-family: inherit;
  font-size: 12.5px;
  width: 120px;
}

.setting-input-group input:focus {
  border-color: var(--accent-primary);
  outline: none;
}

.setting-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}



/* ==========================================================================
   TIMELINE AND LEDGER STYLES IMPORTED FROM DEMO.HTML
   ========================================================================== */

    /* ===== RESET & BASE STYLE ===== */
    /* Cleaned global * reset */
    body
    /* Cleaned global .container reset */

    .transit-row {
      position: relative;
      padding-left: 85px;
      margin-top: -10px;
      margin-bottom: 10px;
      min-height: 32px;
      display: flex;
      align-items: center;
    }

    /* ===== TOP STATS ROW ===== */
    .stats-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      padding-bottom: 20px;
      border-bottom: 1px solid #e8eaed;
      margin-bottom: 24px;
    }
    .stat-item {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .stat-item.interactive {
      cursor: pointer;
      padding: 6px 12px;
      margin: -6px -12px;
      border-radius: 6px;
      transition: background-color 0.2s ease;
    }
    .stat-item.interactive:hover {
      background-color: #f8f9fa;
    }
    .stat-label {
      font-size: 11px;
      color: #5f6368;
      font-weight: 500;
    }
    .stat-value {
      font-size: 18px;
      font-weight: 500;
      color: #202124;
      font-family: 'Outfit', system-ui, sans-serif;
      transition: color 0.3s ease;
    }
    .editable {
      cursor: pointer;
      border-bottom: 1px dashed #c0c0c0;
      display: inline-block;
    }
    .stat-value-input {
      font-size: 18px;
      font-weight: 500;
      width: 100px;
      border: 1px solid #1a73e8;
      border-radius: 4px;
      padding: 2px 4px;
      outline: none;
      display: none;
    }

    /* ===== TIMELINE CONTAINER ===== */
    .timeline-container {
      position: relative;
    }

    /* ===== COLLAPSIBLE CITY GROUP ===== */
    .city-group {
      position: relative;
      /* Dynamic city accent color set via style attribute */
      --city-color: #1a73e8; 
      --bg-current-card: rgba(26, 115, 232, 0.04);
    }
    .city-header {
      position: relative;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 0 10px 85px; /* Left indent to clear times and dot */
      cursor: pointer;
      user-select: none;
    }
    .city-header:hover {
      background: #f8f9fa;
      border-radius: 4px;
    }
    
    /* Segmented vertical lines for city headers */
    .city-header::before {
      content: '';
      position: absolute;
      left: 74px; /* Center is exactly at 75px */
      top: 0;
      height: 50%;
      width: 2px;
      background: var(--city-color);
      z-index: 1;
    }
    .city-group:first-child .city-header::before {
      display: none; /* First city dot has no line above it */
    }
    .city-header::after {
      content: '';
      position: absolute;
      left: 74px;
      top: 50%;
      bottom: 0;
      width: 2px;
      background: var(--city-color);
      z-index: 1;
      transition: bottom 0.3s ease;
    }
    /* Hide line below the last city dot if it is collapsed */
    .city-group.collapsed:last-child .city-header::after {
      display: none;
    }

    .city-title-wrapper {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
    }
    .city-dot {
      position: absolute;
      left: 70px; /* Center of dot is 75px (75 - 5 = 70px) */
      top: 50%;
      transform: translateY(-50%);
      width: 10px;
      height: 10px;
      border-radius: 50%;
      z-index: 2; /* Sits on top of the vertical line */
    }
    .city-name {
      position: absolute;
      left: 0px;
      width: 58px;
      text-align: right;
      font-size: 16px;
      font-weight: 700;
      color: #1a1a1a;
      letter-spacing: -0.02em;
      top: 50%;
      transform: translateY(-50%);
      white-space: nowrap;
    }
    .city-toggle-link {
      font-size: 13px;
      color: #86868b;
      cursor: pointer;
      margin-left: 8px;
      transition: color 0.2s ease;
      user-select: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .city-toggle-link:hover {
      color: var(--city-color);
    }
    .city-meta {
      font-size: 12px;
      color: #5f6368;
      margin-left: 12px;
    }
    .city-stats {
      font-size: 13px;
      color: #5f6368;
    }
    .city-stats b {
      color: #202124;
      font-weight: 500;
    }

    /* City body (contains days and stops) with height animation support */
    .city-body {
      display: block;
      opacity: 1;
      position: relative; /* Relative container for vertical background line positioning */
      padding-top: 0.1px; /* Prevent top margin collapsing with first day-group */
      background: transparent !important;
    }
    .city-group.collapsed .city-body {
      overflow: hidden;
    }
    /* Segmented vertical line inside city body */
    .city-body::before {
      content: '';
      position: absolute;
      left: 74px;
      top: 0; /* Connects directly to the bottom of city-header line segment */
      bottom: 20px; /* Ends at the last visible item */
      width: 2px;
      background: var(--city-color);
      z-index: 1;
      display: block;
    }
    .city-group.collapsed .city-body::before {
      display: none;
    }



    /* ===== TIMELINE ITEMS ===== */
    .timeline-item {
      position: relative;
      padding-left: 85px; /* Clear space for line and dot */
      padding-bottom: 0;  /* Reset global padding-bottom so content card matches container height */
      margin-bottom: 20px;
      transition: padding-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Stop item continuous vertical line segment */
    .timeline-item::after {
      content: '';
      position: absolute;
      left: 74px;
      top: 0;
      bottom: -20px; /* Extend down through margin to connect to next element */
      width: 2px;
      background: var(--city-color);
      z-index: 1;
    }
    /* Stop line at the center of the very last stop dot of the entire timeline */
    .timeline-item.is-last-stop::after {
      bottom: auto;
      height: 11px; /* Ends exactly at the dot center */
    }

    .item-dot {
      position: absolute;
      left: 69px; /* Center of dot is 75px (75 - 6 = 69px) */
      top: 17px;  /* Centered vertically with text row inside card */
      width: 12px;
      height: 12px;
      border-radius: 50%;
      border: 2px solid var(--city-color);
      background: #ffffff;
      z-index: 2; /* Sits on top of the vertical line */
      transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                  top 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                  background-color 0.3s ease,
                  border-color 0.3s ease,
                  box-shadow 0.3s ease;
    }
    .item-header-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 2px;
      width: 100%;
    }
    .item-right-finance {
      font-size: 11px;
      color: #9aa0a6;
      font-weight: 400;
      font-family: 'Outfit', sans-serif;
      margin-left: 12px;
      white-space: nowrap;
    }
    .item-left {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    
    /* Time column positioned on the left side of the timeline line */
    .item-time {
      position: absolute;
      left: 0px; /* Sits on left, ends before 75px line */
      top: 12px; /* Align vertically with the stop name */
      width: 52px; /* Set to 52px to ensure a visible gap from the 75px line */
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      font-size: 12px;
      color: #5f6368;
      font-family: 'Outfit', sans-serif;
      font-weight: 500;
      transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                  top 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                  color 0.2s ease,
                  transform 0.2s ease;
      cursor: pointer;
      z-index: 5; /* Ensure clickable */
      line-height: 1;
    }
    .item-time:hover {
      color: var(--city-color, #1a73e8);
      font-weight: 600;
      transform: scale(1.1);
    }
    .item-name {
      font-size: 14px;
      font-weight: 500;
      color: #202124;
      display: inline-block;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 150px;
      vertical-align: middle;
    }
    .item-category {
      font-size: 11px;
      color: #86868b;
    }

    .timeline-item .departure-time {
      position: absolute;
      left: 0px;
      bottom: 12px;
      width: 52px;
      text-align: right;
      font-size: 12px;
      font-weight: 500;
      color: #86868b;
      font-family: 'Outfit', sans-serif;
      transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      z-index: 3;
      line-height: 1;
    }
    .timeline-item.current .departure-time,
    .timeline-item.selected .departure-time {
      left: 15px;
    }
    
    .timeline-item .departure-dot {
      position: absolute;
      left: 69px;
      bottom: 13px;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      border: 2px solid var(--city-color);
      background: #ffffff;
      z-index: 3;
    }

    .timeline-item .stay-duration {
      position: absolute;
      left: -10px;
      top: 50%;
      transform: translateY(-50%);
      width: 60px;
      text-align: right;
      font-size: 10px;
      font-weight: 500;
      color: #bdc1c6;
      font-family: 'Outfit', sans-serif;
      transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      z-index: 3;
      line-height: 1.2;
      white-space: normal;
      word-wrap: break-word;
      overflow-wrap: break-word;
    }
    .transit-row .transit-duration {
      position: absolute;
      left: -10px;
      top: 50%;
      transform: translateY(-50%);
      width: 60px;
      text-align: left;
      font-size: 10px;
      font-weight: 500;
      color: #bdc1c6;
      font-family: 'Outfit', sans-serif;
      transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      z-index: 3;
      line-height: 1.2;
      white-space: normal;
      word-wrap: break-word;
      overflow-wrap: break-word;
    }
    .timeline-item.current .stay-duration,
    .timeline-item.selected .stay-duration {
      left: 5px;
    }

    .timeline-item:not(.has-duration) .departure-time,
    .timeline-item:not(.has-duration) .departure-dot,
    .timeline-item:not(.has-duration) .stay-duration {
      display: none !important;
    }

    .timeline-item.has-duration .item-content {
      min-height: 88px;
    }

    .timeline-item:not(.is-last-stop):not(.current):not(.selected) .item-content {
      padding-bottom: 36px;
    }


    .btn-transit-ledger {
      background: transparent;
      border: none;
      color: #1a73e8;
      font-size: 11px; font-weight: 500;
      cursor: pointer;
      margin-left: 4px;
      padding: 2px 6px;
      border-radius: 4px;
      display: inline-flex;
      align-items: center;
      gap: 3px;
      line-height: 1.2;
      transition: all 0.2s ease;
    }
    .btn-transit-ledger:hover {
      color: #1557b0;
      background-color: rgba(26, 115, 232, 0.08);
    }

    .transit-buffer-inline-pill {
      color: #86868b;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 3px;
      font-size: 11px;
      padding: 2px 4px;
      border-radius: 4px;
      transition: all 0.2s ease;
    }
    .transit-buffer-inline-pill:hover {
      color: #1a73e8;
      background-color: rgba(26, 115, 232, 0.08);
    }

    .timeline-item .transport-selector-pill {
      position: absolute;
      left: 85px;
      bottom: 9px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 2px 8px;
      background: #f1f3f4;
      border: none;
      border-radius: 12px;
      font-size: 11px;
      color: #5f6368;
      cursor: pointer;
      z-index: 4;
      transition: background-color 0.2s, color 0.2s;
      line-height: 1.2;
    }
    .timeline-item .transport-selector-pill:hover {
      background: #e8eaed;
      color: #202124;
    }
    .timeline-item.is-last-stop .transport-selector-pill {
      display: none !important;
    }

    /* Transit connecting line and info badge */
    .transit-row-old {
      position: relative;
      padding-left: 85px;
      margin-top: -10px;
      margin-bottom: 10px;
      height: 32px;
      display: flex;
      align-items: center;
    }
    .transit-line {
      position: absolute;
      left: 74px;
      top: 0;
      bottom: 0;
      width: 2px;
      background: var(--city-color);
      z-index: 1;
    }
    .transit-info-old {
      font-size: 11px;
      color: #86868b;
      background: #f8f9fa;
      padding: 3px 8px;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      border: 1px solid #e8eaed;
      z-index: 2;
    }

    /* Two-line transit rows and info badges styling */
    .transit-row {
      position: relative;
      padding-left: 85px;
      margin-top: -10px;
      margin-bottom: 10px;
      min-height: 32px;
      display: flex;
      align-items: center;
    }

    .transit-info {
      font-size: 11px;
      color: #70757a;
      background: transparent;
      padding: 0;
      border-radius: 8px;
      display: inline-flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
      border: none; margin-left: 12px;
      z-index: 2;
    }

    .transit-info-line {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
      width: 100%;
    }

    .transit-info-line.second-line {
      border-top: none;
      padding-top: 0;
      margin-top: 1px;
    }

    .transit-buffer-pill-old {
      font-size: 11px;
      color: #1a73e8;
      background: #f1f3f4;
      padding: 3px 8px;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      border: 1px solid #d2e3fc;
      z-index: 2;
      cursor: pointer;
      margin-left: 8px;
      transition: background-color 0.2s, border-color 0.2s;
    }
    .transit-buffer-pill-old:hover {
      background: #e8f0fe;
      border-color: #1a73e8;
    }
    .transit-buffer-editor {
      display: inline-flex;
      align-items: center;
      z-index: 2;
      margin-left: 8px;
      background: #ffffff;
      border: 1px solid #1a73e8;
      border-radius: 12px;
      padding: 2px 6px;
      box-shadow: 0 1px 2px rgba(60,64,67,0.3);
    }
    .transit-buffer-input {
      border: none;
      outline: none;
      width: 35px;
      font-size: 11px;
      padding: 0;
      margin: 0;
      color: #202124;
      text-align: center;
      font-family: inherit;
    }
    /* Hide input number spinner arrows */
    .transit-buffer-input::-webkit-outer-spin-button,
    .transit-buffer-input::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }
    .transit-buffer-input[type=number] {
      -moz-appearance: textfield;
    }
    .transit-buffer-unit {
      font-size: 11px;
      color: #5f6368;
      margin-left: 2px;
    }

    /* Info details section */
    .timeline-item .item-details {
      font-size: 12px;
      color: #5f6368;
      display: none; /* Collapsed by default */
      flex-direction: column;
      gap: 4px;
      margin-top: 0px;
      overflow: hidden;
    }
    .item-desc {
      color: #5f6368;
      line-height: 1.5;
    }
    .item-finance {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }
    .price-val {
      font-weight: 500;
    }
    .price-val.actual {
      color: #202124;
    }
    .price-val.actual.overspent {
      color: #d93025;
    }
    .free-badge {
      color: #202124;
      font-weight: 500;
    }

    /* ===== TIMELINE ITEM CONTENT HOVER & POINTER ===== */
    .timeline-item .item-content {
      cursor: pointer;
      padding: 12px 16px 12px 0px; /* Aligns text name exactly at 85px indent */
      border-radius: 8px;
      transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                  padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                  box-shadow 0.3s ease;
    }
    .timeline-item .item-content:hover {
      background: #f8f9fa;
    }

    /* ===== CURRENT PROCESS HIGHLIGHT CARD (COVERING TIME & LINE) ===== */
    .timeline-item.current {
      padding-left: 0; /* Spans starting from the very left edge (x = 0) */
      margin-bottom: 20px;
      margin-top: 0;
    }
    .timeline-item.current .item-content {
      background: #ffffff;
      border: 1.5px solid var(--city-color);
      border-radius: 8px;
      padding: 10.5px 14.5px 34.5px 83.5px; /* Indent content exactly to align with other stops */
      position: relative;
      box-shadow: 0 4px 24px rgba(26, 115, 232, 0.16), 0 2px 12px rgba(26, 115, 232, 0.12);
    }
    .timeline-item.current .item-content:hover {
      background: #ffffff;
      box-shadow: 0 6px 32px rgba(26, 115, 232, 0.22), 0 4px 16px rgba(26, 115, 232, 0.16);
    }
    .timeline-item.current .item-dot {
      left: 69px; /* Centered exactly on the timeline line at 75px */
      top: 17px;  /* Centered vertically with text row inside card */
      background: var(--city-color); /* Filled solid dot */
      border-color: var(--city-color);
      z-index: 3; /* Above the card background */
      box-shadow: 0 0 0 4px var(--pulse-color);
      animation: pulse-active 1.5s infinite;
    }
    .timeline-item.current .item-time {
      left: 15px; /* Time is inside the card now, aligned on the left */
      top: 12px;  /* Centered vertically */
      z-index: 3;
    }
    .timeline-item.current .item-details {
      padding-left: 0; /* Align directly under name inside card */
    }
    
    @keyframes pulse-active {
      0% { box-shadow: 0 0 0 0 var(--pulse-color); }
      70% { box-shadow: 0 0 0 6px var(--pulse-color-transparent); }
      100% { box-shadow: 0 0 0 0 var(--pulse-color-transparent); }
    }

    /* ===== SELECTED STOP HIGHLIGHT CARD (GREY) ===== */
    .timeline-item.selected {
      padding-left: 0; /* Spans starting from the very left edge (x = 0) */
      margin-bottom: 20px;
      margin-top: 0;
    }
    .timeline-item.selected .item-content {
      background: #ffffff;
      border: 1px solid var(--city-color);
      border-radius: 8px;
      padding: 11px 15px 35px 84px;
      position: relative;
      box-shadow: 0 4px 20px rgba(26, 115, 232, 0.12), 0 2px 8px rgba(26, 115, 232, 0.08);
    }
    .timeline-item.selected .item-content:hover {
      background: #ffffff;
      box-shadow: 0 0 24px rgba(0, 0, 0, 0.08), 0 8px 32px rgba(0, 0, 0, 0.12);
    }
    .timeline-item.selected .item-dot {
      left: 69px;
      top: 17px;
      background: var(--city-color);
      border-color: var(--city-color);
      z-index: 3;
      box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
    }
    .timeline-item.selected .item-time {
      left: 15px;
      top: 12px;
      z-index: 3;
    }
    .timeline-item.selected .item-details {
      padding-left: 0;
    }

    /* Interactive Links */
    .action-link {
      color: #1a73e8;
      text-decoration: none;
      cursor: pointer;
      font-weight: 500;
    }
    .action-link:hover {
      text-decoration: underline;
    }

    /* Micro Inline Form */
    .inline-ledger-form {
      display: none;
      align-items: center;
      gap: 8px;
      margin-top: 4px;
      flex-wrap: wrap;
    }
    .inline-input {
      font-size: 11px;
      padding: 2px 6px;
      border: 1px solid #dadce0;
      border-radius: 4px;
      outline: none;
      color: #202124;
    }
    .inline-input:focus {
      border-color: #1a73e8;
    }
    .btn-submit {
      color: #1a73e8;
      font-weight: 600;
      cursor: pointer;
      font-size: 11px;
      background: none;
      border: none;
    }
    .btn-cancel {
      color: #5f6368;
      cursor: pointer;
      font-size: 11px;
      background: none;
      border: none;
    }

    /* Receipt Style for Stop Expenses */
    .stop-receipt {
      background: #f8f9fa;
      border: 1px dashed #dadce0;
      border-radius: 4px;
      padding: 8px 12px;
      margin-bottom: 8px;
      font-family: 'Outfit', sans-serif;
    }
    .stop-receipt-header {
      font-size: 11px;
      font-weight: 700;
      color: #86868b;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 6px;
      border-bottom: 1px dashed #dadce0;
      padding-bottom: 4px;
      display: flex;
      justify-content: space-between;
    }
    .stop-receipt-item {
      display: flex;
      justify-content: space-between;
      font-size: 12px;
      color: #3c4043;
      padding: 3px 0;
    }
    .stop-receipt-item .desc {
      color: #5f6368;
    }
    .stop-receipt-item .amount {
      font-weight: 600;
      color: #202124;
    }

    .action-btn-add {
      background: #f1f3f4;
      border: none;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: #5f6368;
      transition: all 0.2s ease;
      vertical-align: middle;
      margin-left: 8px;
    }
    .action-btn-add:hover {
      background: var(--city-color, #1a73e8);
      color: #ffffff;
      transform: scale(1.1);
    }

    /* ===== LEVEL 2: DATES (COLLAPSIBLE) ===== */
    .day-group {
      position: relative;
      margin: 16px 0;
    }
    .day-header {
      position: relative;
      padding: 8px 16px 8px 85px; /* Left indent to align with timeline */
      cursor: pointer;
      user-select: none;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
    }
    .day-group.active-highlight > .day-header,
    .day-group.active-highlight > .day-header:hover {
      background: transparent !important;
    }
    .day-header:hover {
      background: #f8f9fa;
      border-radius: 4px;
    }
    
    /* Day time positioned absolutely on the left axis */
    .day-time {
      position: absolute;
      left: 0px;
      top: 20px;
      transform: translateY(-50%);
      width: 64px;
      text-align: right;
      font-family: 'Outfit', sans-serif;
      line-height: 1.2;
      transition: font-size 0.2s ease, color 0.2s ease;
    }
    .day-group.collapsed .day-time {
      font-size: 15px !important;
      color: #8e8e93 !important;
      font-weight: 500 !important;
    }
    
    /* Day dot marker positioned absolutely on the vertical timeline */
    .day-dot {
      position: absolute;
      left: 71px; /* Center at 75px (75 - 4 = 71px) */
      top: 20px;
      transform: translateY(-50%);
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--city-color);
      z-index: 2;
      border: 2px solid #ffffff; /* White background to cut through line */
      box-shadow: 0 0 0 1.5px var(--city-color); /* Double ring effect */
    }
    
    /* Day label continuous vertical line segment */
    .day-header::after {
      content: '';
      position: absolute;
      left: 74px;
      top: -16px;    /* Extend up through margin */
      bottom: -16px; /* Extend down through margin */
      width: 2px;
      background: var(--city-color);
      z-index: 1;
      display: none; /* Relies on background line, but kept for fallback */
    }

    .day-label-text {
      font-size: 12.5px;
      color: #3c4043;
      font-weight: 600;
    }
    .day-weather-badge {
      font-size: 11px;
      color: #5f6368;
      background: #f1f3f4;
      padding: 2px 8px;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      vertical-align: middle;
    }
    .day-weather-badge.warning {
      background: #fce8e6;
      color: #c5221f;
      font-weight: 500;
    }
    .day-stats-old {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-left: auto;
      margin-right: 12px;
      font-size: 11px;
      color: #5f6368;
      font-family: var(--font-sans);
    }
    .day-stats .day-stat-item {
      display: inline-flex;
      align-items: center;
      gap: 2px;
    }
    .day-stats .day-stat-item b {
      font-weight: 600;
    }
    .day-stats .day-stat-item.actual b {
      color: #d93025; /* var(--accent-pink) */
    }
    .day-stats .day-stat-item.budget b {
      color: #1a73e8; /* var(--accent-primary) */
    }
    .day-stats .day-stat-divider {
      color: #dadce0;
    }

    /* New grey unobtrusive day-stats */
    .day-stats {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-left: auto;
      margin-right: 12px;
      font-size: 10px;
      color: #86868b;
      font-family: var(--font-sans);
    }
    .day-stats .day-stat-item {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      color: #86868b;
    }
    .day-stats .day-stat-item b {
      font-weight: 500;
      color: #86868b;
    }
    .day-stats .day-stat-item.actual b {
      color: #86868b;
    }
    .day-stats .day-stat-item.budget b {
      color: #86868b;
    }
    .day-stats .day-stat-divider {
      color: #e8eaed;
    }
    .weather-alert-tag {
      background: #c5221f;
      color: #ffffff;
      padding: 0 4px;
      border-radius: 3px;
      font-size: 9px;
      font-weight: 600;
    }
    .day-toggle-link {
      font-size: 13px;
      color: #86868b;
      cursor: pointer;
      margin-left: auto; /* Push to far right */
      transition: color 0.2s ease;
      user-select: none;
      margin-right: 16px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .day-toggle-link:hover {
      color: var(--city-color);
    }
    .day-body
    .weather-warning-banner {
      background: #fce8e6;
      border-left: 3px solid #c5221f;
      color: #c5221f;
      padding: 8px 12px;
      border-radius: 4px;
      font-size: 11px;
      display: flex;
      align-items: center;
      gap: 6px;
      margin: 6px 16px 8px 85px; /* Indent to align with stops */
    }
    .stop-weather-alert-tag {
      background: #fce8e6;
      color: #c5221f;
      padding: 1px 6px;
      border-radius: 4px;
      font-size: 10.5px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 3px;
      margin-left: 8px;
      vertical-align: middle;
      border: 1px solid rgba(197, 34, 31, 0.15);
      cursor: help;
    }
    .stop-weather-warning-banner {
      background: #fce8e6;
      border-left: 3px solid #c5221f;
      color: #c5221f;
      padding: 8px 12px;
      border-radius: 4px;
      font-size: 11px;
      display: flex;
      align-items: flex-start;
      gap: 6px;
      margin-top: 4px;
      margin-bottom: 8px;
      line-height: 1.4;
    }
    .stop-car-warning-banner {
      background: #fbf0fa;
      border-left: 3px solid #a21caf;
      color: #a21caf;
      padding: 8px 12px;
      border-radius: 4px;
      font-size: 11px;
      display: flex;
      align-items: flex-start;
      gap: 6px;
      margin-top: 4px;
      margin-bottom: 8px;
      line-height: 1.4;
    }

    /* Stop details sections */
    .stop-section {
      margin-top: 12px;
      border-top: 1px dashed #e8eaed;
      padding-top: 8px;
    }
    .stop-section:first-child {
      border-top: none;
      padding-top: 0;
    }
    .stop-section-lbl {
      font-size: 11px;
      font-weight: 500;
      color: #5f6368;
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 4px;
    }
    .stop-section-lbl i {
      color: #b0b3b8; /* Lighter grey for thin icons */
      font-size: 12px;
    }
    .stop-section-txt {
      font-size: 12px;
      color: #3c4043;
      line-height: 1.6;
    }
    .btn-navigate:hover {
      background: rgba(26, 115, 232, 0.08) !important;
    }

    /* Stop Todos list */
    .stop-todos-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-top: 6px;
    }
    .stop-todo-item {
      background: transparent;
      border: none;
      border-bottom: 1px solid #f1f3f4;
      border-radius: 0;
      padding: 8px 0;
      transition: all 0.2s ease;
      position: relative;
      cursor: pointer;
    }
    .stop-todo-item:last-child {
      border-bottom: none;
    }
    .stop-todo-item.done {
      background: transparent;
      border-color: transparent;
    }
    .stop-todo-item.done .todo-title {
      text-decoration: line-through;
      color: #86868b;
    }

    /* Stop Finance list */
    .stop-finance-list {
      display: flex;
      flex-direction: column;
      margin-top: 6px;
    }
    .stop-finance-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid #f1f3f4;
      padding: 8px 0;
      font-size: 12px;
      color: #3c4043;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .stop-finance-item:hover {
      background: rgba(60, 64, 67, 0.04);
      padding-left: 6px;
      padding-right: 6px;
      border-radius: 4px;
    }
    .stop-finance-item:last-child {
      border-bottom: none;
    }
    .stop-finance-item .finance-desc {
      color: #5f6368;
    }
    .stop-finance-item .finance-amount {
      font-weight: 600;
      color: #202124;
    }

    /* Plus Buttons for Todo and Expense */
    .add-todo-btn, .add-expense-btn {
      background: none !important;
      border: none !important;
      color: #86868b !important;
      font-size: 14px !important;
      cursor: pointer !important;
      padding: 4px 6px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      transition: all 0.2s ease !important;
      border-radius: 4px !important;
    }
    .add-todo-btn:hover, .add-expense-btn:hover {
      color: #1a73e8 !important;
      background: rgba(26, 115, 232, 0.08) !important;
    }

    /* Time Drag Tooltip */
    #time-drag-tooltip {
      position: fixed;
      display: none;
      background: rgba(255, 255, 255, 0.9);
      backdrop-filter: blur(8px);
      border: 1px solid rgba(26, 115, 232, 0.3);
      padding: 8px 12px;
      border-radius: 8px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
      z-index: 2000;
      pointer-events: none;
      font-size: 12px;
      font-weight: 600;
      color: #1a73e8;
      font-family: 'Outfit', sans-serif;
      align-items: center;
      gap: 6px;
    }
    
    /* Time Drag Ruler styling */
    .time-drag-ruler {
      position: fixed;
      width: 100px;
      height: 400px;
      margin-top: -200px;
      background: rgba(255, 255, 255, 0.95);
      border-radius: 12px;
      box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
      border: 1px solid rgba(0, 0, 0, 0.08);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      z-index: 1999;
      pointer-events: none;
      font-family: 'Outfit', sans-serif;
      transition: opacity 0.2s ease;
      opacity: 0.95;
    }
    .ruler-line {
      position: absolute;
      left: 20px;
      top: 15px;
      bottom: 15px;
      width: 2px;
      background: linear-gradient(to bottom, rgba(26, 115, 232, 0) 0%, rgba(26, 115, 232, 0.4) 10%, rgba(26, 115, 232, 0.4) 90%, rgba(26, 115, 232, 0) 100%);
    }
    .ruler-ticks {
      position: absolute;
      left: 20px;
      top: 200px;
    }
    .ruler-tick {
      position: absolute;
      left: 0;
      top: 0;
      display: flex;
      align-items: center;
      transform: translateY(var(--offset-y));
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .ruler-tick::before {
      content: '';
      display: block;
      width: 8px;
      height: 1px;
      background: rgba(128, 128, 128, 0.4);
      margin-right: 8px;
      transition: all 0.2s ease;
    }
    .ruler-tick-label {
      font-size: 10px;
      color: #86868b;
      white-space: nowrap;
      transition: all 0.2s ease;
    }
    .ruler-tick.active::before {
      width: 18px;
      height: 2px;
      background: #1a73e8;
      box-shadow: 0 0 6px rgba(26, 115, 232, 0.5);
    }
    .ruler-tick.active .ruler-tick-label {
      color: #1a73e8;
      font-weight: 700;
      font-size: 12px;
      transform: scale(1.1);
      text-shadow: 0 0 8px rgba(26, 115, 232, 0.25);
    }
    .time-adjust-active {
      transform: scale(1.15) !important;
      background: #ffffff !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
      border-radius: 4px !important;
      padding: 2px 6px !important;
      z-index: 100 !important;
      color: #1a73e8 !important;
      border: 1px solid rgba(26, 115, 232, 0.3) !important;
      cursor: ns-resize !important;
    }
    .time-adjust-active span {
      color: #1a73e8 !important;
      font-weight: 700 !important;
    }
    body.time-adjusting-body

    /* Toast Notification */
    .toast-notification {
      position: fixed;
      bottom: 24px;
      left: 50%;
      transform: translateX(-50%) translateY(20px);
      background: rgba(32, 33, 36, 0.9);
      color: #ffffff;
      padding: 10px 20px;
      border-radius: 20px;
      font-size: 13px;
      font-weight: 500;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
      z-index: 2500;
      opacity: 0;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      display: flex;
      align-items: center;
      gap: 8px;
      pointer-events: none;
    }
    .toast-notification.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    /* Todo Modal Overlay */
    .todo-modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.4);
      display: none; /* Hidden by default */
      align-items: center;
      justify-content: center;
      z-index: 1000;
      backdrop-filter: blur(4px);
      animation: fadeIn 0.2s ease;
    }
    
    /* Todo Modal Card */
    .todo-modal-card {
      background: #ffffff;
      width: 90%;
      max-width: 420px;
      border-radius: 12px;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
      padding: 20px;
      position: relative;
      animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    @keyframes slideUp {
      from { transform: translateY(20px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }

    .todo-modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 16px;
      border-bottom: 1px solid #f1f3f4;
      padding-bottom: 12px;
    }
    .todo-modal-title {
      font-size: 15px;
      font-weight: 600;
      color: #202124;
    }
    .todo-modal-close {
      background: none;
      border: none;
      font-size: 22px;
      color: #86868b;
      cursor: pointer;
      padding: 4px;
      line-height: 1;
    }
    .todo-modal-close:hover {
      color: #202124;
    }
    
    .todo-modal-body
    
    .todo-field-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .todo-field-group label {
      font-size: 11px;
      font-weight: 600;
      color: #5f6368;
    }
    .todo-modal-input {
      width: 100%;
      padding: 8px 12px;
      border: 1px solid #dadce0;
      border-radius: 6px;
      font-size: 13px;
      color: #202124;
      outline: none;
      box-sizing: border-box;
      background: #f8f9fa;
      transition: all 0.2s ease;
    }
    .todo-modal-input:focus {
      background: #ffffff;
      border-color: #1a73e8;
      box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.15);
    }
    
    .todo-modal-upload-box {
      border: 2px dashed #dadce0;
      border-radius: 8px;
      padding: 16px;
      text-align: center;
      cursor: pointer;
      background: #f8f9fa;
      transition: all 0.2s ease;
    }
    .todo-modal-upload-box:hover {
      background: #f1f3f4;
      border-color: #1a73e8;
    }
    
    .todo-modal-footer {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      margin-top: 20px;
      border-top: 1px solid #f1f3f4;
      padding-top: 14px;
    }
    
    .todo-modal-btn {
      padding: 8px 16px;
      border-radius: 6px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      border: none;
      transition: all 0.2s ease;
    }
    .todo-modal-btn.primary {
      background: #1a73e8;
      color: #ffffff;
    }
    .todo-modal-btn.primary:hover {
      background: #1557b0;
    }
    .todo-modal-btn.secondary {
      background: #f1f3f4;
      color: #5f6368;
    }
    .todo-modal-btn.secondary:hover {
      background: #e8eaed;
      color: #202124;
    }
    .todo-modal-btn.danger {
      background: #fce8e6;
      color: #d93025;
      margin-right: auto;
    }
    .todo-modal-btn.danger:hover {
      background: #fadddd;
    }
    .todo-main-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .todo-checkbox-label {
      display: flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      font-size: 12px;
      font-weight: 500;
      color: #202124;
    }
    .todo-checkbox-label input {
      display: none;
    }
    .todo-checkbox-custom {
      width: 15px;
      height: 15px;
      border: 1.5px solid #dadce0;
      border-radius: 50%; /* Circular checkbox */
      display: inline-block;
      position: relative;
      transition: all 0.2s ease;
      background: #ffffff;
    }
    .todo-checkbox-label:hover .todo-checkbox-custom {
      border-color: #202124;
      background: rgba(32, 33, 36, 0.04);
    }
    .todo-checkbox-label input:checked + .todo-checkbox-custom {
      background: #202124;
      border-color: #202124;
    }
    .todo-checkbox-label input:checked + .todo-checkbox-custom::after {
      content: '';
      position: absolute;
      left: 4.5px;
      top: 1.5px;
      width: 4px;
      height: 7px;
      border: solid #ffffff;
      border-width: 0 1.5px 1.5px 0;
      transform: rotate(45deg);
    }
    .todo-action-btn {
      font-size: 11px;
      color: #1a73e8;
      font-weight: 600;
      cursor: pointer;
      user-select: none;
    }
    .todo-action-btn:hover {
      text-decoration: underline;
    }
    .todo-edit-btn {
      font-size: 11px;
      color: #5f6368;
      cursor: pointer;
      margin-left: auto;
      align-self: center;
      user-select: none;
    }
    .todo-edit-btn:hover {
      color: #202124;
      text-decoration: underline;
    }
    .todo-completed-details {
      margin-top: 6px;
      padding-top: 6px;
      border-top: 1px dashed #dadce0;
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }
    .todo-info-badge {
      font-size: 11px;
      color: #5f6368;
      background: #f1f3f4;
      padding: 2px 6px;
      border-radius: 4px;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .todo-voucher-img-container {
      width: 32px;
      height: 32px;
      border-radius: 4px;
      overflow: hidden;
      border: 1px solid #dadce0;
      cursor: pointer;
      background: #f1f3f4;
      transition: transform 0.2s ease;
    }
    .todo-voucher-img-container:hover {
      transform: scale(1.1);
    }
    .todo-voucher-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    /* Todo submit form styling */
    .todo-submit-form {
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid #e8eaed;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .todo-form-title {
      font-size: 11px;
      font-weight: 600;
      color: #202124;
    }
    .todo-form-field {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .todo-form-field label {
      font-size: 10px;
      color: #5f6368;
    }
    .todo-form-field input[type="text"] {
      font-size: 11px;
      padding: 4px 8px;
      border: 1px solid #dadce0;
      border-radius: 4px;
      outline: none;
    }
    .todo-form-field input[type="text"]:focus {
      border-color: #1a73e8;
    }
    .todo-file-upload-box {
      border: 1px dashed #dadce0;
      border-radius: 4px;
      padding: 10px;
      text-align: center;
      cursor: pointer;
      background: #ffffff;
      transition: all 0.2s ease;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
    .todo-file-upload-box:hover {
      border-color: #1a73e8;
      background: rgba(26, 115, 232, 0.01);
    }
    .todo-form-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 4px;
    }
    .todo-form-btn {
      font-size: 11px;
      padding: 4px 10px;
      border-radius: 4px;
      border: 1px solid #dadce0;
      cursor: pointer;
      background: #ffffff;
      font-weight: 500;
    }
    .todo-form-btn.save {
      background: #1e8e3e;
      border-color: #1e8e3e;
      color: #ffffff;
    }
    .todo-form-btn.save:hover {
      background: #1b8137;
    }
    .todo-form-btn.cancel {
      color: #5f6368;
    }
    .todo-form-btn.cancel:hover {
      background: #f1f3f4;
    }

    /* Fullscreen Image Lightbox Modal */
    .lightbox-modal {
      display: none;
      position: fixed;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.85);
      z-index: 10000;
      align-items: center;
      justify-content: center;
      cursor: zoom-out;
    }
    .lightbox-content {
      max-width: 90%;
      max-height: 90%;
      border-radius: 8px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    }

    /* Flash Highlight Animation */
    @keyframes flash-green {
      0% { background-color: rgba(30, 142, 62, 0.15); }
      100% { background-color: transparent; }
    }
    .flash-update {
      animation: flash-green 1s ease;
    }
  

/* AI Guide Chat Buttons on Timeline */
.btn-guide-chat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: #1a73e8;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
}
/* Spot button - only visible when timeline item is selected/current */
.timeline-item.current .btn-guide-chat--spot,
.timeline-item.selected .btn-guide-chat--spot {
  opacity: 0.7;
  pointer-events: auto;
}
/* Day button - only visible when day card is not collapsed */
.day-group:not(.collapsed) .btn-guide-chat--day {
  opacity: 0.7;
  pointer-events: auto;
}
/* City button - only visible when city group expanded */
.city-group:not(.collapsed) .btn-guide-chat--city {
  opacity: 0.7;
  pointer-events: auto;
}
.btn-guide-chat:hover {
  opacity: 1 !important;
  background: transparent;
  color: #1557b0;
  transform: scale(1.15);
}
/* City button positioned in the title wrapper */
.btn-guide-chat--city {
  margin-left: 10px;
  opacity: 0;
  pointer-events: none;
}
.city-group:not(.collapsed) .btn-guide-chat--city {
  opacity: 0.7;
  pointer-events: auto;
}
/* Spot button in time column - hidden by default, visible when expanded */
.btn-guide-chat--spot {
  width: 22px;
  height: 22px;
  border-radius: 11px;
  font-size: 10px;
  margin: 0 auto;
}
/* Day button */
.btn-guide-chat--day {
  width: 22px;
  height: 22px;
  border-radius: 11px;
  font-size: 10px;
}


/* Todo badge on timeline items */
.todo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #d93025;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}
.item-header-row .todo-badge {
  margin-left: 6px;
}
/* Todo badge on the left of timeline (next to time) */
/* Todo badge on the left of timeline (below the time) */
.todo-badge-time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #d93025;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  margin-top: 4px;
}
/* Clear and compress context buttons */
.guide-tool-btn {
  border: none;
  background: transparent;
  color: #9aa0a6;
  font-size: 13px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.guide-tool-btn:hover {
  background: rgba(0,0,0,0.06);
  color: #5f6368;
}
.guide-tool-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Guide AI Sidebar thinking indicator */
.guide-thinking-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}

.guide-thinking-dot {
  width: 6px;
  height: 6px;
  background-color: #1a73e8;
  border-radius: 50%;
  opacity: 0.4;
  animation: guide-thinking-pulse 1.4s infinite both;
}

.guide-thinking-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.guide-thinking-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes guide-thinking-pulse {
  0%, 100% {
    transform: scale(0.8);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Guide AI Sidebar update to itinerary button */
.btn-update-to-itinerary {
  background: #f1f3f4;
  border: 1px solid #dadce0;
  color: #5f6368;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-update-to-itinerary:hover {
  background: #e8eaed;
  color: #202124;
  border-color: #bdc1c6;
}

.btn-update-to-todo {
  background: #e8f0fe;
  border: 1px solid #d2e3fc;
  color: #1a73e8;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-update-to-todo:hover {
  background: #d2e3fc;
  color: #185abc;
  border-color: #aecbfa;
}

/* Guide AI Sidebar Resizer styling */
.guide-ai-sidebar-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 1300;
  background: transparent;
  transition: background 0.2s;
}

.guide-ai-sidebar-resizer:hover,
.guide-ai-sidebar-resizer.is-dragging {
  background: rgba(26, 115, 232, 0.25);
  border-right: 1px solid rgba(26, 115, 232, 0.4);
}

/* Guide Msg time stamp */
.guide-msg__time {
  font-size: 9px;
  opacity: 0.6;
  margin-top: 4px;
  align-self: flex-end;
  color: inherit;
}

.acc-selector-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: #f1f3f4;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  color: #5f6368;
  cursor: pointer;
  margin-left: 8px;
  transition: all 0.2s ease;
  vertical-align: middle;
}
.acc-selector-pill:hover {
  background: #e8eaed;
  border-color: #bdc1c6;
  color: #202124;
}

.btn-edit-stop-inline {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.btn-edit-stop-inline:hover {
  opacity: 1;
}

.empty-placeholder {
  color: #9aa0a6;
  font-size: 11px;
  padding: 4px 0;
  font-style: italic;
}

/* Stop Card Actions and More Option Buttons */
.item-right-finance {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stop-card-actions {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: 10px;
}

/* body.edit-mode-active .stop-card-actions {
  display: inline-flex !important;
} */

.btn-action-stop {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 11px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-action-stop:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-primary);
  border-color: rgba(37, 99, 235, 0.2);
}

.btn-action-stop.btn-delete-stop:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-stop-more {
  display: none !important;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 8px;
  transition: var(--transition-fast);
}

.btn-stop-more:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-primary);
  border-color: rgba(37, 99, 235, 0.2);
}

body.edit-mode-active .btn-stop-more {
  display: inline-flex !important;
}

#btn-edit-itinerary {
  display: none !important;
}

/* City Order Modal Styles */
.city-order-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f8f9fa;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: background-color 0.2s;
}
.city-order-list-item:hover {
  background: #f1f3f4;
}
.city-order-item-name {
  font-size: 14px;
  font-weight: 500;
  color: #202124;
  display: flex;
  align-items: center;
  gap: 8px;
}
.city-order-item-actions {
  display: flex;
  gap: 6px;
}
.btn-city-order-move {
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #5f6368;
  transition: all 0.2s;
}
.btn-city-order-move:hover:not(:disabled) {
  background: #f1f3f4;
  border-color: #c3c4c8;
  color: #202124;
}
.btn-city-order-move:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-city-order-move.btn-delete-city-item:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
  color: #ef4444 !important;
}
.category-breakdown-row:hover {
  background-color: #f1f3f4 !important;
}
.category-details-list > div:hover {
  background-color: #f8f9fa !important;
  color: #1a73e8 !important;
}

/* Drag and Drop Styling for City Order */
.city-order-list-item {
  cursor: grab;
  user-select: none;
}
.city-order-list-item.dragging {
  opacity: 0.4;
  border: 1px dashed var(--accent-primary) !important;
  background-color: rgba(26, 115, 232, 0.04) !important;
}
.city-order-list-item.drag-over {
  border: 1px solid var(--accent-primary) !important;
  background-color: rgba(26, 115, 232, 0.08) !important;
}

    .btn-transit-icon {
      color: #1a73e8;
      font-size: 11px;
      cursor: pointer;
      margin-left: 4px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      transition: all 0.2s ease;
    }
    .btn-transit-icon:hover {
      background-color: rgba(26, 115, 232, 0.08);
    }
    .btn-transit-icon.recorded {
      color: #86868b;
    }
    .btn-transit-icon.recorded:hover {
      color: #202124;
      background-color: rgba(0, 0, 0, 0.05);
    }

    /* Collapsed weekday and date style adjustments */
    .day-group.collapsed .day-time span:last-child {
      display: none !important;
    }
    .day-group.collapsed .day-time span:first-child {
      font-size: inherit !important;
      color: inherit !important;
      font-weight: inherit !important;
    }
