:root{font-family:'DM Sans','Noto Sans SC',-apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif;color:#edf2ff;background:#090d18;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-height:100vh}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.48}a{color:inherit}.ambient{position:fixed;pointer-events:none;filter:blur(80px);border-radius:50%;z-index:-1}.ambient-one{width:560px;height:560px;top:-280px;right:8%;background:#34306a88}.ambient-two{width:480px;height:480px;bottom:-300px;left:20%;background:#0e6f7960}.glass{background:rgba(20,27,46,.68);backdrop-filter:blur(28px);-webkit-backdrop-filter:blur(28px);border:1px solid rgba(255,255,255,.09);box-shadow:0 20px 80px #0002}.app-shell{max-width:1720px;margin:auto;min-height:100vh;display:grid;grid-template-columns:252px minmax(0,1fr);gap:26px;padding:22px}.sidebar{border-radius:26px;padding:26px 16px;display:flex;flex-direction:column;position:sticky;top:22px;height:calc(100vh - 44px)}.brand{display:flex;align-items:center;gap:12px;padding:4px 10px 26px}.brand-mark{width:42px;height:42px;background:#080b11;border-radius:13px;display:grid;place-items:center;box-shadow:inset 0 0 0 1px #ffffff1c}.brand-mark img{width:32px;height:32px;object-fit:contain}.brand strong{display:block;font-size:17px;letter-spacing:.02em}.brand small{display:block;color:#8993a9;font-size:11px;margin-top:2px}.sidebar-caption{color:#8e9cb4;font-size:11px;padding:12px 18px;text-transform:uppercase;letter-spacing:.16em}.nav-button{border:0;background:none;color:#aab5c9;width:100%;height:47px;display:flex;align-items:center;gap:13px;padding:0 16px;border-radius:13px;text-align:left;margin:3px 0;font-size:14px}.nav-button:hover{background:#ffffff0d;color:#fff}.nav-button.active{background:linear-gradient(100deg,#8661ee3c,#6d7de51c);color:#f7f3ff;box-shadow:inset 0 0 0 1px #bbadff30}.nav-icon{width:21px;text-align:center;font-size:19px;line-height:1}.sidebar-bottom{margin-top:auto;border-top:1px solid #ffffff13;padding:20px 12px 2px;color:#93a1b8;font-size:11px;display:flex;align-items:center;gap:8px}.status-dot{height:7px;width:7px;border-radius:50%;background:#62d8b9;box-shadow:0 0 12px #62d8b9}.main{min-width:0}.topbar{height:62px;display:flex;justify-content:space-between;align-items:center;padding:0 7px 0 2px}.breadcrumb{display:flex;gap:12px;align-items:center;font-size:13px;color:#96a3ba}.breadcrumb strong{color:#dce5f7;font-weight:600}.slash{color:#7d8aa1}.top-actions{display:flex;align-items:center;gap:12px}.demo-pill{font-size:11px;color:#e2d7ff;padding:6px 10px;border-radius:99px;background:#8b66ed20;border:1px solid #9c7ae63d}.user-button{border:1px solid #ffffff17;background:#ffffff0c;color:#edf2ff;border-radius:99px;display:flex;gap:8px;align-items:center;padding:5px 11px 5px 5px;font-size:12px}.user-button>span:first-child{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#9982e8,#55a8c3);color:white;font-weight:700}.chevron{color:#8995aa}.content{padding:15px 0 70px}.page-title{display:flex;justify-content:space-between;gap:20px;align-items:end;margin:16px 0 26px}.eyebrow{font-size:11px;color:#b9a3ff;letter-spacing:.2em;font-weight:700;margin-bottom:10px}.page-title h1{font-size:32px;line-height:1.2;letter-spacing:-.03em;margin:0 0 8px;font-weight:700}.page-title p{margin:0;color:#8e9bb2;font-size:13px}.title-actions{display:flex;gap:9px;flex-wrap:wrap}.button{border:1px solid #ffffff1a;color:#e8edfc;background:#ffffff0c;border-radius:11px;padding:10px 15px;font-size:12px;min-height:39px;display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap}.button:hover{background:#ffffff19}.button.primary{background:linear-gradient(135deg,#8f77eb,#6958cf);border-color:#a18cf1;color:white;box-shadow:0 8px 25px #7762d234}.button.primary:hover{filter:brightness(1.08)}.button.danger{color:#ffbdc1;border-color:#ed7c894b}.button.tiny{padding:6px 9px;min-height:29px;font-size:11px}.grid{display:grid;gap:17px}.stats-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}.card{background:linear-gradient(145deg,#1d263ac9,#151c2ed9);border:1px solid #ffffff10;border-radius:20px;padding:20px;box-shadow:0 18px 44px #02040c20;min-width:0}.stat-card{min-height:140px;position:relative;overflow:hidden}.stat-card:after{content:'';position:absolute;width:130px;height:130px;border-radius:50%;right:-55px;top:-66px;background:var(--glow,#9274ed);filter:blur(50px);opacity:.22}.stat-label{font-size:12px;color:#94a1b9}.stat-value{font-size:29px;font-weight:700;margin:16px 0 4px;line-height:1}.stat-sub{font-size:11px;color:#98a5bb}.stat-icon{position:absolute;right:18px;bottom:18px;color:var(--glow,#ac91ff);font-size:23px}.two-col{grid-template-columns:minmax(0,1.5fr) minmax(300px,.9fr)}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.section-head h2{margin:0;font-size:16px;font-weight:600}.section-head small{color:#8090aa;font-size:11px}.section-head .muted{color:#8290a7;font-size:12px}.progress-row{display:grid;grid-template-columns:83px 1fr 85px;align-items:center;gap:14px;margin:19px 0}.progress-row label{font-size:12px;color:#b7c3d5}.bar{height:8px;background:#343e54;border-radius:99px;overflow:hidden}.bar>span{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#8e77ee,#69cad5)}.progress-row strong{text-align:right;font-size:12px}.progress-row strong em{font-style:normal;color:#94a1b7;font-weight:400}.mini-legend{display:flex;gap:18px;color:#9eaac0;font-size:11px;margin-top:25px}.mini-legend span:before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;background:#9b84ef;margin-right:7px}.mini-legend span:nth-child(2):before{background:#64c7d0}.donut-wrap{display:flex;align-items:center;justify-content:center;gap:28px;padding:12px 0 4px}.donut{width:142px;height:142px;border-radius:50%;display:grid;place-items:center;position:relative;background:conic-gradient(#9d83ec var(--a),#60c4d0 0)}.donut:before{content:'';position:absolute;inset:22px;border-radius:50%;background:#192237}.donut-center{position:relative;text-align:center}.donut-center strong{font-size:25px;display:block}.donut-center small{font-size:10px;color:#8f9db4}.donut-legend{display:grid;gap:15px}.donut-legend>div{display:flex;align-items:center;gap:9px;font-size:12px;color:#a9b5c9}.swatch{width:8px;height:8px;border-radius:3px;background:#9d83ec}.swatch.cyan{background:#60c4d0}.donut-legend strong{display:block;color:#f4f5fc;font-size:18px;margin-top:3px}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse;min-width:660px}.data-table th{text-align:left;color:#97a4ba;font-size:11px;font-weight:500;padding:0 12px 12px;border-bottom:1px solid #ffffff14;white-space:nowrap}.data-table td{padding:14px 12px;color:#c4cedf;font-size:12px;border-bottom:1px solid #ffffff0d;white-space:nowrap}.data-table tr:last-child td{border-bottom:0}.person-cell{display:flex;align-items:center;gap:9px;font-weight:600;color:#edf2fc}.avatar{width:29px;height:29px;display:inline-grid;place-items:center;border-radius:9px;background:#977bea2a;color:#c8b4ff;font-size:12px;flex:none}.tag{display:inline-flex;align-items:center;border-radius:7px;padding:4px 7px;background:#6c789326;color:#c2cee0;font-size:10px}.tag.green{color:#8de2c6;background:#43bd9524}.tag.orange{color:#ffd08a;background:#e9a04323}.tag.red{color:#ffadb6;background:#df61702a}.filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.select,.input,.textarea{color:#eef1fb;background:#11192a;border:1px solid #ffffff1d;border-radius:10px;outline:none;padding:10px 12px;min-height:39px;font-size:12px}.select:focus,.input:focus,.textarea:focus{border-color:#9b87e6}.select option{background:#182236}.textarea{min-height:88px;resize:vertical;width:100%}.empty{color:#8996ad;text-align:center;padding:35px 15px;font-size:12px}.notice{border:1px solid #9c84e044;background:#8e78dd17;border-radius:13px;color:#cdbff7;padding:13px 15px;font-size:12px;line-height:1.7;margin-bottom:18px}.notice.warning{background:#d6962412;border-color:#d6a25435;color:#f3ce90}.vehicle-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:18px}.vehicle-card{position:relative;min-height:193px}.vehicle-top{display:flex;justify-content:space-between;align-items:start}.vehicle-icon{height:38px;width:38px;border-radius:11px;background:#86a0e624;display:grid;place-items:center;color:#a9c6ff;font-size:20px}.vehicle-number{font-size:16px;font-weight:700;margin:20px 0 6px}.vehicle-meta{font-size:11px;color:#8493ad}.vehicle-footer{display:flex;justify-content:space-between;align-items:end;margin-top:17px}.vehicle-footer strong{display:block;font-size:22px}.vehicle-footer small{font-size:10px;color:#96a3b9}.stack{display:grid;gap:17px}.alert-list{display:grid;gap:10px}.alert-item{border:1px solid #e7956933;background:#db7a4c0c;border-radius:12px;padding:13px 15px;display:flex;align-items:center;gap:11px}.alert-item.normal{border-color:#6aafaa35;background:#5cbaa514}.alert-item .alert-icon{font-size:20px}.alert-item strong{display:block;font-size:12px}.alert-item small{display:block;color:#8998af;font-size:11px;margin-top:4px}.alert-item .tag{margin-left:auto}.timeline{display:grid;gap:0}.timeline-row{display:grid;grid-template-columns:72px 15px 1fr;gap:12px;min-height:53px;font-size:12px}.timeline-time{color:#91a0b6}.timeline-track{position:relative}.timeline-track:before{content:'';position:absolute;top:7px;bottom:-7px;left:7px;border-left:1px solid #4c5a73}.timeline-row:last-child .timeline-track:before{display:none}.timeline-track:after{content:'';position:absolute;top:4px;left:4px;width:7px;height:7px;border-radius:50%;background:#a98ff0}.timeline-row.stop .timeline-track:after{background:#f3a666}.timeline-row strong{display:block;font-weight:600}.timeline-row small{color:#96a3b9;display:block;margin-top:3px}.tabs{display:flex;gap:5px;padding:4px;background:#ffffff0b;border-radius:11px;width:max-content;max-width:100%;margin-bottom:18px}.tab{border:0;background:none;color:#8797b0;padding:8px 14px;font-size:12px;border-radius:8px}.tab.active{background:#ffffff16;color:#eef2fd}.people-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.person-card .person-head{display:flex;gap:11px;align-items:center}.person-card .avatar{width:39px;height:39px;font-size:15px}.person-card h3{font-size:14px;margin:0 0 3px}.person-card small{font-size:11px;color:#8392ab}.person-details{border-top:1px solid #ffffff12;margin-top:17px;padding-top:14px;display:grid;grid-template-columns:1fr 1fr;gap:14px}.person-details label{color:#98a5bb;font-size:10px;display:block;margin-bottom:4px}.person-details strong{font-size:12px;font-weight:500}.profile-hero{display:flex;gap:20px;align-items:center}.profile-hero .avatar{height:66px;width:66px;font-size:29px;border-radius:20px}.profile-hero h2{margin:0 0 6px;font-size:20px}.profile-hero p{color:#8e9db4;margin:0;font-size:12px}.permissions{display:grid;gap:10px}.permission{display:flex;gap:10px;align-items:center;font-size:12px;color:#b4c0d2}.permission i{font-style:normal;color:#80d3b5}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-field{display:grid;gap:7px}.form-field.full{grid-column:1/-1}.form-field label{font-size:11px;color:#99a7bd}.form-field .input,.form-field .select{width:100%}.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}.modal-backdrop{position:fixed;inset:0;background:#03060dbb;backdrop-filter:blur(7px);z-index:20;display:grid;place-items:center;padding:20px}.modal{background:#1a2235;border:1px solid #ffffff21;border-radius:21px;width:min(540px,100%);max-height:min(90vh,850px);overflow:auto;padding:24px;box-shadow:0 35px 110px #0009}.modal-head{display:flex;justify-content:space-between;align-items:start;margin-bottom:21px}.modal h2{margin:0;font-size:19px}.modal p{color:#93a0b5;font-size:12px;margin:6px 0 0;line-height:1.7}.icon-button{background:#ffffff11;border:1px solid #ffffff12;color:#b9c4d4;border-radius:9px;width:30px;height:30px;font-size:18px}.toast{position:fixed;right:25px;bottom:25px;z-index:30;background:#27334a;color:#eef3ff;border:1px solid #ffffff28;border-radius:12px;padding:12px 16px;box-shadow:0 20px 50px #0006;font-size:12px}.mobile-nav{display:none}.kpi-line{display:flex;align-items:center;justify-content:space-between;padding:11px 0;border-bottom:1px solid #ffffff10;font-size:12px}.kpi-line:last-child{border:0}.kpi-line span{color:#8998b0}.kpi-line strong{font-weight:600}.muted{color:#8795ad}.right{text-align:right}.subheading{font-size:12px;color:#94a2b8;margin:0 0 12px}.small-note{font-size:11px;color:#9aa7bd;line-height:1.7}.checklist{display:grid;gap:10px}.checklist label{display:flex;gap:9px;align-items:center;font-size:12px;color:#c4cede}.checklist input{accent-color:#9884ed}.divider{height:1px;background:#ffffff12;margin:18px 0}.mobile-only{display:none}
@media(max-width:1120px){.app-shell{grid-template-columns:205px minmax(0,1fr);gap:18px}.sidebar{padding:20px 10px}.stats-grid{grid-template-columns:repeat(2,1fr)}.vehicle-grid,.people-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.app-shell{display:block;padding:0}.sidebar{display:none}.topbar{height:58px;padding:0 18px;border-bottom:1px solid #ffffff10}.top-actions{gap:8px}.demo-pill{display:none}.content{padding:10px 15px 110px}.page-title{align-items:start;margin:18px 0 22px}.page-title h1{font-size:27px}.title-actions{align-self:end}.title-actions .button{padding:9px 11px;font-size:11px}.two-col{grid-template-columns:1fr}.vehicle-grid,.people-grid{grid-template-columns:1fr 1fr}.mobile-nav{position:fixed;display:grid;grid-template-columns:repeat(4,1fr);left:12px;right:12px;bottom:12px;padding:7px 5px calc(7px + env(safe-area-inset-bottom));border-radius:18px;z-index:10}.mobile-nav .nav-button{height:52px;padding:4px;display:flex;flex-direction:column;justify-content:center;gap:2px;text-align:center;font-size:10px;margin:0}.mobile-nav .nav-icon{font-size:20px}.mobile-only{display:block}.card{padding:16px}.toast{bottom:90px;left:20px;right:20px;text-align:center}}
@media(max-width:500px){.stats-grid{gap:10px}.stat-card{min-height:121px}.stat-value{font-size:25px}.stat-icon{font-size:18px}.vehicle-grid,.people-grid{grid-template-columns:1fr}.page-title{display:block}.title-actions{margin-top:16px}.donut-wrap{justify-content:space-around;gap:10px}.donut{width:125px;height:125px}.form-grid{grid-template-columns:1fr}.form-field.full{grid-column:auto}.modal{padding:18px}.profile-hero .avatar{width:54px;height:54px;font-size:23px}}

/* ===== 第二步：巡逻 / 排班 / 统计 新增组件 ===== */
.shift-chip{border:1px solid #ffffff17;background:#ffffff0c;color:#dce5f7;border-radius:99px;display:inline-flex;align-items:center;gap:8px;padding:7px 12px;font-size:12px;max-width:100%}
.shift-chip:hover{background:#ffffff19}
.shift-chip .chevron{color:#8995aa;font-size:11px}
.shift-dot{width:7px;height:7px;border-radius:50%;background:#69cad5;box-shadow:0 0 10px #69cad5}
.popover{position:fixed;z-index:25;width:min(392px,94vw);max-height:min(72vh,600px);overflow:auto;background:#171f31f5;border:1px solid #ffffff1f;border-radius:18px;box-shadow:0 30px 90px #0009;padding:16px;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.pop-head{display:grid;gap:5px;margin-bottom:12px}
.pop-head strong{font-size:13px}
.pop-head small{font-size:11px;color:#96a3b9;line-height:1.6}
.pop-list{display:grid;gap:2px}
.pop-row{display:flex;align-items:center;gap:10px;padding:7px 4px;border-radius:10px;border-bottom:1px solid #ffffff0c}
.pop-row:last-child{border-bottom:0}
.pop-row.muted{opacity:.72}
.pop-date{display:grid;width:56px;flex:none;line-height:1.3}
.pop-date strong{font-size:12px}
.pop-date span{font-size:10px;color:#96a3b9}
.pop-chips{display:flex;gap:6px;flex-wrap:wrap}
.chk{display:inline-flex;align-items:center;gap:5px;border:1px solid #ffffff1a;border-radius:9px;padding:5px 8px;font-size:11px;color:#b9c5d8;cursor:pointer;background:#ffffff08}
.chk:hover{border-color:#ffffff33}
.chk.on{border-color:#a08cec88;background:#8f77eb26;color:#efe9ff}
.chk input{accent-color:#9884ed;margin:0;width:12px;height:12px}
.chk em{font-style:normal;color:#8f9cb4;font-size:10px}
.chk.on em{color:#c9bdf5}
.pop-foot{display:flex;justify-content:space-between;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid #ffffff12}

.view-card{margin-bottom:18px}
.view-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-bottom:14px;margin-bottom:16px;border-bottom:1px solid #ffffff12;flex-wrap:wrap}
.view-title{display:flex;align-items:center;gap:9px;font-size:13px}
.view-title strong{font-size:15px}
.view-head small{font-size:11px}
.team-block{padding:14px 0 4px;border-top:1px dashed #ffffff14}
.team-block:first-of-type{border-top:0;padding-top:0}
.team-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;flex-wrap:wrap}
.team-title{display:flex;align-items:center;gap:8px;font-size:13px}
.team-dot{width:6px;height:6px;border-radius:50%;background:#a98ff0;box-shadow:0 0 9px #a98ff0}
.team-metrics{display:flex;flex-wrap:wrap;gap:8px 14px;font-size:11px;color:#8795ad}
.team-metrics strong{color:#e7edfa}
.team-metrics strong.warn{color:#ffc98a}
.veh-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.veh-card{border:1px solid #ffffff12;background:linear-gradient(150deg,#20293ee0,#161d2fe0);border-radius:15px;padding:15px;cursor:pointer;transition:border-color .18s,transform .18s}
.veh-card:hover{border-color:#a18cec66;transform:translateY(-2px)}
.veh-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.veh-head strong{font-size:14px;letter-spacing:.01em}
.veh-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0 12px}
.veh-stats span{display:block;font-size:11px;color:#98a5bb;margin-bottom:5px}
.veh-stats strong{font-size:17px;font-weight:700}
.veh-stats strong em{font-style:normal;font-size:10px;color:#8695ad;margin-left:3px;font-weight:400}
.veh-foot{display:flex;justify-content:space-between;align-items:center;font-size:11px;padding-top:10px;border-top:1px solid #ffffff0d}
.link{color:#c4b2ff;font-size:11px}
.pill-role{display:inline-flex;align-items:center;border-radius:7px;padding:3px 6px;font-size:10px;background:#6c789326;color:#c2cee0;white-space:nowrap}
.pill-role.day{background:#f0b45c22;color:#ffd08a}
.pill-role.night{background:#7a86e02a;color:#bcc6ff}
.pill-role.rest{background:#5f6b8426;color:#9aa8bd}
.duty-cell{display:flex;gap:5px;flex-wrap:wrap}
.sched td{padding:11px 12px}
.sched tr.today td{background:#8f77eb14}
.sched .bar.mini{height:5px;margin-top:6px;min-width:74px}
.sched .bar.mini.alt>span{background:linear-gradient(90deg,#5fb8c6,#8e77ee)}
.range-form{display:flex;align-items:end;gap:10px;flex-wrap:wrap}
.range-form label{display:grid;gap:6px;font-size:11px;color:#99a7bd}
.range-form .quick{display:flex;gap:6px;margin-left:auto}
.veh-quick{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.veh-quick span{display:block;font-size:10px;color:#8695ad;margin-bottom:5px}
.veh-quick strong{font-size:14px}
.org-list{gap:20px}
.org-unit{border:1px solid #ffffff10;border-radius:15px;padding:15px;background:#ffffff06}
.org-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:9px}
.org-head small{display:block;color:#96a3b9;font-size:10px;margin-top:3px}
.org-area{border-top:1px dashed #ffffff14;margin-top:12px;padding-top:12px}
.cred{display:flex;justify-content:space-between;gap:10px;background:#0f1626;border:1px dashed #ffffff20;border-radius:9px;padding:7px 10px;font-family:ui-monospace,Menlo,monospace;font-size:11px;color:#cfd9ea;margin-bottom:6px}
.org-tools{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}
.veh-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.veh-chip{display:inline-flex;align-items:center;gap:5px;border:1px solid #ffffff16;border-radius:8px;padding:4px 7px;font-size:10px;color:#c3cee0;background:#ffffff08}
.veh-chip em{font-style:normal;color:#96a3b9}
.veh-chip b{color:#ffd08a;font-weight:600}
.veh-chip button{border:0;background:#ffffff12;color:#b9c4d4;border-radius:5px;padding:1px 5px;font-size:10px;cursor:pointer}
.veh-chip button:hover{background:#ffffff26;color:#fff}
.warn{color:#ffc98a}
@media(max-width:1120px){.veh-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.veh-quick{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.shift-chip{font-size:11px;padding:6px 9px}.view-head{flex-direction:column;align-items:flex-start}.team-metrics{gap:10px}.popover{left:12px;right:12px!important;width:auto}}
@media(max-width:500px){.veh-grid{grid-template-columns:1fr}.range-form .quick{margin-left:0}}
/* 监测班次弹层：每行两枚整宽班次按钮 */
.pop-chips{flex-direction:column;gap:5px;flex:1;min-width:0}
.pop-chips .chk{width:100%;justify-content:flex-start;padding:6px 9px}
.pop-chips .chk em{margin-left:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:62%}
/* 移动端顶部栏收紧 */
@media(max-width:760px){
  .breadcrumb{display:none}
  .topbar{justify-content:flex-end;gap:8px}
  .shift-chip{font-size:10px;padding:6px 10px;white-space:nowrap;flex:none}
  .shift-chip .chevron{display:none}
  .user-button{flex:none}
  .user-button #user-name{max-width:42px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .top-actions{flex:1;justify-content:flex-end;min-width:0}
}
/* 管理页：班组卡片 */
.team-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px}
.team-card{border:1px solid #ffffff12;background:#ffffff07;border-radius:12px;padding:11px;display:grid;gap:8px;align-content:start}
.team-card-head{display:flex;justify-content:space-between;align-items:center;font-size:12px}
.team-card-head strong{font-size:12px}
.team-card .veh-tags{margin:0}
.team-card>.button{width:100%}
.org-area .org-head h2{font-size:17px}
@media(max-width:760px){.team-grid{grid-template-columns:1fr}}
/* 管理页：共享车辆 */
.shared-block{margin-top:12px;padding:10px 12px;border:1px dashed #ffffff1c;border-radius:11px;background:#ffffff05}
.shared-label{display:block;font-size:11px;color:#8b99b1;margin-bottom:7px}
/* 移动端：导航项数自适应（管理员有 5 项） */
@media(max-width:760px){
  .mobile-nav{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:1fr}
  .user-button #user-name{white-space:nowrap;max-width:48px}
  .user-button>span{white-space:nowrap}
}
/* 多选班组 / 排班循环 */
.pick-list{display:grid;gap:8px}
.pick-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.pick-label{font-size:11px;color:#8b99b1;min-width:66px}
.pick-teams{display:flex;gap:6px;flex-wrap:wrap}
.select.mini{min-height:30px;padding:4px 8px;font-size:11px;width:100%}
.team-card-head{position:relative}
.team-del{border:0;background:#ffffff12;color:#9aa8bd;border-radius:6px;width:20px;height:20px;font-size:12px;line-height:1;cursor:pointer}
.team-del:hover{background:#df61702a;color:#ffadb6}
/* 排班循环弹窗加宽 */
.modal.modal-wide{width:min(780px,100%)}
.modal-wide .data-table{min-width:0}
.modal-wide .data-table th,.modal-wide .data-table td{padding-left:8px;padding-right:8px}

/* ===== 第三步：主巡车 / 出发时间 / 错时警力 ===== */
.duty-card{min-height:186px}
.duty-card .stat-value{font-size:22px;line-height:1.25;margin:14px 0 6px;word-break:break-all}
.stat-value.dim{color:#8c99b0;font-size:19px}
.duty-rows{display:grid;gap:7px;margin-top:12px;padding-top:12px;border-top:1px solid #ffffff12}
.duty-row{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11px}
.duty-row span{color:#98a5bb}
.duty-row b{font-weight:600;color:#e7edfa;font-variant-numeric:tabular-nums}
.duty-row b.dim{color:#8c99b0;font-weight:500}
.view-detail{display:flex;flex-wrap:wrap;gap:6px 16px;padding:10px 0 2px;margin:0 0 12px;border-bottom:1px dashed #ffffff14;font-size:11px;color:#8e9db4}
.view-detail span{white-space:nowrap}
@media(max-width:1120px){.duty-card{min-height:176px}}
@media(max-width:760px){.duty-card{min-height:0}.duty-rows{grid-template-columns:1fr 1fr}}
@media(max-width:500px){.duty-rows{grid-template-columns:1fr}}
/* 第三步：明细行文字不折行 */
.duty-row span{white-space:nowrap}
.duty-row b{text-align:right;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:500px){.duty-row b{font-size:10.5px}.duty-card .stat-value{font-size:20px}}

/* 统一下拉框外观（macOS 原生 select 会画出割裂的背景） */
.select{appearance:none;-webkit-appearance:none;-moz-appearance:none;padding-right:30px;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a7b4c9' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 10px center;background-size:10px 6px}
.select.mini{padding-right:24px;background-position:right 7px center}
/* 车辆芯片里的小按钮：原来 10px 太淡 */
.veh-chip button{font-size:11px;padding:2px 6px;color:#dbe3f0;background:#ffffff1c}
.veh-chip button:hover{background:#ffffff30;color:#fff}
/* 时间轴左侧时间稍微提亮 */
.timeline-time{color:#a3b1c6}
/* 统计卡：文字不要压到右下角图标上 */
.stat-card .stat-value,.stat-card .stat-sub{padding-right:26px}
@media(max-width:500px){
  .stat-card .stat-icon{display:none}
  .stat-card .stat-value,.stat-card .stat-sub{padding-right:0}
}
/* 班组统计：白/夜两行 + 出发均值 */
.data-table td.team-cell{vertical-align:top;padding-top:14px}
.data-table td.team-cell strong{display:block;font-size:12px}
.data-table td.team-cell small{display:block;color:#8e9db4;font-size:10px;margin-top:4px}
.dep-avg{display:grid;gap:2px;font-size:11px;color:#98a5bb;line-height:1.5}
.dep-avg span{white-space:nowrap}
.dep-avg b{color:#e7edfa;font-weight:600;font-variant-numeric:tabular-nums;margin-left:4px}
.dim-text{color:#7f8ca3}
.data-table tr.row-dim td{opacity:.72}

/* ===== 登录界面 ===== */
#login-root{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:24px;
  background:radial-gradient(900px 520px at 22% 12%,#2b2a5e66,transparent 70%),radial-gradient(700px 460px at 82% 88%,#0d5b6355,transparent 70%),#080c16}
body.locked .app-shell{display:none}
body.locked .mobile-nav{display:none!important}
.login-card{width:min(400px,100%);background:linear-gradient(160deg,#1d263ac9,#151c2ef2);border:1px solid #ffffff1a;border-radius:24px;padding:30px 28px 24px;box-shadow:0 40px 120px #0009;backdrop-filter:blur(20px)}
.login-brand{display:flex;align-items:center;gap:13px;margin-bottom:24px}
.login-brand .mark{width:46px;height:46px;border-radius:14px;background:#080b11;display:grid;place-items:center;box-shadow:inset 0 0 0 1px #ffffff1c}
.login-brand .mark img{width:34px;height:34px;object-fit:contain}
.login-brand strong{display:block;font-size:18px;letter-spacing:.02em}
.login-brand small{display:block;color:#9aa7bd;font-size:11px;margin-top:3px}
.login-card h1{font-size:17px;margin:0 0 6px;font-weight:600}
.login-card .hint{font-size:11px;color:#98a5bb;margin:0 0 20px;line-height:1.7}
.login-field{display:grid;gap:7px;margin-bottom:14px}
.login-field label{font-size:11px;color:#a9b6c9}
.login-field .input{width:100%;height:44px;font-size:13px}
.login-error{border:1px solid #df617055;background:#df617018;color:#ffbdc1;border-radius:10px;padding:9px 12px;font-size:12px;margin-bottom:12px}
.login-submit{width:100%;height:46px;font-size:14px;margin-top:6px}
.login-foot{margin-top:18px;padding-top:16px;border-top:1px solid #ffffff12;font-size:11px;color:#8e9db4;line-height:1.8}
.login-foot b{color:#c8d3e6;font-weight:600}
/* 登录页更饱满一点 */
.login-card{width:min(420px,100%);padding:34px 30px 26px}
.login-card h1{font-size:20px}
.login-card .hint{font-size:12px;line-height:1.75}
.login-field label{font-size:12px}
.login-field .input{height:46px;font-size:13.5px}
.login-error{font-size:12px;line-height:1.6}
@media(max-width:420px){.login-card{padding:26px 20px 22px}}
/* 登录页：宽屏双栏 */
.login-wrap{display:grid;grid-template-columns:minmax(0,1fr) 420px;gap:72px;align-items:center;width:100%;max-width:1020px}
.login-side{max-width:420px}
.login-eyebrow{font-size:11px;letter-spacing:.22em;color:#b9a3ff;font-weight:700;margin-bottom:18px}
.login-side h2{font-size:40px;line-height:1.22;letter-spacing:-.02em;margin:0 0 18px;font-weight:700;color:#eef2ff}
.login-side p{margin:0;color:#96a3ba;font-size:13px;line-height:1.9}
.login-meta{margin-top:26px;font-size:11px;color:#7f8ca3;letter-spacing:.06em}
@media(max-width:900px){.login-wrap{grid-template-columns:1fr;gap:26px}.login-side{display:none}}
/* 关键：hidden 属性必须真的隐藏登录层（否则会盖住整个应用） */
#login-root[hidden]{display:none!important}
.veh-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.veh-actions .button{font-size:11px}

/* ===== v0.8：公共访问（只读）界面 ===== */
.link-button{background:none;border:0;padding:0;margin-top:6px;color:#b9a3ff;font-size:11px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.link-button:hover{color:#d8c9ff}
.login-card .hint b{color:#dcd2ff;font-weight:600}
.guest-mode .topbar{padding-right:12px}
.guest-badge{font-size:10px;color:#8de2c6;background:#43bd9524;border:1px solid #43bd9533;border-radius:99px;padding:3px 8px;letter-spacing:.04em}
.data-table td,.data-table th{font-variant-numeric:tabular-nums}
.stat-value,.veh-stats strong,.duty-row b{font-variant-numeric:tabular-nums}
#access-form{align-items:flex-end}
#access-form label{display:grid;gap:7px;font-size:11px;color:#99a7bd}
#access-form .input{width:100%}

/* ===== 已勾选班次条（避免旧勾选把新选的顶到下面） ===== */
.pinned-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:-6px 0 16px;padding:10px 14px;border:1px solid #a08cec44;background:#8f77eb14;border-radius:13px}
.pinned-label{font-size:11px;color:#c9bdf5;letter-spacing:.02em}
.pin-chip{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:#efe9ff;background:#ffffff12;border:1px solid #ffffff22;border-radius:99px;padding:4px 6px 4px 10px}
.pin-chip button{border:0;background:none;color:#a9b4c8;font-size:13px;line-height:1;padding:0 2px;cursor:pointer}
.pin-chip button:hover{color:#ff9aa5}
.pinned-bar .button.tiny{margin-left:auto}

/* ===== 出发时间（更显眼） ===== */
.duty-card .duty-dep{display:grid;gap:8px;margin:14px 0 10px}
.dep-line{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 10px;border-radius:10px;background:#ffffff08;border:1px solid #ffffff10}
.dep-line.dim-line{opacity:.6}
.dep-who{font-size:11px;color:#a9b6ca;display:flex;align-items:baseline;gap:6px;white-space:nowrap}
.dep-who small{font-size:10px;color:#7f8ca2}
.dep-times,.dep-cell{display:inline-flex;align-items:center;gap:6px}
.dep-times{gap:14px}
.dep-cell em{font-style:normal;font-size:10px;color:#8b98ae}
.dep-time{font-size:19px;font-weight:700;letter-spacing:-.01em;font-variant-numeric:tabular-nums;color:#f2f5ff}
.dep-time.wait{font-size:13px;color:#ffd08a;font-weight:600}
.dep-time.bad{font-size:13px;color:#ff9aa5;font-weight:600}

.dep-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;margin:12px 0 14px}
.dep-block{border:1px solid #ffffff14;background:linear-gradient(150deg,#20293f,#171f31);border-radius:14px;padding:12px 14px}
.dep-block.dim-line{opacity:.62}
.dep-block-head{display:flex;align-items:baseline;gap:8px;font-size:11px;color:#a9b6ca;margin-bottom:8px}
.dep-block-head small{font-size:10px;color:#7f8ca2}
.dep-block-times{display:flex;gap:18px;flex-wrap:wrap}
.dep-block .dep-time{font-size:22px}
@media(max-width:500px){.dep-block .dep-time{font-size:19px}.dep-times{gap:10px}}

/* 出发时间整幅卡片 & 三列统计 */
.dep-hero{margin-bottom:18px;padding:18px 20px}
.dep-hero .section-head{margin-bottom:12px}
.stats-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:1120px){.stats-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.stats-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:500px){.stats-grid.three{grid-template-columns:1fr 1fr}}

/* 出发面板：按巡区分组 */
.dep-area + .dep-area{margin-top:14px;padding-top:14px;border-top:1px dashed #ffffff14}
.dep-area-head{display:flex;align-items:baseline;gap:10px;margin-bottom:10px}
.dep-area-head strong{font-size:13px;color:#e7ecf8}
.dep-area-head small{font-size:11px;color:#8795ad}
.view-area-line{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin-top:10px;font-size:11px;color:#96a3b9}
.view-area-name{color:#c9d3e4;font-weight:600;font-size:12px}

/* 其余时段说明：解释 全天 ≠ 上午+下午 */
.veh-other{margin:8px 0 0;font-size:10.5px;line-height:1.6;color:#8b98ae;border-left:2px solid #a08cec55;padding-left:8px}

/* ===== 班组统计：可点击的均值 + 计算过程小窗 ===== */
.avg-cell{background:none;border:0;padding:0;display:inline-flex;align-items:baseline;gap:6px;color:inherit;text-align:left;cursor:pointer;line-height:1.2}
.avg-cell strong{font-weight:700;font-variant-numeric:tabular-nums;border-bottom:1px dashed #ffffff33;padding-bottom:1px;transition:border-color .15s,color .15s}
.avg-cell:hover strong{color:#ded2ff;border-bottom-color:#a08cec}
.avg-cell.alt:hover strong{color:#bfe9ee;border-bottom-color:#69cad5}
.avg-hint{font-size:10px;color:#7f8ca2;opacity:0;transition:opacity .15s}
.avg-cell:hover .avg-hint{opacity:1}
.calc-formula{border:1px solid #ffffff14;background:linear-gradient(150deg,#20293f,#171f31);border-radius:14px;padding:14px 16px}
.calc-formula-title{font-size:11px;color:#a9b6ca;letter-spacing:.02em;margin-bottom:10px}
.calc-eq{display:flex;align-items:baseline;gap:10px;padding:7px 0;border-bottom:1px dashed #ffffff10;font-size:12px;color:#9fadc2}
.calc-eq:last-of-type{border-bottom:0}
.calc-eq em{font-style:normal;color:#7f8ca2}
.calc-eq b{margin-left:auto;font-size:15px;color:#eaf0fb;font-variant-numeric:tabular-nums}
.calc-eq.total b{font-size:19px;color:#d9c9ff}
.calc-tip{margin-top:10px;font-size:10.5px;color:#8b98ae;line-height:1.6;border-left:2px solid #a08cec55;padding-left:8px}
.calc-table td{white-space:normal}
.calc-date{color:#c9d3e4}
.calc-date small{color:#7f8ca2;font-size:10px;margin-left:4px}
.calc-car{display:inline-flex;align-items:baseline;gap:6px;margin-right:12px;font-variant-numeric:tabular-nums;color:#b9c5d8}
.calc-car b{font-weight:600;color:#e7ecf8}
