/* MAG Dashboard — liquid glass · Prompt + Athiti · CI blue #1266e3 / gold #e3b76c / ink #1d2129 */
:root {
  --brand: #1266e3; --brand-dark: #0d4fba; --brand-deep: #0a3e93;
  --brand-soft: rgba(18, 102, 227, .10); --brand-glow: rgba(18, 102, 227, .28);
  --sand: #e3b76c; --sand-soft: rgba(227, 183, 108, .20);
  --ink: #1d2129; --gray: #5f6470; --gray2: #9aa1ad;
  --bg: #eef2f9; --panel: rgba(255, 255, 255, .72); --line: rgba(35, 31, 32, .08);
  --ok: #34c759; --warn: #e8a13a; --bad: #ff3b30;
  --radius: 20px; --radius-s: 12px;
  --glass-shadow: 0 8px 32px rgba(4, 90, 130, .10), inset 0 1px 0 rgba(255,255,255,.7);
  --font-head: "Prompt", -apple-system, sans-serif;
  --font-body: "Athiti", -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0; color: var(--ink);
  font: 500 15.5px/1.5 var(--font-body);
  background: var(--bg);
  background-image:
    radial-gradient(1000px 600px at 85% -10%, rgba(18,102,227,.14), transparent 60%),
    radial-gradient(800px 500px at -10% 40%, rgba(227,183,108,.18), transparent 55%),
    radial-gradient(700px 500px at 60% 110%, rgba(18,102,227,.09), transparent 60%);
  background-attachment: fixed;
}
a { color: var(--brand); text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; letter-spacing: -.01em; }
strong, b { font-weight: 700; }

/* wordmark logo */
.logotype {
  font-family: "Quicksand", var(--font-head), sans-serif;
  font-weight: 700; font-size: 23px; letter-spacing: -.01em;
  color: #1266e3; white-space: nowrap;
}

/* ---------- layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex-shrink: 0; padding: 24px 14px;
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border-right: 1px solid rgba(255,255,255,.6);
  box-shadow: 8px 0 32px rgba(4,90,130,.05);
}
.sidebar .brand { padding: 2px 12px 22px; }
.sidebar nav a {
  display: block; padding: 10px 14px; margin: 2px 0; color: var(--ink);
  border-radius: 12px; font-family: var(--font-head); font-weight: 400; font-size: 14.5px;
  transition: all .15s;
}
.sidebar nav a:hover { background: rgba(255,255,255,.8); }
.sidebar nav a.active {
  background: linear-gradient(120deg, var(--brand), #4a8ef5); color: #fff; font-weight: 500;
  box-shadow: 0 6px 18px var(--brand-glow);
}
.nav-group { margin-top: 4px; }
.nav-group > .nav-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-radius: 12px; cursor: pointer;
  font-family: var(--font-head); font-size: 14.5px; color: var(--ink);
}
.nav-group > .nav-head:hover { background: rgba(255,255,255,.8); }
.nav-group .nav-sub { display: none; padding-left: 10px; }
.nav-group.open .nav-sub { display: block; }
.nav-group .nav-sub a { font-size: 13.5px; color: var(--gray); }

.main { flex: 1; padding: 30px 36px; min-width: 0; }
.topbar { display: flex; align-items: center; margin-bottom: 22px; flex-wrap: wrap; gap: 10px; }
.topbar h1 { font-size: 27px; margin: 0; font-weight: 700; }
.topbar #viewActions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
/* ปุ่มยุบ/แสดง side menu */
.side-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.72); font-size: 18px; cursor: pointer; color: var(--ink); }
.side-toggle:hover { background: #fff; box-shadow: 0 2px 8px rgba(4,90,130,.1); }
.sidebar { transition: width .22s ease, transform .22s ease; }
body.side-collapsed .sidebar { width: 0; padding-left: 0; padding-right: 0; overflow: hidden; border-right: 0; }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 200; box-shadow: 6px 0 30px rgba(4,60,90,.18); }
  body.side-collapsed .sidebar { width: 236px; padding: 24px 14px; overflow: auto; transform: translateX(-104%); border-right: 1px solid rgba(255,255,255,.6); }
  .main { width: 100%; }
}

