            /* ═══ LEGAL CENTER v2 — Compact Daily Docket · Navy var(--brand-navy) · Gold var(--brand-gold) ═══
             * จอที่เปิดดูทุกวัน: command bar เตี้ย ~58px + chips กรองบรรทัดเดียว
             * + alert 2 คอลัมน์ + ตารางหนาแน่น (~22 แถว/จอ 1080p) ═══ */
            #pg-legal { background:#eef1f7; min-height:100vh; padding:0; }

            /* slim command bar */
            .lgc-hero {
              background:linear-gradient(150deg,#061220 0%,#0c2244 45%,var(--brand-navy) 70%,#153060 100%);
              padding:9px 24px 0; position:relative; overflow:hidden;
            }
            .lgc-hero::before {
              content:''; position:absolute; top:-120px; right:-60px; width:280px; height:280px; border-radius:50%;
              background:radial-gradient(circle,rgba(200,169,106,.12) 0%,transparent 65%); pointer-events:none;
            }
            .lgc-hero::after {
              content:''; position:absolute; bottom:0; left:0; right:0; height:2px;
              background:linear-gradient(90deg,transparent,var(--brand-gold) 30%,#e8cc8a 50%,var(--brand-gold) 70%,transparent);
            }
            .lgc-hero-inner { display:flex; align-items:center; gap:12px; position:relative; z-index:1; flex-wrap:wrap; }
            .lgc-hero-badge {
              width:34px; height:34px; border-radius:9px; flex-shrink:0;
              background:linear-gradient(135deg,var(--brand-gold),#e8cc8a 50%,#a07840);
              box-shadow:0 0 0 1.5px rgba(200,169,106,.5),0 4px 12px rgba(0,0,0,.3);
              display:flex; align-items:center; justify-content:center; font-size:15px; color:var(--brand-navy);
            }
            .lgc-hero-texts { flex:none; min-width:0; }
            .lgc-hero-title { font-family:'Cinzel','Sarabun',serif; font-size:17px; font-weight:700; color:#fff; line-height:1.2; letter-spacing:.02em; white-space:nowrap; }
            .lgc-hero-title em { font-style:normal; color:#e3c785; }
            /* ยอดรวมเงิน — คำนวณตามตัวกรองปัจจุบัน */
            .lgc-totals { font-size:11.5px; color:rgba(255,255,255,.55); white-space:nowrap; margin-left:6px; }
            .lgc-totals b { color:#e3c785; font-weight:800; font-variant-numeric:tabular-nums; }
            .lgc-hero-actions { display:flex; align-items:center; gap:7px; flex-shrink:0; margin-left:auto; flex-wrap:wrap; }
            .lgc-search-wrap {
              display:flex; align-items:center; gap:7px; background:rgba(255,255,255,.10);
              border:1px solid rgba(200,169,106,.35); border-radius:8px; padding:0 10px; transition:.15s;
            }
            .lgc-search-wrap:focus-within { background:rgba(255,255,255,.16); border-color:rgba(200,169,106,.7); }
            .lgc-search-wrap i { color:rgba(200,169,106,.6); font-size:12px; }
            .lgc-search-wrap input { background:none; border:none; outline:none; color:#fff; font-size:12.5px; padding:7px 0; width:230px; font-family:inherit; }
            .lgc-search-wrap input::placeholder { color:rgba(200,169,106,.45); }
            .lgc-sort-sel {
              background:rgba(255,255,255,.10); border:1px solid rgba(200,169,106,.35); color:#e8edf5;
              border-radius:8px; padding:7px 9px; font-size:12px; font-weight:600; font-family:inherit; cursor:pointer; outline:none;
            }
            .lgc-sort-sel option { color:#1f2a44; }
            .lgc-refresh-btn {
              display:inline-flex; align-items:center; gap:6px; padding:7px 12px;
              background:rgba(200,169,106,.12); border:1px solid rgba(200,169,106,.4); color:var(--brand-gold);
              border-radius:8px; cursor:pointer; font-size:12px; font-weight:600; font-family:inherit; transition:.15s; white-space:nowrap;
            }
            .lgc-refresh-btn:hover { background:rgba(200,169,106,.22); border-color:var(--brand-gold); color:#e8cc8a; }

            /* pipeline tiles → compact count-chips บรรทัดเดียว เลื่อนแนวนอนได้ */
            .lgc-pipe { display:flex; gap:6px; margin-top:8px; padding-bottom:9px; position:relative; z-index:1;
              flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
            .lgc-pipe::-webkit-scrollbar { display:none; }
            .lgc-tile {
              flex:none; display:inline-flex; align-items:center; gap:7px;
              background:rgba(255,255,255,.06); border:1px solid rgba(200,169,106,.22);
              border-radius:20px; padding:5px 13px; cursor:pointer; transition:.15s; position:relative; white-space:nowrap;
            }
            .lgc-tile::before { content:''; width:7px; height:7px; border-radius:50%; background:var(--tc,var(--brand-gold)); flex:none; }
            .lgc-tile:hover { background:rgba(255,255,255,.12); border-color:rgba(200,169,106,.5); }
            .lgc-tile.on { background:rgba(200,169,106,.20); border-color:var(--brand-gold); }
            .lgc-tile-num { font-size:13.5px; font-weight:800; color:#e3c785; line-height:1; order:2; font-variant-numeric:tabular-nums; }
            .lgc-tile-lbl { font-size:12px; color:rgba(255,255,255,.78); font-weight:600; order:1; margin-top:0; }
            .lgc-tile.on .lgc-tile-lbl { color:#fff; }

            .lgc-body { padding:12px 24px 56px; }

            /* alert — กระชับ 2 คอลัมน์ + เพดาน 150px (เกินแล้ว scroll ภายใน) */
            .lgc-alert {
              background:linear-gradient(135deg,#7f1d1d,#b91c1c); border-radius:11px; padding:9px 14px 10px; margin-bottom:10px;
              color:#fff; box-shadow:0 5px 16px rgba(185,28,28,.22);
              display:grid; grid-template-columns:1fr 1fr; gap:0 22px;
              max-height:150px; overflow-y:auto;
            }
            .lgc-alert-hd { grid-column:1/-1; font-size:12.5px; font-weight:800; display:flex; align-items:center; gap:7px; margin-bottom:4px; letter-spacing:.02em; }
            .lgc-alert-row { display:flex; align-items:center; gap:8px; padding:4px 0; border-top:1px solid rgba(255,255,255,.14); font-size:12.5px; cursor:pointer; min-width:0; }
            .lgc-alert-row:hover { color:#fde68a; }
            .lgc-alert-row > span[style*="flex:1"] { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
            .lgc-alert-when { font-size:10.5px; font-weight:800; padding:1px 7px; border-radius:20px; background:rgba(255,255,255,.18); white-space:nowrap; flex:none; }
            .lgc-alert-when.today { background:#fbbf24; color:#7c2d12; }
            .lgc-alert-when.past { background:#450a0a; color:#fca5a5; }

            /* dense docket table — แถว ~30px + zebra
             * scroll เฉพาะภายในตาราง (sticky thead) → command bar/ชิป/alert ปักอยู่กับที่
             * ไม่ต้องเลื่อนทั้งหน้า เห็นบริบทครบตลอด */
            .lgc-card { background:#fff; border:1px solid #e3e8f0; border-radius:12px; box-shadow:0 6px 20px rgba(15,42,82,.06); overflow:hidden; }
            #lgcTableHost > div[style*="overflow-x"] { max-height:calc(100vh - 252px); overflow:auto; }
            /* alert ซ่อนอยู่ → ตารางได้พื้นที่คืน ~160px */
            .lgc-body:has(#lgcAlert[style*="none"]) #lgcTableHost > div[style*="overflow-x"] { max-height:calc(100vh - 168px); }
            .lgc-tbl { width:100%; border-collapse:collapse; font-size:12.5px; }
            .lgc-tbl thead th {
              background:linear-gradient(180deg,var(--brand-navy),#0c2244); color:var(--brand-gold); font-weight:700; text-align:left;
              padding:9px 12px; font-size:10.5px; letter-spacing:.04em; text-transform:uppercase; white-space:nowrap; position:sticky; top:0; z-index:2;
            }
            .lgc-tbl tbody td { padding:6px 12px; border-top:1px solid #eef1f7; color:#1f2a3d; vertical-align:middle; }
            .lgc-tbl tbody tr { cursor:pointer; transition:background .1s; }
            .lgc-tbl tbody tr:nth-child(even) td { background:#f7f9fc; }
            .lgc-tbl tbody tr:hover td { background:#faf6ec; }
            .lgc-plaintiff { font-weight:600; color:#3c4a64; font-size:12px; }
            .lgc-defendant { font-weight:700; color:var(--brand-navy); }
            .lgc-sub { font-size:10.5px; color:#8a93a3; }
            .lgc-badge { display:inline-block; font-size:10.5px; font-weight:700; padding:2px 9px; border-radius:20px; color:#fff; white-space:nowrap; }
            .lgc-when-chip { font-size:10.5px; font-weight:700; padding:1px 7px; border-radius:20px; white-space:nowrap; }
            .lgc-when-up { background:#fef3c7; color:#92400e; }
            .lgc-when-today { background:#fbbf24; color:#7c2d12; }
            .lgc-when-past { background:#fee2e2; color:#991b1b; }
            .lgc-money { font-weight:700; color:var(--brand-navy); text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
            .lgc-empty { text-align:center; padding:44px 20px; color:#9aa3b2; font-size:14px; }
            @media(max-width:1000px) { .lgc-alert { grid-template-columns:1fr; } }
            @media(max-width:820px) {
              .lgc-hero { padding:8px 14px 0; } .lgc-body { padding:10px 12px 48px; }
              .lgc-hero-actions { width:100%; margin-left:0; }
              .lgc-search-wrap { flex:1; min-width:0; }
              .lgc-search-wrap input { width:100%; }
              .lgc-totals { display:none; }
              .lgc-tbl thead th:nth-child(5), .lgc-tbl tbody td:nth-child(5) { display:none; } /* ศาล ซ่อนบนมือถือ */
              .lgc-refresh-btn, .lgc-tile { min-height:38px; }
            }
            @media(max-width:640px) {
              /* โจทก์เกือบทุกแถวคือร้านเอง — ซ่อนบนจอแคบ เหลือคอลัมน์ที่ใช้ตัดสินใจ */
              .lgc-tbl thead th:nth-child(1), .lgc-tbl tbody td:nth-child(1) { display:none; }
              .lgc-tbl thead th:nth-child(4), .lgc-tbl tbody td:nth-child(4) { display:none; } /* เลขคดี */
            }
