/* PANN Audit — ชุดตัวแปรและชิ้นส่วนกลาง (ตามแบบ docs/design/Stock Audit App.dc.html) */

:root {
  /* งาน 016 (ระบบดีไซน์ PANN v1.2): ทุกสีมาจาก pann-design.css — ห้ามเขียนเลขสีในไฟล์นี้ แก้สีที่ pann-design.css ที่เดียว
     ชื่อตัวแปรเดิมของ PANN Audit คงไว้ (โค้ดหน้าเว็บอ้างอยู่) แต่ชี้ไปตัวแปรกลางตามบทบาท:
     brand = ปุ่มหลัก/เมนูที่เลือก/ลิงก์ · green = สำเร็จ/นับแล้ว · amber = ต้องดู · red = อันตราย/ผิดพลาด · blue = ข้อมูล */
  --bg: var(--pann-bg);
  --surface: var(--pann-surface);
  --surface-2: var(--pann-bg);
  --soft: var(--pann-neutral-tint);
  --ink: var(--pann-fg);
  --muted: var(--pann-fg-muted);
  --faint: var(--pann-input);
  --line: var(--pann-line);
  --line-2: var(--pann-line);
  --line-3: var(--pann-line);
  --track: var(--pann-line);
  --seg: var(--pann-neutral-tint);
  --brand: var(--pann-brand);
  --brand-dark: var(--pann-brand-dark);
  --brand-soft: var(--pann-brand-tint);
  --on-brand: var(--pann-on-brand);
  --accent: var(--pann-accent);
  --green: var(--pann-success);
  --green-dark: var(--pann-success);
  --green-soft: var(--pann-success-tint);
  --red: var(--pann-danger);
  --red-soft: var(--pann-danger-tint);
  --amber: var(--pann-attention);
  --amber-ink: var(--pann-attention);
  --amber-soft: var(--pann-attention-tint);
  --blue: var(--pann-info);
  --blue-soft: var(--pann-info-tint);
  --radius-card: 20px;
  --radius-field: 16px;
  --radius-btn: 14px;
  --font: var(--pann-font);   /* IBM Plex Sans Thai ตามระบบดีไซน์ PANN (โจตัดสิน 7 ต.ค. 2569) — โหลดโดย pann-design.css */
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --shadow: var(--pann-shadow-float);
}

* { box-sizing: border-box; }
h1, h2 { font-size: revert; font-weight: revert; margin: revert; text-wrap: revert; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.mono, code { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ---------- โครงหน้า ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 14px; min-width: 0; text-align: left; }
.brand-logo { width: 38px; height: 38px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; overflow: hidden; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; background: var(--surface); }
.brand-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.brand-name { font-weight: 700; font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
/* แถบบนที่ app.js วาด (.brand.live): โลโก้+ชื่อ (ลิงก์หน้าแรก หรือ ตัวสลับแอปของ PANN) ซ้อนช่องเดียวกับปุ่มชื่อสำนักงานใต้ชื่อ */
.brand.live { display: grid; padding: 0; gap: 0; }
.brand.live > * { grid-area: 1 / 1; }
.brand-app { display: flex; align-items: flex-start; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 14px; color: inherit; min-width: 0; min-height: 46px; box-sizing: border-box; position: relative; }
.brand-app:hover { background: var(--soft); color: inherit; }
div.brand-app { cursor: pointer; }
.brand-app .brand-name { line-height: 22px; }
.brand.live .brand-sub { align-self: end; justify-self: start; margin: 0 8px 3px 52px; position: relative; z-index: 1; }
.pann-launcher__caret { margin-left: 4px; font-size: 11px; color: var(--muted); }
.nav a.nav-home { display: inline-flex; align-items: center; padding: 6px 10px; }
.brand-sub { font: inherit; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; border: 0; background: transparent; padding: 0; margin: 0; text-align: left; }
button.brand-sub { cursor: pointer; border-radius: 6px; }
button.brand-sub:hover { color: var(--brand); }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { padding: 8px 12px; border-radius: 12px; color: var(--muted); font-weight: 600; font-size: 14px; }
.nav a.on, .nav a:hover { background: var(--brand-soft); color: var(--brand); }
.page { max-width: 1080px; margin: 0 auto; padding: 18px 16px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 27px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.page-head .sub { font-size: 13px; color: var(--muted); }
@media (max-width: 720px) {
  .nav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--line); justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); margin: 0; z-index: 30; }
  .nav { flex-wrap: nowrap; }
  .nav a { font-size: 12px; padding: 8px 4px; white-space: nowrap; }
  .page-head h1 { font-size: 24px; }
}

