:root{--green:#173F2A;--green2:#1F5C3A;--green3:#2B5A42;--ground:#F4F6F3;--ink:#14201A;--muted:#47534C;--line:#CDD5CF;--line2:#8A968F;--orange:#A8480C}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--ground);color:var(--ink);font-family:'Barlow',Arial,sans-serif}
button,input,select,textarea{font-family:inherit;font-size:16px}
button{cursor:pointer}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #E08A3C;outline-offset:2px}
.cond{font-family:'Barlow Condensed',Arial,sans-serif;font-weight:700}

/* crew */
.phone{height:100dvh;max-width:520px;margin:0 auto;display:flex;flex-direction:column;position:relative;overflow:hidden;background:var(--ground)}
.pin{flex:1;background:var(--green);color:#fff;padding:calc(36px + env(safe-area-inset-top)) 28px calc(28px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:24px;overflow:auto}
.topline{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.brand{font-size:26px;line-height:1.05}
.lang{min-width:56px;height:44px;border:1px solid #8FB39E;border-radius:8px;background:transparent;color:#fff;font-weight:600;font-size:15px}
.pinhead{display:flex;flex-direction:column;align-items:center;gap:16px;margin-top:20px}
.pinhead div:first-child{font-size:20px;font-weight:600}
.dots{display:flex;gap:16px}
.dot{width:18px;height:18px;border-radius:50%;border:2px solid #fff}
.dot.on{background:#fff}
.err{min-height:22px;text-align:center;font-weight:600;color:#FFD9B8}
.keys{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:auto}
.keys button{height:72px;border:0;border-radius:12px;background:var(--green3);color:#fff;font:700 30px 'Barlow Condensed',Arial,sans-serif}
.keys button.plain{background:transparent}
.setup{display:flex;flex-direction:column;gap:12px;margin-top:12px}
.setup label{font-weight:600}
.setup input{height:52px;border-radius:10px;border:0;padding:0 14px;width:100%;margin-top:6px}
.setup button{height:56px;border:0;border-radius:12px;background:#fff;color:var(--ink);font-weight:700;font-size:18px}

.head{background:var(--green);color:#fff;padding:calc(16px + env(safe-area-inset-top)) 16px 14px;display:flex;flex-direction:column;gap:12px}
.dayname{font-size:34px;line-height:1}
.dateline{font-size:18px;font-weight:600;margin-top:4px}
.prog{font-size:16px;font-weight:600;margin-bottom:6px}
.bar{height:10px;border-radius:5px;background:#3B6450;overflow:hidden}
.bar i{display:block;height:10px;background:#fff}
.tabs{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}
.tabs button{height:54px;padding:0;border:0;border-radius:8px;background:var(--green3);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px}
.tabs button.on{background:#fff;color:var(--ink)}
.tabs span{font-size:14px;font-weight:600}
.tabs b{font-size:18px;line-height:1}
.list{flex:1;min-height:0;overflow-y:auto;padding:12px 16px 96px;display:flex;flex-direction:column;gap:8px}
.sect{font-size:14px;font-weight:700;color:var(--muted);padding-top:4px}
.sect.gap{padding-top:12px}
.row{display:flex;align-items:stretch;background:#fff;border:1px solid var(--line);border-radius:12px;flex-shrink:0}
.row.done{background:#E6EDE8;border-color:#E6EDE8}
.chk{width:64px;flex-shrink:0;border:0;background:transparent;display:flex;align-items:center;justify-content:center}
.box{width:34px;height:34px;border:3px solid var(--green);border-radius:9px;display:flex;align-items:center;justify-content:center}
.row.done .box{background:var(--green2);border-color:var(--green2)}
.open{flex:1;min-width:0;border:0;background:transparent;text-align:left;padding:12px 12px 12px 0;display:flex;flex-direction:column;gap:7px;color:var(--ink)}
.addr{font-size:17px;font-weight:600;line-height:1.2}
.row.done .open{flex-direction:row;justify-content:space-between;align-items:center;gap:8px}
.row.done .addr{font-size:15px}
.tm{font-size:13px;font-weight:600;color:var(--muted);white-space:nowrap}
.wk{display:flex;gap:4px;align-items:center;flex-wrap:wrap}
.wk i{font-style:normal;width:30px;height:24px;border-radius:5px;font-size:13px;font-weight:700;display:flex;align-items:center;justify-content:center;background:#fff;color:var(--ink);border:1px solid #AEB8B1}
.wk i.now{border-color:var(--ink)}
.wk i.has{background:var(--green2);color:#fff;border-color:var(--green2)}
.wk i.none{color:#6B766F}
.tag{margin-left:6px;font-size:13px;font-weight:700;color:var(--orange)}
.tag.bi{color:var(--green2)}
.empty{padding:24px 4px;font-weight:600;color:var(--muted)}

.stophead{background:var(--green);color:#fff;padding:calc(10px + env(safe-area-inset-top)) 16px 18px;display:flex;flex-direction:column;gap:10px}
.back{align-self:flex-start;min-height:44px;border:0;background:transparent;color:#fff;padding:0;font-weight:600}
.stopaddr{font-size:32px;line-height:1.05}
.maps{align-self:flex-start;display:flex;align-items:center;min-height:44px;padding:0 14px;border:1px solid #8FB39E;border-radius:8px;color:#fff;text-decoration:none;font-size:15px;font-weight:600}
.stopbody{flex:1;min-height:0;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:20px}
.lbl{font-size:16px;font-weight:700;display:block;margin-bottom:8px}
.weeks{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.weeks button{height:72px;padding:4px 2px;border-radius:10px;border:2px solid #AEB8B1;background:#fff;color:var(--ink);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}
.weeks button.now{border-color:var(--ink)}
.weeks button.has{background:var(--green2);border-color:var(--green2);color:#fff}
.weeks button:disabled{background:#E6EAE7;border-color:#E6EAE7;color:#5B665F}
.weeks b{font-size:15px}.weeks span{font-size:12px;font-weight:600}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chips button{min-height:44px;padding:0 14px;border-radius:22px;border:2px solid var(--line2);background:#fff;color:var(--ink);font-weight:600;font-size:15px}
.chips button.on{background:var(--orange);border-color:var(--orange);color:#fff}
textarea{width:100%;border:1px solid var(--line2);border-radius:10px;padding:12px;background:#fff;color:var(--ink);font-weight:500;resize:none}
.foot{padding:12px 16px calc(20px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line)}
.primary{width:100%;height:60px;border:0;border-radius:12px;background:var(--green2);color:#fff;font-weight:700;font-size:20px}
.toast{position:fixed;left:50%;transform:translateX(-50%);width:calc(100% - 32px);max-width:488px;bottom:calc(20px + env(safe-area-inset-bottom));min-height:56px;padding:6px 8px 6px 16px;border-radius:12px;background:var(--ink);color:#fff;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:15px;font-weight:600;z-index:20}
.toast button{min-width:76px;height:44px;border:0;background:transparent;color:#fff;text-decoration:underline;font-weight:700;font-size:15px}
.offline{background:#7A3A0C;color:#fff;font-size:14px;font-weight:600;padding:8px 16px;text-align:center}

/* office */
.office{padding:24px;display:flex;flex-direction:column;gap:18px;max-width:1500px;margin:0 auto}
.ohead{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px}
.ohead h1{margin:0;font-size:34px;line-height:1}
.ohead p{margin:4px 0 0;font-weight:500}
.oactions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.btn{min-height:44px;padding:0 16px;border:1px solid var(--line2);border-radius:8px;background:#fff;color:var(--ink);font-weight:600}
.btn.go{background:var(--green2);border-color:var(--green2);color:#fff}
.otabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px}
.otabs button{min-height:64px;border:2px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);text-align:left;padding:8px 12px;display:flex;flex-direction:column;gap:2px}
.otabs button.on{background:var(--green);border-color:var(--green);color:#fff}
.otabs b{font-size:16px}.otabs span{font-size:14px;font-weight:600}
.ocols{display:flex;flex-wrap:wrap;gap:18px;align-items:flex-start}
.tablewrap{flex:999 1 640px;min-width:0;background:#fff;border:1px solid var(--line);border-radius:12px;overflow:auto;max-height:calc(100vh - 230px);min-height:420px}
table{width:100%;min-width:900px;border-collapse:collapse}
th{position:sticky;top:0;z-index:1;background:var(--green);color:#fff;padding:8px;font-size:14px;font-weight:700;text-align:center}
th.l{text-align:left;padding-left:14px}
th span{display:block;font-size:12px;font-weight:500}
tbody tr{border-top:1px solid #E1E6E2}
td{padding:6px 4px;text-align:center}
td.a{text-align:left;padding:6px 14px;font-size:15px;font-weight:600}
td.n{text-align:left;padding:6px 14px;font-size:14px;font-weight:600;color:var(--orange);min-width:220px}
.a button{border:0;background:transparent;padding:0;color:var(--ink);font-weight:600;font-size:15px;text-align:left;text-decoration:underline;text-decoration-color:#AEB8B1;min-height:32px}
.cell{width:32px;height:32px;border-radius:7px;border:1px solid #AEB8B1;background:#fff;display:inline-flex;align-items:center;justify-content:center;padding:0}
.cell.has{background:var(--green2);border-color:var(--green2)}
.freq{width:92px;min-height:36px;border-radius:18px;border:2px solid var(--line2);background:#fff;color:var(--ink);font-weight:600;font-size:14px}
.freq.bi{background:var(--green);border-color:var(--green);color:#fff}
.side{flex:1 1 300px;min-width:0;display:flex;flex-direction:column;gap:18px}
.panel{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:10px}
.panel h2{margin:0;font-size:17px}
.small{font-size:14px;font-weight:500;color:var(--muted);margin:0}
.opts{display:flex;flex-wrap:wrap;gap:6px}
.opts button{min-height:44px;padding:0 12px;border-radius:22px;border:2px solid var(--line2);background:#fff;color:var(--ink);font-weight:600;font-size:14px}
.opts button.on{background:var(--green2);border-color:var(--green2);color:#fff}
.feed{max-height:340px;overflow:auto;display:flex;flex-direction:column;gap:10px}
.fi{display:flex;flex-direction:column;gap:2px;padding-bottom:10px;border-bottom:1px solid #E1E6E2}
.fi div:first-child{display:flex;justify-content:space-between;gap:8px;font-size:13px;font-weight:600;color:var(--muted)}
.fi b{font-size:15px}.fi em{font-style:normal;font-size:14px;font-weight:600;color:var(--orange)}
.emp{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:15px;font-weight:600}
.emp.off{color:#5B665F}
.emp span small{display:block;font-size:13px;font-weight:500;color:var(--muted)}
.emp button{min-height:36px;padding:0 10px;font-size:13px;border:1px solid var(--line2);border-radius:8px;background:#fff;color:var(--ink);font-weight:600}
.modalbg{position:fixed;inset:0;background:rgba(10,20,15,.55);display:flex;align-items:center;justify-content:center;padding:16px;z-index:30}
.modal{background:#fff;border-radius:14px;padding:20px;width:100%;max-width:440px;display:flex;flex-direction:column;gap:12px}
.modal h2{margin:0;font-size:20px}
.modal label{font-weight:600;font-size:15px;display:block}
.modal input,.modal select{width:100%;height:48px;margin-top:6px;border:1px solid var(--line2);border-radius:8px;padding:0 12px;background:#fff}
.modal .acts{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;margin-top:6px}
.modal .warn{color:#8F2D12;font-weight:600;font-size:14px;min-height:18px;margin:0}
@media (max-width:640px){.office{padding:12px}.tablewrap{max-height:70vh}}
