/* ========== 全局重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
                 "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 18px;
    color: #333;
    background: #f3f6fa;
    -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 18px; outline: none; }

/* ========== 颜色变量 ========== */
:root {
    --primary: #2f74d8;
    --primary-dark: #1f5bb0;
    --success: #52c41a;
    --warning: #faad14;
    --danger: #f5222d;
    --info: #1890ff;
    --muted: #8c8c8c;
    --border: #e8e8e8;
    --bus1: #e74c3c;
    --bus2: #2ecc71;
    /* 接车主色（蓝） */
    --pickup-color: #2f74d8;
    --pickup-color-soft: #bed2f2;
    /* 送车主色（紫粉日落风，不再是红色反转 —— 全新独立风格） */
    --dropoff-color: #9254de;   /* 紫 */
    --dropoff-color-2: #f759ab; /* 粉 */
    --dropoff-color-soft: #e6d1f5;
}

/* ========== 导航栏 ========== */
.navbar {
    background: linear-gradient(135deg, #4a90e2 0%, #357ab8 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.nav-brand {
    font-size: 23.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 18px;
    flex-wrap: wrap;
}
.nav-links a { opacity: 0.9; transition: opacity 0.15s; }
.nav-links a:hover { opacity: 1; text-decoration: underline; }
.nav-user { opacity: 0.85; font-size: 17px; }

/* ========== 容器 ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}
@media (max-width: 640px) {
    .container { padding: 10px; padding-bottom: 80px; }
    .nav-brand { font-size: 21px; }
    .nav-links { gap: 10px; font-size: 17px; }
}

/* ========== 卡片 ========== */
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    padding: 16px;
    margin-bottom: 16px;
}
.card-title {
    font-size: 21px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

/* ========== Flash 消息 ========== */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; font-size: 18px; }
.flash-error { background: #fff1f0; color: var(--danger); border: 1px solid #ffa39e; }
.flash-info  { background: #e6f7ff; color: var(--info);   border: 1px solid #91d5ff; }
.flash-success { background: #f6ffed; color: var(--success); border: 1px solid #b7eb8f; }

/* ========== 登录页 ========== */
.login-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-box {
    background: #fff; padding: 36px 32px; border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%; max-width: 380px;
}
.login-box h1 { text-align: center; margin-bottom: 8px; font-size: 28.5px; color: #333; }
.login-box p.subtitle { text-align: center; color: var(--muted); margin-bottom: 24px; font-size: 17px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 17px; color: #555; font-weight: 500; }
.form-control {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: 8px; font-size: 18px;
    transition: border 0.2s, box-shadow 0.2s;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74,144,226,0.15); }
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 18px; border-radius: 8px;
    font-size: 18px; font-weight: 500; transition: all 0.15s; gap: 6px; cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-default { background: #f0f0f0; color: #333; }
.btn-default:hover { background: #e0e0e0; }
.btn-block { width: 100%; padding: 12px; font-size: 19.5px; }
.btn-sm { padding: 5px 10px; font-size: 15.5px; border-radius: 6px; }
.btn-lg { padding: 14px 20px; font-size: 21px; }

/* ========== 站点切换标签 ========== */
.tab-group {
    display: inline-flex;
    background: #f0f2f5;
    border-radius: 8px;
    padding: 4px;
    gap: 2px;
}
.tab-item {
    padding: 7px 14px; border-radius: 6px; font-size: 17px;
    cursor: pointer; color: #666; transition: all 0.15s;
    border: none; background: transparent;
}
.tab-item.active {
    background: #fff; color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08); font-weight: 600;
}

/* ========== 站点图 ========== */
.direction-switch {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px; margin-bottom: 16px;
}
.summary-item {
    background: #fff; padding: 14px; border-radius: 10px;
    text-align: center; box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.summary-item .n { font-size: 28.5px; font-weight: 700; color: var(--primary); }
.summary-item .t { font-size: 15.5px; color: var(--muted); margin-top: 4px; }

/* 站点连线图 */
.bus-route { margin-bottom: 28px; }
.bus-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.bus-tag {
    display: inline-block; padding: 5px 12px; border-radius: 20px;
    color: #fff; font-weight: 600; font-size: 17px;
}
.bus-tag.b1 { background: var(--bus1); }
.bus-tag.b2 { background: var(--bus2); }
.bus-route-title { font-weight: 600; font-size: 19.5px; }
.route-arrow { color: var(--muted); font-size: 12px; margin-left: 10px; }

/* ===== stops-line 区域：接车淡蓝渐变 ===== */
.stops-line {
    position: relative;
    padding: 28px 24px 26px;
    background: linear-gradient(180deg, #eef4ff 0%, #f7faff 100%);
    border-radius: 14px;
    overflow: visible;
}
/* ===== stops-line 送车：紫粉日落渐变（全新独立背景，不简单用淡红） ===== */
.stops-line.dropoff-line {
    background: linear-gradient(180deg, #f8edff 0%, #fff0f6 55%, #fff5f7 100%);
}

/* ===== 站点网格：固定 6 列（用户明确要求"每排放6个"）；小屏自适应降档 ===== */
.stops-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    padding: 6px 4px 4px;
}
/* 旧连线 SVG 兜底：即便残留也不占位不显示（JS 会移除，CSS 再隐藏） */
.stops-svg {
    display: none !important;
}

/* ===== stop-node：简洁版卡片（无装饰条、无重阴影、无复杂渐变） ===== */
.stop-node {
    position: relative;
    z-index: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    background: #ffffff;
    border-radius: 10px;
    padding: 10px 8px;
    border: 1px solid #eef0f3;
    box-shadow: none;
    min-height: 84px;
    margin-top: 0;
    overflow: hidden;
}
.stop-node::before { display: none; }  /* 去掉顶部装饰条（简洁） */
.stop-node:hover {
    transform: none;
    border-color: #cfd6de;
    background: #fafbfc;
    box-shadow: none;
}
.stops-line.dropoff-line .stop-node:hover {
    border-color: #d9d1e2;
    background: #fbfafc;
    box-shadow: none;
}

/* ===== 站点徽章（简洁 pill：纯浅底+文字，无边框无装饰圆） ===== */
.stop-circle {
    position: relative;
    top: auto; left: auto;
    transform: none;
    width: auto; height: auto;
    margin: 0 auto 6px;
    border-radius: 6px;
    background: var(--pickup-color);
    color: #ffffff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15.5px; font-weight: 700;
    letter-spacing: 0.2px;
    padding: 3px 9px;
    box-shadow: none;
    border: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
    z-index: 1;
    max-width: 100%;
    line-height: 1.4;
}
.stop-circle::before { display: none; }   /* 去掉徽章左侧装饰圆 */
.stop-circle::after  { display: none; }   /* 去掉送车粉色右下小角标 */

/* 送车徽章：紫粉纯色实心（简洁，无渐变） */
.stops-line.dropoff-line .stop-circle {
    background: var(--dropoff-color);
    color: #ffffff;
    border-radius: 6px;
    position: relative; top: auto; left: auto; transform: none;
    width: auto; height: auto;
    padding: 3px 9px;
    border: none;
    box-shadow: none;
}
.stops-line.dropoff-line .stop-circle::before,
.stops-line.dropoff-line .stop-circle::after {
    display: none;
}

/* 站名（简洁层级，不再紫/黑两色过重区分） */
.stop-name {
    font-size: 17px; font-weight: 600; color: #262626;
    line-height: 1.35;
    margin-top: 0;
    word-break: break-all;
    max-width: 100%;
    padding: 0;
}
.stops-line.dropoff-line .stop-name { color: #262626; }

/* N人上车 / 下车（字号弱化） */
.stop-count {
    font-size: 14.5px; color: #8c8c8c;
    margin-top: 3px;
    display: flex; align-items: baseline; justify-content: center;
    gap: 3px; flex-wrap: wrap;
}
.stop-count .num-people {
    color: #595959;
    font-weight: 600; font-size: 15.5px;
    background: none !important;
    -webkit-text-fill-color: #595959 !important;
}
.stop-count .ride-label { color: #8c8c8c; font-size: 13.5px; }
.stops-line.dropoff-line .stop-count .num-people {
    background: none !important;
    -webkit-text-fill-color: #595959 !important;
    color: #595959 !important;
}

/* 状态：最简洁的灰色标签（done/current 由 outer 边框+底表达，不再叠色） */
.stop-status {
    font-size: 13.5px;
    margin-top: 4px;
    font-weight: 500;
    padding: 1px 7px;
    border-radius: 4px;
    background: #f5f7fa;
    color: #595959;
    display: inline-block;
    align-self: center;
    line-height: 1.5;
    border: 1px solid #eceef1;
}
.stops-line.dropoff-line .stop-status {
    background: #f5f7fa;
    color: #595959;
    border: 1px solid #eceef1;
}

/* ===== 平板：仍 6 列，留白略增 ===== */
@media (min-width: 768px) {
    .stops-track {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 14px; padding: 10px 8px 8px;
    }
    .stop-node { padding: 12px 10px; min-height: 94px; border-radius: 12px; }
    .stop-circle { padding: 4px 10px; font-size: 17px; border-radius: 7px; }
    .stop-name { font-size: 17.5px; }
    .stop-count .num-people { font-size: 17px; }
}

/* ===== 超大屏：仍 6 列 ===== */
@media (min-width: 1024px) {
    .stops-track {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 16px; padding: 12px 10px 10px;
    }
    .stop-node { padding: 14px 12px; min-height: 100px; border-radius: 12px; }
    .stop-circle { padding: 4px 11px; font-size: 17px; border-radius: 7px; }
    .stop-name { font-size: 18px; }
}

/* ========== 站点详情页 ========== */
.stop-info-bar {
    background: linear-gradient(135deg, #2f74d8 0%, #1f5bb0 100%);
    color: #fff;
    padding: 18px; border-radius: 10px; margin-bottom: 16px;
    box-shadow: 0 3px 12px rgba(47,116,216,0.25);
}
/* 送车详情：日落紫粉渐变顶条（独立风格） */
.stop-info-bar.dropoff {
    background: linear-gradient(135deg, #9254de 0%, #f759ab 100%);
    box-shadow: 0 3px 12px rgba(146,84,222,0.35);
}
.stop-info-main {
    font-size: 26px; font-weight: 700; margin-bottom: 6px;
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.stop-info-sub {
    font-size: 17px; opacity: 0.95;
    display: flex; gap: 14px; flex-wrap: wrap;
}

.stats-bar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 10px; margin-bottom: 16px;
}
@media (max-width: 640px) { .stats-bar { grid-template-columns: repeat(2, 1fr); } }
.stat-box {
    background: #fff; border-radius: 10px; padding: 12px;
    text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.stat-box .num { font-size: 28.5px; font-weight: 700; }
.stat-box .lbl { font-size: 15.5px; color: var(--muted); margin-top: 3px; }
.stat-box.t-total .num   { color: var(--primary); }
.stat-box.t-boarded .num { color: var(--success); }
.stat-box.t-not .num     { color: var(--danger); }
.stat-box.t-pending .num { color: var(--warning); }

/* 学生列表 */
.student-list { display: flex; flex-direction: column; gap: 10px; }
.student-item {
    background: #fff; border-radius: 10px; padding: 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    transition: border 0.15s;
    border: 2px solid transparent;
}
.student-item.status-boarded     { border-color: var(--success); background: #f6ffed; }
.student-item.status-not_boarded { border-color: var(--danger);  background: #fff1f0; }
.student-item.status-unregistered { border-color: var(--warning); background: #fffbe6; }

.student-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 21px; font-weight: 700; flex-shrink: 0;
}
.student-info { flex: 1; min-width: 140px; }
.student-name { font-size: 19.5px; font-weight: 600; color: #222; margin-bottom: 4px; }
.student-meta {
    font-size: 15.5px; color: var(--muted);
    display: flex; gap: 10px; flex-wrap: wrap;
}
.student-meta .chip {
    background: #f0f2f5; padding: 2px 8px;
    border-radius: 10px; color: #555;
}
/* 电话号码：变成可点击拨号链接（手机端点击即唤起拨号器并预填号码） */
.student-meta .chip-tel {
    background: #e9f2ff;
    color: #0b76d4;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s, box-shadow .15s;
}
.student-meta .chip-tel:hover,
.student-meta .chip-tel:focus {
    background: #d6e8ff;
    color: #095bb0;
    box-shadow: 0 1px 4px rgba(11,118,212,0.25);
    outline: none;
}
.student-meta .chip-tel:active { background: #c2dcff; }
/* 备用号码：同可点，背景更淡以区分主次 */
.student-meta .chip-tel.backup { background: #f1f7ff; }

/* 通用一键拨号链接（跨页面：统计页/详情卡/表格同样适用，不限定父容器） */
.chip-tel {
    display: inline-flex; align-items: center; gap: 3px;
    background: #e9f2ff; color: #0b76d4;
    padding: 2px 8px; border-radius: 10px;
    font-size: 15.5px; line-height: 1.6;
    text-decoration: none; cursor: pointer;
    transition: background .15s, color .15s, box-shadow .15s;
}
.chip-tel:hover, .chip-tel:focus {
    background: #d6e8ff; color: #095bb0;
    box-shadow: 0 1px 4px rgba(11,118,212,0.25); outline: none;
}
.chip-tel:active { background: #c2dcff; }
.chip-tel.backup { background: #f1f7ff; }
.student-status {
    font-size: 15.5px; font-weight: 600;
    min-width: 80px; text-align: center;
}
.student-status.s-pending { color: var(--warning); }
.student-status.s-boarded { color: var(--success); }
.student-status.s-not     { color: var(--danger); }
.extra-info { font-size: 14.5px; color: var(--muted); margin-top: 4px; }
.student-actions { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 640px) {
    .student-actions { width: 100%; justify-content: flex-end; }
    .student-actions .btn { flex: 1; min-width: 100px; min-height: 40px; }
}

/* ========== 弹窗 Modal ========== */
.modal-mask {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal-box {
    background: #fff; border-radius: 12px; padding: 24px;
    width: 100%; max-width: 380px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.modal-title { font-size: 21px; font-weight: 600; margin-bottom: 16px; }
.reason-list {
    display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px;
}
.reason-item {
    padding: 12px; border: 2px solid var(--border); border-radius: 8px;
    cursor: pointer; transition: all 0.15s;
    display: flex; align-items: center; gap: 10px;
}
.reason-item:hover { border-color: var(--primary); background: #f5faff; }
.reason-item.selected {
    border-color: var(--primary);
    background: #e6f0ff;
    color: var(--primary-dark);
    font-weight: 600;
}
.modal-actions {
    display: flex; gap: 10px; justify-content: flex-end;
    margin-top: 10px; flex-wrap: wrap;
}
.note-input {
    width: 100%; padding: 8px;
    border: 1px solid var(--border); border-radius: 6px;
    min-height: 56px; resize: vertical; margin-top: 6px;
}

/* ========== 统计表 ========== */
.filter-form {
    background: #fff; padding: 16px; border-radius: 10px;
    margin-bottom: 16px; box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px; align-items: end;
}
.filter-form .form-group { margin-bottom: 0; }
.filter-form .form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px; margin-bottom: 16px;
}
.stat-card {
    background: #fff; padding: 16px; border-radius: 10px;
    text-align: center; box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.stat-card .v { font-size: 34px; font-weight: 700; }
.stat-card .l { font-size: 15.5px; color: var(--muted); margin-top: 4px; }
.stat-card.v-total .v   { color: var(--primary); }
.stat-card.v-boarded .v { color: var(--success); }
.stat-card.v-not .v     { color: var(--danger); }
.stat-card.v-pending .v { color: var(--warning); }

/* 表格 */
.table-wrap { overflow-x: auto; border-radius: 10px; }
table.data-table {
    width: 100%; border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    min-width: 680px;
}
table.data-table th, table.data-table td {
    padding: 10px 12px; text-align: left;
    font-size: 17px; border-bottom: 1px solid var(--border);
}
table.data-table thead th {
    background: #fafafa;
    font-weight: 600; color: #555; white-space: nowrap;
}
table.data-table tbody tr:hover { background: #f9fbff; }
.badge {
    display: inline-block; padding: 2px 8px;
    border-radius: 10px; font-size: 14.5px; font-weight: 600;
}
.badge.b-boarded { background: #f6ffed; color: var(--success); }
.badge.b-not     { background: #fff1f0; color: var(--danger); }
.badge.b-pending { background: #fffbe6; color: var(--warning); }

/* 每日柱状图区 */
.daily-chart {
    background: #fff; padding: 16px; border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.daily-row {
    display: grid;
    grid-template-columns: 100px 1fr 90px;
    align-items: center;
    gap: 10px; padding: 8px 0;
    border-bottom: 1px dashed var(--border); font-size: 17px;
}
.daily-row:last-child { border-bottom: none; }
.daily-row .day-label { font-weight: 500; }
.daily-row .day-label .dir-tag {
    display: inline-block; font-size: 13px; padding: 1px 5px;
    border-radius: 4px; margin-right: 4px; color: #fff;
}
.daily-row .day-label .dir-m { background: #52c41a; }
.daily-row .day-label .dir-a { background: #eb2f96; }
.daily-row .bars { display: flex; gap: 4px; height: 18px; }
.daily-row .bar-seg {
    height: 100%; border-radius: 4px; min-width: 4px;
}
.daily-row .bar-seg.boarded { background: var(--success); }
.daily-row .bar-seg.not     { background: var(--danger); }
.daily-row .bar-seg.pending { background: var(--warning); }
.daily-row .count { text-align: right; color: #555; font-size: 15.5px; }

@media (max-width: 640px) {
    .daily-row { grid-template-columns: 86px 1fr 70px; }
    .daily-row .day-label { font-size: 15.5px; }
}

/* ========== 角色标签 ========== */
.role-tag {
    display: inline-block; font-size: 13px;
    padding: 1px 6px; border-radius: 4px;
    margin-right: 6px; vertical-align: middle;
}
.role-tag.role-admin   { background: #fa541c; color: #fff; }
.role-tag.role-teacher { background: #52c41a; color: #fff; }

/* ========== 站点图：当前站点高亮 ========== */
.current-stop-tip {
    background: linear-gradient(135deg, #fff7e6 0%, #ffe7ba 100%);
    color: #ad6800; border: 1px solid #ffd591;
    border-radius: 10px; padding: 12px 16px;
    margin-bottom: 14px; font-size: 17px; font-weight: 600;
    box-shadow: 0 2px 8px rgba(250,173,20,0.12);
}
/* ========== 当前站点（简洁版）：细橙边 + 极浅橙底，无动画无重阴影 ========== */
.stop-node.current {
    border-color: #ffc069 !important;
    background: #fffbf0 !important;
    box-shadow: none !important;
    animation: none !important;
}
.stop-node.current::before { display: none; }
.stop-node.current .stop-circle {
    background: #faad14 !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-text-fill-color: #ffffff !important;
}
.stop-node.current .stop-circle::before,
.stop-node.current .stop-circle::after { display: none !important; }
.stops-line.dropoff-line .stop-node.current .stop-circle::after { display: none !important; }
.stop-node.current .stop-name  { color: #ad6800; font-weight: 600; }
.stop-node.current .stop-count .num-people {
    color: #ad6800 !important;
    -webkit-text-fill-color: #ad6800 !important;
    background: none !important;
}
.stop-node.current .stop-status {
    background: #fff7e6; color: #ad6800;
    border: 1px solid #ffe7ba;
}

/* ========== 已完成（简洁版）：细绿边 + 极浅绿底 ========== */
.stop-node.done {
    border-color: #b7eb8f !important;
    background: #fcffe6 !important;
    box-shadow: none !important;
}
.stop-node.done::before { display: none; }
.stop-node.done .stop-circle {
    background: #52c41a !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-text-fill-color: #ffffff !important;
}
.stop-node.done .stop-circle::before,
.stop-node.done .stop-circle::after { display: none !important; }
.stops-line.dropoff-line .stop-node.done .stop-circle::after { display: none !important; }
.stop-node.done .stop-name  { color: #389e0d; font-weight: 600; }
.stop-node.done .stop-count .num-people {
    color: #389e0d !important;
    -webkit-text-fill-color: #389e0d !important;
    background: none !important;
}
.stop-node.done .stop-status {
    background: #f6ffed; color: #389e0d;
    border: 1px solid #d9f7be;
}

/* ========== 未解锁（简洁版）：灰边浅底，无虚线边框 ========== */
.stop-node[data-locked="1"] {
    opacity: 0.80;
    cursor: not-allowed;
    background: #fafafa !important;
    border-color: #eeeeee !important;
    box-shadow: none !important;
    transform: none !important;
}
.stop-node[data-locked="1"]::before { display: none; }
.stop-node[data-locked="1"] .stop-circle {
    background: #bfbfbf !important;
    color: #ffffff !important;
    border: none !important;
    border-style: solid !important;
    box-shadow: none !important;
    -webkit-text-fill-color: #ffffff !important;
}
.stop-node[data-locked="1"] .stop-circle::before,
.stop-node[data-locked="1"] .stop-circle::after { display: none !important; }
.stops-line.dropoff-line .stop-node[data-locked="1"] .stop-circle::after { display: none !important; }
.stop-node[data-locked="1"] .stop-name  { color: #8c8c8c; }
.stop-node[data-locked="1"] .stop-count .num-people {
    color: #8c8c8c !important;
    -webkit-text-fill-color: #8c8c8c !important;
    background: none !important;
}

/* ========== 站点图例 ========== */
.stops-legend {
    display: flex; gap: 14px; flex-wrap: wrap;
    margin-bottom: 14px; padding: 0 4px;
    font-size: 14.5px; color: #666;
}
.stops-legend .leg { display: inline-flex; align-items: center; gap: 5px; }
.stops-legend .leg i {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid;
    background: #fff;
}
/* 站点图例：小圆点（与现在的路线图圆点节点风格一致） */
.stops-legend .leg i { border-radius: 50%; }

.stops-legend .leg-current i { border-color: var(--warning); background: #faad14; }
.stops-legend .leg-done i    { border-color: var(--success); background: #52c41a; }
.stops-legend .leg-waiting i { border-color: var(--pickup-color); }
.stops-line.dropoff-line .stops-legend .leg-waiting i { border-color: var(--dropoff-color); }
.stops-legend .leg-locked i  {
    border-color: #d9d9d9; background: #f0f0f0;
    border-style: dashed;
}

/* ========== 前一站点未完成警告 ========== */
.prev-warn {
    background: #fffbe6; border: 1px solid #ffe58f; color: #d48806;
    padding: 14px 16px; border-radius: 10px;
    margin-bottom: 14px; font-size: 18px; font-weight: 500;
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 8px; line-height: 1.5;
}

/* ========== 下一站醒目提示横幅 ========== */
.next-stop-banner {
    position: sticky; bottom: 12px; margin: 16px 0;
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    color: #fff; border-radius: 14px; padding: 18px;
    box-shadow: 0 6px 24px rgba(82,196,26,0.45);
    animation: slideUp 0.35s ease;
    z-index: 50;
}
.next-stop-banner.done-all {
    background: linear-gradient(135deg, #722ed1 0%, #531dab 100%);
    box-shadow: 0 6px 24px rgba(114,46,209,0.45);
}
@keyframes slideUp {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.ns-content {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.ns-icon { font-size: 34px; flex-shrink: 0; }
.ns-text { flex: 1; min-width: 160px; }
.ns-title { font-size: 21px; font-weight: 700; margin-bottom: 4px; }
.ns-sub   { font-size: 17px; opacity: 0.92; }
.btn-next {
    background: #fff; color: #389e0d;
    padding: 12px 24px;
    font-size: 19.5px; font-weight: 700;
    border-radius: 26px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    white-space: nowrap;
    transition: transform 0.15s;
}
.btn-next:hover { transform: scale(1.06); }
@media (max-width: 640px) {
    .ns-content { flex-direction: column; text-align: center; }
    .btn-next { width: 100%; padding: 14px; }
}

/* ========== 卡片锁定 ========== */
.card-locked {
    opacity: 0.55; pointer-events: none; filter: grayscale(0.4);
    position: relative;
}
.card-locked::after {
    content: '🔒 请先完成上一站点';
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6); color: #fff;
    padding: 8px 16px; border-radius: 8px;
    font-size: 17px; font-weight: 600;
    pointer-events: none; z-index: 10;
}

/* ========== 移动端整体优化 ========== */
@media (max-width: 640px) {
    .card { padding: 12px; border-radius: 10px; }
    .card-title { font-size: 19.5px; }
    .nav-inner { padding: 10px 12px; }
    .nav-brand { font-size: 19.5px; }
    .nav-links { gap: 8px; font-size: 15.5px; }
    .stop-info-bar { padding: 14px; border-radius: 10px; }
    .stop-info-main { font-size: 22px; flex-wrap: wrap; }
    .stop-info-sub { font-size: 15.5px; gap: 10px; }
    .stats-bar { grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .stat-box { padding: 8px 4px; }
    .stat-box .num { font-size: 23.5px; }
    .stat-box .lbl { font-size: 13px; }
    .student-item { padding: 12px; gap: 10px; }
    .student-avatar { width: 40px; height: 40px; font-size: 18px; }
    .student-name { font-size: 18px; }
    .student-meta { font-size: 14.5px; gap: 6px; }
    .filter-form { grid-template-columns: 1fr; gap: 8px; }
    .form-actions .btn { flex: 1; min-width: 0; padding: 10px 8px; font-size: 15.5px; }
    .summary-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .summary-item { padding: 10px; }
    .summary-item .n { font-size: 23.5px; }
    .direction-switch { font-size: 15.5px; }
    .tab-item { padding: 6px 10px; font-size: 15.5px; }
    .data-table th, .data-table td { padding: 8px 6px; font-size: 15.5px; }
    .data-table { min-width: 500px; }
    .prev-warn { font-size: 17px; padding: 12px; }
    .stops-line { padding: 20px 12px 22px; }
    .stops-track {
        /* 小屏：从 6 列降档到 4 列，避免过挤（用户主需求"每排6个"针对桌面/平板） */
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px; padding: 6px 2px 4px;
    }
    .stop-circle {
        padding: 3px 8px !important;
        font-size: 14.5px !important;
        border-radius: 6px !important;
        width: auto !important; height: auto !important;
        top: auto !important;
        border: none !important;
    }
    .stop-circle::before { display: none !important; }
    .stop-circle::after  { display: none !important; }
    .stops-line.dropoff-line .stop-circle {
        width: auto !important; height: auto !important;
        top: auto !important; border-radius: 6px !important;
        border: none !important;
    }
    .stops-line.dropoff-line .stop-circle::before,
    .stops-line.dropoff-line .stop-circle::after { display: none !important; }
    .stop-node { padding: 8px 6px; margin-top: 0; border-radius: 10px; min-height: 82px; }
    .stop-name { font-size: 15.5px; }
    .stop-count .num-people { font-size: 15.5px; }
}

/* ========== 桌面端优化 ========== */
@media (min-width: 1024px) {
    .container { max-width: 1280px; padding: 24px; }
    .card { padding: 20px; }
    .card-title { font-size: 22px; }
    .stops-track {
        /* 固定 6 列 */
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 20px; padding: 10px 8px 8px;
    }
    /* 清除旧的 absolute 圆样式（新样式已在基础档声明，兜底覆盖防止 media 覆盖回老形状） */
    .stop-circle { border-radius: 7px !important; width: auto !important; height: auto !important; top: auto !important; border: none !important; }
    .stop-circle::before { display: none !important; }
    .stop-circle::after  { display: none !important; }
    .stops-line.dropoff-line .stop-circle { border-radius: 7px !important; width: auto !important; height: auto !important; top: auto !important; border: none !important; }
    .stops-line.dropoff-line .stop-circle::before,
    .stops-line.dropoff-line .stop-circle::after { display: none !important; }
    .stop-node { padding: 14px 12px; margin-top: 0; min-height: 100px; border-radius: 12px; }
    .stop-name { font-size: 18px; }
    .summary-row { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .stat-summary { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .stops-line { padding: 34px 30px 30px; }
}

/* ========== 今日未乘车突出板块（统计报表） ========== */
.today-absent-card {
    border: 2px solid #ffe0e0;
    background: linear-gradient(180deg, #fff8f8 0%, #ffffff 70%);
    box-shadow: 0 4px 16px rgba(255,77,79,0.09), 0 1px 3px rgba(0,0,0,0.05);
    margin-top: 4px;
}
.ta-header {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1.5px dashed #ffd6d6;
}
.ta-title {
    font-size: 23.5px; font-weight: 800;
    color: #cf1322;
    display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.ta-bell { font-size: 22px; animation: taShake 2.4s ease-in-out infinite; }
@keyframes taShake {
    0%, 88%, 100% { transform: rotate(0deg); }
    90% { transform: rotate(-18deg); }
    92% { transform: rotate(18deg); }
    94% { transform: rotate(-12deg); }
    96% { transform: rotate(12deg); }
}
.ta-date { color: #8c8c8c; font-size: 17px; font-weight: 500; }
.ta-badges { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.ta-badge {
    padding: 6px 12px; border-radius: 999px;
    font-size: 15.5px; font-weight: 700;
    border: 1.5px solid;
}
.ta-b-pickup {
    color: #cf1322; border-color: #ffa39e;
    background: linear-gradient(135deg, #fff1f0 0%, #fff7e6 100%);
}
.ta-b-dropoff {
    color: #8738c9; border-color: #d3adf7;
    background: linear-gradient(135deg, #f9f0ff 0%, #fff0f6 100%);
}
.ta-cols {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 760px) { .ta-cols { grid-template-columns: 1fr; gap: 14px; } }
.ta-col {
    border-radius: 14px;
    padding: 14px 14px 12px;
    border: 1.5px solid;
    background: #ffffff;
}
.ta-col-pickup { border-color: #ffccc7; background: linear-gradient(180deg, #fff7f6 0%, #ffffff 100%); }
.ta-col-dropoff { border-color: #e9d8fd; background: linear-gradient(180deg, #fbf6ff 0%, #ffffff 100%); }
.ta-col-title {
    font-size: 18px; font-weight: 800;
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1.5px dashed;
}
.ta-col-p { color: #cf1322; border-color: #ffd8bf; }
.ta-col-d { color: #8738c9; border-color: #efdbff; }
.ta-col-ico { font-size: 15px; }
.ta-col-count {
    margin-left: auto;
    font-size: 15.5px;
    padding: 2px 9px;
    border-radius: 999px;
    color: #fff;
    background: #cf1322;
}
.ta-col-d .ta-col-count { background: #9254de; }
.ta-list { display: flex; flex-direction: column; gap: 10px; }
.ta-item {
    padding: 11px 12px;
    border-radius: 11px;
    border: 1px solid;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.ta-item-p { border-color: #ffd6d6; background: linear-gradient(180deg, #fffbfb 0%, #ffffff 100%); }
.ta-item-d { border-color: #efdbff; background: linear-gradient(180deg, #fdf9ff 0%, #ffffff 100%); }
.ta-item-head {
    display: flex; align-items: baseline; justify-content: space-between;
    flex-wrap: wrap; gap: 6px;
    margin-bottom: 6px;
}
.ta-name {
    font-size: 19.5px; font-weight: 800; color: #1f1f1f;
}
.ta-class {
    font-size: 14.5px; color: #8c8c8c;
    padding: 2px 7px; border-radius: 999px;
    background: #fafafa; border: 1px solid #f0f0f0;
}
.ta-item-line {
    display: flex; align-items: center; gap: 6px;
    font-size: 15.5px; color: #595959;
    margin-top: 3px;
    flex-wrap: wrap;
}
.ta-k { color: #8c8c8c; }
.ta-v { color: #262626; font-weight: 500; }
.ta-phone {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    color: #1890ff;
    letter-spacing: 0.3px;
}
.ta-item-reason {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 9px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
    display: flex; gap: 6px; align-items: flex-start;
    border-left: 4px solid;
}
.ta-reason-p {
    background: #fff2e8;
    color: #a8071a;
    border-left-color: #ff4d4f;
}
.ta-reason-d {
    background: #f9f0ff;
    color: #531dab;
    border-left-color: #9254de;
}
.ta-reason-p i, .ta-reason-d i { font-style: normal; margin-top: 1px; }
.ta-empty {
    padding: 16px 12px;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    border-radius: 10px;
}
.ta-empty-p {
    color: #389e0d;
    background: linear-gradient(135deg, #f6ffed 0%, #fcffe6 100%);
    border: 1.5px dashed #b7eb8f;
}
.ta-empty-d {
    color: #531dab;
    background: linear-gradient(135deg, #f9f0ff 0%, #fff0f6 100%);
    border: 1.5px dashed #d3adf7;
}

/* ==============================================================
   欢迎页 · 公交换乘图风格（简洁双路线卡片）
   ============================================================== */
.welcome-body{ margin:0; padding:0; background:#f0f2f6; color:#1e293b;
  font-family: -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  min-height:100vh; display:flex; flex-direction:column; }
.welcome-body{ overflow-x:hidden; }

.ws-header{ background:#fff; border-bottom:1px solid #e2e8f0; padding:14px 20px;
  display:flex; align-items:center; justify-content:space-between; }
.ws-header-inner{ max-width:1100px; margin:0 auto; width:100%;
  display:flex; align-items:center; justify-content:space-between; }
.ws-logo{ display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit; }
.ws-logo-icon{ width:36px; height:36px; border-radius:8px;
  background:linear-gradient(135deg,#fbbf24,#f59e0b);
  display:flex; align-items:center; justify-content:center; font-size:18px; }
.ws-logo-text{ line-height:1.2; }
.ws-logo-text strong{ display:block; font-size: 19.5px; color:#1e293b; }
.ws-logo-text small{ font-size: 14.5px; color:#64748b; }

.ws-btn{ display:inline-flex; align-items:center; gap:4px; cursor:pointer;
  border:none; padding:7px 14px; border-radius:8px; font-weight:600; font-size: 17px;
  text-decoration:none; color:#fff; background:#2563eb; transition:background .2s; }
.ws-btn:hover{ background:#1d4ed8; }
.ws-btn-ghost{ background:transparent; color:#475569; border:1px solid #e2e8f0; }
.ws-btn-ghost:hover{ background:#f1f5f9; }

.ws-main{ flex:1; max-width:1100px; margin:0 auto; padding:30px 20px; width:100%; }
.ws-title{ text-align:center; margin:0 0 30px; font-size: 28.5px; font-weight:800; color:#1e293b; }
.ws-subtitle{ text-align:center; margin:-20px 0 30px; font-size: 18px; color:#64748b; }

/* 双路线卡片网格 */
.ws-grid{ display:grid; grid-template-columns:1fr 1fr; gap:24px; }

/* 路线卡片 */
.ws-card{ background:#fff; border-radius:16px; border:1px solid #e2e8f0;
  overflow:hidden; cursor:pointer; transition:transform .2s, box-shadow .2s;
  text-decoration:none; color:inherit; display:block; }
.ws-card:hover{ transform:translateY(-3px); box-shadow:0 8px 30px rgba(0,0,0,.08); }
.ws-card-top{ padding:20px 20px 14px; display:flex; align-items:center; gap:12px; }
.ws-card-bus{ width:44px; height:44px; border-radius:12px;
  display:flex; align-items:center; justify-content:center; font-size:22px; }
.ws-card-bus.bus1{ background:linear-gradient(135deg,#fef3c7,#fde68a); }
.ws-card-bus.bus2{ background:linear-gradient(135deg,#dbeafe,#bfdbfe); }
.ws-card-info{ flex:1; }
.ws-card-name{ font-size: 23.5px; font-weight:800; color:#1e293b; margin:0; }
.ws-card-meta{ font-size: 15.5px; color:#64748b; margin-top:2px; display:flex; gap:10px; }
.ws-card-meta span{ display:flex; align-items:center; gap:3px; }

/* 迷你路线图 */
.ws-card-map{ padding:6px 20px 14px; position:relative; }
.ws-card-line{ display:flex; align-items:center; gap:0; padding:6px 0; }
.ws-card-dot{ width:18px; height:18px; border-radius:50%; flex:0 0 18px;
  display:flex; align-items:center; justify-content:center;
  font-size: 10.5px; color:#fff; font-weight:800; }
.ws-card-dot.pickup{ background:#2563eb; }
.ws-card-dot.dropoff{ background:#d946ef; }
.ws-card-dot.gray{ background:#cbd5e1; }
.ws-card-seg{ height:3px; flex:1; min-width:8px; border-radius:999px; }
.ws-card-seg.pickup{ background:#93c5fd; }
.ws-card-seg.dropoff{ background:#d8b4fe; }
.ws-card-seg.gray{ background:#e2e8f0; }

/* 卡片底部 */
.ws-card-foot{ padding:12px 20px; border-top:1px solid #f1f5f9;
  display:flex; align-items:center; justify-content:space-between; }
.ws-card-status{ font-size: 17px; font-weight:700; }
.ws-card-status.go{ color:#2563eb; }
.ws-card-status.done{ color:#16a34a; }
.ws-card-status.wait{ color:#64748b; }
.ws-card-arrow{ font-size: 18px; color:#94a3b8; font-weight:700; }

/* 页脚 */
.ws-footer{ text-align:center; padding:16px; font-size: 15.5px; color:#94a3b8; border-top:1px solid #e2e8f0; }

/* 登录弹窗（简洁版） */
.ws-login-modal{ position:fixed; inset:0; z-index:200; display:none; align-items:center; justify-content:center; padding:16px; }
.ws-login-modal.show{ display:flex; }
.ws-login-mask{ position:absolute; inset:0; background:rgba(30,41,59,.55); }
.ws-login-panel{ position:relative; width:360px; max-width:100%; background:#fff; border-radius:16px;
  padding:24px 20px; box-shadow:0 20px 60px rgba(0,0,0,.15); }
.ws-login-panel h3{ margin:0 0 4px; text-align:center; font-size: 22px; }
.ws-login-panel p{ margin:0 0 16px; text-align:center; font-size: 17px; color:#64748b; }
.ws-login-close{ position:absolute; top:8px; right:12px; border:none; background:transparent;
  font-size:22px; color:#94a3b8; cursor:pointer; line-height:1; }
.ws-login-close:hover{ color:#1e293b; }
.ws-login-form{ display:grid; gap:10px; }
.ws-login-form label{ display:grid; gap:4px; font-size: 15.5px; font-weight:700; color:#1e293b; }
.ws-login-form input{ padding:10px 12px; border-radius:8px; border:1.5px solid #e2e8f0;
  font-size: 18px; outline:none; background:#f8fafc; }
.ws-login-form input:focus{ border-color:#2563eb; background:#fff; box-shadow:0 0 0 3px rgba(37,99,235,.1); }
.ws-login-form button{ margin-top:4px; }
.ws-login-hint{ margin:8px 0 0; text-align:center; font-size: 14.5px; color:#94a3b8; line-height:1.6; }
.ws-login-hint code{ background:#f1f5f9; border:1px solid #e2e8f0; padding:1px 5px; border-radius:4px;
  color:#475569; font-size: 14.5px; }
.ws-flash{ padding:8px 10px; border-radius:8px; font-size: 15.5px; font-weight:700; background:#fef2f2; color:#dc2626; }

/* ==============================================================
   实时运行线路图 · 公交线路风格（垂直时间线）
   ============================================================== */
.rt-body{ margin:0; padding:0; background:#f0f2f6; color:#1e293b;
  font-family: -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  min-height:100vh; }
.rt-body{ overflow-x:hidden; }

/* 顶栏 */
.rt-topbar{ background:#fff; border-bottom:1px solid #e2e8f0; padding:12px 20px;
  display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:50; }
.rt-topbar-inner{ max-width:700px; margin:0 auto; width:100%;
  display:flex; align-items:center; gap:8px 12px; flex-wrap:wrap; }
.rt-back{ display:flex; align-items:center; gap:4px; cursor:pointer; border:none; background:none;
  font-size:15px; color:#475569; font-weight:600; padding:6px 10px; border-radius:8px; white-space:nowrap; }
.rt-back:hover{ background:#f1f5f9; }
.rt-top-info{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.rt-top-title{ font-size:20px; font-weight:800; color:#1e293b;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rt-top-sub{ font-size:13px; font-weight:600; color:#64748b;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rt-top-date{ color:#2563eb; }
.rt-top-actions{ display:flex; gap:6px; }
.rt-top-btn{ padding:7px 14px; border-radius:999px; border:1px solid #e2e8f0; background:#fff;
  font-size:15px; font-weight:700; cursor:pointer; color:#475569; transition:all .2s; white-space:nowrap; }
.rt-top-btn.pickup.active{ background:#2563eb; color:#fff; border-color:#2563eb; }
.rt-top-btn.dropoff.active{ background:#7c3aed; color:#fff; border-color:#7c3aed; }
.rt-top-btn:hover{ background:#f1f5f9; }
.rt-top-btn.pickup.active:hover{ background:#1d4ed8; }
.rt-top-btn.dropoff.active:hover{ background:#6d28d9; }

.rt-refresh-time{ font-size: 14.5px; color:#94a3b8; }

/* 主内容 */
.rt-container{ max-width:700px; margin:0 auto; padding:20px; }

/* 状态卡片 */
.rt-status-card{ background:#fff; border-radius:16px; border:1px solid #e2e8f0;
  padding:18px; margin-bottom:16px; }
.rt-status-row{ display:flex; gap:12px; align-items:stretch; }
.rt-status-item{ flex:1; padding:10px 14px; border-radius:12px; border:1px solid #e2e8f0; }
.rt-status-item.current{ background:#fff7ed; border-color:#fed7aa; }
.rt-status-item.next{ background:#eff6ff; border-color:#bfdbfe; }
.rt-status-item.done{ background:#f0fdf4; border-color:#bbf7d0; }
.rt-status-label{ font-size: 14.5px; font-weight:700; color:#64748b; margin-bottom:2px; }
.rt-status-name{ font-size: 21px; font-weight:800; color:#1e293b; }
.rt-status-item.onway .rt-status-name{ color:#2563eb; }
.rt-status-item.onway .rt-status-label{ color:#2563eb; }
.rt-status-item.next .rt-status-name{ color:#2563eb; }
.rt-status-meta{ font-size: 15.5px; color:#64748b; margin-top:2px; }
.rt-status-arrow{ display:flex; align-items:center; font-size:18px; color:#94a3b8; }
.rt-status-bar{ margin-top:12px; display:flex; align-items:center; gap:8px; }
.rt-status-dot{ width:10px; height:10px; border-radius:50%; flex:0 0 10px; }
.rt-status-dot.pulse{ background:#ea580c; animation: pulseRt 1.5s ease-in-out infinite; }
@keyframes pulseRt{ 0%,100%{ box-shadow:0 0 0 0 rgba(234,88,12,.4);} 50%{ box-shadow:0 0 0 8px rgba(234,88,12,0);} }
.rt-status-dot.moving{ background:#2563eb; animation: moveRt 1.2s ease-in-out infinite; }
@keyframes moveRt{ 0%,100%{ transform:translateX(0);} 50%{ transform:translateX(4px);} }
.rt-status-dot.green{ background:#16a34a; }
.rt-status-dot.gray{ background:#94a3b8; }
.rt-status-text{ font-size: 18px; font-weight:700; color:#1e293b; }
.rt-status-text span{ color:#64748b; font-weight:400; }

/* 进度条 */
.rt-progress{ background:#fff; border-radius:16px; border:1px solid #e2e8f0; padding:14px 18px; margin-bottom:16px; }
.rt-progress-bar{ height:6px; background:#e2e8f0; border-radius:999px; overflow:hidden; margin-bottom:6px; }
.rt-progress-fill{ height:100%; border-radius:999px; transition:width .5s ease; }
.rt-progress-fill.pickup{ background:linear-gradient(90deg,#2563eb,#60a5fa); }
.rt-progress-fill.dropoff{ background:linear-gradient(90deg,#d946ef,#f0abfc); }
.rt-progress-label{ display:flex; justify-content:space-between; font-size: 15.5px; color:#64748b; }

/* ===== 垂直时间线：站点列表 ===== */
.rt-timeline{ background:#fff; border-radius:16px; border:1px solid #e2e8f0; overflow:hidden; }

.rt-stop{ display:flex; align-items:stretch; position:relative; min-height:60px; }
.rt-stop:last-child .rt-stop-line{ display:none; }

/* 左侧竖线 + 圆点 */
.rt-stop-left{ display:flex; flex-direction:column; align-items:center; width:50px; flex:0 0 50px; position:relative; }
.rt-stop-line{ width:3px; flex:1; background:#e2e8f0; }
.rt-stop-dot{ width:18px; height:18px; border-radius:50%; background:#fff;
  border:3px solid #cbd5e1; margin-top:18px; position:relative; z-index:1; flex:0 0 18px; }

/* 已完成 */
.rt-stop.done .rt-stop-line{ background:#16a34a; }
.rt-stop.done .rt-stop-dot{ background:#16a34a; border-color:#16a34a; }
.rt-stop.done .rt-stop-body{ opacity:.7; }
.rt-stop.done .rt-stop-name{ color:#94a3b8; }

/* 当前站（橙色发光） */
.rt-stop.current .rt-stop-line{ background:linear-gradient(to bottom, #16a34a 50%, #e2e8f0 50%); }
.rt-stop.current .rt-stop-dot{ width:22px; height:22px; margin-top:16px; flex:0 0 22px;
  background:#ea580c; border-color:#ea580c;
  box-shadow:0 0 0 6px rgba(234,88,12,.12), 0 0 0 14px rgba(234,88,12,.06);
  animation: dotGlow 2s ease-in-out infinite; }
@keyframes dotGlow{ 0%,100%{ box-shadow:0 0 0 6px rgba(234,88,12,.12), 0 0 0 14px rgba(234,88,12,.06);}
  50%{ box-shadow:0 0 0 10px rgba(234,88,12,.10), 0 0 0 20px rgba(234,88,12,0);} }
.rt-stop.current .rt-stop-body{ background:#fff7ed; }
.rt-stop.current .rt-stop-name{ color:#ea580c; font-size: 21px; }

/* 下一站 */
.rt-stop.next .rt-stop-dot{ background:#2563eb; border-color:#2563eb; }
.rt-stop.next .rt-stop-name{ color:#2563eb; font-weight:800; }
.rt-stop.next .rt-stop-body{ background:#eff6ff; }

/* 即将到达（on_the_way 时的目标站） */
.rt-stop.onway .rt-stop-dot{ width:22px; height:22px; margin-top:16px; flex:0 0 22px;
  background:#2563eb; border-color:#2563eb;
  box-shadow:0 0 0 6px rgba(37,99,235,.12), 0 0 0 14px rgba(37,99,235,.06); }
.rt-stop.onway .rt-stop-name{ color:#2563eb; font-size: 21px; }
.rt-stop.onway .rt-stop-body{ background:#f0f7ff; }

/* 右侧内容 */
.rt-stop-body{ flex:1; padding:12px 16px 12px 8px; display:flex; align-items:center; gap:8px; border-bottom:1px solid #f1f5f9; }
.rt-stop:last-child .rt-stop-body{ border-bottom:none; }
.rt-stop-main{ flex:1; }
.rt-stop-name{ font-size: 19.5px; font-weight:700; color:#1e293b; }
.rt-stop-tag{ display:inline-block; font-size: 14.5px; font-weight:700; padding:1px 8px; border-radius:999px; margin-left:8px; }
.rt-stop-tag.current-tag{ background:#fff7ed; color:#ea580c; border:1px solid #fed7aa; }
.rt-stop-tag.next-tag{ background:#eff6ff; color:#2563eb; border:1px solid #bfdbfe; }
.rt-stop-tag.done-tag{ background:#f0fdf4; color:#16a34a; border:1px solid #bbf7d0; }
.rt-stop-tag.onway-tag{ background:#e0f2fe; color:#0369a1; border:1px solid #bae6fd; }
.rt-stop-absence{ font-size: 15.5px; color:#dc2626; margin-top:2px; font-weight:600; }
.rt-stop-right{ text-align:right; flex:0 0 auto; }
.rt-stop-count{ font-size: 17px; font-weight:700; color:#64748b; }
.rt-stop-status{ font-size: 14.5px; color:#16a34a; margin-top:2px; }

/* 加载状态 */
.rt-loading{ text-align:center; padding:60px 0; color:#64748b; }
.rt-spinner{ display:inline-block; width:24px; height:24px; border:3px solid #e2e8f0;
  border-top-color:#2563eb; border-radius:50%; animation: spinRt .6s linear infinite; }
@keyframes spinRt{ to{ transform:rotate(360deg);} }

/* 响应式 */
@media (max-width: 768px){
  .ws-grid{ grid-template-columns:1fr; gap:16px; }
  .ws-main{ padding:20px 16px; }
  .ws-title{ font-size: 23.5px; }
  .rt-status-row{ flex-direction:column; }
  .rt-status-arrow{ display:none; }
  .rt-container{ padding:12px; }
}
@media (max-width: 480px){
  .ws-header{ padding:12px 14px; }
  .ws-logo-text small{ display:none; }
  .ws-card-top{ padding:14px 14px 10px; }
  .ws-card-map{ padding:4px 14px 10px; }
  .ws-card-foot{ padding:10px 14px; }
  .rt-topbar{ padding:8px 12px; }
  .rt-topbar-inner{ gap:6px 8px; }
  .rt-back{ padding:4px 8px; font-size:14px; }
  .rt-back-text{ display:none; }
  .rt-top-title{ font-size:17px; }
  .rt-top-sub{ font-size:12px; }
  .rt-top-actions{ order:5; width:100%; gap:8px; margin-top:2px; }
  .rt-top-btn{ flex:1; padding:9px 0; font-size:15px; border-radius:10px; }
  .rt-stop-left{ width:40px; flex:0 0 40px; }
  .rt-stop-body{ padding:10px 12px 10px 6px; }
  .rt-stop-name{ font-size: 18px; }
}
.flash-error{ background:#fef2f2; color:#dc2626; border:1px solid #fecaca;}

