/* CCAT_MENU_V3 — เมนูแถบซ้าย + ปุ่ม ย้อนกลับ / หน้าหลัก (ใช้ทั้ง Data Center และ ccat-shell.js ของระบบอื่น) */
:root{
  --green:#0F4C5C; --green-dk:#0A3540; --green-soft:#E1F2F2;
  --ground:#EEF3F5; --line:#D8E3E7; --line2:#EDF2F4;
  --side:#0F3440; --side-on:#1E5A69; --side-ink:#D6E5E9; --accent:#2BB3B1; --badge:#F2A93B;
}
body.has-shell{background:var(--ground)}
.ccat-shell-ic,.shell .ic,.bottombar .ic{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.shell{display:flex;min-height:100vh;align-items:stretch}
.navtoggle{position:absolute;opacity:0;pointer-events:none}
.side{flex:0 0 272px;width:272px;background:var(--side);color:var(--side-ink);display:flex;flex-direction:column;padding:16px 12px;gap:4px;
  position:sticky;top:0;height:100vh;overflow-y:auto;z-index:30}
.side-brand{display:flex;align-items:center;gap:12px;padding:4px 8px 16px;margin-bottom:8px;border-bottom:1px solid #24505D;text-decoration:none;color:#fff}
.side-brand:hover{color:#fff}
.side-brand img{width:44px;height:44px;border-radius:50%;background:#fff;object-fit:contain;flex:none}
.side-brand span{display:flex;flex-direction:column;line-height:1.3}
.side-brand b{font-size:19px}.side-brand small{font-size:12px;color:#A9C3CA}
.side-nav{display:flex;flex-direction:column;gap:3px}
.side-nav a{display:flex;align-items:center;gap:12px;min-height:50px;padding:0 12px;border-radius:12px;color:var(--side-ink);text-decoration:none;font-size:16px}
.side-nav a:hover{background:#174554;color:#fff}
.side-nav a.on{background:var(--side-on);color:#fff;font-weight:600;box-shadow:inset 4px 0 0 var(--accent)}
.side-nav .t{flex:1}
.side-nav .badge,.tile .badge{background:var(--badge);color:#2A1A00;font-size:13px;font-weight:700;border-radius:999px;padding:1px 9px;line-height:1.5}
.side-user{margin-top:auto;border-top:1px solid #24505D;padding-top:12px;display:flex;align-items:center;gap:8px}
.side-user .me{flex:1;display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;min-width:0;padding:4px;border-radius:10px}
.side-user .me:hover{background:#174554;color:#fff}
.side-user .av{width:38px;height:38px;border-radius:50%;background:#24505D;display:flex;align-items:center;justify-content:center;font-weight:700;flex:none}
.side-user .nm{display:flex;flex-direction:column;line-height:1.3;min-width:0}
.side-user .nm b{font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.side-user .nm small{font-size:12px;color:#A9C3CA;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.side-user .out{width:44px;height:44px;border-radius:10px;background:#1A4552;color:#E4EEF1;display:flex;align-items:center;justify-content:center;flex:none}
.side-user .out:hover{background:#24505D;color:#fff}
.content{flex:1;min-width:0;display:flex;flex-direction:column}
.content>main.wrap,.content>.ccat-page{width:100%}
.topbar{background:#fff;border-bottom:1px solid var(--line);padding:10px 20px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-height:68px;position:sticky;top:0;z-index:20}
.tb-btn{display:inline-flex;align-items:center;gap:8px;min-height:46px;padding:0 18px;border-radius:12px;border:2px solid var(--green);color:var(--green);background:#fff;font-weight:700;font-size:16px;text-decoration:none;white-space:nowrap}
.tb-btn:hover{background:var(--green-soft);color:var(--green)}
.tb-btn.solid{background:var(--green);color:#fff}
.tb-btn.solid:hover{background:var(--green-dk);color:#fff}
.tb-title{font-weight:700;font-size:19px;padding:0 4px}
.crumb{font-size:14.5px;color:var(--muted);margin-left:6px}
.crumb a{color:var(--green)}
.scrim{display:none}
.bottombar{display:none}
/* หน้าหลัก */
.hello{background:var(--green);color:#fff;border-radius:18px;padding:22px 26px;display:flex;flex-direction:column;gap:4px}
.hello h1{font-size:26px}.hello p{margin:0;color:#CFE3E8;font-size:16px}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.tile{background:#fff;border:1px solid var(--line);border-radius:18px;padding:20px;display:flex;flex-direction:column;gap:12px;text-decoration:none;color:var(--ink);min-height:150px}
.tile:hover{border-color:var(--green);color:var(--ink);box-shadow:0 4px 14px rgba(15,52,64,.08)}
.tile .hd{display:flex;align-items:center;justify-content:space-between}
.tile .ib{width:56px;height:56px;border-radius:15px;background:var(--green);color:#fff;display:flex;align-items:center;justify-content:center}
.tile .ib .ic{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tile b{font-size:20px}.tile span.d{font-size:15px;color:var(--muted)}
.tile.hot{background:#FFF8EC;border-color:#F2C47A}
.todo a{display:flex;align-items:center;gap:12px;padding:12px 20px;border-top:1px solid var(--line2);text-decoration:none;color:var(--ink);min-height:48px}
.todo a:hover{background:#F6FAFB;color:var(--ink)}
.todo .n{background:#FDF0DA;color:#7A4A00;font-weight:700;border-radius:999px;padding:1px 12px;font-size:14px}
@media (max-width:900px){
  .side{position:fixed;left:0;top:0;bottom:0;transform:translateX(-105%);transition:transform .2s ease;box-shadow:4px 0 24px rgba(0,0,0,.25)}
  .navtoggle:checked ~ .side{transform:none}
  .navtoggle:checked ~ .scrim{display:block;position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:25}
  .topbar{padding:8px 12px;min-height:56px}
  .topbar .tb-btn{display:none}
  .crumb{margin-left:0;font-size:15px}
  .bottombar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;position:fixed;left:0;right:0;bottom:0;z-index:40;
    background:#fff;border-top:1px solid var(--line);padding:8px 10px calc(8px + env(safe-area-inset-bottom))}
  .bottombar a,.bottombar label{min-height:58px;border-radius:14px;border:2px solid var(--green);color:var(--green);display:flex;flex-direction:column;
    align-items:center;justify-content:center;gap:2px;font-size:14px;font-weight:700;text-decoration:none;cursor:pointer;background:#fff}
  .bottombar .solid{background:var(--green);color:#fff}
  body.has-shell{padding-bottom:86px}
  .hello{padding:18px}.hello h1{font-size:22px}
  .tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .tile{padding:14px;min-height:140px;gap:8px}.tile b{font-size:17px}.tile span.d{font-size:13.5px}
  .tile .ib{width:48px;height:48px}
}
@media print{
  .side,.topbar,.bottombar,.scrim{display:none!important}
  body.has-shell{padding:0;background:#fff}
  .shell{display:block}
}
input[type=number],input[type=time]{font:inherit;font-size:16px;color:var(--ink);background:#fff;border:1px solid #C5CEC8;border-radius:10px;padding:0 12px;min-height:46px;width:100%}
