/**
 * 货代销售报价工作台 - 样式
 * 响应式：手机竖屏 + 电脑桌面自适应
 */
:root {
  --primary: #c81e1e;
  --primary-light: #ff5757;
  --primary-dark: #9a1414;
  --primary-bg: #fef2f2;
  --bg: #f5f5f5;
  --card-bg: #fff;
  --text: #1a1a1a;
  --text-light: #666;
  --text-lighter: #999;
  --border: #e8e8e8;
  --green: #16a34a;
  --orange: #ea580c;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --radius: 12px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
a { color: var(--primary); text-decoration: none; }
input, select, textarea, button { font-family: inherit; font-size: inherit; outline: none; }

/* ===== 页面容器 ===== */
.page { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding-bottom: 100px; position: relative; }
.page-admin { max-width: 1200px; margin: 0 auto; padding: 20px; }
.page-full { max-width: 100%; padding: 0; }
@media (min-width: 768px) {
  .page { max-width: 480px; box-shadow: 0 0 20px rgba(0,0,0,0.08); }
}

/* ===== 登录页 ===== */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%); padding: 20px; }
.login-card { background: #fff; border-radius: 20px; padding: 36px 28px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo .login-logo-img { width: 72px; height: 72px; border-radius: 50%; display: inline-block; margin-bottom: 8px; box-shadow: 0 4px 12px rgba(20,40,90,0.15); }
.login-logo .logo-circle { width: 72px; height: 72px; border-radius: 50%; background: var(--primary); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.login-logo h1 { font-size: 20px; color: var(--text); }
.login-logo p { font-size: 12px; color: var(--text-lighter); margin-top: 4px; }
.login-form .form-group { margin-bottom: 16px; }
.login-form label { display: block; font-size: 13px; color: var(--text-light); margin-bottom: 6px; font-weight: 500; }
.login-form input { width: 100%; height: 44px; border: 1.5px solid var(--border); border-radius: 10px; padding: 0 14px; transition: border-color .2s; }
.login-form input:focus { border-color: var(--primary); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; cursor: pointer; border-radius: 10px; font-weight: 500; transition: all .15s; }
.btn-primary { background: var(--primary); color: #fff; height: 44px; width: 100%; font-size: 15px; }
.btn-primary:active { background: var(--primary-dark); }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; }
.btn-sm.btn-primary { height: auto; width: auto; }
.btn-sm.btn-success { height: auto; width: auto; }
.btn-outline { border: 1.5px solid var(--border); background: #fff; color: var(--text); height: 40px; padding: 0 16px; border-radius: 10px; }
.btn-outline:active { background: var(--bg); }
.btn-danger { background: #dc2626; color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-link { background: none; color: var(--primary); padding: 4px 8px; font-size: 13px; }
.login-demo { margin-top: 20px; padding: 12px; background: var(--primary-bg); border-radius: 10px; font-size: 12px; color: var(--text-light); line-height: 1.8; }
.login-demo code { background: rgba(200,30,30,0.1); padding: 1px 5px; border-radius: 4px; color: var(--primary); font-size: 11px; }

/* ===== 顶部导航 ===== */
.top-bar { background: var(--primary); color: #fff; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.top-bar .title { font-size: 17px; font-weight: 600; }
.top-bar .back { color: #fff; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.top-bar .right { font-size: 13px; opacity: 0.9; }

/* ===== 工作台首页 ===== */
.home-header { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; padding: 20px 16px 28px; border-radius: 0 0 24px 24px; }
.home-header .user-info { display: flex; align-items: center; gap: 12px; }
.home-header .avatar { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; }
.home-header .user-name { font-size: 16px; font-weight: 600; }
.home-header .user-role { font-size: 12px; opacity: 0.85; }
.home-header .stats { display: flex; gap: 16px; margin-top: 16px; }
.home-header .stat-item { flex: 1; text-align: center; }
.home-header .stat-num { font-size: 22px; font-weight: 700; }
.home-header .stat-label { font-size: 11px; opacity: 0.8; }

.grid-section { padding: 16px; }
.grid-section .section-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.grid-section .section-title .more { font-size: 12px; color: var(--text-lighter); font-weight: 400; }

.func-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.func-item { background: var(--card-bg); border-radius: var(--radius); padding: 16px 8px; text-align: center; box-shadow: var(--shadow); cursor: pointer; transition: transform .15s; }
.func-item:active { transform: scale(0.95); }
.func-item .icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin: 0 auto 6px; }
.func-item .name { font-size: 12px; color: var(--text); }

/* 各功能图标颜色 */
.ic-rate { background: #fee2e2; }
.ic-spec { background: #dbeafe; }
.ic-script { background: #dcfce7; }
.ic-flow { background: #fef3c7; }
.ic-fav { background: #fce7f3; }
.ic-tool { background: #e0e7ff; }
.ic-me { background: #e2e8f0; }
.ic-cust { background: #ffe0b2; }

/* 热门航线卡片 */
.route-card { background: var(--card-bg); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); margin-bottom: 10px; }
.route-card .route-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.route-card .route-ports { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; flex-wrap: wrap; }
.route-card .route-ports .route-en { font-size: 14px; font-weight: 500; color: var(--text-light); }
.route-card .route-ports .arrow { color: var(--primary); }
.route-card .route-price { font-size: 16px; font-weight: 700; color: var(--primary); }
.route-card .route-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-light); }
.route-card .tag { display: inline-block; font-size: 10px; padding: 2px 6px; border-radius: 4px; background: #f0f0f0; color: var(--text-light); }
.route-card .tag.direct { background: #dcfce7; color: var(--green); }
.route-card .tag.trans { background: #fef3c7; color: var(--orange); }
.route-card .expired { opacity: 0.5; }
.route-card .expired .route-price { text-decoration: line-through; color: var(--text-lighter); }

/* 客户管理 - 顶部模块切换按钮 */
.cust-tabs { display: flex; gap: 8px; }
.cust-tab { flex: 1; padding: 10px 6px; border: 1px solid #e8e8e8; background: #fafafa; border-radius: 8px; font-size: 14px; color: #666; cursor: pointer; margin: 0; }
.cust-tab.active { background: #c81e1e; color: #fff; border-color: #c81e1e; font-weight: 700; }
.cust-tab:focus { outline: none; }

/* ===== 运价查询页 ===== */
.search-form { background: var(--card-bg); padding: 16px; border-radius: 0 0 20px 20px; box-shadow: var(--shadow); }
.form-row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; position: relative; }
.form-row .swap-btn { position: absolute; right: -2px; top: 32px; z-index: 5; background: #fff; border: 1.5px solid var(--border); border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; color: var(--primary); }
.form-field { flex: 1; }
.form-field label { display: block; font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.form-field select, .form-field input { width: 100%; height: 40px; border: 1.5px solid var(--border); border-radius: 10px; padding: 0 10px; background: #fff; }
.form-field select:focus, .form-field input:focus { border-color: var(--primary); }

/* ===== 可搜索港口选择器 ===== */
.port-picker { position: relative; width: 100%; }
.port-picker-input { width: 100%; height: 40px; border: 1.5px solid var(--border); border-radius: 10px; padding: 0 10px; background: #fff; display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: border-color .15s; }
.port-picker-input:hover { border-color: var(--primary); }
.port-picker-input .port-display { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--text); }
.port-picker-input .port-display.placeholder { color: var(--text-lighter); }
.port-picker-input .port-arrow { color: var(--text-light); font-size: 14px; flex-shrink: 0; margin-left: 6px; transition: transform .2s; }
.port-picker.open .port-arrow { transform: rotate(180deg); }

.port-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1.5px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); z-index: 100; max-height: 300px; display: none; flex-direction: column; overflow: hidden; }
.port-picker.open .port-dropdown { display: flex; }
.port-search-box { padding: 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.port-search-box input { width: 100%; height: 36px; border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; font-size: 13px; background: #f8f9fa; }
.port-search-box input:focus { border-color: var(--primary); background: #fff; }

.port-list { flex: 1; overflow-y: auto; max-height: 250px; -webkit-overflow-scrolling: touch; }
.port-list::-webkit-scrollbar { width: 4px; }
.port-list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.port-group-header { padding: 6px 10px; font-size: 11px; font-weight: 600; color: var(--text-light); background: #f8f9fa; position: sticky; top: 0; z-index: 1; }
.port-option { padding: 9px 12px; cursor: pointer; display: flex; align-items: center; gap: 7px; transition: background .1s; border-bottom: 1px solid #f5f5f5; }
.port-option:hover, .port-option.active { background: #fff5f5; }
.port-option .po-flag { font-size: 17px; flex-shrink: 0; width: 22px; text-align: center; }
.port-option .po-names { flex: 1; min-width: 0; overflow: hidden; }
.port-option .po-cn { font-size: 14px; font-weight: 600; color: var(--text); }
.port-option .po-en { font-size: 13px; color: var(--text-light); margin-left: 4px; }
.port-option .po-code { font-size: 10px; color: var(--text-lighter); background: #f0f0f0; padding: 2px 6px; border-radius: 4px; flex-shrink: 0; }
.port-empty-search { padding: 20px; text-align: center; font-size: 13px; color: var(--text-lighter); }

.box-type-tabs { display: flex; gap: 0; margin-bottom: 12px; background: #f0f0f0; border-radius: 10px; padding: 3px; }
.box-type-tabs .tab { flex: 1; text-align: center; padding: 8px; font-size: 13px; border-radius: 8px; cursor: pointer; color: var(--text-light); transition: all .15s; }
.box-type-tabs .tab.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* 查询结果 */
.result-list { padding: 16px; }
.result-empty { text-align: center; padding: 40px 20px; color: var(--text-lighter); font-size: 14px; }
.result-card { background: var(--card-bg); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.result-card .rc-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.result-card .rc-carrier { font-size: 15px; font-weight: 600; }
.result-card .rc-tag { font-size: 10px; padding: 2px 8px; border-radius: 4px; }
.result-card .rc-tag.direct { background: #dcfce7; color: var(--green); }
.result-card .rc-tag.trans { background: #fef3c7; color: var(--orange); }
.result-card .rc-price-row { display: flex; align-items: baseline; gap: 8px; margin: 8px 0; }
.result-card .rc-price { font-size: 24px; font-weight: 700; color: var(--primary); }
.result-card .rc-price-unit { font-size: 13px; color: var(--text-light); }
.result-card .rc-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--text-light); margin-top: 8px; }
.result-card .rc-meta span { display: flex; align-items: center; gap: 3px; }
.result-card .rc-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.result-card .rc-actions .btn-sm { flex: 1; height: 36px; }

/* 港口航线行 */
.rc-route-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 0; margin-bottom: 4px; font-size: 12px; }
.rc-route-line .rc-port { font-weight: 600; color: var(--text); font-size: 13px; }
.rc-route-line .rc-port-en { font-size: 11px; color: var(--text-light); }
.rc-route-line .rc-arrow { color: var(--primary); font-size: 14px; margin: 0 2px; }

/* 航线头部 */
.rc-route-header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--card-bg); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow); flex-wrap: wrap; }
.rc-route-header .rc-route-from, .rc-route-header .rc-route-to { font-size: 16px; font-weight: 600; color: var(--text); }
.rc-route-header .rc-route-from em, .rc-route-header .rc-route-to em { font-style: normal; font-size: 14px; font-weight: 500; color: var(--text-light); margin-left: 4px; }
.rc-route-header .rc-route-arrow { color: var(--primary); font-size: 18px; }
.rc-route-header .rc-route-type { margin-left: auto; font-size: 11px; padding: 3px 10px; border-radius: 6px; background: #fef3f3; color: var(--primary); font-weight: 600; }

/* ===== 详情弹窗 ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; display: none; }
.modal-mask.show { display: flex; align-items: flex-end; justify-content: center; }
.modal-card { background: #fff; border-radius: 20px 20px 0 0; width: 100%; max-width: 480px; max-height: 85vh; overflow-y: auto; padding: 20px; animation: slideUp .25s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-card .modal-handle { width: 36px; height: 4px; background: #ddd; border-radius: 2px; margin: 0 auto 16px; }
.modal-card h3 { font-size: 17px; margin-bottom: 16px; }
.detail-row { display: flex; padding: 8px 0; border-bottom: 1px solid #f5f5f5; }
.detail-row .dl { width: 100px; color: var(--text-light); font-size: 13px; }
.detail-row .dr { flex: 1; font-size: 13px; }

/* ===== 集装箱规格 ===== */
.spec-card { background: var(--card-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 12px; }
.spec-card .spec-header { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.spec-card .spec-header .type-name { font-size: 18px; font-weight: 700; }
.spec-card .spec-body { padding: 14px 16px; }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.spec-item { padding: 10px; background: #f8f9fa; border-radius: 8px; }
.spec-item .label { font-size: 11px; color: var(--text-lighter); margin-bottom: 2px; }
.spec-item .value { font-size: 15px; font-weight: 600; color: var(--text); }
.spec-item .unit { font-size: 11px; color: var(--text-light); }
.spec-diagram { text-align: center; padding: 12px; }
.spec-diagram svg { max-width: 100%; height: auto; }

/* ===== 话术库 ===== */
.script-tabs { display: flex; overflow-x: auto; gap: 8px; padding: 12px 16px; background: #fff; position: sticky; top: 52px; z-index: 50; }
.script-tabs .stab { white-space: nowrap; padding: 6px 16px; font-size: 13px; border-radius: 20px; background: #f0f0f0; cursor: pointer; color: var(--text-light); }
.script-tabs .stab.active { background: var(--primary); color: #fff; }
.script-list { padding: 8px 16px 16px; }
.script-card { background: var(--card-bg); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); margin-bottom: 10px; }
.script-card .sc-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.script-card .sc-content { font-size: 13px; color: var(--text-light); line-height: 1.6; margin-bottom: 10px; white-space: pre-wrap; }
.script-card .sc-actions { display: flex; gap: 8px; }
.script-card .sc-actions .btn-sm { flex: 1; height: 34px; font-size: 12px; }

/* ===== 底部导航 ===== */
.bottom-nav { position: fixed; bottom: 34px; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; border-top: 1px solid var(--border); display: flex; z-index: 90; }
.bottom-nav .nav-item { flex: 1; text-align: center; padding: 8px 0 6px; cursor: pointer; color: var(--text-lighter); transition: color .15s; }
.bottom-nav .nav-item.active { color: var(--primary); }
.bottom-nav .nav-item .nav-icon { font-size: 20px; line-height: 1; }
.bottom-nav .nav-item .nav-label { font-size: 11px; margin-top: 2px; }

/* ===== 报价生成弹窗 ===== */
.quote-preview { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin: 12px 0; }
.quote-preview .qp-title { text-align: center; font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.quote-preview .qp-subtitle { text-align: center; font-size: 12px; color: var(--text-light); margin-bottom: 12px; }
.quote-preview .qp-section { margin-bottom: 12px; }
.quote-preview .qp-section-title { font-size: 13px; font-weight: 600; color: var(--text); border-bottom: 1px solid #f0f0f0; padding-bottom: 4px; margin-bottom: 6px; }
.quote-preview .qp-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.quote-preview .qp-row .qp-label { color: var(--text-light); }
.quote-preview .qp-row .qp-value { font-weight: 500; }
.quote-preview .qp-total { background: var(--primary-bg); border-radius: 8px; padding: 10px; margin-top: 8px; }
.quote-preview .qp-total .qp-row .qp-value { color: var(--primary); font-weight: 700; font-size: 15px; }

/* ===== 后台管理 ===== */
.admin-nav { display: flex; gap: 0; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 20px; }
.admin-nav .nav-tab { flex: 1; text-align: center; padding: 12px 8px; font-size: 14px; cursor: pointer; color: var(--text-light); border-bottom: 3px solid transparent; transition: all .15s; }
.admin-nav .nav-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: var(--primary-bg); }

.admin-section { display: none; }
.admin-section.active { display: block; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: var(--shadow); }
.stat-card .stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 12px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; }
.stat-card .stat-name { font-size: 13px; color: var(--text-light); margin-top: 4px; }

.admin-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.admin-card h3 { font-size: 16px; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.admin-card h3 .actions { display: flex; gap: 8px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { background: #f8f9fa; text-align: left; padding: 10px 12px; font-weight: 600; color: var(--text-light); border-bottom: 2px solid var(--border); white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #f5f5f5; }
.data-table tr:hover { background: #fafafa; }
.data-table .row-actions { display: flex; gap: 4px; }
.data-table .row-actions button { padding: 2px 8px; font-size: 12px; border-radius: 4px; border: 1px solid var(--border); background: #fff; cursor: pointer; }
.data-table .row-actions .edit { color: #2563eb; }
.data-table .row-actions .del { color: #dc2626; }
.data-table .expired-row { opacity: 0.5; }
.data-table .expired-row td:first-child::after { content: ' (已过期)'; color: #999; font-size: 11px; }
.data-table .readonly-row { background: #f6f8fa; }
.data-table .readonly-tag { color: #94a3b8; font-size: 12px; white-space: nowrap; }

.admin-form-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.admin-form-row .form-field { flex: 1; min-width: 150px; }

.upload-box { border: 2px dashed var(--border); border-radius: 12px; padding: 30px; text-align: center; cursor: pointer; transition: border-color .2s; }
.upload-box:hover { border-color: var(--primary); }
.upload-box .upload-icon { font-size: 36px; color: var(--text-lighter); margin-bottom: 8px; }
.upload-box p { color: var(--text-light); font-size: 13px; }
.upload-box input { display: none; }

.import-result { margin-top: 16px; padding: 16px; border-radius: 10px; font-size: 13px; }
.import-result.success { background: #f0fdf4; border: 1px solid #bbf7d0; }
.import-result.error { background: #fef2f2; border: 1px solid #fecaca; }
.import-result ul { margin-top: 8px; padding-left: 20px; }

/* ===== Toast提示 ===== */
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.8); color: #fff; padding: 10px 20px; border-radius: 10px; font-size: 14px; z-index: 9999; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-lighter); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }

/* ===== 通用 ===== */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.gap-8 { gap: 8px; }
.hidden { display: none !important; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.badge-red { background: #fee2e2; color: var(--primary); }
.badge-green { background: #dcfce7; color: var(--green); }
.badge-blue { background: #dbeafe; color: #2563eb; }
.badge-gray { background: #f0f0f0; color: var(--text-light); }
.badge-orange { background: #fff3e0; color: #e65100; }

/* ===== 待办事项 ===== */
.todo-badge { position: absolute; top: 6px; right: 18px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; background: #ef4444; color: #fff; font-size: 11px; font-weight: 600; border-radius: 9px; padding: 0 4px; }
.todo-alert { background: #fef2f2; border: 1.5px solid #fca5a5; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.todo-alert .alert-title { font-size: 14px; font-weight: 600; color: #dc2626; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.todo-card { background: var(--card-bg); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); margin-bottom: 10px; border-left: 4px solid var(--border); transition: opacity .2s; }
.todo-card.priority-high { border-left-color: #ef4444; }
.todo-card.priority-medium { border-left-color: #f59e0b; }
.todo-card.priority-low { border-left-color: #6b7280; }
.todo-card.overdue { background: #fef2f2; }
.todo-card.done { opacity: 0.55; }
.todo-card.done .todo-title { text-decoration: line-through; color: var(--text-lighter); }
.todo-top { display: flex; align-items: flex-start; gap: 10px; }
.todo-check { width: 22px; height: 22px; min-width: 22px; border: 2px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; margin-top: 1px; flex-shrink: 0; }
.todo-check.checked { background: #22c55e; border-color: #22c55e; color: #fff; font-size: 13px; }
.todo-body { flex: 1; min-width: 0; }
.todo-title { font-size: 15px; font-weight: 600; word-break: break-word; }
.todo-desc { font-size: 13px; color: var(--text-light); margin-top: 3px; word-break: break-word; }
.todo-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.todo-meta .pri-tag { font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 500; }
.todo-meta .pri-high { background: #fee2e2; color: #dc2626; }
.todo-meta .pri-medium { background: #fef3c7; color: #d97706; }
.todo-meta .pri-low { background: #f0f0f0; color: #6b7280; }
.todo-meta .due-tag { font-size: 11px; color: var(--text-light); display: flex; align-items: center; gap: 3px; }
.todo-meta .due-tag.overdue-text { color: #dc2626; font-weight: 600; }
.todo-meta .remind-tag { font-size: 11px; color: #2563eb; display: flex; align-items: center; gap: 3px; }
.todo-actions { display: flex; gap: 6px; margin-top: 8px; }
.todo-actions button { font-size: 12px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border); background: #fff; color: var(--text-light); cursor: pointer; }
.todo-actions button:active { transform: scale(0.95); }
.todo-actions button.del { color: #dc2626; border-color: #fca5a5; }
.todo-form-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1000; display: flex; align-items: flex-end; justify-content: center; }
.todo-form-overlay .form-panel { background: #fff; border-radius: 20px 20px 0 0; padding: 20px; width: 100%; max-width: 500px; max-height: 85vh; overflow-y: auto; }
.todo-form-overlay .form-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.todo-form-overlay .form-header h3 { font-size: 17px; font-weight: 600; }
.todo-form-overlay .form-header .close-btn { font-size: 22px; color: var(--text-lighter); cursor: pointer; background: none; border: none; }
.todo-form-overlay .form-field { margin-bottom: 14px; }
.todo-form-overlay .form-field label { display: block; font-size: 13px; color: var(--text-light); margin-bottom: 4px; }
.todo-form-overlay .form-field input, .todo-form-overlay .form-field select, .todo-form-overlay .form-field textarea {
  width: 100%; height: 40px; border: 1.5px solid var(--border); border-radius: 10px; padding: 0 10px; font-size: 16px; background: #fff; }
.todo-form-overlay .form-field textarea { height: auto; padding: 8px 10px; resize: vertical; min-height: 60px; }
.todo-form-overlay .form-field input:focus, .todo-form-overlay .form-field select:focus, .todo-form-overlay .form-field textarea:focus { border-color: var(--primary); outline: none; }
.todo-form-overlay .form-actions { display: flex; gap: 10px; margin-top: 16px; }
.todo-form-overlay .form-actions button { flex: 1; height: 44px; border-radius: 10px; border: none; font-size: 15px; font-weight: 600; cursor: pointer; }
.todo-reminder-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.todo-reminder-modal .reminder-box { background: #fff; border-radius: 20px; padding: 28px 24px; width: 100%; max-width: 380px; text-align: center; }
.todo-reminder-modal .reminder-icon { font-size: 48px; margin-bottom: 8px; }
.todo-reminder-modal .reminder-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; color: #dc2626; }
.todo-reminder-modal .reminder-text { font-size: 14px; color: var(--text-light); margin-bottom: 20px; line-height: 1.6; }
.todo-reminder-modal .reminder-actions { display: flex; gap: 10px; }
.todo-reminder-modal .reminder-actions button { flex: 1; height: 44px; border-radius: 10px; border: none; font-size: 14px; font-weight: 600; cursor: pointer; }

/* ===== Embed模式（后台iframe嵌入） ===== */
.embed-mode .bottom-nav { display: none !important; }
.embed-mode .page { padding-bottom: 0 !important; }
.embed-mode .login-wrap { display: none !important; }
.embed-mode #page-search .top-bar { display: none !important; }
.embed-mode #page-search { padding-top: 0 !important; }
.embed-mode .search-form { padding-top: 12px; }
.embed-mode .port-dropdown { z-index: 9999 !important; }

/* ===== 通知横幅 ===== */
.notify-banner {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 12px 0 4px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  animation: notifyPulse 2s ease-in-out infinite;
}
@keyframes notifyPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}
.notify-banner.hidden { display: none; }
.notify-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #f59e0b;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.notify-body { flex: 1; min-width: 0; }
.notify-title { font-size: 14px; font-weight: 700; color: #92400e; margin-bottom: 2px; }
.notify-list { font-size: 12px; color: #78350f; line-height: 1.6; }
.notify-item { padding: 2px 0; border-bottom: 1px dashed rgba(146, 64, 14, 0.2); }
.notify-item:last-child { border-bottom: none; }
.notify-time { font-size: 11px; color: #a16207; }
.notify-close {
  font-size: 18px; color: #92400e; cursor: pointer;
  flex-shrink: 0; line-height: 1; padding: 2px 4px;
}
.notify-close:hover { color: #78350f; }
.notify-badge {
  position: absolute; top: -4px; right: -4px;
  background: #ef4444; color: #fff;
  font-size: 10px; min-width: 16px; height: 16px;
  border-radius: 8px; display: flex;
  align-items: center; justify-content: center;
  padding: 0 4px;
}

/* 隐藏数字输入框原生上下微调箭头，保留键盘直接输入（所有运价调整面板通用） */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}
/* 港口 TIPS 小提示（销售端详情/快速报价点开可见） */
.port-tips {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  vertical-align: middle;
  white-space: nowrap;
}

/* 20261007b：箱型条「更多」下拉（45HQ/40HR 等），样式与箱型 Tab 融合 */
.box-type-tabs .box-more-sel { flex: 1; min-width: 0; border: none; background: transparent; font-size: 13px; color: var(--text-light); padding: 8px 2px; border-radius: 8px; outline: none; cursor: pointer; text-align: center; text-align-last: center; font-family: inherit; transition: all .15s; }
.box-type-tabs .box-more-sel.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
