/* ============================================
   国际物流报价系统 — 全局样式表 v2
   设计系统：侧边栏布局 + 新色彩体系
   ============================================ */

/* ── CSS Variables ── */
:root {
  --primary: #534AB7;
  --primary-hover: #3C3489;
  --primary-light: #EEEDFE;
  --green: #639922;
  --green-hover: #3B6D11;
  --green-bg: #EAF3DE;
  --amber: #EF9F27;
  --amber-bg: #FAEEDA;
  --red: #E24B4A;
  --red-bg: #FCEBEB;
  --blue-light: #E6F1FB;
  --purple: #993356;
  --purple-bg: #FBEAF0;
  --bg: #F5F4F0;
  --card: #FFFFFF;
  --text: #2C2C2A;
  --text-secondary: #5F5E5A;
  --text-muted: #888780;
  --border: #E3E1DA;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --sidebar-w: 220px;
  --sidebar-collapsed: 56px;
}

/* ── Reset & Base ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); font-size: 13px; line-height: 1.5; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout: Sidebar + Main ── */
.layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar { width: var(--sidebar-w); background: #1A1844; color: #fff; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-logo { padding: 18px 16px 14px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-logo img { width: 100%; height: auto; display: block; border-radius: 4px; filter: brightness(0) invert(0.92); opacity: 0.9; }
.sidebar-nav { flex: 1; padding: 8px 0; }
.sidebar-nav .nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 18px; color: rgba(255,255,255,0.6); cursor: pointer; font-size: 13px; transition: all .12s; border-left: 3px solid transparent; text-decoration: none; }
.sidebar-nav .nav-item:hover { background: #272459; color: #fff; text-decoration: none; }
.sidebar-nav .nav-item.active { background: rgba(83,74,183,0.25); color: #fff; border-left-color: var(--primary); }
.sidebar-nav .nav-icon { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.sidebar-nav .nav-label { flex: 1; }
.sidebar-nav .nav-badge { background: var(--red); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 500; }
.sidebar-nav .nav-badge.amber { background: var(--amber); }
.sidebar-footer { padding: 12px 18px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 11px; color: rgba(255,255,255,0.35); }
.sidebar-user { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sidebar-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; flex-shrink: 0; }
.sidebar-name { font-size: 12px; color: rgba(255,255,255,0.7); }

/* Main */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 28px; background: var(--card); border-bottom: 0.5px solid var(--border); flex-shrink: 0; }
.topbar h2 { font-size: 16px; font-weight: 500; }
.topbar-brand { flex: 1; text-align: center; font-size: 12px; color: var(--text-muted); letter-spacing: 1px; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.content { padding: 20px 28px; flex: 1; }

/* ── App container (legacy support) ── */
.app { max-width: 1100px; margin: 0 auto; }

/* ── Header (legacy) ── */
.hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.hdr h1 { font-size: 18px; font-weight: 500; }

/* ── Navigation (legacy top bar, used for fallback) ── */
.nav { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; background: var(--card); border-radius: var(--radius-lg); padding: 6px; border: 0.5px solid var(--border); }
.nav a { padding: 7px 14px; border-radius: var(--radius-md); font-size: 12px; font-weight: 500; color: var(--text-secondary); text-decoration: none; display: flex; align-items: center; gap: 6px; }
.nav a:hover { background: #F0EFEA; text-decoration: none; }
.nav a.active { background: var(--primary); color: #fff; }
.nav .nav-spacer { flex: 1; }

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.tab { padding: 7px 16px; border-radius: var(--radius-sm); border: none; background: transparent; color: var(--text-secondary); cursor: pointer; font-size: 12px; font-family: inherit; font-weight: 500; }
.tab:hover { background: #F0EFEA; }
.tab.active { background: var(--primary); color: #fff; }

/* ── Stats Bar ── */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--card); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 14px; text-align: center; }
.stat .num { font-size: 22px; font-weight: 500; }
.stat .lbl { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.stat.rus .num{color:#27500A;} .stat.eur .num{color:#0C447C;} .stat.ca .num{color:#854F0B;} .stat.lcl .num{color:var(--purple);}

/* ── Metric Cards (Dashboard) ── */
.metric-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.metric-card { background: var(--card); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; }
.metric-card .num { font-size: 24px; font-weight: 500; margin: 4px 0 2px; }
.metric-card .lbl { font-size: 11px; color: var(--text-muted); }
.metric-card .change { font-size: 11px; margin-top: 4px; }

/* ── Quick Actions ── */
.quick-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; margin-bottom: 16px; }
.quick-item { text-align: center; padding: 14px 8px; background: var(--card); border: 0.5px solid var(--border); border-radius: var(--radius-md); cursor: pointer; transition: all .1s; }
.quick-item:hover { border-color: var(--primary); background: #FAFAFF; }
.quick-item .qi-icon { font-size: 22px; margin-bottom: 4px; }
.quick-item .qi-label { font-size: 11px; color: var(--text-secondary); }

/* ── Search Area ── */
.search-area { background: var(--card); border-radius: var(--radius-lg); padding: 16px 20px; border: 0.5px solid var(--border); margin-bottom: 16px; display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.search-area .field { flex: 1; min-width: 130px; }
.search-area .field label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; font-weight: 500; }
.search-area .field select, .search-area .field input { width: 100%; padding: 8px 10px; border: 0.5px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; background: var(--card); color: var(--text); font-family: inherit; }
.search-area .field select:focus, .search-area .field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(83,74,183,0.12); }

/* ── Legacy .field (for non-search-area contexts) ── */
.field label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; font-weight: 500; }
.field select, .field input { width: 100%; padding: 8px 10px; border: 0.5px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; background: var(--card); color: var(--text); font-family: inherit; }
.field select:focus, .field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(83,74,183,0.12); }

/* ── Buttons ── */
.btn { padding: 7px 16px; border-radius: var(--radius-sm); border: 0.5px solid var(--border); background: var(--card); color: var(--text-secondary); font-size: 12px; cursor: pointer; font-family: inherit; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.btn:hover { background: #F0EFEA; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-green { background: var(--green); color: #fff; border-color: var(--green); }
.btn-green:hover { background: var(--green-hover); }
.btn-calc { padding: 8px 20px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap; font-family: inherit; height: 33px; }
.btn-calc:hover { background: var(--primary-hover); }
.btn-sm { padding: 4px 10px; font-size: 11px; }
.btn-danger { color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red-bg); }

/* ── Cards (general) ── */
.card { background: var(--card); border: 0.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 14px; }
.card-header { padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 0.5px solid var(--border); }
.card-header h3 { font-size: 14px; font-weight: 500; }
.card-body { padding: 20px; }
.card-body-nopad { padding: 0; }

/* ── Result Card ── */
.result { background: var(--card); border: 0.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 14px; }
.result-head { padding: 14px 20px; background: #FAFAF8; display: flex; align-items: center; justify-content: space-between; border-bottom: 0.5px solid var(--border); }
.result-head h3 { font-size: 15px; color: var(--green-hover); }
.result-close { margin-left: auto; width: 24px; height: 24px; border: none; background: transparent; color: var(--text-muted); font-size: 20px; line-height: 1; cursor: pointer; border-radius: 6px; }
.result-close:hover { background: #EDEBE4; color: var(--text); }

/* ── 数据中心：搜索/排序工具栏 ── */
.dm-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.dm-search { flex: 1; min-width: 220px; padding: 8px 12px; border: 0.5px solid var(--border); border-radius: 6px; font-size: 12px; font-family: inherit; background: var(--card); }
.dm-search:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.dm-sort { padding: 8px 10px; border: 0.5px solid var(--border); border-radius: 6px; font-size: 12px; font-family: inherit; background: var(--card); }
.dm-count { font-size: 11px; color: var(--text-muted); margin-left: auto; white-space: nowrap; }
.dm-ops { white-space: nowrap; }
.cli-btn-ok { color: var(--green-hover); border-color: var(--green); background: var(--green-bg); }
.cli-btn-ok:hover { background: #DCEAC8; }
.result-body { padding: 20px; }
.price-big { font-size: 28px; font-weight: 500; color: var(--green-hover); line-height: 1; }
.price-unit { font-size: 12px; color: var(--text-secondary); margin-left: 4px; }
.route-info { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin-top: 12px; font-size: 12px; }
.ri-label { color: var(--text-muted); }
.ri-value { font-weight: 500; color: var(--text); }
.note-box { margin-top: 12px; padding: 10px 14px; background: #FAF8F4; border-radius: var(--radius-sm); font-size: 12px; color: var(--text-secondary); border-left: 3px solid #FAC775; }

/* ── Data Table ── */
.table-wrap { background: var(--card); border: 0.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; padding: 9px 12px; color: var(--text-muted); font-weight: 500; font-size: 11px; border-bottom: 0.5px solid var(--border); white-space: nowrap; }
td { padding: 8px 12px; border-bottom: 0.5px solid #F0EFEA; color: var(--text); vertical-align: middle; }
tr:hover td { background: #FAFAF8; }
.col-price { font-weight: 500; color: var(--green-hover); text-align: right !important; }
.col-pol, .col-pod, .col-port { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-hint { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.empty-msg { text-align: center; padding: 40px; color: var(--text-muted); }

/* ── Tags / Badges ── */
.tag-route { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 10px; font-weight: 500; }
/* ── 班列状态徽标（定班/预计/待排 醒目标识） ── */
.sch-badge { display: inline-block; margin-left: 8px; padding: 3px 10px; border-radius: 14px; font-size: 11.5px; font-weight: 600; letter-spacing: .3px; white-space: nowrap; }
.sch-ok { background: #E8F5E9; color: #1B5E20; border: 1px solid #A5D6A7; }
.sch-warn { background: #FFF8E1; color: #B26A00; border: 1px solid #FFD54F; animation: schPulse 1.6s ease-in-out infinite; }
.sch-pend { background: #FFF3E0; color: #D84315; border: 1.5px solid #FFB74D; animation: schPulse 1.6s ease-in-out infinite; }
@keyframes schPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.35); }
  50% { box-shadow: 0 0 0 5px rgba(255, 152, 0, 0); }
}
/* 表格行紧凑状态点 */
.sch-mini { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 8px; font-size: 9.5px; font-weight: 600; vertical-align: 1px; white-space: nowrap; }
.sch-mini-ok { background: #E8F5E9; color: #1B5E20; border: 0.5px solid #A5D6A7; }
.sch-mini-warn { background: #FFF8E1; color: #B26A00; border: 0.5px solid #FFD54F; }
.sch-mini-pend { background: #FFF3E0; color: #D84315; border: 0.5px solid #FFB74D; }
.tag-rus { background: var(--green-bg); color: #27500A; }
.tag-eur { background: var(--blue-light); color: #0C447C; }
.tag-ca { background: var(--amber-bg); color: #854F0B; }
.tag-lcl { background: var(--purple-bg); color: var(--purple); }
.tag-high { background: var(--primary-light); color: var(--primary); }
.tag-medium { background: var(--amber-bg); color: #854F0B; }
.tag-low { background: var(--red-bg); color: #A32D2D; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 10px; font-weight: 500; }
.badge-purple { background: var(--primary-light); color: var(--primary); }
.badge-green { background: var(--green-bg); color: #27500A; }
.badge-amber { background: var(--amber-bg); color: #854F0B; }
.badge-red { background: var(--red-bg); color: #A32D2D; }

/* ── Email Section ── */
.email-section { background: var(--card); border-radius: var(--radius-lg); border: 0.5px solid var(--border); padding: 20px; margin-bottom: 14px; }
.email-section h3 { margin-bottom: 12px; font-size: 14px; font-weight: 500; }
.email-field { margin-bottom: 10px; }
.email-field label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 3px; font-weight: 500; }
.email-field input { width: 100%; padding: 8px 10px; border: 0.5px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; font-family: inherit; }
.email-field input:focus { outline: none; border-color: var(--primary); }
textarea.email-body { width: 100%; min-height: 180px; padding: 12px; border: 0.5px solid var(--border); border-radius: var(--radius-md); font-family: "SF Mono", "Consolas", monospace; font-size: 12px; line-height: 1.7; resize: vertical; color: var(--text); }
textarea.email-body:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(83,74,183,0.12); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ── Reply Badge ── */
.reply-badge { display: none; background: var(--primary-light); color: var(--primary); border: 0.5px solid #d7d4fc; border-radius: var(--radius-sm); padding: 6px 12px; font-size: 12px; margin-bottom: 10px; }

/* ── Contacts ── */
.contacts-bar { background: #FAF8F4; border: 0.5px solid var(--border); border-radius: var(--radius-md); padding: 10px 14px; margin-bottom: 10px; }
.contacts-bar .cb-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.contacts-bar .cb-hdr span { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.contact-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.contact-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--card); border: 0.5px solid var(--border); border-radius: 16px; padding: 3px 8px 3px 10px; font-size: 11px; cursor: pointer; }
.contact-chip:hover { border-color: var(--primary); background: var(--primary-light); }
.contact-chip .cc-to { color: var(--primary); font-weight: 600; cursor: pointer; padding: 0 3px; }
.contact-chip .cc-cc { color: var(--text-muted); cursor: pointer; padding: 0 3px; }
.contact-chip .cc-del { color: var(--red); cursor: pointer; padding: 0 3px; font-size: 13px; opacity: 0.4; }
.contact-chip .cc-del:hover { opacity: 1; }
.contact-chip .cc-label { color: var(--text); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Inbox ── */
.inbox-layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; }
.inbox-list { border: 0.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; max-height: 65vh; overflow-y: auto; }
.inbox-item { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 0.5px solid #F0EFEA; cursor: pointer; }
.inbox-item:hover { background: #FAFAF8; }
.inbox-item.unread { border-left: 3px solid var(--primary); background: #F8F7FF; }
.inbox-item .ii-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 5px; flex-shrink: 0; display: none; }
.inbox-item.unread .ii-dot { display: block; }
.inbox-item .ii-main { flex: 1; min-width: 0; }
.inbox-item .ii-from { font-size: 11px; color: var(--text-muted); }
.inbox-item .ii-subj { font-size: 12px; font-weight: 500; color: var(--text); margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-item .ii-date { font-size: 10px; color: var(--text-muted); }
.inbox-item .ii-actions { display: flex; gap: 4px; flex-shrink: 0; align-items: center; }
.inbox-item .ii-actions button { padding: 3px 7px; border: 0.5px solid var(--border); background: var(--card); border-radius: 4px; font-size: 10px; cursor: pointer; white-space: nowrap; font-family: inherit; }
.inbox-item .ii-actions button:hover { background: #F0EFEA; }
.inbox-item .ii-actions .ii-reply { color: var(--primary); border-color: var(--primary); }
.inbox-item .ii-actions .ii-reply:hover { background: var(--primary-light); }
.inbox-item .ii-actions .ii-smart { color: #B44; border-color: #B44; }
.inbox-item .ii-actions .ii-smart:hover { background: #FDEAEA; }
.inbox-item .ii-actions .ii-done { color: var(--green-hover); border-color: var(--green); }
.inbox-item .ii-actions .ii-done:hover { background: var(--green-bg); }
.inbox-item.done { opacity: 0.55; }
.inbox-item.done .ii-subj { text-decoration: line-through; }
.inbox-item.non-quote { opacity: 0.65; }
.inbox-item.non-quote .ii-subj { color: var(--text-muted); }
.inbox-item .ii-done-tag { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 8px; font-size: 9px; font-weight: 500; background: var(--green-bg); color: #27500A; border: 0.5px solid var(--green); vertical-align: 1px; }
.inbox-item .ii-nonquote-tag { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 8px; font-size: 9px; font-weight: 500; background: #F1EFE8; color: #5F5E5A; border: 0.5px solid #D3D1C7; vertical-align: 1px; }
.inbox-empty { text-align: center; padding: 40px; color: var(--text-muted); }
.inbox-error { text-align: center; padding: 20px; color: var(--red); font-size: 12px; }
.inbox-detail { display: none; }
.inbox-detail.show { display: block; }

/* ── Modals ── */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.3); z-index: 1000; justify-content: center; align-items: center; }
.modal-overlay.active { display: flex; }
.modal-box { background: var(--card); border-radius: var(--radius-lg); padding: 24px; width: 420px; max-width: 90vw; max-height: 80vh; overflow-y: auto; box-shadow: 0 8px 30px rgba(0,0,0,0.15); }
.modal-box h3 { margin-bottom: 16px; font-size: 15px; font-weight: 500; }
.modal-field { margin-bottom: 12px; }
.modal-field label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.modal-field input, .modal-field select { width: 100%; padding: 8px 10px; border: 0.5px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; font-family: inherit; }
.modal-field input:focus { outline: none; border-color: var(--primary); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.contact-list-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 0.5px solid #F0EFEA; }
.contact-list-item:last-child { border-bottom: none; }
.contact-list-item .cli-info { display: flex; flex-direction: column; }
.contact-list-item .cli-name { font-weight: 500; font-size: 12px; }
.contact-list-item .cli-email { font-size: 11px; color: var(--text-muted); }
.contact-list-item .cli-actions { display: flex; gap: 6px; }
.cli-btn { padding: 3px 8px; border: 0.5px solid var(--border); background: var(--card); border-radius: 4px; font-size: 11px; cursor: pointer; font-family: inherit; }
.cli-btn:hover { background: #F0EFEA; }
.cli-btn-danger { color: var(--red); }
.cli-btn-danger:hover { background: var(--red-bg); border-color: var(--red); }

/* ── Data Manager ── */
.dm-btn { padding: 6px 14px; background: var(--card); border: 0.5px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; cursor: pointer; font-family: inherit; color: var(--text-secondary); }
.dm-btn:hover { background: #F0EFEA; }
.dm-editable { border: none; background: #FAF8F4; padding: 4px 6px; border-radius: 3px; font-size: 12px; width: 100px; font-family: inherit; }
.dm-editable:focus { outline: 2px solid var(--primary); background: var(--card); }
.dm-editable-wide { width: 160px; }
.dm-row-add { border: 1px dashed var(--border); border-radius: 4px; padding: 6px; margin: 6px 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dm-row-add input { padding: 4px 8px; border: 0.5px solid var(--border); border-radius: 3px; font-size: 12px; font-family: inherit; }
.dm-row-add button { padding: 4px 10px; background: var(--primary); color: #fff; border: none; border-radius: 4px; font-size: 12px; cursor: pointer; }
.dm-hint { font-size: 11px; color: var(--text-muted); margin-top: 8px; text-align: center; }
.dm-reset { color: var(--red) !important; border-color: var(--red) !important; }
.dm-reset:hover { background: var(--red-bg) !important; }
.import-col-name { display: inline-block; background: #E6E4DD; padding: 1px 6px; border-radius: 3px; font-size: 11px; margin: 1px; }

/* ── Multi-Route Panel ── */
.mrp-cards { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.mrp-result { margin-top: 12px; }
.rec-list { display: flex; flex-direction: column; gap: 8px; }
.rec-card { border: 0.5px solid var(--border); border-radius: var(--radius-md); padding: 12px 14px; }
.rec-card.best { border: 2px solid var(--green); background: var(--green-bg); }

/* ── Dashboard Cards (legacy) ── */
.dash-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 24px; }
.dash-card { background: var(--card); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 20px; text-align: center; }
.dash-card .dash-icon { font-size: 28px; margin-bottom: 8px; }
.dash-card .dash-num { font-size: 28px; font-weight: 500; color: var(--primary); }
.dash-card .dash-lbl { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.dash-quick { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 16px; }
.dash-quick-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px; background: var(--card); border: 0.5px solid var(--border); border-radius: var(--radius-lg); cursor: pointer; }
.dash-quick-item:hover { border-color: var(--primary); background: #FAFAFF; }
.dash-quick-item .dqi-icon { font-size: 24px; }
.dash-quick-item .dqi-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }

/* ── Toast ── */
.toast { position: fixed; top: 20px; right: 20px; z-index: 2000; padding: 10px 18px; border-radius: var(--radius-md); font-size: 12px; font-weight: 500; box-shadow: 0 2px 10px rgba(0,0,0,0.12); animation: toastIn .25s ease; max-width: 400px; }
.toast.normal { background: var(--text); color: #fff; }
.toast.info { background: var(--primary-light); color: var(--primary-hover); border: 0.5px solid #d7d4fc; }
.toast.warning { background: var(--amber-bg); color: #854F0B; border: 0.5px solid #FAC775; }
.toast.success { background: var(--green-bg); color: #27500A; border: 0.5px solid #C0DD97; }
.toast.error { background: var(--red-bg); color: #A32D2D; border: 0.5px solid #F7C1C1; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Fee Breakdown Table ── */
.fee-table { width: 100%; font-size: 12px; border-collapse: collapse; }
.fee-table td { padding: 4px 0; border: none; }
.fee-table .ft-label { color: var(--text-muted); }
.fee-table .ft-value { text-align: right; font-weight: 500; }
.fee-table .ft-input { width: 85px; padding: 3px 6px; border: 0.5px solid var(--border); border-radius: 4px; font-size: 11px; text-align: right; font-family: inherit; }
.fee-table .ft-input:focus { outline: none; border-color: var(--primary); }
.fee-table .ft-total { font-size: 13px; font-weight: 500; color: var(--green-hover); }

/* ── Status Bar ── */
.status-bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--card); border: 0.5px solid var(--border); border-radius: var(--radius-md); margin-bottom: 16px; font-size: 11px; color: var(--text-muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.green { background: var(--green); }
.status-dot.red { background: var(--red); }
.status-dot.yellow { background: var(--amber); }

/* ── Two-column layout ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; } }
.col-left { min-width: 0; }
.col-right { min-width: 0; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #B4B2A9; }

/* ── 班列日期多标签样式 ── */
.dept-tag { display:inline-block; font-size:11px; font-weight:500; padding:2px 8px; border-radius:10px; margin:1px 3px 1px 0; white-space:nowrap; line-height:1.6; }
.dm-departure-input { min-width:180px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .sidebar { width: var(--sidebar-collapsed); }
  .sidebar-logo { padding: 12px 8px; text-align: center; }
  .sidebar-logo img { width: 32px; height: auto; border-radius: 4px; filter: brightness(0) invert(0.92); opacity: 0.9; }
  .sidebar-nav .nav-label, .sidebar-name, .sidebar-footer p { display: none; }
  .sidebar-nav .nav-item { justify-content: center; padding: 12px; }
  .sidebar-nav .nav-badge { display: none; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .quick-grid { grid-template-columns: repeat(3,1fr); }
  .inbox-layout { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .topbar { padding: 10px 16px; }
}
@media (max-width: 600px) {
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .quick-grid { grid-template-columns: repeat(2,1fr); }
  .stats { grid-template-columns: repeat(2,1fr); }
  .search-area .field { min-width: 100%; }
}

/* 邮箱设置面板 */
.mailcfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.mailcfg-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--text-muted); }
.mailcfg-grid input, .mailcfg-grid select { width: 100%; padding: 8px 10px; border: 0.5px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; font-family: inherit; box-sizing: border-box; }
.mailcfg-grid input:focus, .mailcfg-grid select:focus { outline: none; border-color: var(--primary); }
