:root{--blue:#0072d1;--blue-d:#005aa6;--orange:#ef5e00;--orange-d:#c24c00;--ink:#1b2430;--line:#dde3ea}
*{box-sizing:border-box}body{margin:0;font:14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:#f4f7fb;color:var(--ink)}
a{color:var(--blue-d);text-decoration:none}a:hover{color:var(--orange-d);text-decoration:underline}
header{background:#fff;border-top:4px solid var(--orange);border-bottom:3px solid var(--blue);display:flex;align-items:center;gap:18px;padding:0 20px;height:62px;box-shadow:0 1px 4px #0001}
header .brand{display:flex;align-items:center;gap:8px;font-weight:700;font-size:15px;margin-right:10px;color:var(--blue);text-decoration:none}header .brand img{height:44px}
header .brand small{display:block;font-size:11px;font-weight:600;color:var(--orange-d);letter-spacing:.06em;text-transform:uppercase}
header nav{display:flex;gap:4px}header nav a{color:var(--ink);padding:19px 8px;font-weight:500;border-bottom:3px solid transparent}header nav a:hover{color:var(--blue);text-decoration:none}header nav a.on{color:var(--blue);border-bottom-color:var(--orange)}
header .right{margin-left:auto;display:flex;gap:12px;align-items:center;font-size:13px}
main{max-width:1240px;margin:22px auto;padding:0 20px}
h1{font-size:22px;margin:0 0 14px;color:var(--blue-d)}h2{font-size:16px;margin:18px 0 10px;color:var(--ink)}
.card{background:#fff;border:1px solid var(--line);border-radius:8px;padding:16px;margin-bottom:16px}
details.card summary{cursor:pointer;color:var(--blue-d)}
table{width:100%;border-collapse:collapse;background:#fff}th,td{text-align:left;padding:8px 10px;border-bottom:1px solid #e6eaf0;vertical-align:top}th{background:#eef4fb;font-size:12px;text-transform:uppercase;color:#3d4d63}
table.kv th{text-transform:none;font-size:13px;background:#f6f9fd}.pl{white-space:pre-line}
input,select,textarea{font:inherit;padding:7px 9px;border:1px solid #c5ced9;border-radius:5px;width:100%;background:#fff}input:focus,select:focus,textarea:focus{outline:2px solid var(--blue);border-color:var(--blue)}textarea{min-height:70px}
label{display:block;font-size:12px;font-weight:600;color:#3d4d63;margin:8px 0 3px}label.chk{font-weight:400;display:flex;gap:4px;align-items:center}label.chk input{width:auto}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:4px 16px}
.btn,button{display:inline-block;background:var(--blue);color:#fff;border:0;border-radius:5px;padding:7px 14px;font:inherit;font-weight:600;cursor:pointer}.btn:hover,button:hover{background:var(--blue-d);color:#fff;text-decoration:none}
.btn.accent,button.accent{background:var(--orange-d)}.btn.accent:hover,button.accent:hover{background:#a34000}
.btn.sec,button.sec{background:#e7eef7;color:var(--ink)}.btn.sec:hover,button.sec:hover{background:#d6e3f2;color:var(--ink)}.btn.danger,button.danger{background:#b3261e}.btn.sm,button.sm{padding:3px 9px;font-size:12px}
.inline{display:inline}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.muted{color:#5f6d80;font-size:12px}
.tabs{display:flex;gap:4px;border-bottom:2px solid var(--line);margin-bottom:14px}.tabs a{padding:8px 14px;border-radius:6px 6px 0 0;color:#3d4d63}.tabs a.on{background:#fff;border:1px solid var(--line);border-top:3px solid var(--orange);border-bottom-color:#fff;margin-bottom:-2px;color:var(--blue-d);font-weight:600}
.pill{display:inline-block;padding:1px 8px;border-radius:10px;font-size:11px;background:#e7eef7}.pill.high{background:#ffe6d5;color:#8a3600}.pill.urgent{background:#fde2e0;color:#8f1d16}.pill.done{background:#dcf2df;color:#1d5f28}.pill.sample{background:#fff0e5;color:#8a3600;border:1px solid var(--orange)}.pill.inprogress{background:#dcebfa;color:#00498a}.pill.waiting{background:#f3e8ff;color:#5b2a86}
.flash{padding:10px 14px;border-radius:6px;margin-bottom:14px;background:#dcf2df;border-left:4px solid #2e8b3e}.flash.err{background:#fde2e0;border-left-color:#b3261e}
.login{max-width:400px;margin:50px auto;text-align:left}.biglogo{display:block;width:230px;margin:0 auto 10px}.mask{font-family:ui-monospace,monospace}
.cal{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;background:var(--line);border:1px solid var(--line)}.cal div{background:#fff;min-height:100px;padding:4px;font-size:12px}.cal .hd{min-height:auto;background:#eef4fb;font-weight:600;text-align:center}.cal .other{background:#f8f9fb;color:#99a}.cal .today{outline:2px solid var(--orange);outline-offset:-2px}
.cal .t{display:block;background:#e3effb;border-left:3px solid var(--blue);border-radius:3px;margin:2px 0;padding:1px 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ink)}.cal .t.urgent,.cal .t.high{border-left-color:var(--orange)}
#toasts{position:fixed;right:16px;bottom:16px;display:flex;flex-direction:column;gap:8px;z-index:9}.toast{background:#fff;border-left:5px solid var(--orange);padding:12px 14px;border-radius:8px;max-width:320px;box-shadow:0 4px 14px #0003}
pre.j{white-space:pre-wrap;font-size:11px;margin:0;max-width:330px;max-height:140px;overflow:auto;background:#f6f8fa;padding:4px}
.stats{display:flex;gap:12px}.stats .card{flex:1;text-align:center;border-top:3px solid var(--blue)}.stats .card:nth-child(2){border-top-color:var(--orange)}.stats b{font-size:26px;display:block;color:var(--blue-d)}
pre.codes{font:15px ui-monospace,monospace;background:#f6f8fa;border:1px dashed #0072d1;padding:12px 16px;columns:2;max-width:360px}code{background:#f0f3f7;padding:1px 5px;border-radius:4px}
.btn.big,button.big{padding:11px 22px;font-size:15px;border-radius:7px;box-shadow:0 2px 6px #0072d133}.btn.big.accent{box-shadow:0 2px 6px #ef5e0040}
.dash-head{gap:14px}.dash-actions{margin-left:auto;display:flex;gap:10px}
details.inline-client{margin-top:12px;border:1px dashed #c5ced9;border-radius:8px;padding:10px 14px}details.inline-client.active,details.inline-client[open]{border-color:var(--orange);background:#fff8f3}
.att-box h3{font-size:14px;margin:4px 0 6px;color:var(--blue-d)}details.inline-client .att-box{margin-top:12px;border-top:1px dashed #e0b48f;padding-top:8px}
.tagpick{display:flex;flex-wrap:wrap;gap:6px 14px;margin:4px 0}.pill.tagpill{background:#e3effb;color:#00498a}.pill.stage-active{background:#dcf2df;color:#1d5f28}.pill.stage-prospect{background:#fff0e5;color:#8a3600}.pill.stage-inactive{background:#eee;color:#666}
.recur{background:#f6f9fd;border:1px solid #dde7f3;border-radius:6px;padding:8px 10px;margin-top:6px}
.checklist{list-style:none;padding:0}.checklist li{display:flex;gap:8px;align-items:center;padding:4px 0;border-bottom:1px solid #eef2f6}.checklist li.done span:first-of-type{text-decoration:line-through;color:#6b788a}
.progress{height:8px;background:#e7eef7;border-radius:4px;overflow:hidden;margin-bottom:8px}.progress span{display:block;height:100%;background:linear-gradient(90deg,#0072d1,#ef5e00)}
.timeline{list-style:none;padding:0;border-left:3px solid #0072d1;margin-left:8px}.timeline li{display:flex;gap:14px;padding:8px 12px;position:relative}.timeline li:before{content:'';position:absolute;left:-8px;top:14px;width:11px;height:11px;border-radius:50%;background:#0072d1}
.timeline li.tl-note{background:#fff;border:1px solid #dde3ea;border-radius:8px;margin:6px 0 6px 10px}.timeline li.tl-note:before{background:#ef5e00;left:-18px}.tl-when{min-width:150px;color:#5f6d80;font-size:12px}
.thread{display:flex;flex-direction:column;gap:10px;margin-bottom:14px}.msg{max-width:70%;background:#fff;border:1px solid #dde3ea;border-radius:10px;padding:10px 14px}.msg.mine{align-self:flex-end;background:#e3effb;border-color:#b8d4f1}.msg .meta{font-size:12px;color:#5f6d80;margin-bottom:4px}
.bar{position:relative;background:#eef4fb;border-radius:4px;height:20px}.bar span{display:block;height:100%;background:#0072d1;border-radius:4px}.bar b{position:absolute;left:8px;top:1px;color:#fff;font-size:12px;text-shadow:0 0 3px #0008}.late{color:#c24c00}
.tplbar{border-left:4px solid #ef5e00}.req-card{border-left:4px solid #ef5e00}.flash.verify{background:#fff4e8;border-left-color:#ef5e00;color:#5a2a00}
