:root{--primary:#00d2ff;--primary-foreground:#04101e;--background:#070c14;--foreground:#e2e8f0;--card:#0d1526;--card-foreground:#f8fafc;--secondary:#182236;--secondary-foreground:#cbd5e1;--muted:#182236;--muted-foreground:#94a3b8;--accent:#13243f;--accent-foreground:#38bdf8;--destructive:#ef4444;--border:#1e293b;--input:#1e293b;--ring:#00d2ff;--sidebar:#09101d;--ok:#34d399;--radius:.75rem}
*{box-sizing:border-box}html,body{margin:0;background:var(--background);color:var(--foreground);font-family:Inter,system-ui,sans-serif;font-size:14px}
.hidden{display:none!important}.muted{color:var(--muted-foreground)}.err{color:var(--destructive);min-height:1em}
.center{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px}
.card{background:var(--card);color:var(--card-foreground);border:1px solid var(--border);border-radius:var(--radius)}
.loginCard{padding:28px;width:100%;max-width:360px;display:flex;flex-direction:column;gap:12px;align-items:center}
.loginCard h1,.top h1{font-weight:900;letter-spacing:-.02em;margin:0;font-size:20px}
.logo{height:36px}.logo-lg{height:64px}
.input{background:var(--background);color:var(--foreground);border:1px solid var(--input);border-radius:calc(var(--radius) - 4px);height:36px;padding:0 10px;font:inherit;width:100%}
textarea.input{height:auto;min-height:110px;padding:8px 10px;resize:vertical}
.input:focus{outline:none;border-color:var(--ring);box-shadow:0 0 0 3px #00d2ff33}
.btn{border:1px solid transparent;border-radius:calc(var(--radius) - 4px);height:36px;padding:0 16px;font:inherit;font-weight:600;cursor:pointer}
.btn.primary{background:var(--primary);color:var(--primary-foreground);width:100%}.btn.primary:disabled{opacity:.5;cursor:wait}
.btn.ghost{background:transparent;color:var(--foreground);border-color:var(--border)}.btn.ghost:hover{background:var(--accent);color:var(--accent-foreground)}
.btn.sm{height:32px;padding:0 12px}
.top{position:sticky;top:0;z-index:5;display:flex;gap:12px;align-items:center;padding:10px 16px;background:#09101df2;backdrop-filter:blur(8px);border-bottom:1px solid var(--border)}
.top #logout{margin-left:auto}
.pill{font-size:11px;padding:3px 8px;border-radius:999px;background:var(--secondary);color:var(--secondary-foreground)}
.badge{font-size:11px;font-weight:600;padding:2px 8px;border-radius:999px;background:var(--secondary);color:var(--muted-foreground)}
.badge.ok{background:#34d39922;color:var(--ok)}.badge.bad{background:#ef444422;color:#f87171}.badge.info{background:var(--accent);color:var(--accent-foreground)}
.filters{margin:12px 16px;padding:12px;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;align-items:end}
.filters label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted-foreground)}
.filters label.chk{flex-direction:row;align-items:center;gap:8px;height:36px;color:var(--foreground)}
.banner{margin:0 16px 12px;padding:10px;border:1px solid var(--destructive);border-radius:var(--radius)}
.split{display:grid;grid-template-columns:minmax(300px,380px) 1fr;gap:16px;padding:0 16px 24px;max-width:1600px;margin:0 auto}
.list{display:flex;flex-direction:column;gap:8px;max-height:calc(100vh - 190px);overflow:auto}
.item{padding:12px;cursor:pointer;display:grid;gap:4px}.item:hover{background:var(--accent)}.item.sel{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary)}
.item .r1{display:flex;justify-content:space-between;gap:8px;font-weight:600}.item .r2{display:flex;gap:6px;flex-wrap:wrap;font-size:12px;color:var(--muted-foreground);align-items:center}
.detail{padding:18px;max-height:calc(100vh - 190px);overflow:auto}
.dhead{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:center;margin-bottom:12px}.dhead h2{margin:0;font-size:18px;font-weight:700}
.st{display:inline-flex;align-items:center;gap:6px;background:var(--primary);color:var(--primary-foreground);text-decoration:none;font-weight:600;border-radius:calc(var(--radius) - 4px);padding:8px 14px}
.kv{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;margin-bottom:12px}
.kv div{background:var(--secondary);border-radius:calc(var(--radius) - 4px);padding:8px 10px}.kv span{display:block;font-size:11px;color:var(--muted-foreground);text-transform:uppercase;letter-spacing:.04em}.kv b{font-weight:600}
.notes{background:var(--secondary);border-radius:calc(var(--radius) - 4px);padding:10px;margin-bottom:8px;white-space:pre-wrap}.notes span{display:block;font-size:11px;color:var(--muted-foreground);text-transform:uppercase}
h3{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--accent-foreground);margin:18px 0 8px}
.form{display:grid;gap:12px}.row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.form label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted-foreground)}
.fus{display:grid;grid-template-columns:1fr;gap:10px}
@media (min-width:1200px){.fus{grid-template-columns:repeat(3,minmax(0,1fr))}}
.fu{display:flex;flex-direction:column;gap:10px;background:var(--secondary);border:1px solid var(--border);border-radius:calc(var(--radius) - 4px);padding:12px;min-width:0}
.fu>b{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:var(--accent-foreground)}
.furow{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.fu .chk{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--foreground);margin:0}
.fu .fusel{width:84px}
input[type=checkbox]{accent-color:var(--primary);width:18px;height:18px}
.back{display:none}
.toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:var(--card);border:1px solid var(--primary);padding:10px 16px;border-radius:var(--radius);z-index:50}

