/* =========================================================
   ระบบนิเทศการสอน — Flat app UI
   palette: violet / teal / coral / sun on a cool grey canvas
   ========================================================= */
:root{
  --violet:#5550C9; --violet-d:#433EB0; --violet-50:#EEEDFB;
  --teal:#1DA98F;   --teal-d:#15907A;   --teal-50:#E3F5F1;
  --coral:#F2546A;  --coral-d:#DB3E55;  --coral-50:#FDECEF;
  --sun:#F5BE3A;    --sun-d:#C9920F;    --sun-50:#FEF5DF;
  --orange:#F28A3C; --orange-50:#FEEFE3;
  --blue:#3B82F6;   --blue-50:#E8F0FE;
  --ink:#2E3A4B; --ink-2:#4A5568; --muted:#7C8798; --line:#E3E6EB;
  --canvas:#E6E8EC; --card:#FFFFFF; --soft:#F4F5F7;
  --r-xl:22px; --r-lg:16px; --r-md:12px; --r-sm:8px;
  --drawer:256px;
  --safe-b:env(safe-area-inset-bottom,0px);
  --head:'Prompt',system-ui,sans-serif; --body:'Sarabun',system-ui,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{font-family:var(--body);font-size:15.5px;line-height:1.55;color:var(--ink);background:var(--canvas);-webkit-font-smoothing:antialiased}
h1,h2,h3,h4{font-family:var(--head);font-weight:600;margin:0;line-height:1.3;color:var(--ink)}
h1{font-size:1.55rem} h2{font-size:1.2rem} h3{font-size:1.02rem}
a{color:var(--violet)}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:3px solid rgba(85,80,201,.45);outline-offset:2px;border-radius:6px}
svg.i{width:20px;height:20px;flex:none;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
svg.i.fill{fill:currentColor;stroke:none}
.muted{color:var(--muted)} .small{font-size:.86rem} .tiny{font-size:.78rem}
.num{font-family:var(--head);font-variant-numeric:tabular-nums}
.hide{display:none!important}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ---------- boot ---------- */
.boot{min-height:100vh;display:grid;place-items:center}
.spinner{width:42px;height:42px;border-radius:50%;border:4px solid var(--violet-50);border-top-color:var(--violet);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------- login (phone-screen look) ---------- */
.login{min-height:100vh;display:grid;place-items:center;padding:24px}
.phone{width:100%;max-width:400px;background:var(--ink);border-radius:44px;padding:12px;box-shadow:0 30px 60px -20px rgba(46,58,75,.45)}
.phone-screen{background:#EDEEF1;border-radius:34px;padding:22px 26px 30px;text-align:center;position:relative;overflow:hidden}
.status-bar{display:flex;justify-content:space-between;font-size:.75rem;font-weight:600;color:var(--ink-2);margin-bottom:18px}
.login h1{font-size:1.6rem;letter-spacing:.2px}
.login .school{font-size:.88rem;color:var(--muted);margin-top:4px}
.hero-disc{width:168px;height:168px;border-radius:50%;background:#fff;margin:22px auto;display:grid;place-items:center}
.login form{text-align:left;margin-top:6px}
.login .dots{display:flex;gap:8px;justify-content:center;margin-top:18px}
.login .dots i{width:9px;height:9px;border-radius:50%;background:#B9BFCA}.login .dots i:first-child{background:var(--violet)}

/* ---------- forms ---------- */
.field{margin-bottom:14px}
.lbl{display:block;font-size:.85rem;font-weight:600;color:var(--ink-2);margin-bottom:5px}
.inp{width:100%;background:#fff;border:1.5px solid var(--line);border-radius:var(--r-md);padding:10px 13px;transition:border-color .15s}
.inp:focus{border-color:var(--violet);outline:none;box-shadow:0 0 0 3px var(--violet-50)}
textarea.inp{min-height:92px;resize:vertical}
select.inp{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237C8798' stroke-width='2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:34px}
.line-inp{border:0;border-bottom:1.5px solid #CDD2DA;border-radius:0;background:transparent;padding:8px 2px}
.line-inp:focus{box-shadow:none;border-color:var(--violet)}
.row{display:grid;gap:12px}
@media(min-width:640px){.row.c2{grid-template-columns:1fr 1fr}.row.c3{grid-template-columns:repeat(3,1fr)}}
.check{display:flex;gap:9px;align-items:center;cursor:pointer;font-size:.93rem}
.check input{width:18px;height:18px;accent-color:var(--violet)}
.hint{font-size:.8rem;color:var(--muted);margin-top:4px}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:0;border-radius:var(--r-md);padding:10px 18px;font-family:var(--head);font-weight:500;font-size:.95rem;cursor:pointer;text-decoration:none;transition:background .15s,transform .05s;white-space:nowrap}
.btn:active{transform:translateY(1px)}
.btn[disabled]{opacity:.55;pointer-events:none}
.btn-violet{background:var(--violet);color:#fff}.btn-violet:hover{background:var(--violet-d)}
.btn-teal{background:var(--teal);color:#fff}.btn-teal:hover{background:var(--teal-d)}
.btn-coral{background:var(--coral);color:#fff}.btn-coral:hover{background:var(--coral-d)}
.btn-sun{background:var(--sun);color:#3d2c00}.btn-sun:hover{background:#ebb021}
.btn-ghost{background:var(--soft);color:var(--ink)}.btn-ghost:hover{background:#E9EBEF}
.btn-line{background:#fff;color:var(--violet);box-shadow:inset 0 0 0 1.5px var(--violet)}
.btn-block{width:100%;padding:13px}
.btn-sm{padding:7px 12px;font-size:.85rem;border-radius:10px}
.btn-icon{width:40px;height:40px;padding:0;border-radius:12px}
.btn-wide{min-width:180px;padding:13px 26px;font-weight:600;letter-spacing:.3px}

/* ---------- shell ---------- */
.shell{min-height:100vh;display:flex}
.drawer{width:var(--drawer);background:var(--violet);color:#fff;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column;z-index:60;transform:translateX(-100%);transition:transform .22s ease}
.drawer.open{transform:none}
.drawer-head{padding:26px 22px 18px;display:flex;flex-direction:column;align-items:center;text-align:center}
.drawer-avatar{width:68px;height:68px;border-radius:50%;background:#fff;color:var(--violet);display:grid;place-items:center;font-family:var(--head);font-weight:700;font-size:1.5rem;box-shadow:0 0 0 5px rgba(255,255,255,.18)}
.drawer-name{font-family:var(--head);font-weight:600;margin-top:12px;line-height:1.35}
.drawer-role{font-size:.8rem;opacity:.75}
.drawer nav{flex:1;overflow-y:auto;padding:6px 14px 10px}
.nav-sec{font-size:.74rem;opacity:.6;margin:16px 10px 6px}
.nav-a{display:flex;align-items:center;gap:12px;color:rgba(255,255,255,.86);text-decoration:none;padding:10px 12px;border-radius:12px;font-family:var(--head);font-weight:500;font-size:.93rem;margin-bottom:2px}
.nav-a:hover{background:rgba(255,255,255,.1);color:#fff}
.nav-a.on{background:#fff;color:var(--violet)}
.nav-a .cnt{margin-left:auto;background:var(--coral);color:#fff;border-radius:99px;font-size:.72rem;padding:1px 8px}
.drawer-foot{padding:12px 14px 18px;border-top:1px solid rgba(255,255,255,.14)}
.nav-out{color:#FFB3BE}
.scrim{position:fixed;inset:0;background:rgba(46,58,75,.45);z-index:55;opacity:0;pointer-events:none;transition:opacity .2s}
.scrim.on{opacity:1;pointer-events:auto}
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.appbar{background:var(--teal);color:#fff;position:sticky;top:0;z-index:40;padding:10px 16px;display:flex;align-items:center;gap:10px;min-height:60px}
.appbar h1{color:#fff;font-size:1.08rem;font-weight:600;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.appbar .btn-icon{background:rgba(255,255,255,.16);color:#fff;position:relative}
.appbar .btn-icon:hover{background:rgba(255,255,255,.26)}
.appbar select{background:rgba(255,255,255,.16);border:0;color:#fff;border-radius:10px;padding:8px 30px 8px 12px;font-family:var(--head);font-size:.86rem;appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}
.appbar select option{color:var(--ink)}
.badge-dot{position:absolute;top:-4px;right:-4px;background:var(--coral);color:#fff;border-radius:99px;font-size:.68rem;min-width:18px;height:18px;display:grid;place-items:center;padding:0 5px;border:2px solid var(--teal);font-family:var(--head)}
.who{display:none;align-items:center;gap:10px;margin-left:4px}
.who .av{width:38px;height:38px;border-radius:50%;background:#fff;color:var(--teal);display:grid;place-items:center;font-family:var(--head);font-weight:700}
.who b{display:block;font-family:var(--head);font-weight:500;font-size:.9rem;line-height:1.2}
.who span{font-size:.75rem;opacity:.8}
.page{padding:18px 14px calc(96px + var(--safe-b));max-width:1320px;width:100%;margin:0 auto}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.page-head p{margin:2px 0 0;color:var(--muted);font-size:.9rem}

/* bottom tab bar (mobile) */
.tabbar{position:fixed;left:0;right:0;bottom:0;background:#fff;display:flex;justify-content:space-around;padding:6px 6px calc(6px + var(--safe-b));z-index:45;box-shadow:0 -1px 0 var(--line)}
.tab{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;color:#A3ABB8;text-decoration:none;font-size:.7rem;font-family:var(--head);padding:6px 0;border:0;background:none;cursor:pointer}
.tab svg.i{width:23px;height:23px}
.tab.on{color:var(--coral)}

@media(min-width:1024px){
  .drawer{transform:none}
  .main{margin-left:var(--drawer)}
  .tabbar,.appbar .menu-btn,.scrim{display:none}
  .who{display:flex}
  .page{padding:26px 28px 40px}
  .appbar{padding:12px 28px}
}

/* ---------- cards / panels ---------- */
.panel{background:var(--card);border-radius:var(--r-xl);padding:18px}
.panel-h{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.panel-h h3{display:flex;align-items:center;gap:8px}
.grid{display:grid;gap:14px}
.grid>*{min-width:0}
.g4{grid-template-columns:1fr 1fr}
@media(min-width:720px){.g2{grid-template-columns:1fr 1fr}.g3{grid-template-columns:repeat(3,1fr)}.g4{grid-template-columns:repeat(4,1fr)}}
@media(min-width:1024px){.g-main{grid-template-columns:1.55fr 1fr}.g5{grid-template-columns:repeat(5,1fr)}}
.span2{grid-column:1/-1}

/* hero */
.hero{border-radius:var(--r-xl);padding:20px;color:#fff;position:relative;overflow:hidden;display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.hero.teal{background:var(--teal)} .hero.violet{background:var(--violet)} .hero.coral{background:var(--coral)}
.hero h2{color:#fff;font-size:1.35rem}
.hero p{margin:4px 0 0;opacity:.9}
.hero .grow{flex:1;min-width:220px}
.hero::after{content:"";position:absolute;right:-60px;top:-60px;width:220px;height:220px;border-radius:50%;background:rgba(255,255,255,.08);pointer-events:none}
.ring{--p:0;--c:#fff;--t:rgba(255,255,255,.22);width:124px;height:124px;border-radius:50%;background:conic-gradient(var(--c) calc(var(--p)*1%),var(--t) 0);display:grid;place-items:center;flex:none}
.ring>div{width:96px;height:96px;border-radius:50%;background:var(--bg,var(--teal));display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;line-height:1.1}
.ring b{font-family:var(--head);font-size:1.7rem;display:block}
.ring span{font-size:.74rem;opacity:.9}
.ring.sm{width:62px;height:62px}.ring.sm>div{width:48px;height:48px}.ring.sm b{font-size:.95rem}

/* icon tiles (like app grid) */
.tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
@media(min-width:720px){.tiles{grid-template-columns:repeat(6,1fr)}}
.tile{display:flex;flex-direction:column;align-items:center;gap:8px;text-decoration:none;color:var(--ink);font-family:var(--head);font-size:.82rem;text-align:center;background:none;border:0;cursor:pointer;padding:0}
.tile .sq{width:100%;aspect-ratio:1;max-width:96px;border-radius:20px;display:grid;place-items:center;color:#fff;position:relative;transition:transform .12s}
.tile:hover .sq{transform:translateY(-2px)}
.tile .sq svg.i{width:36px;height:36px;stroke-width:1.8}
.tile .sq .cnt{position:absolute;top:-6px;right:-6px;background:#fff;color:var(--coral);border-radius:99px;min-width:24px;height:24px;font-size:.78rem;display:grid;place-items:center;padding:0 6px;box-shadow:0 0 0 2px var(--coral)}
.bg-violet{background:var(--violet)}.bg-teal{background:var(--teal)}.bg-coral{background:var(--coral)}.bg-sun{background:var(--sun)}.bg-blue{background:var(--blue)}.bg-ink{background:var(--ink)}.bg-orange{background:var(--orange)}

/* KPI */
.kpi{background:#fff;border-radius:var(--r-lg);padding:14px 16px;display:flex;gap:12px;align-items:center}
.kpi .ic{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;flex:none}
.kpi b{font-family:var(--head);font-size:1.45rem;display:block;line-height:1.15}
.kpi span{font-size:.8rem;color:var(--muted)}
.t-violet{background:var(--violet-50);color:var(--violet)}.t-teal{background:var(--teal-50);color:var(--teal)}.t-coral{background:var(--coral-50);color:var(--coral)}
.t-sun{background:var(--sun-50);color:var(--sun-d)}.t-orange{background:var(--orange-50);color:var(--orange)}.t-blue{background:var(--blue-50);color:var(--blue)}.t-gray{background:#EEF0F3;color:#677284}

/* status pill */
.pill{display:inline-flex;align-items:center;gap:5px;border-radius:99px;padding:3px 10px;font-size:.76rem;font-weight:600;font-family:var(--head);white-space:nowrap}
.pill::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}

/* list rows w/ chevron (like profile list) */
.lst{display:flex;flex-direction:column}
.li{display:flex;align-items:center;gap:12px;padding:12px 4px;border-bottom:1px solid var(--line);text-decoration:none;color:inherit;cursor:pointer;background:none;border-left:0;border-right:0;border-top:0;width:100%;text-align:left}
.li:last-child{border-bottom:0}
.li:hover{background:var(--soft)}
.li .grow{flex:1;min-width:0}
.li .t{font-weight:600;line-height:1.35}
.li .s{font-size:.82rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.li .chev{color:#B2B9C4}
.av{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;font-family:var(--head);font-weight:600;flex:none;color:#fff}
.score{display:flex;align-items:center;gap:4px;font-family:var(--head);font-weight:600}
.score svg{width:16px;height:16px;color:var(--sun)}

/* event card (calendar list) */
.ev{display:flex;gap:12px;align-items:stretch;border-radius:var(--r-md);padding:12px 14px;color:#fff;cursor:pointer;text-align:left;border:0;width:100%;margin-bottom:8px}
.ev .grow{flex:1;min-width:0}
.ev b{font-family:var(--head);font-weight:600;display:block;line-height:1.3}
.ev span{font-size:.82rem;opacity:.92}
.ev .when{text-align:right;font-size:.8rem;font-family:var(--head);white-space:nowrap;opacity:.95}
.ev.teal{background:var(--teal)}.ev.coral{background:var(--coral)}.ev.sun{background:var(--sun);color:#3d2c00}.ev.violet{background:var(--violet)}.ev.orange{background:var(--orange)}.ev.gray{background:#A7AFBC}

/* calendar */
.cal-head{display:flex;align-items:center;justify-content:center;gap:14px;margin-bottom:10px}
.cal-head h3{min-width:170px;text-align:center}
.cal-head .btn-icon{background:var(--soft);color:var(--ink)}
.cal{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;text-align:center}
.cal .dow{font-size:.78rem;font-weight:700;font-family:var(--head);color:var(--ink-2);padding:4px 0}
.cal .dow:nth-child(1),.cal .dow:nth-child(7){color:var(--coral)}
.day{aspect-ratio:1;max-height:72px;border-radius:14px;border:0;background:none;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-family:var(--head);font-size:.95rem;color:var(--ink);position:relative}
.day:hover{background:var(--soft)}
.day.out{color:#C3C8D0}
.day.we{color:#A1A9B6}
.day.today .n{box-shadow:0 0 0 2px var(--violet);}
.day .n{width:32px;height:32px;border-radius:50%;display:grid;place-items:center}
.day.has .n{color:#fff}
.day.sel{background:var(--violet-50)}
.day .dots{display:flex;gap:3px;height:6px}
.day .dots i{width:6px;height:6px;border-radius:50%}
.day .load{position:absolute;top:3px;right:5px;font-size:.62rem;color:var(--muted)}
.legend{display:flex;flex-wrap:wrap;gap:10px 14px;font-size:.78rem;color:var(--ink-2);margin-top:12px}
.legend i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:5px;vertical-align:-1px}

/* chips */
.chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
.chip{border:0;background:#fff;border-radius:99px;padding:8px 14px;font-family:var(--head);font-size:.84rem;cursor:pointer;white-space:nowrap;color:var(--ink-2);display:inline-flex;gap:6px;align-items:center}
.chip.on{background:var(--ink);color:#fff}
.chip .c{background:var(--soft);color:var(--ink-2);border-radius:99px;padding:0 7px;font-size:.74rem}
.chip.on .c{background:rgba(255,255,255,.2);color:#fff}

/* table */
.tbl-wrap{overflow-x:auto;border-radius:var(--r-lg)}
.tbl{width:100%;border-collapse:collapse;background:#fff}
.tbl th{text-align:left;font-family:var(--head);font-weight:500;font-size:.82rem;color:var(--muted);padding:12px;border-bottom:1px solid var(--line);white-space:nowrap}
.tbl td{padding:12px;border-bottom:1px solid #F0F2F5;font-size:.93rem;vertical-align:middle}
.tbl tr:last-child td{border-bottom:0}
.tbl tbody tr{cursor:default}
.tbl tbody tr.click{cursor:pointer}.tbl tbody tr.click:hover{background:#FAFAFC}
.c{text-align:center}.r{text-align:right}

/* search */
.search{position:relative;flex:1;min-width:200px}
.search svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:var(--muted)}
.search input{padding-left:40px;border-radius:99px;border:0}

/* modal / sheet */
.modal{position:fixed;inset:0;z-index:80;display:flex;align-items:flex-end;justify-content:center;background:rgba(46,58,75,.5);animation:fade .15s}
.sheet{background:#fff;width:100%;max-height:92vh;overflow-y:auto;border-radius:26px 26px 0 0;padding:0 0 calc(20px + var(--safe-b));animation:up .22s ease}
.sheet-h{position:sticky;top:0;background:#fff;z-index:2;display:flex;align-items:center;gap:10px;padding:16px 20px 12px;border-bottom:1px solid var(--line)}
.sheet-h h2{flex:1;font-size:1.1rem}
.sheet-b{padding:16px 20px}
.sheet-f{display:flex;gap:10px;justify-content:flex-end;padding:4px 20px 0;flex-wrap:wrap}
.sheet .grab{width:44px;height:5px;border-radius:9px;background:#D5D9E0;margin:8px auto 0}
@media(min-width:720px){.modal{align-items:center;padding:20px}.sheet{max-width:640px;border-radius:24px;padding-bottom:20px}.sheet.wide{max-width:900px}.sheet .grab{display:none}}
@keyframes fade{from{opacity:0}}@keyframes up{from{transform:translateY(40px);opacity:.4}}
.sheet-band{padding:16px 20px;color:#fff;display:flex;gap:12px;align-items:center}
.sheet-band b{font-family:var(--head);font-size:1.05rem;display:block}

.kv{display:grid;grid-template-columns:130px 1fr;gap:8px 12px;font-size:.93rem}
.kv dt{color:var(--muted)} .kv dd{margin:0;font-weight:500}
.box{border-radius:var(--r-md);padding:12px 14px;margin-bottom:10px}
.box h4{font-size:.9rem;margin-bottom:4px}
.box p{margin:0;white-space:pre-line}
.box.teal{background:var(--teal-50)}.box.coral{background:var(--coral-50)}.box.sun{background:var(--sun-50)}.box.violet{background:var(--violet-50)}.box.soft{background:var(--soft)}
.alert{display:flex;gap:10px;align-items:flex-start;border-radius:var(--r-md);padding:12px 14px;margin-bottom:12px;font-size:.92rem}
.alert svg.i{margin-top:2px}
.alert.sun{background:var(--sun-50);color:#7a5600}.alert.coral{background:var(--coral-50);color:#9b2335}.alert.teal{background:var(--teal-50);color:#0f6b5a}.alert.violet{background:var(--violet-50);color:var(--violet-d)}
.file-chip{display:flex;align-items:center;gap:10px;background:var(--soft);border-radius:var(--r-md);padding:10px 12px;text-decoration:none;color:inherit}
.file-chip .ic{width:38px;height:38px;border-radius:10px;background:var(--coral);color:#fff;display:grid;place-items:center}

/* rubric picker */
.rub{background:#fff;border-radius:var(--r-lg);padding:16px;margin-bottom:12px}
.rub-h{display:flex;gap:10px;align-items:flex-start;margin-bottom:10px}
.rub-n{width:30px;height:30px;border-radius:10px;background:var(--violet-50);color:var(--violet);display:grid;place-items:center;font-family:var(--head);font-weight:600;flex:none}
.rub-opts{display:grid;gap:8px}
@media(min-width:560px){.rub-opts{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}}
.opt{border:2px solid var(--line);border-radius:var(--r-md);padding:10px 12px;cursor:pointer;background:#fff;text-align:left;font-size:.86rem;line-height:1.4;display:flex;gap:10px;align-items:flex-start;transition:border-color .12s,background .12s}
.opt .lv{width:28px;height:28px;border-radius:50%;background:var(--soft);display:grid;place-items:center;font-family:var(--head);font-weight:600;flex:none}
.opt:hover{border-color:#C9C7F0}
.opt.sel{border-color:var(--violet);background:var(--violet-50)}
.opt.sel .lv{background:var(--violet);color:#fff}
.sumbar{position:sticky;bottom:calc(70px + var(--safe-b));z-index:20;background:var(--ink);color:#fff;border-radius:var(--r-lg);padding:12px 16px;display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-top:12px}
@media(min-width:1024px){.sumbar{bottom:16px}}
.sumbar b{font-family:var(--head);font-size:1.3rem}
.sumbar .grow{flex:1}
.photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:8px}
.photo{position:relative;aspect-ratio:4/3;border-radius:12px;overflow:hidden;background:var(--soft)}
.photo img{width:100%;height:100%;object-fit:cover;display:block;cursor:zoom-in}
.photo button{position:absolute;top:5px;right:5px;width:28px;height:28px;border-radius:50%;border:0;background:rgba(0,0,0,.55);color:#fff;display:grid;place-items:center;cursor:pointer}
.photo button svg{width:15px;height:15px}
.add-photo{aspect-ratio:4/3;border-radius:12px;border:2px dashed #C6CBD4;display:grid;place-items:center;color:var(--muted);cursor:pointer;font-size:.8rem;text-align:center;background:#fff}

/* chart */
.chart-box{position:relative;height:250px}
.chart-box.tall{height:300px}
.bar-row{display:grid;grid-template-columns:minmax(110px,1fr) 2fr 52px;gap:10px;align-items:center;font-size:.86rem;padding:6px 0}
.bar{height:10px;border-radius:9px;background:var(--soft);overflow:hidden}
.bar i{display:block;height:100%;border-radius:9px}

/* notifications */
.notif-panel{position:fixed;top:64px;right:12px;width:min(380px,calc(100vw - 24px));max-height:70vh;background:#fff;border-radius:20px;box-shadow:0 20px 50px -10px rgba(46,58,75,.35);z-index:70;display:flex;flex-direction:column;overflow:hidden;animation:fade .15s}
.notif-panel .h{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid var(--line)}
.notif-panel .b{overflow-y:auto}
.nt{display:flex;gap:10px;padding:12px 16px;border-bottom:1px solid #F1F3F6;cursor:pointer;font-size:.9rem}
.nt:hover{background:var(--soft)}
.nt.unread{background:#F7F6FE}
.nt .dot{width:8px;height:8px;border-radius:50%;background:var(--coral);margin-top:8px;flex:none}
.nt.read .dot{background:transparent}

/* empty */
.empty{text-align:center;padding:34px 16px;color:var(--muted)}
.empty .ic{width:64px;height:64px;border-radius:20px;background:var(--soft);display:grid;place-items:center;margin:0 auto 10px;color:#A3ABB8}
.empty .ic svg{width:30px;height:30px}

/* toast */
#toast{position:fixed;left:50%;bottom:calc(84px + var(--safe-b));transform:translateX(-50%) translateY(20px);background:var(--ink);color:#fff;padding:12px 18px;border-radius:14px;z-index:100;opacity:0;pointer-events:none;transition:.2s;max-width:calc(100vw - 32px);font-size:.93rem;display:flex;gap:8px;align-items:center}
#toast.on{opacity:1;transform:translateX(-50%)}
#toast.err{background:var(--coral)}#toast.ok{background:var(--teal)}
@media(min-width:1024px){#toast{bottom:24px}}

.lightbox{position:fixed;inset:0;background:rgba(10,14,22,.9);z-index:120;display:grid;place-items:center;cursor:zoom-out}
.lightbox img{max-width:94vw;max-height:90vh;border-radius:8px}
.sec-title{font-family:var(--head);font-weight:600;font-size:.95rem;margin:18px 0 10px;display:flex;align-items:center;gap:8px}
.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:14px}
.swatch{width:22px;height:22px;border-radius:7px;display:inline-block;vertical-align:middle}
input[type=color].inp{padding:4px;height:42px}
.mt{margin-top:14px}.mb0{margin-bottom:0}
.right{margin-left:auto}
.flex{display:flex;gap:10px;align-items:center;flex-wrap:wrap}

.desk{display:none}
@media(min-width:860px){.desk{display:block}.mob{display:none}}

@media(max-width:1023px){.appbar select{max-width:118px;padding-right:26px;font-size:.8rem}}
.li .t{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kpi{min-width:0}.kpi b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:480px){.kpi{padding:12px}.kpi .ic{width:38px;height:38px}.kpi b{font-size:1.2rem}.page-head h1{font-size:1.3rem}}

/* bulk selection */
.u-ck{width:18px;height:18px;accent-color:var(--violet);cursor:pointer;vertical-align:middle}
.tbl tbody tr.sel{background:var(--violet-50)!important}
.tbl td[data-ck]{cursor:pointer}
.bulkbar{position:fixed;left:12px;right:12px;bottom:calc(72px + var(--safe-b));z-index:44;margin:0;gap:8px;box-shadow:0 12px 30px -8px rgba(46,58,75,.45)}
@media(min-width:1024px){.bulkbar{left:calc(var(--drawer) + 28px);right:28px;bottom:16px}}
.has-bulk{padding-bottom:110px}
@media(max-width:720px){.hide-sm{display:none}.has-bulk{padding-bottom:200px}}
.bulkbar .bulk-ghost{background:rgba(255,255,255,.12);color:#fff}
.bulkbar .bulk-ghost:hover{background:rgba(255,255,255,.22)}
@media(max-width:720px){.bulkbar .grow{display:none}.bulkbar .btn{flex:1 1 30%}}
