/* Look & feel matched to Trio ERP: black sidebar/top bar, mint-green actions, Poppins, soft status pills. */
@font-face{font-family:Poppins;font-weight:400;font-display:swap;src:url(/fonts/poppins-latin-400-normal.woff2) format('woff2')}
@font-face{font-family:Poppins;font-weight:500;font-display:swap;src:url(/fonts/poppins-latin-500-normal.woff2) format('woff2')}
@font-face{font-family:Poppins;font-weight:600;font-display:swap;src:url(/fonts/poppins-latin-600-normal.woff2) format('woff2')}
@font-face{font-family:Poppins;font-weight:700;font-display:swap;src:url(/fonts/poppins-latin-700-normal.woff2) format('woff2')}
:root{
  --side:#121315;--side-2:#1E1F22;--side-hover:#2A2B2E;--side-active:#3A3B3E;--side-text:#ECEDEF;--side-muted:#8E9096;
  --accent:#7DEBA5;--accent-hover:#68DE93;--accent-ink:#10331F;
  --ink:#1C1D22;--muted:#6B6E76;--line:#E3E5E9;--soft:#EFEFF1;--ground:#F6F7F9;--chip:#EFEFF1;
  --blue-bg:#DBE5FE;--blue:#2753C9;--green-bg:#D7FAE3;--green:#14803D;--amber-bg:#FDF0D5;--amber:#9A5B07;--red-bg:#FDE2E2;--red:#C81E1E;
  --brand:#B71C1C;
  /* legacy names used in markup */
  --deep:var(--ink);--band:var(--red-bg)
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--ground);color:var(--ink);font-family:Poppins,"Segoe UI",Tahoma,Arial,sans-serif;font-size:14px;-webkit-text-size-adjust:100%}
a{color:var(--ink);text-decoration:none}
a.link,.main a.link{color:#0E7A3A;text-decoration:underline}
button,input,select,textarea{font:inherit;color:inherit}
h1,h2,h3{margin:0}
.muted{color:var(--muted)}
.small{font-size:12px}
.row{display:flex;align-items:center;gap:8px}
.col{display:flex;flex-direction:column;gap:8px}
.wrap{flex-wrap:wrap}
.grow{flex:1;min-width:0}
.right{margin-inline-start:auto}
.hidden{display:none!important}
.num{font-variant-numeric:tabular-nums}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:42px;padding:0 16px;border-radius:9px;border:1px solid var(--line);background:#fff;font-weight:500;font-size:14px;cursor:pointer;color:var(--ink);text-align:center;white-space:nowrap}
.btn:hover{background:#F7F8FA}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn.pri{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:600}
.btn.pri:hover{background:var(--accent-hover)}
.btn.dark{background:var(--ink);border-color:var(--ink);color:#fff}
.btn.danger{background:#fff;border-color:#F3B4B4;color:var(--red)}
.btn.ghost{border-color:transparent;background:transparent}
.btn.sm{min-height:34px;padding:0 12px;font-size:13px;border-radius:8px}
.btn.block{width:100%}
.btn.big{min-height:52px;font-size:16px;border-radius:12px}
.iconbtn{width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;border:1px solid var(--line);background:#fff;cursor:pointer;color:var(--ink)}

/* inputs */
.field{display:flex;flex-direction:column;gap:5px}
.field>label,.lbl{font-size:13px;font-weight:500;color:var(--ink)}
.input,select.input,textarea.input{width:100%;min-height:42px;border:1px solid var(--line);border-radius:9px;padding:8px 12px;background:#fff;font-size:14px}
textarea.input{min-height:80px;resize:vertical}
.input:focus{outline:2px solid var(--accent);outline-offset:-1px;border-color:var(--accent)}
.input.bad{border:2px solid var(--red);background:#FFF7F7}
.seg{display:flex;flex-wrap:wrap;gap:6px}
.seg button{min-height:40px;padding:0 14px;border:1px solid var(--line);border-radius:9px;background:#fff;cursor:pointer;font-size:14px}
.seg button.on{background:var(--ink);border-color:var(--ink);color:#fff;font-weight:600}
.check{display:flex;align-items:center;gap:10px;min-height:40px;font-size:14px;cursor:pointer}
.check input{width:20px;height:20px;accent-color:#22A35A;margin:0;flex:none}

/* status pills (ERP style: soft colour + dot) */
.chip{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:600;padding:3px 10px;border-radius:999px;background:var(--chip);color:#3F4249;white-space:nowrap}
.chip.pdot::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.chip.blue{background:var(--blue-bg);color:var(--blue)}
.chip.green{background:var(--green-bg);color:var(--green)}
.chip.amber{background:var(--amber-bg);color:var(--amber)}
.chip.red,.chip.band{background:var(--red-bg);color:var(--red)}
.chip.gray,.chip.line{background:var(--chip);color:#3F4249}
.chip.dark{background:var(--ink);color:#fff}
button.chip{border:1px solid var(--line);font-family:inherit}
button.chip.dark,button.chip.red{border-color:transparent}

/* cards & notices */
.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px}
.card.sel{border:2px solid var(--accent)}
.notice{border-radius:10px;padding:10px 12px;font-size:13px;line-height:1.5}
.notice.band,.notice.warn{background:#FFF8EC;color:#7A4A05;border:1px solid #F6E0B5}
.notice.grey{background:var(--ground);border:1px solid var(--line)}
.notice.red{background:var(--red-bg);color:var(--red)}
.notice.ok{background:var(--green-bg);color:var(--green)}
.err{color:var(--red);font-size:13px;font-weight:600}
.dot{width:22px;height:22px;border-radius:50%;flex:none;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:700}
.dot.done{background:#22A35A;color:#fff}
.dot.todo{border:2px solid var(--line)}
.dot.now{border:2px solid #E3A33B;color:#9A5B07}
.bar{height:6px;background:var(--soft);border-radius:3px;overflow:hidden}
.bar>i{display:block;height:100%;background:#22A35A}

/* ============ FIELD (phone) ============ */
.phone{max-width:560px;margin:0 auto;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;background:var(--ground)}
.phead{background:var(--side);color:#fff;padding:16px 16px 18px;display:flex;flex-direction:column;gap:14px}
.phead .tile{width:40px;height:40px;border-radius:9px;background:var(--side-2);display:flex;align-items:center;justify-content:center}
.phead .tile img{width:26px}
.phead .sub{color:var(--side-muted);font-size:12px}
.phead .stat{background:var(--side-2);border-radius:12px;padding:10px 12px}
.phead .stat b{font-size:20px;display:block}
.phead .stat span{font-size:11px;color:var(--side-muted)}
.phead .hbtn{min-width:44px;height:38px;padding:0 8px;border-radius:9px;border:1px solid #34363A;background:transparent;color:#fff;font-weight:600;cursor:pointer}
.topbar{background:#fff;border-bottom:1px solid var(--line);padding:8px 10px;display:flex;align-items:center;gap:6px;position:sticky;top:0;z-index:5}
.pbody{flex:1;padding:14px 14px 110px;display:flex;flex-direction:column;gap:12px}
.tabs{display:flex;gap:4px;background:var(--ground);border-radius:10px;padding:3px;overflow-x:auto}
.tabs a{flex:1;min-width:max-content;display:flex;align-items:center;justify-content:center;gap:4px;height:38px;padding:0 10px;font-size:13px;font-weight:500;color:var(--muted);border-radius:8px;white-space:nowrap}
.tabs a.on{background:var(--accent);color:var(--accent-ink);font-weight:600}
.foot{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid var(--line);padding:10px 14px calc(12px + env(safe-area-inset-bottom));z-index:6}
.foot .in{max-width:532px;margin:0 auto;display:flex;gap:8px;align-items:center}
.vcard{display:flex;flex-direction:column;gap:8px;color:var(--ink)}
.sitecode{font-weight:600;font-size:16px;letter-spacing:.01em}
.sec{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:0 14px;min-height:50px;font-weight:500;cursor:pointer;width:100%;text-align:start}
.sec .cnt{margin-inline-start:auto;font-size:12px;color:var(--muted);font-weight:400}
.pf{font-size:11px;color:var(--muted)}
.slotgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.slot{display:flex;flex-direction:column;gap:5px}
.slot .ph{position:relative;aspect-ratio:3/4;border-radius:10px;overflow:hidden;background:var(--soft)}
.slot .ph img{width:100%;height:100%;object-fit:cover;display:block}
.slot .ph .st{position:absolute;top:5px;inset-inline-end:5px}
.slot .ph .del{position:absolute;bottom:5px;inset-inline-end:5px;width:30px;height:30px;border-radius:8px;border:0;background:rgba(18,19,21,.75);color:#fff;cursor:pointer}
.slot .take{aspect-ratio:3/4;border-radius:10px;border:2px dashed #B8BBC2;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;font-size:12px;font-weight:600;cursor:pointer;color:var(--ink);position:relative;overflow:hidden}
.slot .take.req{border-color:#E3A33B;background:#FFF8EC;color:#7A4A05}
.slot .take input{position:absolute;inset:0;opacity:0;cursor:pointer}
.slot .lbl{font-size:12px;font-weight:500;line-height:1.3}
.camwrap{position:relative;overflow:hidden}
.camwrap input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.bt td{padding:3px}
.bt input{width:100%;min-height:40px;border:1px solid var(--line);border-radius:7px;text-align:center;font-size:15px}
.syncpill{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:600;padding:4px 10px;border-radius:999px;background:var(--side-2);color:var(--accent)}

/* ============ ADMIN (ERP shell) ============ */
.erp{display:flex;min-height:100vh}
.side{flex:0 0 256px;background:var(--side);color:var(--side-text);display:flex;flex-direction:column;position:sticky;top:0;height:100vh;overflow-y:auto}
.side>*{flex-shrink:0}
.side .logo{height:72px;display:flex;align-items:center;justify-content:center;border-bottom:1px solid #222326;position:relative}
.side .logo img{height:40px}
.side nav{padding:14px 10px;display:flex;flex-direction:column;gap:2px}
.nv{display:flex;align-items:center;gap:12px;min-height:44px;padding:0 14px;border-radius:10px;color:var(--side-text);font-size:15px;font-weight:500;cursor:pointer;border:0;background:transparent;width:100%;text-align:start}
.nv:hover{background:var(--side-hover)}
.nv.open{background:var(--side-active)}
.nv svg{flex:none;opacity:.9}
.nv .chev{margin-inline-start:auto;transition:transform .15s}
.nv.open .chev{transform:rotate(180deg)}
.nv.ext{color:#C9CBCF}
.sub{display:flex;flex-direction:column;padding:4px 0 6px 22px;position:relative}
.sub>.lvl2{font-size:13px;color:var(--side-muted);padding:8px 14px 4px 22px;text-transform:uppercase;letter-spacing:.05em;font-weight:600}
.tree{position:relative;margin-left:10px;padding-left:0}
.tree::before{content:"";position:absolute;left:5px;top:16px;bottom:16px;width:1px;background:#3A3B3E}
.tree a{position:relative;display:flex;align-items:center;min-height:42px;padding:0 12px 0 34px;color:#D5D7DB;font-size:14.5px;border-radius:8px}
.tree a::before{content:"";position:absolute;left:1px;top:50%;width:9px;height:9px;margin-top:-4.5px;border-radius:50%;background:#55575C}
.tree a:hover{color:#fff}
.tree a.on{color:#fff;font-weight:600}
.tree a.on::before{background:var(--accent);box-shadow:0 0 0 3px rgba(125,235,165,.25)}
.side .foot2{margin-top:auto;padding:14px 18px;border-top:1px solid #222326;display:flex;flex-direction:column;gap:12px;font-size:14px}
.side .foot2 a{color:#F06A6A;display:flex;align-items:center;gap:10px}
.side .foot2 .ver{color:var(--side-muted);font-size:13px}
.shell{flex:1;min-width:0;display:flex;flex-direction:column}
.top{height:68px;background:var(--side);color:#fff;display:flex;align-items:center;gap:14px;padding:0 22px;position:sticky;top:0;z-index:20}
.top .search{display:flex;align-items:center;gap:8px;height:38px;padding:0 12px;border-radius:999px;border:1px solid #34363A;color:#C9CBCF;font-size:13px;background:transparent;min-width:170px;position:relative}
.top .search input{background:transparent;border:0;color:#fff;outline:0;width:120px;font-size:13px}
.top .search kbd{font-family:inherit;font-size:11px;border:1px solid #44464B;border-radius:5px;padding:0 5px;color:#AEB0B5}
.top .results{position:absolute;top:44px;left:0;min-width:260px;background:#fff;color:var(--ink);border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.18);padding:6px;z-index:30}
.top .results a{display:block;padding:9px 12px;border-radius:7px;font-size:13px}
.top .results a:hover{background:var(--ground)}
.top .bell{position:relative;width:38px;height:38px;display:flex;align-items:center;justify-content:center;color:#fff;border-radius:50%}
.top .bell b{position:absolute;top:0;right:-2px;background:#E5484D;color:#fff;font-size:10px;min-width:18px;height:18px;border-radius:9px;display:flex;align-items:center;justify-content:center;padding:0 4px;border:2px solid var(--side)}
.top .me{display:flex;align-items:center;gap:10px;padding-left:18px;border-left:1px solid #34363A;cursor:pointer;position:relative}
.top .av{width:36px;height:36px;border-radius:50%;background:var(--accent);color:var(--accent-ink);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px}
.top .menu{position:absolute;top:48px;right:0;background:#fff;color:var(--ink);border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.18);padding:6px;min-width:210px;z-index:30}
.top .menu a{display:block;padding:9px 12px;border-radius:7px;font-size:13px}
.top .menu a:hover{background:var(--ground)}
.main{flex:1;min-width:0;padding:26px 34px 60px;display:flex;flex-direction:column;gap:18px;background:#fff}
.main h1{font-size:26px;font-weight:600;color:var(--ink)}
.crumb{font-size:12px;color:var(--muted)}
.crumb b{color:var(--ink);font-weight:500}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}
.kpi{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px 16px;display:flex;flex-direction:column;gap:2px}
.kpi b{font-size:24px;font-weight:600}
.kpi span{font-size:12px;color:var(--muted)}
/* folder-style status tabs */
.ftabs{display:flex;gap:6px;overflow-x:auto;padding-top:4px;border-bottom:1px solid var(--line)}
.ftabs button{flex:none;min-height:46px;padding:0 26px;border:1px solid var(--line);border-bottom:0;border-radius:14px 14px 0 0;background:#fff;color:var(--muted);font-weight:500;cursor:pointer;white-space:nowrap}
.ftabs button.on{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:600}
.tbl{overflow-x:auto;background:#fff;border:1px solid var(--line);border-radius:12px}
.ftabs+.tbl,.ftabs+.toolbar{border-top-left-radius:0}
.toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:12px 14px;border:1px solid var(--line);border-top:0;background:#fff}
.toolbar .q{flex:1;min-width:200px;display:flex;align-items:center;gap:8px;color:var(--muted)}
.toolbar .q input{border:0;outline:0;width:100%;font-size:14px;padding:8px 0}
table.t{border-collapse:collapse;width:100%;font-size:13.5px}
table.t th{background:#fff;color:var(--ink);text-align:start;padding:13px 12px;font-size:13.5px;font-weight:600;white-space:nowrap;border-bottom:1px solid var(--line)}
table.t td{padding:13px 12px;border-bottom:1px solid var(--soft);white-space:nowrap;vertical-align:middle}
table.t tr.click{cursor:pointer}
table.t tr.click:hover td{background:#F7FBF8}
table.t td.wrapc{white-space:normal}
.filters{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}
.filters .field{min-width:150px}
.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.gph{display:flex;flex-direction:column;gap:5px}
.gph .im{position:relative;aspect-ratio:3/4;border-radius:10px;overflow:hidden;background:var(--soft)}
.gph .im img{width:100%;height:100%;object-fit:cover;cursor:zoom-in}
.gph.rej .im{outline:3px solid var(--red);outline-offset:-3px}
.qa{display:flex;gap:10px;align-items:flex-start;padding:9px 0;border-bottom:1px solid var(--soft);font-size:13px;line-height:1.45}
.qa:last-child{border-bottom:0}
.qa i{width:20px;height:20px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;font-style:normal;font-size:11px;font-weight:700}
.qa i.ok{background:var(--green-bg);color:var(--green)}
.qa i.warn{background:var(--amber-bg);color:var(--amber)}
.qa i.bad{background:var(--red-bg);color:var(--red)}
.hbars .r{display:flex;align-items:center;gap:10px;font-size:13px;padding:5px 0}
.hbars .r span:first-child{flex:0 0 180px}
.hbars .t{flex:1;height:12px;background:var(--soft);border-radius:6px;overflow:hidden}
.hbars .t i{display:block;height:100%;background:#22A35A;border-radius:6px}
.modal{position:fixed;inset:0;background:rgba(18,19,21,.5);display:flex;align-items:center;justify-content:center;z-index:50;padding:16px}
.modal .box{background:#fff;border-radius:16px;padding:20px;max-width:540px;width:100%;max-height:90vh;overflow:auto;display:flex;flex-direction:column;gap:12px}
.lightbox{position:fixed;inset:0;background:rgba(0,0,0,.9);display:flex;align-items:center;justify-content:center;z-index:60;cursor:zoom-out}
.lightbox img{max-width:96vw;max-height:92vh}
.toast{position:fixed;bottom:90px;left:50%;transform:translateX(-50%);background:var(--side);color:#fff;padding:11px 18px;border-radius:10px;font-size:14px;z-index:70;max-width:90vw}
.login{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px;background:var(--side)}
.login .box{background:#fff;border-radius:18px;padding:28px;width:100%;max-width:390px;display:flex;flex-direction:column;gap:14px}
/* embedded inside the ERP: the ERP already shows its own menu and top bar */
.erp.embed .side,.erp.embed .top{display:none}
.erp.embed .main{padding:20px 24px}
@media (max-width:900px){
  .erp{flex-direction:column}
  .side{position:static;height:auto;flex:none}
  .side nav{padding:8px}
  .side .foot2{display:none}
  .top{position:static}
  .top .search{display:none}
  .main{padding:16px}
}
[dir=rtl] .flip{transform:scaleX(-1)}