.pairs{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.pair{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:end;background:var(--secondary);border-radius:calc(var(--radius) - 4px);padding:10px}
.pair .ro span{display:block;font-size:12px;color:var(--muted-foreground);margin-bottom:4px}.pair .ro b{display:flex;align-items:center;height:36px;padding:0 10px;border:1px dashed var(--border);border-radius:calc(var(--radius) - 4px);font-weight:600}
@media (max-width:1100px){.pairs{grid-template-columns:1fr}}
@media (max-width:820px){
 .split{grid-template-columns:1fr;padding:0 12px 24px}.list{max-height:none}
 .detail{position:fixed;inset:0;z-index:40;max-height:none;border-radius:0;transform:translateY(100%);transition:transform .2s;padding:16px 16px calc(24px + env(safe-area-inset-bottom))}
 .detail.open{transform:none}.back{display:inline-flex}.filters{margin:12px}.top h1{font-size:17px}.pill{display:none}
 .row2{grid-template-columns:1fr}
}

html,body{overflow-x:hidden;max-width:100%}
.split>*,.filters>*,.kv>*,.pair>*,.item,.detail,.form>*{min-width:0}
.item .r1 span,.kv b,.notes,.dhead h2,.muted,.err{overflow-wrap:anywhere;word-break:break-word}
.input,select,textarea{max-width:100%;min-width:0}
.dhead{min-width:0}.st{max-width:100%}
@media (max-width:820px){.detail{width:100vw;max-width:100vw;left:0;right:0;overflow-x:hidden}.pair{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.split{grid-template-columns:minmax(0,1fr)}.filters{grid-template-columns:repeat(2,minmax(0,1fr))}.filters label.chk{grid-column:1/-1}.top{min-width:0}.top h1{white-space:nowrap}}
.form .fu label.chk{flex-direction:row;align-items:center;gap:8px;font-size:13px;color:var(--foreground)}
.remember{align-self:flex-start;display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted-foreground);cursor:pointer;user-select:none}
.c-green{color:#34d399!important}.c-red{color:#f87171!important}.c-purple{color:#c084fc!important}
.wcv{font-size:12px;font-weight:700}
.ynsel option{color:var(--foreground)}
.item .r2 .dur{font-weight:600}
.rangetxt{font-size:11px;color:var(--accent-foreground);min-height:1em}
.custom .dates{display:flex;gap:6px;min-width:0}.custom .dates .input{flex:1 1 0;min-width:0;padding:0 6px}
@media (max-width:820px){.filters label.custom{grid-column:1/-1}}
.kv.kv2{grid-template-columns:repeat(2,minmax(0,1fr))}
.kvbtn{background:var(--secondary);border-radius:calc(var(--radius) - 4px);padding:8px 10px;display:flex;flex-direction:column;gap:4px;min-width:0}.kvbtn span{font-size:11px;color:var(--muted-foreground);text-transform:uppercase;letter-spacing:.04em}.kvbtn .btn{align-self:flex-start;max-width:100%;height:28px;padding:0 10px;font-size:12px}
.kvempty{visibility:hidden}
@media (min-width:1101px){.pairs .pair.mo{grid-column:2}}
.kv .kvfull{grid-column:1/-1;width:100%}
.filters{align-items:start}.filters>label{align-self:start}
/* filter bar layout */
.filters{grid-template-columns:repeat(4,minmax(0,1fr))!important;align-items:start}
.filters>.search{grid-column:1/-1;grid-row:1}
.filters>label:has(#fpreset){grid-column:1;grid-row:2}.filters>label:has(#fplumber){grid-column:2;grid-row:2}
.filters>label:has(#ftype){grid-column:3;grid-row:2}.filters>label.chk{grid-column:4;grid-row:2}
.filters>#fcustom{grid-column:1/-1;grid-row:3}
.filters>#refresh{grid-column:1/-1;grid-row:4;width:100%;height:36px}
.filters label.chk{margin-top:19px;height:36px}
.filters label.custom .dates{max-width:420px}
.search{position:relative;min-width:0}.search .input{padding-right:36px}
.search button{position:absolute;right:4px;top:4px;height:28px;width:28px;border:0;border-radius:6px;background:transparent;color:var(--muted-foreground);font-size:18px;line-height:1;cursor:pointer}
.search button:hover{background:var(--accent);color:var(--accent-foreground)}
@media (max-width:767px){
 .filters{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .filters>label:has(#fpreset){grid-column:1;grid-row:2}.filters>label:has(#fplumber){grid-column:2;grid-row:2}
 .filters>label:has(#ftype){grid-column:1;grid-row:3}.filters>label.chk{grid-column:2;grid-row:3}
 .filters>#fcustom{grid-row:4}.filters>#refresh{grid-row:5}
 .filters label.custom .dates{max-width:none}
}
/* iOS no-zoom */
@media (max-width:767px){input,select,textarea,.input,.fu .fusel,.custom .dates .input{font-size:16px!important}}
html,body,#app,.split{overflow-x:hidden;max-width:100%}
@supports (overflow-x:clip){html,body,#app,.split{overflow-x:clip}}

.gbadge{font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;border:1px solid var(--border);background:transparent;white-space:nowrap}
.g-green{color:#34d399;border-color:#34d39966}.g-amber{color:#fbbf24;border-color:#fbbf2466}.g-red{color:#f87171;border-color:#f8717166}
.stgrade{display:inline-flex;align-items:center;gap:8px;flex-wrap:nowrap;max-width:100%;min-width:0}
.stgrade .st{white-space:nowrap;padding:8px 12px}#livegrade .gbadge{font-size:13px;padding:5px 10px;cursor:help}
.techavg{margin:0 16px 12px;padding:8px 12px;display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center;min-width:0;max-width:calc(100% - 32px)}
.techavg .tlabel{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--accent-foreground);margin-right:4px}
.tchip{font-size:12px;background:var(--secondary);border-radius:999px;padding:3px 10px;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.tchip small{color:var(--muted-foreground)}
@media (max-width:820px){.techavg{margin:0 12px 12px;max-width:calc(100% - 24px)}.stgrade .st{padding:8px 10px;font-size:14px}#livegrade .gbadge{font-size:12px;padding:4px 8px}}
.g-orange{color:#fb923c;border-color:#fb923c66}.c-orange{color:#fb923c!important}
#livegrade .gbadge{font-size:26px;font-weight:900;line-height:1;padding:4px 12px;border-width:2px;letter-spacing:-.02em}
@media (max-width:820px){#livegrade .gbadge{font-size:22px;padding:3px 10px}}
.funote{font-size:12px;line-height:1.3}.funote.auto{color:var(--accent-foreground)}.funote.warn{color:#fb923c}
.badge.flag{background:transparent;border:1px solid #fb923c88;color:#fb923c}
.badge.partial{background:transparent;border:1px solid var(--border);color:var(--muted-foreground)}.gpartial{font-size:12px;line-height:1.25;color:var(--muted-foreground);white-space:normal;display:block}#livegrade{min-width:0}
/* status/follow-up checkbox row */
.filters>.chkrow{grid-column:1/-1;grid-row:3;display:flex;flex-wrap:wrap;gap:4px 18px;align-items:center;min-width:0}
.filters>#fcustom{grid-row:4}.filters>#refresh{grid-row:5}
.filters .chkrow label.chk{margin-top:0;height:auto;min-height:28px;flex-direction:row;align-items:center;gap:8px;white-space:nowrap;font-size:13px;color:var(--foreground)}
.chkrow input[type=checkbox]{width:18px;height:18px;flex:none}
@media (max-width:767px){.filters>.chkrow{grid-row:4;gap:2px 14px}.filters>#fcustom{grid-row:5}.filters>#refresh{grid-row:6}
 .filters>label:has(#ftype){grid-column:1/-1}.filters .chkrow label.chk{font-size:16px;min-height:32px}}
.ynsel.missing{border-color:var(--destructive)!important;box-shadow:0 0 0 2px #ef444455}
.mconfirm{border:1px solid var(--destructive);border-radius:calc(var(--radius) - 4px);padding:10px;display:flex;flex-direction:column;gap:8px;font-size:13px;color:var(--foreground);background:#ef444411;min-width:0;overflow-wrap:anywhere}
.mconfirm .mbtns{display:flex;gap:8px;flex-wrap:wrap}.mconfirm .mbtns .btn.primary{width:auto}

/* status dropdown + mobile touch targets (2026-10-12) */
.filters>label.fstatus{grid-column:4;grid-row:2;min-width:0}
#fsearchclr{position:absolute;right:0;top:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:none;border:0;color:var(--muted-foreground);cursor:pointer}
#fsearchclr.hidden{display:none}
@media (max-width:639px){
 .filters .input,.filters select,.filters #refresh{height:44px!important;min-width:0}
 #fsearchclr{width:44px;height:44px}.search .input{padding-right:44px}
 .custom .dates{flex-direction:column}
}
@media (max-width:767px){.filters>label.fstatus{grid-column:1/-1;grid-row:4}}