/* ---------- การ์ด ---------- */
.card { background: var(--surface); border-radius: var(--radius-card); padding: 16px; border: 1px solid var(--line); }
.card + .card, .stack > * + * { margin-top: 14px; }
.card h2, .card h3 { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.card-list { background: var(--surface); border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-3); }
.row:last-child { border-bottom: 0; }
.row.click { cursor: pointer; }
.row.click:hover { background: var(--surface-2); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 12px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 720px) { .grid4 { grid-template-columns: 1fr 1fr; } }
.stat { background: var(--surface); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 24px; font-weight: 700; line-height: 1.2; }
.hero { background: var(--brand); color: var(--on-brand); border-radius: 24px; padding: 20px 20px 18px; }
.hero .big { font-size: 44px; font-weight: 700; letter-spacing: -.02em; line-height: 1; margin: 6px 0 12px; }
.hero .bar { background: color-mix(in srgb, var(--on-brand) 25%, transparent); }
.hero .bar > i { background: var(--accent); }

/* ---------- ปุ่ม ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: var(--radius-btn); border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap; transition: background .12s, transform .06s; }
.btn:active { transform: scale(.98); }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { color: var(--red); }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: var(--on-brand); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--brand); }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.busy { opacity: .55; pointer-events: none; }
.btn .spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.fab { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow); cursor: pointer; font-size: 22px; }

/* ---------- ฟอร์ม ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea { width: 100%; height: 50px; padding: 0 16px; background: var(--surface); border-radius: var(--radius-field); border: 1px solid var(--pann-input); font-size: 15px; }
.textarea { height: auto; min-height: 90px; padding: 12px 16px; resize: vertical; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.search { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; background: var(--surface); border-radius: var(--radius-field); border: 1px solid var(--pann-input); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 15px; padding: 0; outline: none; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }

/* ---------- ชิป แถบ ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.amber { background: var(--amber-soft); color: var(--amber-ink); }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.dark { background: var(--ink); color: var(--surface); }
.bar { height: 8px; border-radius: 8px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 8px; background: var(--accent); width: 0; transition: width .4s; }
.bar.thin { height: 6px; }
.seg { display: flex; gap: 6px; background: var(--seg); border-radius: 14px; padding: 4px; overflow-x: auto; }
.seg > * { flex: 1; text-align: center; padding: 9px 8px; border-radius: 11px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--muted); border: 0; background: transparent; }
.seg > .on { background: var(--surface); color: var(--ink); box-shadow: var(--pann-shadow); }
.steps { display: flex; gap: 6px; }
.steps > i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps > i.on { background: var(--brand); }
.notice { display: flex; align-items: center; gap: 10px; border-radius: 14px; padding: 11px 14px; font-size: 13px; line-height: 1.4; background: var(--soft); color: var(--muted); }
.notice.amber { background: var(--amber-soft); color: var(--amber-ink); }
.notice.red { background: var(--red-soft); color: var(--red); }
.notice.green { background: var(--green-soft); color: var(--green-dark); }
.notice.blue { background: var(--blue-soft); color: var(--blue); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- ตาราง ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius-card); border: 1px solid var(--line); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); position: sticky; top: 0; white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-3); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.warn td { background: var(--amber-soft); }
.tbl tr.bad td { background: var(--red-soft); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 4px; font-size: 13px; color: var(--muted); }

/* ---------- แผ่นล่าง / modal / toast ---------- */
.sheet-bg { position: fixed; inset: 0; background: color-mix(in srgb, var(--ink) 40%, transparent); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; border-radius: 24px 24px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
@media (min-width: 721px) { .sheet-bg { align-items: center; } .sheet { border-radius: 24px; } }
.sheet h2 { margin: 0 0 14px; font-size: 20px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 12px 18px; border-radius: 14px; font-size: 14px; z-index: 80; max-width: 92vw; box-shadow: var(--pann-shadow-float); }
.toast.err { background: var(--red); }
.skeleton { background: linear-gradient(90deg, var(--soft), var(--surface), var(--soft)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; height: 16px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- หน้าเข้าใช้ ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 28px; padding: 32px 24px; text-align: center; border: 1px solid var(--line); }
.login-card h1 { font-size: 27px; margin: 14px 0 6px; }
/* ปุ่ม Google ตามมาตรฐาน Google Sign-In Branding (Light/neutral) — ไม่ใช้สีแบรนด์เรา (006h)
   016: สี 4 ค่าด้านล่างเป็นข้อกำหนดของ Google ไม่ใช่สีของระบบดีไซน์ PANN — คงไว้ตามเดิม ไม่เปลี่ยนเป็นตัวแปร */
.google-btn { width: 100%; font-size: 15px; font-weight: 500; background: #FFFFFF; border: 1px solid #747775; color: #1F1F1F; gap: 12px; }
.google-btn:hover { background: #F2F2F2; }
.google-btn svg { flex: none; }

/* ---------- ปฏิทินไทย ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grid i { font-style: normal; font-size: 12px; color: var(--muted); padding: 4px 0; }
.cal-d { height: 42px; border-radius: 12px; border: 0; background: var(--surface); cursor: pointer; font-weight: 600; }
.cal-d:hover { background: var(--brand-soft); }
.cal-d.today { box-shadow: inset 0 0 0 1.5px var(--brand); }
.cal-d.on { background: var(--brand); color: var(--on-brand); }

/* ---------- แท็บ ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 16px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .search { flex: 1 1 220px; height: 44px; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; z-index: 5; }
@media (max-width: 720px) { .sticky-actions { bottom: 58px; } }
/* หน้าเข้าใช้: เส้นคั่น "หรือ" ระหว่าง Google กับอีเมล (006f) */
.login-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 18px 0 14px; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* หน้าสำนักงาน (006n): ซ้าย = ข้อมูล + ขั้นตอนปิดงาน · ขวา = ทีม (กว้าง) · จอแคบเรียงลง */
.firm-layout { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(0, 1.5fr); gap: 14px; align-items: start; }
.firm-left { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.firm-left > .card { margin: 0; }
.firm-team { min-width: 0; }
@media (max-width: 900px) { .firm-layout { grid-template-columns: minmax(0, 1fr); } }
.mrow { flex-wrap: wrap; align-items: flex-start; }
.mrow .row-main { flex: 1 1 220px; min-width: 200px; }
.mrow .m-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .m-email { font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.mrow .m-email .nw { white-space: nowrap; }
.mrow .m-state { font-size: 12px; color: var(--muted); }
.mrow .m-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; flex: 0 1 auto; }
.mrow .m-acts .select { width: 170px; height: 40px; }
@media (max-width: 560px) { .mrow .m-acts { flex: 1 1 100%; justify-content: flex-start; padding-left: 48px; } }
/* 0067: ตารางผลต่าง — ช่องตัวเลขแคบพอดีตัวเลข · ชิปสถานะใต้ชื่อ · ปุ่มไม่ล้น · จอแคบกว่า 1280 = การ์ดต่อรายการ */
.tbl td.num, .tbl th.num { text-align: right; white-space: nowrap; width: 1%; }
.res-tbl { table-layout: auto; }
.res-tbl .c-item { min-width: 220px; }
.res-tbl .c-pick { width: 1%; padding-right: 0; }
.res-tbl .c-zone { max-width: 150px; min-width: 90px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-tbl .c-act { white-space: nowrap; width: 1%; text-align: right; }
.res-tbl .c-act .btn + .btn { margin-left: 4px; }
.row-link { color: inherit; text-decoration: none; }
.row-link:hover b { text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chips .chip { font-size: 11px; padding: 2px 8px; }
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-list .btn { justify-content: flex-start; text-align: left; }
.tbl .zone-cell { white-space: nowrap; }
@media (max-width: 1279px) {
  .tbl.cards thead { display: none; }
  .tbl.cards, .tbl.cards tbody { display: block; width: 100%; }
  .tbl.cards tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 10px; padding: 12px; border-bottom: 1px solid var(--line-3); }
  .tbl.cards tr.warn { background: var(--amber-soft); }
  .tbl.cards td { display: block; padding: 0; border: 0; background: transparent !important; width: auto; text-align: left; min-width: 0; }
  .tbl.cards td.num { text-align: left; }
  .tbl.cards td[data-th]::before { content: attr(data-th); display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
  .tbl.cards td.c-pick { grid-column: 1 / -1; }
  .tbl.cards td.c-item { grid-column: 1 / -1; min-width: 0; }
  .tbl.cards td.c-item::before { display: none; }
  .tbl.cards td.c-zone { max-width: none; white-space: normal; }
  .tbl.cards td.c-act { grid-column: 1 / -1; text-align: left; }
  .tbl.cards td.empty { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .tbl.cards tr { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 006o: คลิกนอกกรอบหน้าต่างที่มีฟอร์ม = สั่นเบา ๆ (ไม่ปิด) */
@keyframes sheet-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.sheet.shake { animation: sheet-shake .22s ease-in-out 1; }
@media (prefers-reduced-motion: reduce) { .sheet.shake { animation: none; outline: 2px solid var(--amber-ink); } }
/* หน้าเอกสารสาธารณะ privacy / terms */
.legal .card { margin-bottom: 14px; }
.legal ul { margin: 0; padding-left: 20px; }
.legal li { margin-bottom: 6px; line-height: 1.6; }

/* ---------- 006: วงกลมโปรไฟล์มุมขวาบน + เมนู "บัญชีของฉัน" ---------- */
.topbar-in { position: relative; }
.me-btn { border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; width: 40px; height: 40px; margin-left: 4px; }
.me-btn:hover, .me-btn[aria-expanded="true"] { background: var(--brand); color: var(--on-brand); }
.me-menu { position: absolute; right: 16px; top: calc(100% + 6px); z-index: 45; min-width: 260px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--pann-shadow-float); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.me-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line-3); margin-bottom: 4px; min-width: 0; }
.me-who { display: flex; flex-direction: column; min-width: 0; }
.me-who > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-menu [role=menuitem] { font: inherit; font-size: 15px; font-weight: 600; text-align: left; background: transparent; border: 0; border-radius: 10px; padding: 12px 10px; min-height: 44px; color: var(--ink); cursor: pointer; }
.me-menu [role=menuitem]:hover, .me-menu [role=menuitem]:focus-visible { background: var(--soft); }
@media (max-width: 720px) {
  .me-btn { margin-left: auto; }
  .me-menu { left: 8px; right: 8px; max-width: none; }
}

/* ---------- 004z: แถบเหลืองช่วงระบบปิดปรับปรุง (ย้ายฐาน) ---------- */
.maint-bar { position: relative; z-index: 1; background: var(--pann-attention-tint); color: var(--pann-attention); border-bottom: 1px solid var(--pann-attention); padding: 10px 16px; font-size: 14px; font-weight: 600; text-align: center; }

/* ---------- 003: หน้าลูกค้า — คอลัมน์ รหัส · รอบปีบัญชี · สถานะ + ตัวอย่างนำเข้า ---------- */
.client-cols { display: grid; grid-template-columns: 84px 96px 70px; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); flex: none; }
.client-cols .cc-code { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) {
  .client-row { flex-wrap: wrap; }
  .client-cols { display: flex; flex-wrap: wrap; gap: 4px 10px; flex: 1 1 100%; padding-left: 58px; margin-top: -6px; }
  .client-cols > span:empty, .client-cols.none, .client-row > svg { display: none; }
}
details.extras { border-top: 1px solid var(--line-3); margin-top: 6px; padding-top: 10px; }
details.extras > summary, .imp-pile > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
details.extras[open] > summary { margin-bottom: 8px; }
.imp-pile { border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; margin-bottom: 8px; background: var(--surface); }
.imp-pile .imp-n { display: inline-block; min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brand); }
.imp-pile .card-list { max-height: 260px; overflow: auto; }

/* ---------- 001 (PANN Audit): แถบบอกตำแหน่ง + แผงเมนูหน้าแรก ---------- */
.crumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 0 0 8px; min-width: 0; }
.crumb a { font-weight: 600; flex: none; }
.crumb b { font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .menu-grid { grid-template-columns: minmax(0, 1fr); } }
.menu-tile { display: flex; align-items: flex-start; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 18px 16px; color: inherit; min-height: 96px; min-width: 0; }
.menu-tile:hover { border-color: var(--pann-brand-line); background: var(--pann-brand-soft); color: inherit; }
.menu-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; flex: none; }
.menu-ico svg { width: 26px; height: 26px; }
.menu-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.menu-title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.menu-desc { font-size: 13px; color: var(--muted); }
.menu-tile.soon .menu-ico { background: var(--pann-neutral-tint); color: var(--muted); }
.soon-card { max-width: 560px; margin: 24px auto 0; text-align: center; padding: 28px 20px; }
.soon-card .menu-ico { margin: 0 auto 12px; width: 64px; height: 64px; border-radius: 20px; }
.soon-card .menu-ico svg { width: 34px; height: 34px; }