/* ---------- glass cards ---------- */
.card {
  background: var(--panel);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.65); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--glass-shadow);
}
.card h3 { margin: 0 0 14px; font-size: 16.5px; font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat {
  background: var(--panel); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.65); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--glass-shadow);
}
.stat .n { font-family: var(--font-head); font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.stat .n.brand { color: var(--brand); }
.stat .l { color: var(--gray); font-size: 12.5px; margin-top: 2px; font-weight: 400; }
.stat select {
  width: auto; border: 0; background: transparent; color: var(--gray);
  font: 400 12px var(--font-head); padding: 2px 4px; margin: -2px 0 4px -4px;
}
.stat .sub { color: var(--gray2); font-size: 11.5px; margin-top: 8px; line-height: 1.7; font-weight: 400; }
.stat .amt { color: var(--brand-dark); font-weight: 700; font-size: 14px; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--gray2); font: 600 10.5px var(--font-head); text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(255,255,255,.55); }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--brand); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border: 0; border-radius: 980px; padding: 9px 20px;
  cursor: pointer; font: 500 14px var(--font-head);
  background: linear-gradient(120deg, var(--brand), #4a8ef5); color: #fff;
  box-shadow: 0 6px 16px var(--brand-glow); transition: all .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px var(--brand-glow); }
