/* ECC Classification: one plain stylesheet (the SDC Packet Processor's look: slate, system font, no framework). */
*{box-sizing:border-box}
html,body{margin:0}
body{font:14px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:#0f172a;color:#e2e8f0}
a{color:#60a5fa;text-decoration:none}
a:hover,a:focus{text-decoration:underline;color:#93c5fd}
h1{font-size:19px;margin:0 0 4px}
h2{font-size:15px;margin:0 0 8px}
h3{font-size:14px;margin:0 0 6px}
p{margin:6px 0}
code,pre,.mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.wrap{max-width:1180px;margin:0 auto;padding:0 18px}
.wrap.wide{max-width:1500px}
main.wrap{padding-top:16px;padding-bottom:60px}

/* top bar */
header.top{background:#0b1222;border-bottom:1px solid #1e293b}
header.top .wrap{display:flex;align-items:center;gap:18px;min-height:50px;flex-wrap:wrap}
.brand{font-weight:700;color:#e2e8f0;font-size:15px}
.brand:hover{text-decoration:none;color:#fff}
header nav{display:flex;gap:4px;flex-wrap:wrap}
header nav a{color:#cbd5e1;padding:6px 10px;border-radius:6px}
header nav a.on{background:#1e293b;color:#fff}
header nav a:hover{background:#1e293b;text-decoration:none}
.who{margin-left:auto;color:#94a3b8;font-size:13px;display:flex;align-items:center;gap:8px}
.role{display:inline-block;padding:0 7px;border-radius:99px;background:#334155;color:#cbd5e1;font-size:11.5px}
.role.approver{background:#14532d;color:#bbf7d0}
.localbar{background:#422006;color:#fde68a;font-size:12.5px;text-align:center;padding:4px 10px}

/* cards, layout */
.card{background:#1e293b;border-radius:10px;padding:14px 16px;margin-top:14px}
.card.flat{padding:0;overflow:hidden}
.row{display:flex;gap:14px;flex-wrap:wrap;align-items:flex-start}
.row>.grow{flex:1 1 320px}
.muted{color:#94a3b8}
.small{font-size:12.5px}
.tiny{font-size:11.5px}
.right{text-align:right}
.nowrap{white-space:nowrap}
.hide{display:none!important}
.sep{color:#475569;margin:0 6px}
.flash{padding:9px 12px;border-radius:8px;margin-top:10px;background:#1e293b}
.flash.ok{background:#14532d;color:#dcfce7}
.flash.error,.err{color:#fecaca}
.flash.error{background:#450a0a}
.warnbox{background:#422006;color:#fde68a;border-radius:8px;padding:9px 12px;margin-top:10px}
.errbox{background:#450a0a;color:#fecaca;border-radius:8px;padding:9px 12px;margin-top:10px}
.okbox{background:#14532d;color:#dcfce7;border-radius:8px;padding:9px 12px;margin-top:10px}
.infobox{background:#172554;color:#dbeafe;border-radius:8px;padding:9px 12px;margin-top:10px}
ul.plain{margin:4px 0;padding-left:18px}

/* job header and tabs */
.jobhead{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap}
.jobhead .facts{color:#94a3b8;font-size:13px}
.tabs{display:flex;gap:2px;margin-top:12px;border-bottom:1px solid #334155;flex-wrap:wrap}
.tabs a{padding:7px 13px;color:#cbd5e1;border-radius:7px 7px 0 0}
.tabs a.on{background:#1e293b;color:#fff;font-weight:600}
.tabs a:hover{text-decoration:none;background:#1e293b}

/* forms and buttons */
label{display:block;font-size:12.5px;color:#94a3b8;margin:10px 0 3px}
input[type=text],input[type=password],input[type=date],input[type=search],input:not([type]),select,textarea{
  width:100%;padding:8px 10px;border-radius:6px;border:1px solid #334155;background:#0f172a;color:#e2e8f0;font:inherit}
input:focus,select:focus,textarea:focus{outline:2px solid #2563eb;outline-offset:0;border-color:#2563eb}
input[type=file]{color:#cbd5e1}
input.bad{border-color:#f87171}
.fielderr{color:#fca5a5;font-size:12px;margin-top:2px}
.hint{color:#64748b;font-size:11.5px;margin-top:2px}
.grid2{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:0 16px}
button,.btn{display:inline-block;padding:8px 15px;border:0;border-radius:7px;font:600 13.5px system-ui,sans-serif;cursor:pointer;
  background:#475569;color:#fff;text-decoration:none;line-height:1.3}
button:hover,.btn:hover{filter:brightness(1.12);text-decoration:none;color:#fff}
button:focus-visible,.btn:focus-visible{outline:2px solid #93c5fd;outline-offset:2px}
button:disabled,.btn.disabled{opacity:.4;cursor:not-allowed;filter:none}
.primary{background:#2563eb}.ok{background:#16a34a}.warn{background:#a16207}.danger{background:#b91c1c}.grey{background:#475569}
button.small,.btn.small{padding:4px 9px;font-size:12.5px;border-radius:6px}
button.link{background:none;color:#60a5fa;padding:0;font-weight:400;font-size:inherit}
button.link:hover{text-decoration:underline;filter:none}
form.inline{display:inline}
.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px;align-items:center}

/* tables */
table{width:100%;border-collapse:collapse}
th,td{text-align:left;padding:6px 8px;border-bottom:1px solid #334155;vertical-align:top}
th{color:#94a3b8;font-weight:600;font-size:11.5px;text-transform:uppercase;letter-spacing:.02em;white-space:nowrap}
tbody tr:hover{background:#243247}
td.num,th.num{text-align:right;white-space:nowrap}

/* status pills and badges */
.pill{display:inline-block;padding:1px 8px;border-radius:99px;font-size:11.5px;background:#334155;color:#cbd5e1;white-space:nowrap}
.pill.review,.pill.pending{background:#1e3a8a;color:#dbeafe}
.pill.running,.pill.queued,.pill.committing{background:#713f12;color:#fef3c7}
.pill.filed,.pill.approved,.pill.library,.pill.recorded{background:#14532d;color:#dcfce7}
.pill.error,.pill.not_filed,.pill.commit_unknown,.pill.held{background:#7f1d1d;color:#fee2e2}
.pill.cancelled,.pill.superseded,.pill.draft{background:#334155;color:#94a3b8}
.pga{font-size:12px;color:#94a3b8}
.pga .req{display:inline-block;background:#4c1d95;color:#ede9fe;border-radius:5px;padding:0 6px;font-weight:600}
.badge{display:inline-block;padding:0 6px;border-radius:5px;font-size:11.5px;background:#334155;color:#cbd5e1}
.badge.src-claude{background:#1e3a8a;color:#dbeafe}
.badge.src-other_guess{background:#701a75;color:#fae8ff}
.badge.src-shipper_fit{background:#7c2d12;color:#ffedd5}
.lowduty{color:#fdba74;font-size:12px;font-weight:600}
.badge.exemption{background:#7c2d12;color:#ffedd5;margin-left:6px}
.badge.src-seed{background:#365314;color:#ecfccb}
.badge.src-other_ior,.badge.src-same_desc{background:#134e4a;color:#ccfbf1}
.badge.src-library{background:#14532d;color:#dcfce7}
.badge.src-none{background:#3f3f46;color:#e4e4e7}

/* progress */
.bar{height:10px;background:#0f172a;border-radius:99px;overflow:hidden;margin:8px 0}
.bar>div{height:100%;background:#2563eb;width:0;transition:width .4s}
.bar.indef>div{width:30%;animation:slide 1.4s infinite ease-in-out}
@keyframes slide{0%{margin-left:-30%}100%{margin-left:100%}}
pre.log{background:#020617;border:1px solid #1e293b;border-radius:8px;padding:10px;max-height:300px;overflow:auto;
  font-size:12px;white-space:pre-wrap;margin:8px 0 0}
pre.preview{background:#020617;border:1px solid #334155;border-radius:8px;padding:12px;max-height:620px;overflow:auto;
  font-size:12.5px;white-space:pre-wrap;line-height:1.45}
pre.preview .req{background:#4c1d95;color:#ede9fe}
pre.preview .flagline{color:#fde68a}
pre.preview .head{color:#93c5fd;font-weight:600}
.stats{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}
.stat{background:#0f172a;border-radius:8px;padding:8px 12px;min-width:120px}
.stat b{display:block;font-size:19px}
.stat span{color:#94a3b8;font-size:12px}

/* login */
body.login{display:flex;min-height:100vh;align-items:center;justify-content:center}
body.login main.wrap{padding:0}
.loginbox{background:#1e293b;padding:30px;border-radius:12px;width:min(380px,92vw)}
.loginbox button{width:100%;margin-top:18px;padding:11px}

/* review page */
.piletabs{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}
.piletab{background:#1e293b;border:2px solid transparent;border-radius:10px;padding:8px 14px;cursor:pointer;color:#e2e8f0;text-align:left;
  font-weight:400;min-width:190px}
.piletab b{font-size:18px;display:block}
.piletab .muted{font-size:12px}
.piletab.on{border-color:#2563eb;background:#172554}
.piletab.ready b{color:#86efac}.piletab.approval b{color:#93c5fd}.piletab.insufficient b{color:#fca5a5}
.toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-end;margin-top:12px;background:#1e293b;padding:10px 12px;border-radius:10px}
.toolbar label{margin:0 0 2px}
.toolbar .f{display:flex;flex-direction:column}
.toolbar .f.q{flex:1 1 240px}
.toolbar select,.toolbar input{padding:6px 8px}
.toolbar .chk{display:flex;align-items:center;gap:6px;color:#e2e8f0;margin:0;padding-bottom:7px;font-size:13px}
.pager{display:flex;gap:6px;align-items:center;margin:10px 0;color:#94a3b8;font-size:13px;flex-wrap:wrap}
.block{background:#1e293b;border-radius:9px;margin-top:8px;border-left:4px solid #334155}
.block.alldone{border-left-color:#16a34a}
.block.haspending{border-left-color:#2563eb}
.bhead{display:grid;grid-template-columns:22px minmax(150px,auto) 1fr auto;gap:4px 12px;align-items:start;padding:9px 12px;cursor:pointer;border-radius:9px}
.bhead:focus{outline:2px solid #60a5fa;outline-offset:-2px}
.bhead .chev{color:#94a3b8;font-size:13px;padding-top:2px;transition:transform .15s}
.block.open .bhead .chev{transform:rotate(90deg)}
.bhead .code{font:600 14px ui-monospace,Consolas,monospace;color:#fff;white-space:nowrap}
.bhead .txt{color:#cbd5e1;font-size:13px}
.bhead .meta{grid-column:3/4;color:#94a3b8;font-size:12px}
.bhead .act{grid-row:1/3;grid-column:4/5;display:flex;gap:6px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.bbody{padding:0 8px 8px}
.ptable td{font-size:13px}
.ptable tr.prow{cursor:default}
.ptable tr.prow:focus{outline:2px solid #60a5fa;outline-offset:-2px;background:#243247}
.ptable tr.st-approved td:first-child,.ptable tr.st-library td:first-child{border-left:3px solid #16a34a}
.ptable tr.st-held td:first-child{border-left:3px solid #dc2626}
.ptable tr.st-pending td:first-child{border-left:3px solid #2563eb}
.ptable .desc{color:#f1f5f9}
.ptable .seller{color:#94a3b8;font-size:12px}
.ptable .why{color:#cbd5e1;font-size:12.5px;max-width:420px}
.ptable .need{color:#fecaca;font-size:12.5px;max-width:380px}
.ptable .acts{white-space:nowrap;text-align:right}
.ptable .acts button{margin-left:4px}
.decided{font-size:12px;color:#94a3b8}
/* AGS's declared code (ags.js): the codes, the duty against the code to file, "Use AGS ..." */
.ptable td.agscol{min-width:190px;max-width:300px;font-size:12px}
.agsc{margin-bottom:2px}
.agsc .mono{font-size:12px}
.duty{color:#cbd5e1}
.duty.lower{display:inline-block;background:#422006;color:#fde68a;border:1px solid #a16207;border-radius:5px;padding:0 5px;font-weight:600}
.blockedcode{display:inline-block;background:#7f1d1d;color:#fee2e2;border-radius:5px;padding:0 5px;font-size:11.5px;font-weight:600}
.agsused{display:inline-block;margin-top:2px;padding:0 6px;border-radius:5px;background:#14532d;color:#dcfce7;font-size:11.5px}
button.ags{background:#0e7490}
.agscol button{margin-top:3px}
.agspick label.chk{display:block;color:#e2e8f0;font-size:13px;margin:6px 0;cursor:pointer}
.agspick label.chk input{margin-right:6px}
.detail td{background:#0f172a;font-size:12.5px;color:#cbd5e1}
.detail .lines span{display:inline-block;margin:2px 6px 2px 0;padding:1px 6px;background:#1e293b;border-radius:5px}
.detail .lines span.held{background:#7f1d1d;color:#fee2e2}
details.panel{background:#1e293b;border-radius:10px;padding:10px 14px;margin-top:10px}
details.panel summary{cursor:pointer;font-weight:600}
.rule{display:flex;gap:10px;align-items:flex-start;padding:7px 0;border-bottom:1px solid #334155}
.rule:last-child{border-bottom:0}
.switch{position:relative;display:inline-block;width:38px;height:21px;flex:none;margin-top:2px}
.switch input{opacity:0;width:0;height:0}
.switch span{position:absolute;inset:0;background:#475569;border-radius:99px;cursor:pointer;transition:.2s}
.switch span:before{content:"";position:absolute;width:15px;height:15px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s}
.switch input:checked+span{background:#16a34a}
.switch input:checked+span:before{transform:translateX(17px)}
.switch input:disabled+span{cursor:not-allowed;opacity:.6}
.kbd,kbd{display:inline-block;font:12px ui-monospace,Consolas,monospace;background:#0f172a;border:1px solid #475569;border-bottom-width:2px;
  border-radius:4px;padding:0 5px;color:#e2e8f0}
.finishbar{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}

/* dialog */
dialog{background:#1e293b;color:#e2e8f0;border:1px solid #475569;border-radius:12px;padding:18px 20px;width:min(560px,94vw)}
dialog::backdrop{background:rgba(2,6,23,.65)}
dialog h2{margin-bottom:4px}
.cands{max-height:210px;overflow:auto;margin-top:6px;border:1px solid #334155;border-radius:6px}
.cands div{padding:4px 8px;cursor:pointer;font-size:12.5px;border-bottom:1px solid #334155}
.cands div:hover,.cands div:focus{background:#243247;outline:none}
.check{margin-top:6px;font-size:12.5px;min-height:18px}
.check.good{color:#86efac}.check.bad{color:#fca5a5}

/* toast */
.toast{position:fixed;right:18px;bottom:18px;background:#0b1222;border:1px solid #475569;color:#e2e8f0;border-radius:10px;padding:10px 14px;
  max-width:460px;box-shadow:0 8px 30px rgba(0,0,0,.4);z-index:50;display:flex;gap:12px;align-items:center}
.toast.bad{border-color:#dc2626}
.toast.good{border-color:#16a34a}
.copyrow{display:flex;gap:8px;align-items:flex-start}
.copyrow textarea,.copyrow input{flex:1}
textarea.mail{min-height:240px;font:12.5px ui-monospace,Consolas,monospace}
@media (max-width:760px){
  .bhead{grid-template-columns:18px 1fr}
  .bhead .txt,.bhead .meta,.bhead .act{grid-column:2/3;grid-row:auto}
  .piletab{min-width:0;flex:1}
}
/* the lax profile (23 Oct, app/lax.py) and the extras: profile badge, lax sources, flags, entry description, PGA screen */
.profile-lax{color:#fde68a}
.badge.profile-lax{background:#78350f;color:#fef3c7}
.badge.src-ags_unclear,.badge.src-ags_same_chapter,.badge.src-ags_category{background:#7c2d12;color:#ffedd5}
.badge.src-suffix_mapped{background:#701a75;color:#fae8ff}
.laxflag{display:inline-block;margin:1px 3px 1px 0;padding:0 5px;border-radius:4px;font-size:11px;background:#422006;color:#fde68a}
.entrydesc{font-size:11.5px;color:#a5f3fc}
.pgakw{font-size:11.5px;color:#fda4af}
.pgakw.ok{color:#94a3b8}
.agspga{font-size:11px;color:#c4b5fd}
.basis{font-size:11px;color:#86efac}
.risk0{border-left:3px solid #f87171}
.risk1{border-left:3px solid #fb923c}
.risk2{border-left:3px solid #facc15}
/* Ben's automations (23 Oct): the ready notices, the nav badge, the auto-approval mark and switches */
.notices{margin:10px 0 14px}
.notice{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 12px;border-radius:8px;margin-bottom:6px;background:#0f2a1e;border:1px solid #166534}
.notice a{color:#bbf7d0}
.badge.notecount{background:#166534;color:#dcfce7;margin-left:4px}
.badge.auto{background:#0e7490;color:#cffafe;margin-top:3px}
.badge.autoswitch{background:#0e7490;color:#cffafe;margin-left:6px}
.autonote{color:#a5f3fc;font-size:12px}
.autooff{color:#fcd34d;font-size:12px}