.btn.ghost { background: rgba(255,255,255,.7); color: var(--brand-dark); box-shadow: inset 0 0 0 1.5px var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.sand { background: linear-gradient(120deg, var(--sand), #f0d19a); color: var(--ink); box-shadow: 0 6px 16px rgba(227,183,108,.4); }
.btn.small { padding: 5px 13px; font-size: 12.5px; }
.btn.danger { background: rgba(255,255,255,.7); color: var(--bad); box-shadow: inset 0 0 0 1.5px var(--bad); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }

/* ---------- badges ---------- */
.badge { display: inline-block; padding: 3px 11px; border-radius: 980px; font: 600 11.5px var(--font-head); }
.badge.Pending { background: var(--sand-soft); color: #8a6234; }
.badge.Approved, .badge.Active { background: rgba(52,199,89,.14); color: #1d7a42; }
.badge.Completed { background: var(--brand-soft); color: var(--brand-deep); }
.badge.Canceled, .badge.Rejected, .badge.Expired { background: rgba(255,59,48,.12); color: #b03028; }
.badge.No-show, .badge.Inactive, .badge.Depleted { background: rgba(35,31,32,.07); color: var(--gray); }
.badge.Paid { background: rgba(52,199,89,.14); color: #1d7a42; }
.badge.Unpaid { background: var(--sand-soft); color: #8a6234; }

.units { font-family: var(--font-head); font-weight: 700; color: var(--brand); font-size: 15px; }
.units small { color: var(--gray2); font-weight: 400; }
.meter { height: 5px; border-radius: 4px; background: rgba(35,31,32,.08); margin-top: 5px; overflow: hidden; width: 110px; }
.meter i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--brand), #5c9cf7); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 980px;
  background: var(--brand-soft); color: var(--brand-deep); font: 600 13px var(--font-head);
  margin: 0 6px 6px 0; cursor: pointer; }
.chip:hover { background: rgba(18,102,227,.18); }

/* ---------- modal & forms ---------- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(20, 45, 60, .35);
  display: flex; align-items: center; justify-content: center; z-index: 50;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 14px;
}
.modal {
  background: rgba(255,255,255,.88); backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.8); border-radius: 24px; padding: 26px;
  width: min(560px, 96vw); max-height: 90vh; overflow: auto;
  box-shadow: 0 24px 70px rgba(4,60,90,.25);
}
.modal h2 { margin: 0 0 16px; font-size: 19px; font-weight: 700; }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font: 500 12.5px var(--font-head); color: var(--gray); margin-bottom: 5px; }
input, select, textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--radius-s);
  font: 500 14.5px var(--font-body); background: rgba(255,255,255,.85); color: var(--ink);
  transition: all .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.muted { color: var(--gray2); }
.filters { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.filters select, .filters input { width: auto; }
.empty { text-align: center; color: var(--gray2); padding: 32px 0; font-weight: 400; }
.kv { font-size: 13px; color: var(--gray); word-break: break-all; font-weight: 400; }
.login-box { max-width: 380px; margin: 12vh auto; }

/* summary modal */
.sum-box { text-align: center; padding: 6px 0 2px; }
.sum-box .big-ok { font-size: 44px; }
.sum-box .headline { font: 700 20px var(--font-head); margin: 6px 0 2px; }
.sum-box .jn { display: inline-block; margin: 8px 0; padding: 7px 20px; border-radius: 980px;
  background: var(--brand-soft); color: var(--brand-deep); font: 700 17px var(--font-head); letter-spacing: .03em; }
.sum-rows { text-align: left; margin: 12px auto 0; max-width: 400px; }
.sum-rows div { display: flex; justify-content: space-between; padding: 7px 4px; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.sum-rows div b { font-family: var(--font-head); }

/* ---------- public page ---------- */
.pub-nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.7); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px clamp(14px, 6vw, 60px);
}
.pub-tabs { display: flex; gap: 4px; background: rgba(35,31,32,.06); border-radius: 980px; padding: 4px; }
.pub-tabs button {
  border: 0; background: transparent; padding: 7px 18px; border-radius: 980px;
  font: 500 14px var(--font-head); color: var(--gray); cursor: pointer;
}
.pub-tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(4,60,90,.15); font-weight: 600; }
.book-wrap { max-width: 680px; margin: 0 auto; padding: 38px 16px 70px; }
.book-head { text-align: center; margin-bottom: 24px; }
.book-head h1 { font-size: clamp(26px, 5vw, 38px); margin: 0 0 6px; font-weight: 700; }
.book-head p { color: var(--gray); font-size: 16px; margin: 0; font-weight: 400; }
.steps { display: flex; gap: 7px; justify-content: center; margin: 20px 0 24px; }
.steps span { width: 38px; height: 5px; border-radius: 4px; background: rgba(35,31,32,.1); transition: background .2s; }
.steps span.on { background: var(--brand); }
.option {
  border: 1px solid rgba(255,255,255,.7); border-radius: var(--radius); padding: 16px 19px;
  margin-bottom: 10px; cursor: pointer; background: var(--panel);
  backdrop-filter: blur(14px); display: flex; justify-content: space-between; align-items: center;
  transition: all .15s; box-shadow: var(--glass-shadow);
}
.option:hover { border-color: var(--brand); transform: translateY(-1px); }
.option .price { font-family: var(--font-head); font-weight: 700; color: var(--brand); font-size: 16px; }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 15px; }
.pkg-card {
  border: 1px solid rgba(255,255,255,.7); border-radius: var(--radius); background: var(--panel);
  backdrop-filter: blur(14px); padding: 22px; text-align: center; cursor: pointer;
  box-shadow: var(--glass-shadow); transition: all .15s;
}
.pkg-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.pkg-card .qty { font-family: var(--font-head); font-size: 34px; font-weight: 700; color: var(--brand); }
.pkg-card .qty small { font-size: 16px; color: var(--ink); font-weight: 600; }
.pkg-card .name { font-weight: 600; margin: 6px 0 2px; font-family: var(--font-head); }
.pkg-card .desc { color: var(--gray); font-size: 13px; min-height: 18px; font-weight: 400; }
.pkg-card .price { margin-top: 10px; font-family: var(--font-head); font-size: 20px; font-weight: 700; }
.pkg-card .valid { color: var(--gray2); font-size: 12px; margin-top: 3px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 9px; }
.slot { border: 1px solid var(--line); border-radius: 980px; padding: 9px 0; text-align: center;
  cursor: pointer; background: rgba(255,255,255,.8); font: 500 14px var(--font-head); transition: all .12s; }
.slot:hover, .slot.sel { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.book-nav { display: flex; justify-content: space-between; margin-top: 20px; }
.confirm-box { background: var(--sand-soft); border: 1px solid rgba(227,183,108,.5);
  border-radius: var(--radius); padding: 15px 18px; margin-bottom: 13px; }
.done-card { text-align: center; padding: 36px 20px; }
.done-card .big { font-size: 46px; }
.done-card .code { display: inline-block; margin: 12px 0; padding: 8px 22px; border-radius: 980px;
  background: var(--brand-soft); color: var(--brand-deep); font: 700 18px var(--font-head); letter-spacing: .04em; }
.footer { text-align: center; color: var(--gray2); font-size: 12.5px; padding: 28px 0 40px; font-weight: 400; }

/* ---------- responsive: iPad ---------- */
@media (max-width: 1100px) {
  .main { padding: 22px 18px; }
  .cards { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important; }
}
/* ---------- responsive: mobile ---------- */
@media (max-width: 760px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; display: flex; align-items: center; overflow-x: auto; padding: 8px 10px; gap: 2px;
    position: sticky; top: 0; z-index: 20; }
  .sidebar .brand { padding: 0 8px 0 4px; }
  .sidebar .logotype { font-size: 17px; }
  .sidebar nav { display: flex; align-items: center; }
  .sidebar nav a, .nav-group > .nav-head { white-space: nowrap; padding: 8px 11px; font-size: 13px; }
  .nav-group .nav-sub { display: flex !important; padding-left: 0; }
  .nav-group > .nav-head { display: none; }
  .main { padding: 14px 10px; }
  .topbar h1 { font-size: 21px; }
  .grid2 { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr !important; }
  .card { padding: 14px; border-radius: 16px; }
  th, td { padding: 8px 8px; font-size: 13px; }
  .modal { padding: 18px; border-radius: 18px; }
}

/* dashboard averages: aligned rows */
.stat .amt-big { color: var(--brand-dark); font-family: var(--font-head); font-weight: 700; font-size: 21px; }
.avg-head { text-align: right; font: 600 11px var(--font-head); color: var(--gray); margin-top: 10px; text-transform: uppercase; letter-spacing: .06em; }
.avg-row { display: grid; grid-template-columns: 1fr auto 92px; gap: 8px; font-size: 12px; color: var(--gray); padding: 2px 0; }
.avg-row span:nth-child(2) { text-align: right; }
.avg-row span:nth-child(3) { text-align: right; font-family: var(--font-head); font-weight: 600; color: var(--brand-dark); font-variant-numeric: tabular-nums; }

/* POS gold */
.logotype .pos { color: #c9973f; font-weight: 700; }
/* iPad refinement */
@media (min-width: 761px) and (max-width: 1180px) {
  .sidebar { width: 190px; padding: 18px 10px; }
  .sidebar nav a, .nav-group > .nav-head { padding: 9px 11px; font-size: 13.5px; }
  .main { padding: 20px 16px; }
  th, td { padding: 8px 8px; font-size: 13px; }
  .stat .n { font-size: 25px; }
  .modal { width: min(600px, 94vw); }
  .cards { grid-template-columns: repeat(3, 1fr) !important; }
}

/* ---- role-based UI restrictions ---- */
body.role-staff .btn.danger, body.role-accountant .btn.danger { display: none !important; }
body.role-accountant #viewActions { display: none !important; }
body.role-accountant [data-edit], body.role-accountant [data-jo],
body.role-accountant [data-user], body.role-accountant [data-staff],
body.role-accountant [data-adjsave], body.role-accountant [data-editpurchase] { display: none !important; }
body.role-manager [data-jo] { display: none !important; } /* Manager แก้ไข job ที่บันทึกแล้วไม่ได้ */
body.role-manager .admin-only, body.role-staff .admin-only, body.role-accountant .admin-only { display: none !important; }

/* ---- v27 responsive polish (มือถือ/iPad เท่านั้น — ไม่กระทบ PC) ---- */
@media (max-width: 1180px) {
  .cards { grid-template-columns: repeat(2, 1fr) !important; }
  #view table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .filters { flex-wrap: wrap; row-gap: 8px; }
}
@media (max-width: 760px) {
  .cards { grid-template-columns: 1fr !important; }
  .topbar h1 { font-size: 20px; }
  #viewActions { display: flex; flex-wrap: wrap; gap: 6px; }
  #viewActions .btn { margin: 0 !important; }
  .card { padding: 12px 14px; }
  .modal { width: 96vw !important; max-width: 96vw !important; }
  .grid2 { grid-template-columns: 1fr !important; }
}


/* ---------- accounting (เมนูบัญชี) ---------- */
.acct-tbl td.r, .acct-tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
.acct-tbl tr.grp td { background: var(--brand-soft); font-weight: 600; font-family: var(--font-head); font-size: 13px; }
.acct-tbl tr.sub td { font-weight: 600; border-top: 1px solid var(--line); background: rgba(255,255,255,.5); }
.acct-tbl tr.tot td { font-weight: 700; font-family: var(--font-head); border-top: 2px solid var(--brand); }


/* บทบาทบัญชี: ซ่อนปุ่มเขียนงานในหน้าจ็อบ (ดูอย่างเดียว) */
body.role-accountant #view [data-use], body.role-acctmanager #view [data-use],
body.role-accountant #view [data-editpurchase], body.role-acctmanager #view [data-editpurchase],
body.role-accountant #view [data-payok], body.role-acctmanager #view [data-payok],
body.role-accountant #view [data-payno], body.role-acctmanager #view [data-payno],
body.role-accountant #view [data-trellojob], body.role-acctmanager #view [data-trellojob] { display: none !important; }

/* Accountant: ห้ามแก้ไข/ลบรายการที่บันทึกแล้ว (ซ่อนปุ่มแก้/ลบ) — Acct.Manager ทำได้ทุกอย่าง */
body.role-accountant #view [data-del], body.role-accountant #view [data-edit],
body.role-accountant #view [data-venddel], body.role-accountant #view [data-vend],
body.role-accountant #view [data-mandel], body.role-accountant #view [data-acc],
body.role-accountant #view [data-expcat] { display: none !important; }

/* ---------- MAG dashboard additions ---------- */
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
td.c, th.c { text-align: center; }
.month-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.month-chips .chip.on { background: linear-gradient(120deg, var(--brand), #4a8ef5); color: #fff; }
.seg { display: inline-block; padding: 3px 11px; border-radius: 980px; font: 600 11.5px var(--font-head); }
.seg.champion { background: rgba(18,102,227,.14); color: var(--brand-deep); }
.seg.loyal { background: rgba(52,199,89,.14); color: #1d7a42; }
.seg.potential { background: rgba(90,200,250,.18); color: #0a6485; }
.seg.new { background: rgba(175,130,255,.16); color: #6a3fbf; }
.seg.atrisk { background: var(--sand-soft); color: #8a6234; }
.seg.hibernate { background: rgba(255,59,48,.12); color: #b03028; }
.seg.lost { background: rgba(35,31,32,.07); color: var(--gray); }
.due-past { color: var(--bad); font-weight: 600; }
.due-soon { color: #b97f14; font-weight: 600; }
.bar-cell { display: flex; align-items: center; gap: 8px; }
.bar-cell .meter { margin-top: 0; flex-shrink: 0; }
.heat { font-variant-numeric: tabular-nums; text-align: right; }
.pct-badge { display: inline-block; min-width: 52px; text-align: center; padding: 2px 8px; border-radius: 8px;
  background: var(--brand-soft); color: var(--brand-deep); font: 600 12.5px var(--font-head); }
.tbl-note { color: var(--gray2); font-size: 12px; margin: 6px 0 0; font-weight: 400; }
.kpi-up { color: #1d7a42; font-weight: 600; } .kpi-down { color: #b03028; font-weight: 600; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.pager button { border: 1px solid var(--line); background: rgba(255,255,255,.8); border-radius: 8px;
  padding: 4px 10px; cursor: pointer; font: 500 12.5px var(--font-head); color: var(--ink); }
.pager button.on { background: linear-gradient(120deg, var(--brand), #4a8ef5); color: #fff; border-color: transparent; }
.pager button:disabled { opacity: .4; cursor: default; }
.sync-meta { color: var(--gray2); font-size: 12px; font-weight: 400; }

/* brand logo (มุมบนซ้าย เหนือชื่อ MAG Dashboard) */
.brand-logo { display: block; width: 64px; height: 64px; border-radius: 50%; margin-bottom: 10px;
  box-shadow: 0 6px 18px rgba(18,102,227,.25); }
@media (max-width: 760px) {
  .sidebar .brand { display: flex; align-items: center; gap: 8px; }
  .brand-logo { width: 28px; height: 28px; margin-bottom: 0; box-shadow: none; }
  .sidebar .brand .muted { display: none; }
}
