/* theme-root:start (generated by scripts/theme_tokens.py from ROOT) */
:root{--bg:#fff;--fg:#0a0a0a;--muted:#737373;--border:#e5e5e5;--soft:#f5f5f5;--primary:#171717;--radius:8px;--radius-full:9999px;--radius-sm:4px;--radius-md:6px;--radius-lg:8px;--radius-xl:12px;--radius-pill:999px;--radius-count:7px;--radius-thumb:3px;--shadow-sm:0 1px 2px 0 rgb(0 0 0 / .05);--shadow:0 1px 3px 0 rgb(0 0 0 / .1),0 1px 2px -1px rgb(0 0 0 / .1);--shadow-lg:0 10px 15px -3px rgb(0 0 0 / .1),0 4px 6px -4px rgb(0 0 0 / .1);--shadow-xl:0 20px 25px -5px rgb(0 0 0 / .1),0 8px 10px -6px rgb(0 0 0 / .1);--shadow-2xl:0 25px 50px -12px rgb(0 0 0 / .25);--shadow-bar-up:0 -4px 12px rgba(0,0,0,.05);--sk-base:#e5e5e5;--sk-hi:#f7f7f7;--mx-teal-bg:#f0fdfa;--mx-teal-fg:#0f766e;--mx-cyan-bg:#ecfeff;--mx-cyan-fg:#0e7490;--mx-emerald-bg:#ecfdf5;--mx-emerald-fg:#047857;--mx-orange-bg:#fff7ed;--mx-orange-fg:#c2410c;--mx-purple-bg:#faf5ff;--mx-purple-fg:#7e22ce;--mx-blue-bg:#eff6ff;--mx-blue-fg:#1d4ed8;--mx-slate-bg:#f8fafc;--mx-slate-fg:#334155;--mx-paid:#059669;--mx-awaiting:#d97706;--mx-cream-head:#fffdf5;--mx-cream-cell:#fffefa;--mx-cream-row:#fffcf0;--mx-head-bg:#fafafa;--mx-total:#ea580c;--mx-line:#e5e5e5;--mx-bg:#fff;--mx-muted:#737373;--mx-hover:#f5f5f5;--text-scale:1;--mx-pink-bg:#fdf2f8;--mx-pink-fg:#be185d;--mx-amber-bg:#fffbeb;--mx-amber-fg:#b45309;--mx-rose-bg:#fff1f2;--mx-rose-fg:#be123c;--mx-indigo-bg:#eef2ff;--mx-indigo-fg:#4338ca;--switch-off:#e5e5e5;--switch-knob:#fff;--switch-knob-on:#fff}
/* theme-root:end */
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--fg);font:14px/20px 'IBM Plex Sans Thai',sans-serif}button,input,select,textarea{font:inherit}a{color:inherit;text-decoration:none}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--tl-2563eb,#2563eb);outline-offset:2px}.icon{width:18px;height:18px;flex-shrink:0}.sidebar{width:256px;position:fixed;inset:0 auto 0 0;border-right:1px solid var(--border);display:flex;flex-direction:column;z-index:30;transition:width .15s}.brand{height:56px;display:flex;gap:10px;align-items:center;padding:0 16px;overflow:hidden;white-space:nowrap}.brand .icon{width:24px;height:24px}.brand strong{font-size:18px;line-height:28px}.sidebar nav{overflow:auto;flex:1}.nav-link{display:flex;align-items:center;gap:12px;padding:10px 12px;margin-bottom:6px;border:0;border-radius:var(--radius-lg);font-size:14px;font-weight:500;width:100%;text-align:left;white-space:nowrap;background:transparent;line-height:20px}.nav-link:hover{background:var(--soft)}.nav-link.active{background:var(--primary);color:var(--on-primary,white);box-shadow:var(--shadow-sm)}.sidebar footer{border-top:1px solid var(--border)}.workspace{margin-left:256px;min-width:0}.collapsed .sidebar{width:64px}.collapsed .workspace{margin-left:64px}.collapsed .sidebar span,.collapsed .brand strong{display:none}.collapsed .nav-link{justify-content:center;padding:10px}.collapsed .brand{justify-content:center;padding:0}.collapsed .sidebar footer{padding:8px}main{padding:24px;margin:auto}.page-header,.heading,.page-header-title{display:flex;align-items:center;gap:8px}.page-header{justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:12px}.heading,.page-header-copy,.page-header-title{min-width:0}.page-header-title h1{min-width:0;overflow-wrap:anywhere}.page-header-title .badge{flex-shrink:0}h1{font-size:24px;line-height:32px;margin:0;font-weight:700}.page-header p{font-size:14px;color:var(--muted);line-height:20px}h2{font-size:14px;margin:0 0 14px;line-height:20px}h3{font-size:14px;margin:0 0 10px;line-height:20px}p{line-height:inherit}.button,.icon-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:36px;padding:0 16px;border:1px solid var(--border);background:var(--tb-ffffff,white);border-radius:var(--radius-md);font-weight:500;font-size:14px;line-height:20px;box-shadow:var(--shadow-sm)}.icon-button{padding:6px;width:36px;border-color:transparent;box-shadow:none}.button.primary{background:var(--primary);color:var(--on-primary,#fafafa);border-color:var(--primary)}.button:hover,.icon-button:hover{filter:brightness(.95)}.filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px;margin-bottom:16px}.search{position:relative;width:100%;margin-bottom:4px}.search>.icon{position:absolute;left:12px;top:10px;color:var(--muted);pointer-events:none}input,select,textarea{height:36px;border:1px solid var(--border);border-radius:var(--radius-md);padding:4px 12px;color:var(--fg);max-width:100%;font-size:14px;line-height:20px}.search input{width:100%;padding-left:36px}textarea{height:auto;min-height:60px;padding:8px 12px;resize:vertical}.card{border:1px solid var(--border);border-radius:var(--radius-xl);background:var(--tb-ffffff,white);overflow:hidden;box-shadow:var(--shadow)}.card.padded{padding:24px}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:14px;text-align:left;line-height:20px}th{color:var(--muted);font-size:14px;font-weight:500;height:40px}td,th{padding:8px;border-bottom:1px solid var(--border)}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:var(--tb-fafafa,#fafafa)}.record-link{display:block;font-weight:500}.muted{color:var(--muted);font-size:12px;line-height:16px}.mono{font-family:monospace;font-size:12px;line-height:16px}.badge{padding:2px 10px;display:inline-flex;align-items:center;border:1px solid transparent;border-radius:var(--radius-md);font-size:12px;line-height:16px;font-weight:600;background:var(--tb-e8f0ff,#e8f0ff);color:var(--tf-2457a3,#2457a3)}.badge.company{background:var(--tb-f0eaff,#f0eaff);color:var(--tf-7540a0,#7540a0)}.row-actions{display:flex;gap:6px}.form-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}.field{display:flex;flex-direction:column;gap:6px}.field label{font-size:12px;font-weight:600;line-height:16px}.field.full{grid-column:1/-1}.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:24px}.alert{border:1px solid var(--tl-fca5a5,#fca5a5);background:var(--tb-fff5f5,#fff5f5);color:var(--tf-991b1b,#991b1b);padding:12px 16px;border-radius:var(--radius-lg);font-size:14px;margin-bottom:16px;line-height:20px}.success{border-color:var(--tl-86efac,#86efac);background:var(--tb-f0fdf4,#f0fdf4);color:var(--tf-166534,#166534)}.field-error{color:var(--tf-b91c1c,#b91c1c);font-size:12px;line-height:16px}.tabs{display:inline-flex;gap:4px;padding:4px;margin:16px 0;background:var(--soft);border-radius:var(--radius-lg);max-width:100%;overflow:auto}/* A bar right under another bar (a section's sub-sections) takes its own row at the content edge, never sits beside it */.tabs+.tabs{display:flex;width:fit-content}.tabs :is(a,button){display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:var(--radius-md);white-space:nowrap;font-size:14px;font-weight:500;color:var(--muted);line-height:20px}.tabs button{background:none;border:0;cursor:pointer}.tabs :is(a,button).active{background:var(--bg);color:var(--fg);box-shadow:var(--shadow)}.tabs .icon{width:16px;height:16px}.grid-3{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr));gap:16px}.stat{font-size:24px;font-weight:700;margin-top:8px;line-height:32px}.mobile-header{display:none}.calendar-nav{display:flex;align-items:center;justify-content:center;gap:16px;margin:12px 0}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.calendar-day{min-height:115px;border-right:1px solid var(--border);border-bottom:1px solid var(--border);padding:8px;font-size:12px;display:block;color:inherit;line-height:16px}.calendar-day.other{background:var(--tb-fafafa,#fafafa);color:var(--tf-aaaaaa,#aaa)}.calendar-day.today>strong{background:var(--tb-171717,#171717);color:var(--tf-ffffff,white);border-radius:50%;padding:3px 7px}.calendar-weekday{padding:10px;text-align:center;font-size:12px;background:var(--tb-fafafa,#fafafa);line-height:16px}.event{display:block;background:var(--tb-eef2ff,#eef2ff);color:var(--tf-3730a3,#3730a3);border:1px solid var(--tl-c7d2fe,#c7d2fe);border-radius:6px;padding:5px;margin-top:5px;font-size:12px;overflow:hidden;line-height:16px}.calendar-day .event:hover{background:var(--tb-e0e7ff,#e0e7ff)}.mobile-backdrop{display:none}.htmx-request:not(body,main,#content){opacity:.65}#request-error{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:var(--tb-991b1b,#991b1b);color:var(--tf-ffffff,white);padding:14px;z-index:100;border-radius:6px}
@media(max-width:767px){.sidebar,.collapsed .sidebar{transform:translateX(-100%);width:256px}.mobile-open .sidebar{transform:translateX(0)}.mobile-open .sidebar span,.mobile-open .brand strong{display:block}.mobile-open .nav-link{justify-content:flex-start}.workspace,.collapsed .workspace{margin-left:0}.mobile-header{height:56px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--border);padding:0 12px}.mobile-backdrop{display:block;position:fixed;inset:0;background:var(--tb-000000a40,#0006)}main{padding:12px}h1{font-size:18px;line-height:28px}.page-header p{font-size:12px;line-height:16px}.form-grid,.grid-3{grid-template-columns:minmax(0,1fr)}.form-grid .field{min-width:0}.form-grid select,.form-grid input{max-width:100%}.field.full{grid-column:auto}input,select,textarea{font-size:16px;line-height:24px}.calendar-day{padding:4px;min-height:85px}.event{font-size:12px;padding:3px;line-height:16px}.button{font-size:14px;line-height:20px}}

.payment-kpis{margin:16px 0}.payment-kpis .metric{display:block;font-size:24px;margin-top:6px;line-height:32px}.payment-queue{display:grid;gap:12px;padding-bottom:72px}.payment-group{overflow:hidden}.payment-group>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;cursor:pointer}.payment-group>summary span{display:flex;gap:10px;align-items:baseline}.payment-group table{margin:0}.payment-action-bar{position:sticky;bottom:12px;z-index:5;justify-content:space-between;gap:12px;margin:0 auto;padding:10px 12px;width:min(520px,calc(100% - 24px));background:var(--tb-111827,#111827);color:var(--tf-ffffff,#fff);border-radius:6px;box-shadow:var(--shadow-xl)}.payment-action-bar>strong{white-space:nowrap}.payment-action-bar .payment-actions{flex-wrap:wrap;justify-content:flex-end}.payment-summary{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr));gap:12px;margin-bottom:16px}.payment-summary>div{display:grid;gap:4px;padding:12px;border:1px solid var(--border);border-radius:6px}.payment-summary small{color:var(--muted)}

.badge.partial{background:var(--tb-fff7ed,#fff7ed);color:var(--tf-9a3412,#9a3412)}.badge.paid{background:var(--tb-ecfdf5,#ecfdf5);color:var(--tf-047857,#047857)}@media(max-width:767px){.payment-summary{grid-template-columns:minmax(0,1fr)}.payment-action-bar{bottom:8px}.payment-group>summary{padding:12px}.payment-form{padding:16px}}
.payment-form input,.payment-form select,.payment-form textarea,.payment-form .button{min-height:44px}.payment-checkbox{width:24px;height:24px;cursor:pointer}.payment-queue .record-link{display:flex;align-items:center;min-height:44px}.bank-blocker{display:flex;align-items:center;justify-content:space-between;gap:16px}.bank-blocker>div:first-child{display:grid;gap:3px}.bank-blocker-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.bank-blocker .button{min-height:44px;background:var(--tb-ffffff,#fff);color:var(--tf-991b1b,#991b1b);border-color:var(--tl-fca5a5,#fca5a5)}.bank-missing{color:var(--tf-b91c1c,#b91c1c);font-weight:600}@media(max-width:767px){.bank-blocker{align-items:flex-start;flex-direction:column}.bank-blocker-actions,.bank-blocker-actions .button{width:100%}}
.modal{width:min(var(--modal-w-md),calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto}.modal::backdrop{background:var(--tb-000000a80,rgb(0 0 0 / .8))}.modal-inner{min-width:0}.deal-form-modal{width:min(var(--modal-w-lg),calc(100vw - 24px))}.deal-modal-form{margin-top:18px}.deal-form-modal .button,.deal-form-modal input:not([type=hidden]),.deal-form-modal select,.deal-form-modal textarea{min-height:44px}@media(max-width:767px){.deal-form-modal{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:16px}}
.kanban{display:flex;overflow:auto;padding-bottom:16px;min-height:65vh;gap:10px}.kanban-column>header{display:flex;align-items:center;gap:8px;padding:12px}.kanban-column.is-drag-over{outline:2px dashed var(--tl-2563eb,#2563eb);outline-offset:-3px;background:var(--tb-eff6ff,#eff6ff)}.stage-dot{width:8px;height:8px;border-radius:50%}.deal-card{display:block;background:var(--tb-ffffff,white);border:1px solid var(--border);border-radius:var(--radius-lg);margin:0 8px 8px;box-shadow:none}.deal-card.is-dragging,.deal-card[aria-busy=true]{opacity:.55}.deal-card[aria-busy=true]{pointer-events:none}.deal-card-head{display:flex;align-items:flex-start;justify-content:space-between}.deal-card-head>[data-board-drag-handle]:not([hidden]){display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;margin:-8px -8px 0 0;border-radius:6px;color:var(--muted);font-size:18px;line-height:28px;cursor:grab;user-select:none}.deal-card-head>[data-board-drag-handle]:hover{background:var(--soft);color:var(--fg)}.deal-card-head>[data-board-drag-handle]:active{cursor:grabbing}.deal-card h3{margin:8px 0}.deal-stage-context{display:flex;align-items:center;gap:14px;margin-bottom:16px;min-width:0}.deal-stage-path{display:flex;align-items:stretch;min-width:0;overflow-x:auto;scrollbar-width:thin}@media(max-width:767px){.deal-stage-context{align-items:stretch;flex-direction:column;gap:6px}.deal-stage-path{width:100%}}.profile-summary{display:flex;gap:20px;align-items:center;margin-bottom:24px}
.deal-card[data-board-deal-card-url]{cursor:pointer}.deal-card-identity{flex:1;min-width:0}.deal-card-tools{display:flex;flex-shrink:0}.deal-card-tools>[data-board-drag-handle]:not([hidden]){display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;margin:-8px -8px 0 0;border-radius:6px;color:var(--muted);font-size:18px;line-height:28px;cursor:grab;user-select:none}.deal-card-tools>[data-board-drag-handle]:hover{background:var(--soft);color:var(--fg)}.deal-card-tools>[data-board-drag-handle]:active{cursor:grabbing}.deal-identity{display:grid;gap:2px;min-width:0}.deal-identity-line{display:flex;align-items:center;gap:5px;min-width:0}.deal-identity-line .record-link{display:inline;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.deal-identity-primary{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.deal-identity-secondary,.deal-contact-person{display:block;color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:16px}.deal-value{white-space:nowrap;padding:2px 6px;border-radius:var(--radius-md);background:var(--tb-171717a05,rgb(23 23 23 / .05));color:var(--primary);font:600 12px/16px 'IBM Plex Sans Thai',sans-serif}.deal-card-timeline{display:flex}.deal-age.urgency-watch{color:var(--tf-a16207,#a16207)}.deal-age.urgency-late{color:var(--tf-b91c1c,#b91c1c)}.deal-age.urgency-critical{color:var(--tf-7f1d1d,#7f1d1d);font-weight:700}.deal-stage-result{margin-left:auto}.deal-stage-result.won{background:var(--tb-dcfce7,#dcfce7);color:var(--tf-166534,#166534)}.deal-stage-result.lost{background:var(--tb-fee2e2,#fee2e2);color:var(--tf-991b1b,#991b1b)}.deal-stage-result+.badge{margin-left:0}
.board-card-action{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:end;margin-top:12px;padding-top:10px;border-top:1px solid var(--border)}.board-card-action label{display:grid;gap:3px;color:var(--muted);font-size:12px;line-height:16px}.board-card-action select{width:100%;min-width:0;height:32px;min-height:32px;font-size:12px;line-height:16px}.button.small{min-height:32px;padding:4px 12px;font-size:12px;line-height:16px}.field.compact{min-width:150px}.field.compact>span{font-size:12px;font-weight:600;color:var(--muted);line-height:16px}td .board-card-action{margin:0;padding:0;border:0;min-width:230px}
.board-bulk-bar{display:flex;align-items:end;gap:8px;flex-wrap:wrap;padding:8px 10px;margin-bottom:8px;border:1px solid var(--border);border-radius:6px;background:var(--soft)}.board-bulk-bar label{display:grid;gap:3px;color:var(--muted);font-size:12px;line-height:16px}.board-bulk-count{align-self:center;min-width:90px;font-size:12px;line-height:16px}.board-bulk-clear{margin-left:auto}.board-select-cell{width:48px;padding-left:12px;padding-right:8px}.board-select-hit{display:inline-flex;align-items:center;justify-content:center;min-width:24px;min-height:24px}.board-select{padding:0}.board-row-selected{background:var(--soft)}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

.deal-owner-menu{position:relative;min-width:0}.deal-owner-menu>summary{list-style:none;cursor:pointer}.deal-owner-menu>summary::-webkit-details-marker{display:none}.deal-owner-control{display:inline-flex;align-items:center;gap:6px;min-width:0}.deal-owner-control.owner-card{width:24px}.deal-owner-avatar{display:grid;place-items:center;flex:0 0 22px;width:22px;height:22px;border:1px solid var(--tl-cbd5e1,#cbd5e1);border-radius:50%;background:var(--tb-f1f5f9,#f1f5f9);color:var(--tf-334155,#334155);font-size:12px;font-weight:700;line-height:16px}.deal-owner-label{font-size:12px;color:var(--muted);line-height:16px}.deal-owner-name{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600;line-height:16px}.deal-owner-control.owner-card .deal-owner-label,.deal-owner-control.owner-card .deal-owner-name{display:none}.deal-owner-control.owner-row .deal-owner-name{display:inline;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}/* SALES-48 (11-20): the table row shows the owner's name (the card's 24px pill width left only the initial) */.deal-owner-control.owner-row{width:auto;max-width:100%}.board-table .board-col-date-short{width:108px}.deal-owner-menu>summary:hover .deal-owner-avatar{border-color:var(--tl-2563eb,#2563eb);box-shadow:0 0 0 2px #dbeafe}.deal-owner-popover{position:absolute;z-index:24;top:calc(100% + 6px);right:0;width:250px;padding:10px;border:1px solid var(--border);border-radius:6px;background:var(--tb-ffffff,#fff);box-shadow:var(--shadow-xl);color:var(--fg);font-size:12px;line-height:16px}.deal-owner-menu.owner-card .deal-owner-popover{right:auto;left:0}.deal-owner-menu.owner-card.opens-up .deal-owner-popover{top:auto;bottom:calc(100% + 6px)}.deal-owner-popover>strong{display:block;margin-bottom:8px}.deal-owner-popover>input{width:100%;height:36px}.deal-owner-options{display:flex;flex-direction:column;max-height:220px;overflow:auto;overflow-x:hidden;margin-top:6px}.deal-owner-options>form,.deal-owner-options>.deal-owner-row{display:grid;grid-template-columns:minmax(0,1fr) 30px;align-items:center;border-radius:6px}.deal-owner-options>form:hover,.deal-owner-options>.deal-owner-row:hover{background:var(--soft)}.deal-owner-options>.deal-owner-row[hidden]{display:none}.deal-owner-option{display:flex;align-items:center;gap:7px;min-width:0;min-height:36px;padding:4px 6px;border:0;background:transparent;text-align:left}.deal-owner-option>span:nth-child(2){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.deal-owner-option small{margin-left:auto;color:var(--tf-2563eb,#2563eb);white-space:nowrap}.deal-owner-option small[hidden]{display:none}/* SALES-03: in a table cell `td small` showed every row as ปัจจุบัน */.deal-owner-option:disabled{cursor:default;opacity:1}.deal-owner-favorite{width:32px;height:32px;padding:0;border:0;background:transparent;color:var(--tf-d97706,#d97706);font-size:18px;line-height:28px}.deal-tabs-head{display:flex;align-items:flex-end;gap:10px;border-bottom:1px solid var(--border)}.deal-tabs-head>.deal-owner-control,.deal-tabs-head>.deal-owner-menu{flex:0 0 auto;margin-bottom:4px}
@media(max-width:767px){.board-card-action{grid-template-columns:minmax(0,1fr)}.board-card-action .button{width:100%}.board-card-action select,.board-card-action .button{min-height:44px}.field.compact{flex:1 1 140px}.filters .field.compact select{width:100%}.board-bulk-bar{align-items:stretch}.board-bulk-count{flex:1 0 100%}.board-bulk-bar label{flex:1 1 100%}.board-bulk-bar select{width:100%;min-height:44px}.board-bulk-bar .button{flex:1 1 calc(50% - 4px);min-height:44px}.board-bulk-bar .board-bulk-clear{flex-basis:100%;margin-left:0}.board-select-hit{min-width:44px;min-height:44px}}
@media(pointer:coarse){.board-select-hit{min-width:44px;min-height:44px}.board-select-cell{padding:2px 4px}.board-card-action select,.board-card-action .button{min-height:44px}}
@media(max-width:767px){.deal-tabs-head{align-items:flex-start;flex-direction:column}.deal-tabs-head>.deal-owner-control,.deal-tabs-head>.deal-owner-menu{align-self:flex-end;margin:0;order:-1}.deal-owner-popover{width:min(280px,calc(100vw - 48px))}.deal-card footer{overflow:visible}}
@media print{.sidebar,.mobile-header,.no-print{display:none!important}.workspace,.collapsed .workspace{margin:0}main{padding:0}@page{size:A4;margin:15mm}}

/* Shared interaction accessibility; legacy visual tokens remain authoritative. */
a,summary{cursor:pointer}summary:focus-visible{outline:2px solid var(--tl-2563eb,#2563eb);outline-offset:2px}
@media(pointer:coarse){.button,.icon-button,.nav-link,.tabs :is(a,button),summary{min-height:44px;min-width:44px}input,select{min-height:44px}.deal-form-modal :is(.combobox-trigger,.datepicker-trigger),.deal-form-modal .combobox-customer .combobox-trigger{min-height:44px;height:auto}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
.proposal-slide{aspect-ratio:16/9;border:1px solid var(--border);padding:6%;background:var(--tb-ffffff,white);display:flex;flex-direction:column;justify-content:center}.proposal-slide h2{font-size:24px;line-height:32px}.proposal-slide p{font-size:24px;line-height:32px}
.form-stack{display:grid;grid-template-columns:minmax(0,1fr)}.form-stack label{display:grid;gap:6px;font-size:12px;font-weight:600;line-height:16px}.form-stack input,.form-stack select,.form-stack textarea{width:100%}.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.grid-main{display:grid;grid-template-columns:minmax(280px,380px) minmax(0,1fr);gap:16px;align-items:start}.stack{display:grid;gap:12px}.actions,.row-between,.inline-form,.list-row{display:flex;gap:8px;align-items:center}.row-between,.list-row{justify-content:space-between}.inline-form input{min-width:120px}.list-row{padding:10px 0;border-bottom:1px solid var(--border)}.list-row:last-child{border-bottom:0}.list-row small,td small{display:block;color:var(--muted);font-size:12px;margin-top:3px;line-height:16px}pre{white-space:pre-wrap;overflow:auto;background:var(--tb-111827,#111827);color:var(--tf-f9fafb,#f9fafb);padding:12px;border-radius:6px;font:12px/16px ui-monospace,monospace}.metric{padding:16px}.metric span{display:block;color:var(--muted);font-size:12px;line-height:16px}.metric strong{display:block;font-size:24px;margin-top:6px;line-height:32px}.check-row{display:flex!important;align-items:center;gap:8px;font-weight:400!important}.check-row input{width:auto;height:auto}.public-shell{min-height:100vh;background:var(--tb-f9fafb,#f9fafb)}.public-main{max-width:760px;padding:36px 16px 64px}.public-heading{text-align:center;margin:0 auto 24px}.public-heading .brand-mark{display:inline-block;font-size:14px;font-weight:600;margin-bottom:12px;line-height:20px}.public-heading p{color:var(--muted);margin:6px 0}.public-card,.auth-card{max-width:620px;margin:0 auto 14px}.public-main>.tabs{max-width:620px;margin:0 auto 16px}.public-main>.success{max-width:620px;margin:0 auto 16px}.auth-card{margin-top:40px}.public-shell fieldset{border:0;padding:0;display:grid;gap:8px}.public-shell legend{font-weight:600;margin-bottom:8px}

.success small{display:block;margin-top:4px}.feedforward-answer{margin-top:16px}.feedforward-answer p{margin:5px 0;white-space:normal}.public-shell details{margin-top:10px}.public-shell details summary{font-weight:600}
@media(max-width:767px){.public-main{padding:20px 12px 48px}.public-main>.tabs{overflow-x:auto}}
.hub-tabs{display:flex;width:100%}.hub-tabs a{flex:1;justify-content:center}@media(max-width:480px){.hub-tabs{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:4px;overflow:visible}.hub-tabs a{min-width:0;white-space:nowrap;padding-inline:4px}} /* owner 2026-11-03: on a phone every tab is seen, none cut off; three tabs since the Requirement moved above them (2026-11-04), a fourth ไฟล์ when the Hub has files (2026-11-08) */.hub-section h2{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.hub-empty{margin:0;color:var(--muted);font-size:14px;line-height:20px}.hub-requirement{margin:0;display:grid;gap:14px}.hub-requirement div{display:grid;gap:4px}.hub-requirement dt{font-size:12px;font-weight:600;color:var(--muted);line-height:16px}.hub-requirement dd{margin:0;overflow-wrap:anywhere}.hub-days{list-style:none;margin:0;padding:0}.hub-day{padding:12px 0;border-bottom:1px solid var(--border);display:grid;gap:6px}.hub-day:last-child{border-bottom:0}.hub-day.own .hub-day-head strong::after{content:' · วันของคุณ';color:var(--tf-15803d,#15803d);font-weight:500}.hub-day-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.hub-day-head small{color:var(--muted);font-size:12px;line-height:16px}.hub-day-place{margin:0;font-size:12px;color:var(--muted);line-height:16px}.hub-day-place a{color:var(--tf-2563eb,#2563eb);margin-left:6px}.hub-people{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}.hub-people li{padding:2px 10px;border-radius:var(--radius-full);background:var(--soft);font-size:12px;line-height:20px}.hub-step-title{margin:18px 0 10px!important;font-size:14px}.hub-step-title:first-child{margin-top:0!important}.hub-step-title small{font-weight:400;color:var(--muted);font-size:12px}.hub-step-no{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--primary);color:var(--on-primary,#fff);font-size:12px;line-height:16px}.hub-chips{display:flex;flex-wrap:wrap;gap:8px;border:0;padding:0;margin:0}.hub-day-chips{overflow-x:auto;padding-bottom:4px}.hub-chip{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;min-height:40px;min-width:64px;padding:6px 12px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--tb-ffffff,#fff);font-size:14px;line-height:20px;scroll-snap-align:start;flex-shrink:0;cursor:pointer}.hub-chip small{font-size:11px;line-height:14px;color:var(--muted)}.hub-chip.active,.hub-chip:has(input:checked){background:var(--primary);border-color:var(--primary);color:var(--on-primary,#fff)}.hub-chip.active small,.hub-chip:has(input:checked) small{color:inherit;opacity:.8}.public-shell fieldset.hub-people-chips{display:flex;flex-wrap:wrap;gap:8px}.form-stack .hub-people-chips .hub-chip{display:inline-flex;flex-direction:row;gap:0;font-size:14px;font-weight:500;line-height:20px;position:relative}.hub-people-chips .hub-chip input{position:absolute;opacity:0;width:1px;height:1px}.hub-form{margin-top:4px}.hub-submit{width:100%;min-height:40px;height:40px}.hub-note{margin:0;text-align:left}.hub-summary{display:grid;grid-template-columns:1fr auto;gap:12px;padding:12px;border-radius:var(--radius-lg);background:var(--soft);margin-bottom:14px}.hub-summary small{display:block;font-size:12px;color:var(--muted);line-height:16px}.hub-summary div:last-child:not(:first-child){text-align:right}.hub-summary+.hub-day-chips{margin-bottom:14px}.hub-aside{text-align:center}.hub-claim-line{display:grid;gap:10px;padding:12px;border:1px solid var(--border);border-radius:var(--radius-lg)}.hub-claim-line input[type=file]{max-width:100%}.hub-claim-line .button.small{justify-self:start}
.hub-form{margin-top:16px}.hub-form .hub-step-title{margin:2px 0 -6px!important}.hub-team-person{display:grid;gap:8px;padding:12px 0;border-top:1px solid var(--border)}.hub-team-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.hub-team-head small,.hub-team-waiting>small{font-size:12px;line-height:16px;color:var(--muted)}.hub-team-answers{margin:0;display:grid;gap:8px}.hub-team-answers div{display:grid;gap:2px}.hub-team-answers dt{font-size:12px;font-weight:600;line-height:16px;color:var(--muted)}.hub-team-answers dd{margin:0;font-size:14px;line-height:20px;overflow-wrap:anywhere}.hub-team-waiting{display:grid;gap:6px;padding-top:12px;border-top:1px solid var(--border)}.hub-sent{font-size:12px;opacity:.8}
@media(max-width:767px){.grid-2,.grid-main{grid-template-columns:minmax(0,1fr)}.row-between,.list-row{align-items:flex-start;flex-wrap:wrap}.inline-form{flex-wrap:wrap}.actions{flex-wrap:wrap}.auth-card{margin-top:16px}}
@media print{.proposal-presentation .filters{display:none}.proposal-slide{display:flex!important;break-after:page;height:90vh;border:0}.proposal-slide:last-child{break-after:auto}}

.project-manage-head{margin-bottom:16px}.project-manage-head h2{margin-bottom:4px}.journey-phase p{font-size:12px;line-height:16px}
.matrix-item{display:block}.project-cost-quick-action{display:grid;gap:8px;margin-top:6px;padding:8px;border:1px solid var(--border);border-radius:6px;background:var(--tb-fafafa,#fafafa)}.project-cost-quick-action label{display:grid;gap:4px;font-size:12px;font-weight:600;line-height:16px}.matrix-item-trigger{display:grid!important;gap:1px;min-height:36px;padding:4px 6px;border:1px solid var(--border);border-radius:6px;background:var(--tb-ffffff,#fff);text-align:left}.matrix-item-trigger:hover{border-color:var(--tl-737373,#737373)}.matrix-item-trigger span{font-weight:600;color:var(--fg)}.matrix-item-trigger small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:767px){.project-manage-head{align-items:flex-start}.project-manage-head .actions{width:100%}.project-manage-head .button{flex:1}}
.conversion-modal{width:min(var(--modal-w-lg),calc(100vw - 24px))}.conversion-source,.conversion-line-summary,.conversion-allocation-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.conversion-source{padding:14px;border:1px solid var(--border);border-radius:6px;background:var(--tb-fafafa,#fafafa);flex-wrap:wrap}.conversion-source>div{display:flex;flex-direction:column;gap:3px;min-width:140px}.conversion-form{display:grid;gap:16px;margin-top:16px}.conversion-lines-overview{border:1px solid var(--border);border-radius:6px;padding:16px}.conversion-line-summary{padding:10px 0;border-top:1px solid var(--border)}.conversion-line-summary>div,.conversion-allocation-row>div{min-width:0}.conversion-line-summary small,.conversion-allocation-row small{display:block;color:var(--muted);font-size:12px;line-height:16px}.conversion-projects{display:grid;gap:12px}.conversion-project header{margin-bottom:16px}.conversion-project header h2{margin-bottom:2px}.conversion-allocations{border-top:1px solid var(--border);margin-top:18px;padding-top:14px}.conversion-allocations h3{margin:0}.conversion-allocation-row{align-items:center;padding:8px 0}.conversion-allocation-inputs{display:grid;grid-template-columns:150px 170px;gap:8px;align-items:end}.conversion-allocation-inputs>input{width:150px;text-align:right}.conversion-allocation-inputs label{display:grid;gap:4px;font-size:12px;color:var(--muted);line-height:16px}.conversion-allocation-inputs label input{width:170px;text-align:left}.conversion-add{justify-self:start}.conversion-actions{position:sticky;bottom:-24px;background:var(--tb-ffffff,white);border-top:1px solid var(--border);padding:14px 0 2px;margin-top:0;z-index:2}
@media(max-width:767px){.conversion-modal{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:16px}.conversion-source{display:grid;grid-template-columns:minmax(0,1fr)}.conversion-line-summary{display:grid;grid-template-columns:minmax(0,1fr) auto}.conversion-project{padding:16px!important}.conversion-allocation-row{display:grid;grid-template-columns:minmax(0,1fr)}.conversion-allocation-inputs{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.conversion-allocation-inputs>input,.conversion-allocation-inputs label input{width:100%}.conversion-add{width:100%}.conversion-actions{bottom:-16px}.conversion-actions .button{flex:1}}
#app-update{position:fixed;right:16px;bottom:16px;z-index:120;display:flex;gap:12px;align-items:center;background:var(--tb-171717,#171717);color:var(--tf-ffffff,white);padding:10px 12px;border-radius:6px;box-shadow:var(--shadow-xl)}#app-update[hidden]{display:none}#app-update button{border:1px solid var(--tl-ffffff,#fff);background:var(--tb-ffffff,#fff);color:var(--tf-171717,#171717);border-radius:6px;padding:6px 10px;font-weight:600}
.calendar-settings{position:relative}.calendar-settings>summary{list-style:none}.calendar-settings>summary::-webkit-details-marker{display:none}.calendar-settings-panel{width:min(360px,calc(100vw - 24px));background:var(--tb-ffffff,white)}.calendar-settings-panel label{display:flex;align-items:center;gap:8px;padding:6px 0;font-size:12px;line-height:16px}.calendar-settings-panel input{width:auto;height:auto}.calendar-day.selected{background:var(--tb-f5f5f5,#f5f5f5);box-shadow:inset 0 0 0 1px #a3a3a3}.calendar-event-list{display:grid;gap:8px}.calendar-detail-card{display:flex;align-items:flex-start;padding:12px}.calendar-detail-card.past{opacity:.55;background:var(--tb-fafafa,#fafafa)}.calendar-detail-card>div{min-width:0}.calendar-detail-card p{margin:3px 0}.calendar-legend{display:flex;flex-wrap:wrap;margin:8px 0;justify-content:center;font-size:12px;gap:10px;color:var(--tf-737373a70,#737373b3);line-height:16px}.calendar-legend span{display:inline-flex;align-items:center;gap:5px}.calendar-legend i{width:7px;height:7px;border-radius:6px;background:var(--tb-6366f1,#6366f1)}.calendar-legend .deal{background:var(--tb-7c3aed,#7c3aed)}.calendar-legend .leave{background:var(--tb-c026d3,#c026d3)}
.choice-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}@media(max-width:767px){.choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.field-label{font-size:12px;font-weight:600;line-height:16px}.readonly-field{min-height:36px;border:1px solid var(--border);border-radius:6px;background:var(--soft);padding:7px 10px}
.finance-filters .search{flex:1 1 260px;margin:0}.finance-table th:not(:first-child),.finance-table td:not(:first-child){text-align:right;white-space:nowrap}.finance-table td:nth-child(2){text-align:left}.finance-drill-row:hover{background:var(--tb-ffffff,white)}.finance-drill-row>td{padding:0 16px 10px}.finance-drill-link{display:block;color:var(--muted);font-size:12px;padding:8px 0;line-height:16px}.finance-drilldown{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;background:var(--tb-fafafa,#fafafa);border:1px solid var(--border);border-radius:6px;padding:12px}.finance-drilldown section{min-width:0}.finance-line{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--border)}.finance-line:last-child{border-bottom:0}.finance-line>div:last-child{text-align:right;white-space:nowrap}.finance-line small{display:block;color:var(--muted);font-size:12px;margin-top:3px;line-height:16px}.finance-negative{color:var(--tf-b91c1c,#b91c1c)}.cash-day-amount{display:block;border-radius:6px;margin-top:4px;font:12px/16px ui-monospace,monospace;overflow:hidden;text-overflow:ellipsis;background:none;padding:0;font-weight:500;line-height:16px}.cash-day-amount.inflow{background:none;color:var(--tf-16a34a,rgb(22 163 74))}.cash-day-amount.outflow{background:none;color:var(--tf-dc2626,rgb(220 38 38))}.cashflow-detail{margin-top:16px}
@media(max-width:1000px){.finance-drilldown{grid-template-columns:minmax(0,1fr)}}
@media(max-width:767px){.finance-filters select,.finance-filters .button{flex:1 1 140px}.finance-line{align-items:flex-start;flex-direction:column}.finance-line>div:last-child{text-align:left}.cashflow-grid .calendar-day{min-height:72px}}

.public-main>.form-actions{max-width:800px;margin-left:auto!important;margin-right:auto!important}

.commercial-steps{display:flex;align-items:center;gap:0;margin:0 0 16px;overflow:auto}.commercial-steps span{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:12px;white-space:nowrap;line-height:16px}.commercial-steps span:not(:last-child)::after{content:"";width:38px;height:1px;background:var(--border);margin:0 10px}.commercial-steps b{display:grid;place-items:center;width:24px;height:24px;border:1px solid var(--border);border-radius:50%;font-size:12px;line-height:16px}.commercial-steps .active{color:var(--fg);font-weight:600}.commercial-steps .active b{background:var(--primary);border-color:var(--primary);color:var(--on-primary,white)}.commercial-steps .done b{background:var(--tb-dcfce7,#dcfce7);border-color:var(--tl-86efac,#86efac);color:var(--tf-166534,#166534)}.commercial-kpis{grid-template-columns:repeat(auto-fill,minmax(min(100%,200px),1fr));gap:12px;margin-bottom:16px}.commercial-kpis .metric{padding:16px}.commercial-kpis .metric strong{font-size:24px;line-height:32px}.commercial-kpis .metric small{display:block;color:var(--muted);font-size:12px;margin-top:4px;line-height:16px}.commercial-kpis .available{border-color:var(--tl-86efac,#86efac);background:var(--tb-f8fff9,#f8fff9)}.commercial-entitlements{margin-bottom:16px}.commercial-entitlements>.row-between{margin-bottom:10px}.commercial-entitlements h2,.commercial-builder h2,.commercial-document-matrix h2{margin-bottom:3px}.commercial-entitlements td:not(:first-child),.commercial-entitlements th:not(:first-child){text-align:right;white-space:nowrap}.commercial-builder{display:grid;gap:12px}.commercial-builder-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-top:4px}.commercial-builder-tools{display:grid;grid-template-columns:90px auto auto;gap:8px;align-items:end}.commercial-builder-tools label{display:grid;gap:4px;font-size:12px;font-weight:600;line-height:16px}.commercial-builder-tools input{width:90px}.commercial-batches{display:grid;gap:12px}.commercial-batch{overflow:visible}.commercial-batch>header{margin-bottom:16px}.commercial-batch>header h2{font-size:16px;line-height:24px}.commercial-allocation-list{margin-top:18px;border-top:1px solid var(--border);padding-top:14px}.commercial-allocation{display:grid;grid-template-columns:minmax(220px,1fr) minmax(160px,220px);gap:16px;align-items:center;padding:10px 0;border-bottom:1px solid var(--border)}.commercial-allocation:last-child{border-bottom:0}.commercial-allocation small,.commercial-allocation label span{display:block;color:var(--muted);font-size:12px;line-height:16px}.commercial-allocation label{display:grid;gap:4px}.commercial-allocation input{width:100%;text-align:right}.commercial-preflight{display:grid;grid-template-columns:minmax(240px,1fr) auto;gap:14px;align-items:start;position:sticky;bottom:8px;z-index:3;box-shadow:var(--shadow-xl)}.commercial-preflight-total{text-align:right}.commercial-preflight-total strong,.commercial-preflight-total small{display:block}.commercial-preflight-total strong{font-size:24px;line-height:32px}.commercial-preflight-total small{color:var(--muted);font-size:12px;line-height:16px}.commercial-checks{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:0}.commercial-checks li{border:1px solid var(--border);border-radius:6px;padding:5px 8px;font-size:12px;line-height:16px}.commercial-checks .pass{border-color:var(--tl-86efac,#86efac);background:var(--tb-f0fdf4,#f0fdf4);color:var(--tf-166534,#166534)}.commercial-checks .fail{border-color:var(--tl-fcd34d,#fcd34d);background:var(--tb-fffbeb,#fffbeb);color:var(--tf-92400e,#92400e)}.commercial-preflight .form-actions{grid-column:1/-1;margin-top:0}.commercial-document-matrix{margin-top:16px}.commercial-document-matrix>.row-between{margin-bottom:10px}.commercial-document-matrix td small{max-width:240px}.commercial-draft{background:var(--tb-fef3c7,#fef3c7);color:var(--tf-92400e,#92400e)}.commercial-mini{display:flex;gap:36px;border-top:1px solid var(--border);margin-top:16px;padding-top:14px}.commercial-mini span,.commercial-mini strong{display:block}.commercial-mini span{font-size:12px;color:var(--muted);line-height:16px}.commercial-mini strong{margin-top:4px}
@media(max-width:767px){.commercial-steps span:not(:last-child)::after{width:18px;margin:0 6px}.commercial-kpis{grid-template-columns:minmax(0,1fr);gap:8px}.commercial-kpis .metric{padding:12px}.commercial-kpis .metric:first-child{grid-column:1/-1}.commercial-kpis .metric strong{font-size:18px;line-height:28px}.commercial-builder-head,.commercial-batch>header,.commercial-entitlements>.row-between,.commercial-document-matrix>.row-between{align-items:flex-start;flex-direction:column}.commercial-builder-tools{width:100%;grid-template-columns:80px minmax(0,1fr)}.commercial-builder-tools input{width:80px}.commercial-builder-tools .button:last-of-type{grid-column:1/-1}.commercial-allocation{grid-template-columns:minmax(0,1fr);gap:7px}.commercial-preflight{grid-template-columns:minmax(0,1fr);bottom:4px;padding:14px}.commercial-preflight-total{text-align:left}.commercial-preflight-total,.commercial-checks,.commercial-preflight .form-actions{grid-column:1}.commercial-preflight .form-actions .button{flex:1}.commercial-mini{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}.commercial-entitlements table{min-width:560px}}

@media print{.public-main{max-width:none;padding:0}}
.commercial-document-matrix table{min-width:980px}.commercial-issued{background:var(--tb-dcfce7,#dcfce7);color:var(--tf-166534,#166534)}.commercial-lifecycle{padding:0 4px}.commercial-lifecycle>summary,.commercial-create-child>summary{cursor:pointer;color:var(--primary);font-weight:600;padding:10px 0}.commercial-lifecycle>summary:focus-visible,.commercial-create-child>summary:focus-visible{outline:2px solid var(--primary);outline-offset:2px}.commercial-lifecycle-stage{padding:14px 0;border-bottom:1px solid var(--border)}.commercial-lifecycle-stage>header,.commercial-iv-card>header,.commercial-rt-row,.commercial-action-form{display:flex;align-items:center;justify-content:space-between;gap:12px}.commercial-lifecycle-stage h3,.commercial-iv-card h3{margin:2px 0 0;font-size:14px;line-height:20px}.commercial-action-form{justify-content:flex-end;flex-wrap:wrap;margin-top:10px}.commercial-action-form label{display:grid;gap:4px;color:var(--muted);font-size:12px;line-height:16px}.commercial-action-form input{width:150px}.commercial-action-form>small{flex-basis:100%;text-align:right;color:var(--muted)}.commercial-create-child{margin-top:10px}.commercial-create-child>summary{border:1px dashed var(--border);border-radius:6px;padding:9px 11px}.commercial-child-form,.commercial-receipt-form{display:grid;gap:10px;padding:12px 0}.commercial-line-input{display:grid;grid-template-columns:minmax(220px,1fr) 180px;gap:12px;align-items:center;padding:8px 0;border-bottom:1px solid var(--border)}.commercial-line-input small,.commercial-receipt-line small{display:block;color:var(--muted);font-size:12px;margin-top:3px;line-height:16px}.commercial-line-input label,.commercial-receipt-line label{display:grid;gap:4px;color:var(--muted);font-size:12px;line-height:16px}.commercial-line-input input{width:100%;text-align:right}.commercial-stage-complete,.commercial-receipt-status{margin:10px 0 0;color:var(--tf-166534,#166534)}.commercial-receipt-status small{display:block;color:var(--muted);margin-top:3px}.commercial-evidence-list{list-style:none;margin:8px 0 0;padding:0}.commercial-evidence-list li{display:grid;grid-template-columns:90px 160px minmax(0,1fr);gap:8px;padding:6px 0;border-top:1px solid var(--border);font-size:12px;line-height:16px}.commercial-evidence-list small{color:var(--muted)}.commercial-iv-card{margin:12px 0;padding:12px;border:1px solid var(--border);border-radius:6px;background:var(--tb-ffffff,#fff)}.commercial-receipt-lines{display:grid;gap:8px}.commercial-receipt-line{display:grid;grid-template-columns:minmax(210px,1fr) 72px repeat(3,minmax(105px,140px));gap:8px;align-items:end;padding:9px 0;border-bottom:1px solid var(--border)}.commercial-receipt-line input{width:100%;text-align:right}.commercial-receipt-line input[name^="wht_evidence"]{text-align:left}.commercial-receipt-select{align-self:center!important;display:flex!important;align-items:center;gap:6px;white-space:nowrap}.commercial-receipt-select input{width:auto;height:auto}.commercial-rt-row{margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.commercial-rt-row>div{display:flex;align-items:center;gap:8px}.commercial-rt-row .commercial-action-form{margin-top:0}
@media(max-width:767px){.commercial-lifecycle{box-sizing:border-box;width:calc(100vw - 64px);padding:0 8px}.commercial-lifecycle-stage>header,.commercial-iv-card>header,.commercial-rt-row,.commercial-action-form{align-items:flex-start;flex-direction:column}.commercial-action-form{width:100%}.commercial-action-form label,.commercial-action-form input,.commercial-action-form .button{width:100%}.commercial-action-form>small{text-align:left}.commercial-line-input{grid-template-columns:minmax(0,1fr)}.commercial-evidence-list li{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.commercial-evidence-list small{grid-column:1/-1}.commercial-receipt-line{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.commercial-receipt-line>div{grid-column:1/-1}.commercial-rt-row>div{flex-wrap:wrap;width:100%}.commercial-rt-row .commercial-action-form{width:100%}}.material-lots{margin-bottom:16px}.material-lots .card{display:grid;gap:5px;min-width:0}.material-lots .card.selected{border-color:var(--tl-737373,#737373);box-shadow:inset 0 0 0 1px #737373}.material-lots h2,.material-lots p{margin:0}.material-form-layout{grid-template-columns:minmax(0,1fr) minmax(260px,360px)}.material-source{display:grid;gap:4px;padding:12px;border:1px solid var(--border);border-radius:6px;background:var(--tb-fafafa,#fafafa)}.material-source small{color:var(--muted)}.material-movements table{min-width:940px}.material-movements .button{white-space:nowrap}

@media(max-width:767px){.material-header-action{flex:0 0 36px;width:36px;padding:7px;font-size:0}.material-form-layout{grid-template-columns:minmax(0,1fr)}.material-lots{grid-template-columns:minmax(0,1fr)}.material-movements table{min-width:0}/* CORE-14: the pov-stack rows fit 390px */}
.deal-linked-projects{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;padding:12px 14px;border:1px solid var(--tl-bbf7d0,#bbf7d0);border-radius:6px;background:var(--tb-f0fdf4,#f0fdf4);color:var(--tf-14532d,#14532d)}.deal-linked-projects>div:first-child{display:grid;gap:2px}.deal-linked-projects .actions{flex-wrap:wrap;justify-content:flex-end}@media(max-width:767px){.deal-linked-projects{align-items:flex-start;flex-direction:column}.deal-linked-projects .actions{justify-content:flex-start}}
.source-deal-card{display:flex;align-items:center;gap:12px;margin-bottom:16px}.source-deal-card>div{display:grid;gap:2px}@media(max-width:767px){}
.badge.cancelled{background:var(--tb-fee2e2,#fee2e2);color:var(--tf-991b1b,#991b1b)}.project-schedule-empty{border-style:dashed}@media(max-width:767px){}.project-overview-card h2{margin-bottom:8px}.project-overview-days{display:flex;align-items:center;margin:12px 0 0;border-top:1px solid var(--border);font-size:12px;line-height:16px}.project-overview-days b{color:var(--fg)}.project-overview-notes{margin:10px 0 0;border-top:1px solid var(--border);font-size:12px;color:var(--muted);overflow-wrap:anywhere;line-height:16px}.project-overview-customer{margin:0;display:grid;gap:2px}.project-overview-card small{display:block;color:var(--muted);font-size:12px;line-height:16px}.project-overview-person{border-top:1px solid var(--border);display:grid}.project-overview-person span{font-size:12px;overflow-wrap:anywhere;line-height:16px}.project-readiness{list-style:none;margin:0;padding:0;display:grid;gap:4px}/* audit PROJ-27: five rows, no scroll box */
.project-readiness-all{display:inline-block;margin-top:8px;font-size:12px}.project-readiness li{line-height:16px}.project-readiness-ok{font-weight:600;flex-shrink:0}.project-readiness-missing{flex-shrink:0}
.project-link-url{width:100%;font-family:monospace;font-size:12px;background:var(--soft);line-height:16px}.project-item-check{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:500;line-height:20px}.project-item-check input{height:auto;width:16px}
/* sweep-p10:begin */
/* /Contacts and /ContactForm (design sweep P10): the list is the one .pov table, the tools are rows, the form is one panel. */
.ct-c-pick{width:36px}/* SALES21-24: the name column gets the room (it was cut at ~150px while ผู้ประสาน stood empty) */.ct-c-type{width:144px}.ct-c-inner{width:136px}.ct-c-person{width:128px}.ct-c-phone{width:128px}.ct-c-email{width:208px}.ct-c-act{width:56px}.ct-c-note{width:280px}
.contact-table td.is-main a{font-weight:600}.contact-table td.fw-pick-cell{padding-right:0}.contact-table td.pov-act{text-align:right;overflow:visible}
.contact-table td.pov-act .icon-button{margin:0}
.contact-tool{border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden}
.contact-tool>summary{display:flex;align-items:center;gap:8px;min-height:40px;padding:8px 12px;background:var(--soft);cursor:pointer;list-style:none}.contact-tool>summary::-webkit-details-marker{display:none}.contact-tool[open]>summary{border-bottom:1px solid var(--border)}
.contact-tool>:not(summary){margin:12px}.contact-tool .pov table td.pov-act form{display:inline-flex}
.contact-form.form-stack{gap:0}.contact-form.is-solo{padding:16px;border:1px solid var(--border);border-radius:var(--radius-lg)}
.contact-sec{min-width:0}.contact-sec-plain{border:0;background:none}.contact-sec-plain h2{color:var(--fg)}
.contact-detail-panel>.contact-sec+.contact-sec,.contact-detail-panel>.contact-sec+form{margin-top:24px}
.contact-signed-table td.pov-act{overflow:visible}.contact-signed-void{position:relative;display:inline-block}.contact-signed-void>summary{list-style:none}.contact-signed-void>summary::-webkit-details-marker{display:none}
.contact-signed-void form{position:absolute;right:0;top:100%;z-index:20;width:280px;padding:12px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--tb-ffffff,#fff);box-shadow:var(--shadow-lg);white-space:normal;text-align:left}
.contact-more .kebab-menu{min-width:200px}
@media(max-width:700px){
 .contact-form.is-solo{padding:12px}.contact-form{padding-bottom:16px}
}
/* sweep-p10:end */
.contact-people-list{list-style:none;margin:10px 0 0;padding:10px 0 0;border-top:1px solid var(--border);display:grid;gap:6px}.contact-people-list li{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:14px;line-height:20px}.contact-people-list small{color:var(--muted);font-size:12px;line-height:16px}
.profile-identity{display:grid;gap:4px;min-width:0}.profile-identity .profile-name{margin:0;font-size:18px;font-weight:600;line-height:28px}.profile-identity p{margin:0;font-size:14px;line-height:20px}.profile-signature{display:grid;place-items:center;min-height:96px;border:2px dashed var(--border);border-radius:6px;background:var(--tb-ffffff,white);padding:24px}.profile-signature.is-empty{background:var(--soft);color:var(--muted);text-align:center}.profile-signature p{margin:0}.profile-signature-name{font-size:24px;font-style:italic;line-height:32px}.profile-security{display:grid;gap:6px;justify-items:start;padding:16px;border:1px solid var(--border);border-radius:6px;background:var(--soft)}.profile-security p{margin:0}@media(max-width:767px){.profile-summary{flex-direction:column;text-align:center}.profile-identity{justify-items:center}}
.dashboard-stat-icon{display:inline-flex;align-items:center;justify-content:center;background:var(--soft);color:var(--fg);flex-shrink:0;border-radius:var(--radius-lg)}.dashboard-stat-icon .icon{width:20px;height:20px}.dashboard-tint-blue{background:var(--tb-dbeafe,#dbeafe);color:var(--tf-2563eb,#2563eb)}.dashboard-limited{text-align:center;border-color:var(--tl-bfdbfe,#bfdbfe);background:var(--tb-eff6ff,#eff6ff);margin-bottom:20px}.dashboard-limited p{margin:0 0 4px}.dashboard-limited .button{margin-top:12px}.dashboard-columns{gap:24px;margin-bottom:24px}.dashboard-card-head{margin-bottom:12px}.dashboard-card-head h2{margin:0;font-size:16px;line-height:24px}.dashboard-card-head small{display:block;color:var(--muted);font-size:12px}.dashboard-more{display:inline-flex;align-items:center;gap:4px;font-size:12px;flex-shrink:0}.dashboard-more .icon{width:12px;height:12px}.dashboard-more:hover{text-decoration:underline}.dashboard-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}.dashboard-project{display:flex;align-items:center;gap:12px;padding:8px;border-radius:6px;min-width:0}.dashboard-project:hover{background:var(--soft)}.dashboard-project-body{flex:1;min-width:0}.dashboard-project-body strong{display:block;font-size:14px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px}.dashboard-project-body small{display:block;color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:16px}.dashboard-stage-value{width:80px;text-align:right;font-size:14px;font-weight:500;flex-shrink:0;line-height:20px}.dashboard-empty{padding:16px 0;text-align:center;color:var(--muted);margin:0;font-size:14px;line-height:20px}
/* วันลา (owner 2026-10-18 item 12, app/View/leave.php; docs/ui/DESIGN-SYSTEM.md): รออนุมัติ and ลาของฉัน are the .pov table (fixed
   columns, 28px rows, an expand row under an own row), ลงวันลา one row of 36px fields, the team calendar the .calendar-* grid. Every
   block is a direct child of main (16px apart); spacing on the 4 · 8 · 12 · 16 · 24 steps; no stripe, no box in a box. */
.leave-ask{padding:16px}.leave-ask>h2{margin:0 0 12px}
.leave-ask-grid{display:grid;grid-template-columns:176px 176px minmax(0,1fr) auto;gap:16px;align-items:start}/* audit PROJ-34: a filled date and its × on one line */
.leave-ask-grid.has-who{grid-template-columns:200px 176px 176px minmax(0,1fr) auto}
.leave-ask-hint{grid-column:1/-1;margin:0;font-size:12px;line-height:16px;color:var(--muted)}
.leave-ask-go{display:flex;justify-content:flex-end;padding-top:22px}
.leave-c-person{width:200px}.leave-c-decide{width:184px}
.leave-queue>.row-between,.leave-mine>.row-between{margin-bottom:8px}.leave-queue h2,.leave-mine h2{margin:0}
main#content .pov td.leave-decide{padding-top:0;padding-bottom:0;overflow:visible}
.leave-decide form{display:flex;gap:8px;justify-content:flex-end}.leave-decide .button.small{min-height:0;height:28px;padding-top:0;padding-bottom:0}
.leave-cal-bar{align-items:center}.leave-cal-bar h2{margin:0}.leave-cal-bar .calendar-nav{margin:0}
.leave-card-actions{margin-left:auto;align-self:center}
main#content .pov tr.leave-edit-row>td{height:auto;white-space:normal;overflow:visible;padding:12px 8px 16px;background:var(--soft)}
.leave-edit-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 24px;align-items:end}
.leave-edit-grid :is(input,.datepicker-trigger){height:28px;min-height:28px}
.leave-edit-go{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;align-items:center}.leave-edit-go>p{margin:0 auto 0 0}
.leave-history{list-style:none;margin:12px 0 0;padding:0;font-size:12px;line-height:16px;color:var(--muted)}.leave-history li+li{margin-top:4px}
@media(max-width:767px){.leave-ask{padding:12px}.leave-ask-grid,.leave-ask-grid.has-who{grid-template-columns:repeat(2,minmax(0,1fr))}.leave-ask-grid .leave-who,.leave-ask-grid .leave-note,.leave-ask-go{grid-column:1/-1}.leave-ask-go{padding-top:0}}
/* /Assets, the ทะเบียนสินทรัพย์ page (owner 2026-10-21 D8 / S11): one-line list rows with a 24px photo, the opened thing and its forms under the list, the history as a flat table. */
.asset-thumb{display:inline-block;width:24px;height:24px;border-radius:var(--radius-sm);object-fit:cover;vertical-align:middle;margin-right:8px;background:var(--soft)}.asset-thumb.is-empty{text-align:center;line-height:24px;color:var(--muted)}.asset-thumb.is-empty .icon{width:14px;height:14px;vertical-align:-2px}
.payroll-c-month{width:150px}@media(max-width:700px){.payroll-list.pov td.num{text-align:right}}.payroll-c-date{width:150px}.payroll-c-amount{width:150px}.payroll-c-status{width:110px}.payroll-c-act{width:64px}.payroll-list td.num,.payroll-list th.num{text-align:right}.asset-c-since{width:176px}.pov-lines td.asset-since{white-space:nowrap;overflow:visible;text-overflow:clip}.asset-c-kind{width:112px}.asset-c-serial{width:144px}.asset-c-peak{width:120px}.asset-c-holder{width:160px}.asset-c-where{width:200px}.asset-c-date{width:112px}.asset-c-when{width:152px}
.asset-form{padding:16px;margin-bottom:16px}.asset-form>.row-between{margin-bottom:12px}dialog.modal.asset-detail-modal{width:min(var(--modal-w-xl),calc(100vw - 32px))}.asset-detail{display:flex;flex-direction:column;gap:16px}.asset-detail .asset-history h2{margin:0 0 8px;font-size:16px;line-height:24px}
.asset-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:start;margin-top:16px}.asset-grid h3{margin:0;font-size:14px;line-height:20px}.asset-w2{grid-column:span 2}.asset-w4{grid-column:1/-1}
.asset-go{grid-column:1/-1;display:flex;justify-content:flex-end}
.asset-take{display:grid;grid-template-columns:minmax(0,1fr) 156px auto;gap:16px;align-items:end;margin-top:16px}.asset-take .asset-go{grid-column:auto}
.asset-photos{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:16px}.asset-photo{position:relative;margin:0}.asset-photo img{display:block;width:96px;height:96px;object-fit:cover;border-radius:var(--radius-md);border:1px solid var(--border)}.asset-photo form{position:absolute;top:4px;right:4px}
.asset-more{margin-top:16px}.asset-more>summary{display:inline-flex;cursor:pointer}
.asset-history{margin-top:16px}
@media(max-width:767px){.asset-form{padding:12px}.asset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.asset-w2{grid-column:1/-1}.asset-take{grid-template-columns:minmax(0,1fr)}.asset-take .asset-go{grid-column:1/-1}}
@media(max-width:700px){
 .leave-queue tr.leave-row,.leave-mine tr.leave-row{grid-template-columns:repeat(3,minmax(0,1fr))}
 .leave-queue tr.leave-row td:is(:first-child,:nth-child(5),:nth-child(6),.leave-decide),.leave-mine tr.leave-row td:last-child{grid-column:1/-1}
 :is(.leave-queue,.leave-mine) td[data-l]:not([data-l=""])::before{content:attr(data-l);display:block;font-size:11px;line-height:14px;font-weight:400;color:var(--muted)}
 main#content :is(.leave-queue,.leave-mine) td.num{text-align:left}.leave-decide form{justify-content:flex-start}
 .leave-mine tr.leave-edit-row{display:block;padding:0}.leave-edit-grid{grid-template-columns:minmax(0,1fr)}
 /* ux-misc 10: a leave on a phone is one compact line (ตั้งแต่ – ถึง · N วัน · สถานะ), its note a muted line under it, no label/value card;
    a request to approve adds its person above and, only when someone else is off then, ลาช่วงเดียวกัน and the names. */
 main#content :is(.leave-queue,.leave-mine) tr.leave-row{display:flex;flex-wrap:wrap;align-items:center;column-gap:0;row-gap:2px;padding:8px 12px;height:auto}
 main#content :is(.leave-queue,.leave-mine) tr.leave-row>td{display:inline-flex;align-items:center;width:auto;height:auto;min-height:0;padding:0;border:0;white-space:nowrap}
 main#content :is(.leave-queue,.leave-mine) tr.leave-row>td[data-l]::before{content:none}
 main#content .leave-mine tr.leave-row>td:nth-child(2)::before,main#content .leave-queue tr.leave-row>td:nth-child(3)::before{content:"–";display:inline;margin:0 4px;font-size:inherit;color:var(--muted)}
 main#content :is(.leave-queue,.leave-mine) tr.leave-row>td.leave-days::before,main#content .leave-mine tr.leave-row>td:nth-child(4)::before{content:"·";display:inline;margin:0 6px;font-size:inherit;color:var(--muted)}
 :is(.leave-queue,.leave-mine) tr.leave-row>td.leave-days::after{content:" " attr(data-unit);white-space:pre}
 /* RULES 5.23: no line of a leave wraps. ลาของฉัน is one line: ตั้งแต่ – ถึง · N วัน · สถานะ · the note, which gives up width first and ends in …
    (whole in its tip). A request to approve is two lines on every row: the person with อนุมัติ / ไม่อนุมัติ beside, then ตั้งแต่ – ถึง · N วัน
    · ลาช่วงเดียวกัน · the note, cut with …. */
 main#content .leave-mine tr.leave-row{flex-wrap:nowrap}
 main#content .leave-mine tr.leave-row>td{flex:none}
 main#content .leave-mine tr.leave-row>td:last-child{display:block;flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--muted);font-size:12px;line-height:16px}
 main#content .leave-mine tr.leave-row>td:last-child:not(:empty)::before{content:"·";display:inline;margin:0 6px;font-size:inherit;color:var(--muted)}
 main#content .leave-mine tr.leave-row>td:last-child:empty{display:none}
 main#content .leave-queue tr.leave-row{display:grid;grid-template-columns:auto auto auto minmax(0,max-content) minmax(0,1fr) auto;align-items:center;column-gap:0;row-gap:2px}
 main#content .leave-queue tr.leave-row>td{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis}
 main#content .leave-queue tr.leave-row>td:first-child{grid-column:1/6;grid-row:1;font-weight:600}
 main#content .leave-queue tr.leave-row>td:nth-child(2){grid-column:1;grid-row:2}main#content .leave-queue tr.leave-row>td:nth-child(3){grid-column:2;grid-row:2}main#content .leave-queue tr.leave-row>td.leave-days{grid-column:3;grid-row:2}
 main#content .leave-queue tr.leave-row>td:is(.leave-overlap,:nth-child(6)){grid-row:2;color:var(--muted);font-size:12px;line-height:16px}
 main#content .leave-queue tr.leave-row>td.leave-overlap{grid-column:4}main#content .leave-queue tr.leave-row>td:nth-child(6){grid-column:5}
 main#content .leave-queue tr.leave-row>td.leave-overlap::before{content:"· " attr(data-l) " ";display:inline;margin:0 0 0 6px;font-size:inherit;line-height:inherit;white-space:pre}main#content .leave-queue tr.leave-row>td.leave-overlap.is-none{display:none}
 main#content .leave-queue tr.leave-row>td:nth-child(6):not(:empty)::before{content:"·";display:inline;margin:0 6px;font-size:inherit;color:var(--muted)}
 main#content .leave-queue tr.leave-row>td:nth-child(6):empty{display:none}
 main#content .leave-queue tr.leave-row>td.leave-decide{grid-column:6;grid-row:1/3;padding:0 0 0 8px;overflow:visible}
 main#content .leave-queue .leave-decide form{justify-content:flex-end}
}
@media(pointer:coarse){.leave-edit-grid :is(input,.datepicker-trigger),.leave-decide .button.small{min-height:44px;height:44px}}
.project-form-required{margin-left:2px}.project-form-optional{color:var(--muted);font-weight:400}.project-form-error{display:block;color:var(--tf-b91c1c,#b91c1c);font-size:12px;margin-top:2px;line-height:16px}.project-form label>.field-label,.project-form legend.field-label{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.project-form fieldset{border:0;padding:0;margin:0;display:grid;gap:8px}.project-form-code{font-size:12px;padding:2px 6px;border-radius:6px;background:var(--tb-eff6ff,#eff6ff);color:var(--tf-1d4ed8,#1d4ed8);vertical-align:middle;line-height:16px}.project-form-type-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.project-form-type-card{align-items:flex-start;padding:10px 12px;border:1px solid var(--border);border-radius:6px;background:var(--tb-ffffff,#fff);cursor:pointer}.project-form-type-card span{display:grid;gap:2px;min-width:0}.project-form-type-card small{color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:16px}.project-form-type-card:has(:checked){border-color:var(--primary);box-shadow:inset 0 0 0 1px var(--primary);background:var(--tb-f8fafc,#f8fafc)}.project-form-type-toggle{justify-self:start}.project-form-type-details summary{cursor:pointer;font-size:12px;line-height:16px}.project-form-type-details[open] summary{margin-bottom:12px}@media(max-width:767px){.project-form-type-grid{grid-template-columns:minmax(0,1fr)}}
[x-show][style*="display: none"]{display:none!important}
.finance-hub{display:grid;gap:16px;max-width:1024px;margin-inline:auto}.finance-hub-source{margin:0;padding:8px 12px;border:1px solid var(--border);background:var(--tb-f8fafca70,#f8fafcb3);color:var(--tf-475569,#475569);font-size:12px;line-height:16px;border-radius:var(--radius-lg)}.finance-hub-source-error{border-color:var(--tl-fecaca,#fecaca);background:var(--tb-fef2f2,#fef2f2);color:var(--tf-b91c1c,#b91c1c)}
/* sweep-p1:begin */
.dash-quick h2{margin:0 0 8px;font-size:14px;line-height:20px;font-weight:500;color:var(--muted)}.dash-quick-row{display:flex;flex-wrap:wrap;gap:8px}
.pov>.pov-two{padding:0}.pov-two>section{min-width:0}.pov-two>section>.row-between{margin-bottom:8px}.pov-two>section h2{margin:0;font-size:14px;line-height:20px;font-weight:600}.pov-two .dashboard-more{font-size:12px;line-height:16px;color:var(--muted)}.pov-two .empty.is-inline{padding:8px 0}
.pov-c-count{width:72px}.dash-name{display:flex;align-items:center;min-width:0}
.management-report-todo{margin:0;font-size:14px;line-height:20px;color:var(--muted)}.management-report-todo a{color:inherit;text-decoration:underline}
/* sweep-p1:end */
.calendar-actions details.calendar-manage{display:none;position:relative}.calendar-filter-label{display:none}@media(max-width:767px){.calendar-actions details.calendar-manage{display:block}}.calendar-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.calendar-actions summary .badge{padding:0 5px;font-size:12px;line-height:16px}.calendar-settings-panel h3{margin:14px 0 8px;font-size:12px;color:var(--muted);line-height:16px}.calendar-settings-group{padding-bottom:8px;margin-bottom:8px;border-bottom:1px solid var(--border)}.calendar-settings-group>p{margin:0 0 4px}.calendar-option>span:not(.calendar-swatch,.switch){flex:1}.calendar-swatch{width:12px;height:12px;border-radius:6px;background:var(--calendar-solid);flex-shrink:0}.calendar-month-label{font-size:16px;font-weight:600;line-height:24px}.calendar-next .icon{transform:rotate(180deg)}.calendar-legend .calendar-dot{width:6px;height:6px;border-radius:50%;background:var(--calendar-solid)}.calendar-weekend{color:var(--tf-a3a3a3,#a3a3a3)}.calendar-month .calendar-day{position:relative;display:flex;flex-direction:column;min-width:0;min-height:120px;padding:4px 2px}.calendar-month .calendar-other{opacity:.2}.calendar-month .calendar-selected{background:var(--tb-f5f5f5,#f5f5f5);box-shadow:inset 0 0 0 1px #d4d4d4}.calendar-day-number{display:flex;padding:0 2px}.calendar-day-number::after{content:"";position:absolute;inset:0}.calendar-day-number span{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;font-size:12px;font-weight:500;line-height:16px}.calendar-today .calendar-day-number span{background:var(--tb-171717a15,#17171726);color:var(--primary);font-weight:700}.calendar-today.calendar-selected .calendar-day-number span{background:var(--primary);color:var(--on-primary,#fff)}.calendar-selected:not(.calendar-today) .calendar-day-number span{background:var(--tb-171717a80,#171717cc);color:var(--tf-ffffff,#fff)}.calendar-mini-list{position:relative;z-index:1;display:flex;flex-direction:column;gap:2px;margin-top:2px;min-width:0;pointer-events:none}.calendar-mini-list a{pointer-events:auto}.calendar-mini,.calendar-mini-mobile{display:flex;flex-direction:column;min-width:0;overflow:hidden;padding:3px 6px;border:1px solid var(--calendar-border);border-radius:4px;background:var(--calendar-bg);color:var(--calendar-fg);font-size:12px;line-height:16px}.calendar-mini-mobile{display:none}.calendar-mini-line{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.calendar-mini-deal{font-weight:500;opacity:.8}.calendar-mini-code,.calendar-detail-code{font-family:monospace;font-weight:600}.calendar-mini-soft{opacity:.7}.calendar-mini-faint{opacity:.6}.calendar-more{font-size:12px;color:var(--muted);text-align:center;line-height:16px}.calendar-more-mobile{display:none}
.calendar-tone-project-training{--calendar-solid:#3b82f6;--calendar-bg:var(--tb-eff6ff,#eff6ff);--calendar-border:var(--tl-bfdbfe,#bfdbfe);--calendar-fg:var(--tf-1e40af,#1e40af)}.calendar-tone-project-signature_program{--calendar-solid:#f59e0b;--calendar-bg:var(--tb-fffbeb,#fffbeb);--calendar-border:var(--tl-fde68a,#fde68a);--calendar-fg:var(--tf-92400e,#92400e)}.calendar-tone-project-transformation_journey{--calendar-solid:#ef4444;--calendar-bg:var(--tb-fef2f2,#fef2f2);--calendar-border:var(--tl-fecaca,#fecaca);--calendar-fg:var(--tf-991b1b,#991b1b)}.calendar-tone-project-consulting_implementation,.calendar-tone-project-other,.calendar-tone-project-marketing_campaign{--calendar-solid:#334155;--calendar-bg:var(--tb-f1f5f9,#f1f5f9);--calendar-border:var(--tl-cbd5e1,#cbd5e1);--calendar-fg:var(--tf-1e293b,#1e293b)}.calendar-tone-project-custom_elearning{--calendar-solid:#f97316;--calendar-bg:var(--tb-fff7ed,#fff7ed);--calendar-border:var(--tl-fed7aa,#fed7aa);--calendar-fg:var(--tf-9a3412,#9a3412)}.calendar-tone-project-own_elearning{--calendar-solid:#65a30d;--calendar-bg:var(--tb-f7fee7,#f7fee7);--calendar-border:var(--tl-d9f99d,#d9f99d);--calendar-fg:var(--tf-3f6212,#3f6212)}.calendar-tone-project-go_to_market{--calendar-solid:#6366f1;--calendar-bg:var(--tb-eef2ff,#eef2ff);--calendar-border:var(--tl-c7d2fe,#c7d2fe);--calendar-fg:var(--tf-3730a3,#3730a3)}.calendar-tone-project-product{--calendar-solid:#78716c;--calendar-bg:var(--tb-fafaf9,#fafaf9);--calendar-border:var(--tl-e7e5e4,#e7e5e4);--calendar-fg:var(--tf-44403c,#44403c)}.calendar-tone-project-sme{--calendar-solid:#06b6d4;--calendar-bg:var(--tb-ecfeff,#ecfeff);--calendar-border:var(--tl-a5f3fc,#a5f3fc);--calendar-fg:var(--tf-155e75,#155e75)}.calendar-tone-cs-close{--calendar-solid:#0f766e;--calendar-bg:var(--tb-f0fdfa,#f0fdfa);--calendar-border:var(--tl-99f6e4,#99f6e4);--calendar-fg:var(--tf-115e59,#115e59)}.calendar-tone-cs-training{--calendar-solid:#14b8a6;--calendar-bg:var(--tb-f0fdfa,#f0fdfa);--calendar-border:var(--tl-99f6e4,#99f6e4);--calendar-fg:var(--tf-0f766e,#0f766e)}.calendar-tone-cs-activity{--calendar-solid:#5eead4;--calendar-bg:var(--tb-f0fdfa,#f0fdfa);--calendar-border:var(--tl-ccfbf1,#ccfbf1);--calendar-fg:var(--tf-0d9488,#0d9488)}.calendar-tone-sales-close{--calendar-solid:#6d28d9;--calendar-bg:var(--tb-f5f3ff,#f5f3ff);--calendar-border:var(--tl-ddd6fe,#ddd6fe);--calendar-fg:var(--tf-5b21b6,#5b21b6)}.calendar-tone-sales-training{--calendar-solid:#8b5cf6;--calendar-bg:var(--tb-f5f3ff,#f5f3ff);--calendar-border:var(--tl-ddd6fe,#ddd6fe);--calendar-fg:var(--tf-6d28d9,#6d28d9)}.calendar-tone-sales-activity{--calendar-solid:#c4b5fd;--calendar-bg:var(--tb-f5f3ff,#f5f3ff);--calendar-border:var(--tl-ede9fe,#ede9fe);--calendar-fg:var(--tf-7c3aed,#7c3aed)}.calendar-tone-pr-close{--calendar-solid:#0e7490;--calendar-bg:var(--tb-ecfeff,#ecfeff);--calendar-border:var(--tl-a5f3fc,#a5f3fc);--calendar-fg:var(--tf-155e75,#155e75)}.calendar-tone-pr-training{--calendar-solid:#06b6d4;--calendar-bg:var(--tb-ecfeff,#ecfeff);--calendar-border:var(--tl-a5f3fc,#a5f3fc);--calendar-fg:var(--tf-0e7490,#0e7490)}.calendar-tone-pr-activity{--calendar-solid:#67e8f9;--calendar-bg:var(--tb-ecfeff,#ecfeff);--calendar-border:var(--tl-cffafe,#cffafe);--calendar-fg:var(--tf-0891b2,#0891b2)}.calendar-tone-leave{--calendar-solid:#d946ef;--calendar-bg:var(--tb-fdf4ff,#fdf4ff);--calendar-border:var(--tl-f5d0fe,#f5d0fe);--calendar-fg:var(--tf-a21caf,#a21caf)}.calendar-past{opacity:.75}
.calendar-detail{margin-top:16px}.calendar-detail-heading{display:flex;align-items:center;gap:8px;margin-bottom:8px}.calendar-detail-heading h2{margin:0}.calendar-detail-icon{display:flex;color:var(--tf-eab308,#eab308)}.calendar-detail-icon .icon{width:16px;height:16px}.calendar-empty{padding:32px 20px}a.calendar-detail-card:hover{background:var(--tb-fafafa,#fafafa)}.calendar-mark{width:10px;height:10px;margin-top:5px;border-radius:50%;background:var(--calendar-solid);flex-shrink:0}.calendar-detail-body{flex:1;min-width:0}.calendar-detail-title{display:flex;align-items:center;flex-wrap:wrap;gap:6px;min-width:0}.calendar-label{padding:0 6px;border:1px solid var(--calendar-border);border-radius:6px;background:var(--calendar-bg);color:var(--calendar-fg);font-size:12px;font-weight:500;line-height:16px}.calendar-detail-code{font-size:14px;line-height:20px}.calendar-detail-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;color:var(--muted);line-height:20px}.calendar-detail-primary{color:var(--fg);font-weight:600}.calendar-detail-subtitle{margin:2px 0 0}.calendar-detail-meta{display:flex;flex-wrap:wrap;margin-top:6px;font-size:12px;color:var(--muted);line-height:16px}@media(max-width:767px){.calendar-action-label{display:none}.calendar-actions>a.button[aria-label]{display:none}.calendar-actions .calendar-filter-label{display:inline}.calendar-month .calendar-day{min-height:60px;padding:4px 1px}.calendar-day-number{justify-content:center}.calendar-mini,.calendar-desktop-slot,.calendar-more-desktop{display:none}.calendar-mini-mobile{display:flex;flex-direction:row;gap:4px;padding:3px 6px 3px 2px;border-radius:6px;line-height:16px}.calendar-mini-mobile::before{content:none}.calendar-mini-mobile-body{display:flex;flex-direction:column;flex:1;min-width:0}.calendar-mini-mobile .calendar-mini-title{font-weight:500}.calendar-more-mobile{display:block;font-size:12px;line-height:16px}.calendar-legend{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;white-space:nowrap}.calendar-legend{gap:8px;scrollbar-width:none}.calendar-legend span{flex-shrink:0;padding:2px 6px;border-radius:var(--radius-full);background:var(--tb-f5f5f5a40,rgb(245 245 245 / .4))}}
.sales-report-filters{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.sales-report-next .icon{transform:rotate(180deg)}.sales-report-period{position:relative;margin:0}.sales-report-period>summary{list-style:none}.sales-report-popover{position:absolute;right:0;top:calc(100% + 6px);z-index:20;width:min(360px,calc(100vw - 32px));padding:12px;display:grid;gap:10px}.sales-report-popover p{margin:0}.sales-report-presets{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px}.sales-report-presets .button{flex-direction:column;align-items:flex-start;gap:0}.sales-report-presets small{font-size:12px;opacity:.8;line-height:16px}.sales-report-custom{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:6px;align-items:end}.sales-report-custom .field{gap:4px}.sales-report-custom .field span{font-size:12px;color:var(--muted);line-height:16px}.sales-report-scope{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;margin:0 0 12px;padding:6px 12px;border:1px solid var(--border);border-radius:6px;background:var(--tb-f8fafc,#f8fafc);color:var(--muted);font-size:12px;line-height:16px}.sales-report-row{margin-top:16px}.sales-report-bars th{height:auto;padding:6px 8px 6px 0;background:none;color:var(--fg);font-size:12px;font-weight:500;white-space:nowrap;line-height:16px}.sales-report-bars td{padding:6px 0 6px 8px}.sales-report-bars td.mono{text-align:right;white-space:nowrap}.sales-report-bars small{color:var(--muted)}.sales-report-months td.mono{text-align:right}.sales-report-table-head{flex-wrap:wrap;margin-bottom:12px}.sales-report-table-head h3{margin:0}.sales-report-table-head .search{width:240px;margin:0}.sales-report-footer{margin:12px 0 0}.sales-report-types{margin-top:16px}.sales-report-board{margin-bottom:24px}.sales-report-board-head{justify-content:flex-start;margin-bottom:8px;align-items:center;gap:8px}.sales-report-board-head h2{margin:0;font-size:14px;line-height:20px;font-weight:600}.sales-report-total{text-align:right}.sales-report-total strong{display:block;font-size:18px;line-height:28px}.sales-report-picker{margin-bottom:16px}.sales-report-picker .list-row{justify-content:flex-start;flex-wrap:wrap}.sales-report-picker label{display:flex;align-items:center;gap:6px;font-weight:600}@media(max-width:767px){.sales-report-popover{position:fixed;left:16px;right:16px;top:72px;width:auto}.sales-report-custom{grid-template-columns:minmax(0,1fr)}.sales-report-table-head .search{width:100%}.sales-report-bars th{white-space:normal}.sales-report-bars td:nth-child(2){width:30%}}
/* sweep-p4:begin */
.sr-c-value{width:260px}.sr-c-cell{width:152px}.sr-c-owner{width:160px}.sr-c-stage{width:140px}.sr-c-qty{width:96px}.pov-c-rank{width:40px}
.sales-report-chart>h3,.sales-report-performance>h3,.sales-report-types>h3,.sales-report-table>h3{margin:0 0 8px;font-size:14px;line-height:20px;font-weight:600}
.sales-report-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.sales-report-toolbar .sales-report-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
main#content p.sales-report-scope{display:block;padding:0;border:0;border-radius:0;background:none;font-size:14px;line-height:20px;color:var(--muted)}main#content p.sales-report-scope-warn{color:var(--tf-92400e,#92400e)}

main#content p.sales-report-scope{display:block;padding:0;border:0;border-radius:0;background:none;font-size:14px;line-height:20px;color:var(--muted)}main#content p
main#content>nav.tabs[aria-label]{width:100%}
.sales-report-bars td small{display:inline}
/* sweep-p4:end */
.credit-term-filters{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;align-items:end;margin-bottom:12px}.credit-term-tone-default{color:inherit}.credit-term-title{padding:12px 16px 8px;font-size:14px;line-height:20px}.credit-term-table small{display:block}.credit-term-balance{font-size:12px;color:var(--muted);line-height:16px}.credit-term-late{color:var(--tf-b91c1c,#b91c1c);font-weight:600}.credit-term-overdue td{background:var(--tb-fef2f2,#fef2f2)}@media(max-width:767px){.credit-term-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
.sales-report-period:not([open])>.sales-report-popover,details:not([open])>.calendar-settings-panel{display:none}
.partner-portal-narrow{margin:0 auto}.partner-portal-unlinked{text-align:center;padding-block:8px}.partner-portal-unlinked h1{font-size:18px;line-height:28px}.partner-portal-stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,150px),1fr));gap:12px;margin-bottom:24px}.partner-portal-paid-amount{color:var(--tf-16a34a,#16a34a)}.partner-portal-pending-amount{color:var(--tf-ca8a04,#ca8a04)}.partner-portal-panels{gap:24px;align-items:start}.partner-portal-summary{margin-bottom:8px}@media(max-width:767px){.grid-2.partner-portal-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}.partner-portal-list{display:grid;gap:8px}.partner-portal-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--border);border-radius:6px}.partner-portal-day{justify-content:flex-start}.partner-portal-day>.badge{margin-left:auto}.partner-portal-copy{display:grid;gap:2px;min-width:0;flex:1}.partner-portal-copy strong{font-size:14px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px}.partner-portal-copy small{color:var(--muted);font-size:12px;overflow-wrap:anywhere;line-height:16px}.partner-portal-amount{font-size:14px;font-weight:600;white-space:nowrap;line-height:20px}.partner-portal-date{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:0 0 44px;height:44px;border-radius:6px;background:var(--tb-eef2ff,#eef2ff);color:var(--tf-3730a3,#3730a3);line-height:1}.partner-portal-date strong{font-size:14px;line-height:20px}.partner-portal-date span{font-size:12px;margin-top:2px;line-height:16px}.badge.partner-portal-done{background:var(--tb-dcfce7,#dcfce7);color:var(--tf-15803d,#15803d)}.badge.partner-portal-pending{background:var(--tb-fef9c3,#fef9c3);color:var(--tf-a16207,#a16207)}.partner-portal-group h3{font-size:14px;margin:0 0 8px;line-height:20px}.partner-portal-empty{text-align:center;padding-block:16px;margin:0}.partner-portal-required{color:var(--tf-ef4444,#ef4444)}@media(max-width:767px){.partner-portal-stats{grid-template-columns:repeat(auto-fill,minmax(min(100%,150px),1fr))}.partner-portal-row{flex-wrap:wrap}.partner-portal-day>.badge{margin-left:0}}
.accounting-audit-intro{margin-bottom:12px}.accounting-audit-intro p{margin:0;font-size:12px;line-height:16px}.accounting-audit-scope{margin:0 0 12px;font-size:12px;line-height:16px}.accounting-audit-incomplete ul{margin:8px 0 0;padding-left:20px;font-size:12px;line-height:16px}.system-health-table td,.accounting-audit-table td{vertical-align:top}.system-health-empty,.accounting-audit-empty{text-align:center}
.admin-updatelog-section{margin-bottom:24px}.admin-updatelog-items{margin:8px 0 0;padding-left:18px;color:var(--muted);font-size:14px;line-height:20px}.admin-required{color:var(--tf-dc2626,#dc2626)}.admin-updatelog-form{margin-bottom:20px}.admin-audit-card{margin-bottom:16px}.admin-audit-card>h2{margin:0;padding:10px 16px;border-bottom:1px solid var(--border);font-size:14px;line-height:20px}.admin-audit-warn{color:var(--tf-b45309,#b45309)}.admin-audit-timeline h2{font-size:14px;line-height:20px}
.automation-menu,.automation-add{position:relative}.automation-menu>summary,.automation-add>summary{list-style:none;cursor:pointer}.automation-menu>summary::-webkit-details-marker,.automation-add>summary::-webkit-details-marker{display:none}.automation-add-menu{position:absolute;z-index:20;top:calc(100% + 4px);display:grid;gap:4px;min-width:160px;padding:8px;border:1px solid var(--border);border-radius:6px;background:var(--tb-ffffff,#fff);box-shadow:var(--shadow-xl)}.automation-add-menu{right:auto;left:50%;transform:translateX(-50%);width:220px}details:not([open])>.automation-add-menu{display:none}.automation-active{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:6px;background:var(--soft);font-size:12px;line-height:16px}.automation-active input{width:auto;height:auto}.automation-canvas{display:flex;flex-direction:column;align-items:center;margin:12px 0;padding:32px 16px 48px;border:1px solid var(--border);border-radius:6px;background:var(--soft)}.automation-node{position:relative;display:flex;align-items:center;gap:10px;width:220px;max-width:100%;padding:10px 14px;border:1px solid var(--border);border-radius:6px;background:var(--tb-ffffff,#fff);text-align:left}.automation-node>span:last-of-type{display:grid;min-width:0}.automation-node small{color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:16px}.automation-node-icon{display:grid;place-items:center;flex:0 0 32px;height:32px;border-radius:6px;background:var(--tb-2d9f4a,#2d9f4a);color:var(--tf-ffffff,#fff)}.automation-node-icon.trigger{background:var(--tb-4361ee,#4361ee)}.automation-node-index{position:absolute;top:-8px;left:-8px;display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:var(--tb-374151,#374151);color:var(--tf-ffffff,#fff);font-size:12px;font-weight:700;line-height:16px}.automation-node-sample{position:absolute;top:-5px;right:-5px;width:12px;height:12px;border-radius:50%;background:var(--tb-16a34a,#16a34a)}.automation-connector{width:2px;height:24px;background:var(--border)}.automation-add>summary{display:grid;place-items:center;width:40px;height:40px;border:2px dashed var(--tl-9ca3af,#9ca3af);border-radius:50%;background:var(--tb-ffffff,#fff);font-size:18px;line-height:28px}.automation-panel{margin-top:12px}.automation-trigger-types{display:grid;gap:6px;border:0;padding:0;margin:0 0 12px}.automation-option{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--border);border-radius:6px}.automation-option:has(:checked){border-color:var(--primary);background:var(--tb-f8fafc,#f8fafc)}.automation-option input{width:auto;height:auto}.automation-option span{display:grid}.automation-output{display:grid;gap:4px;margin-top:12px;padding:12px;border:1px solid var(--tl-bbf7d0,#bbf7d0);border-radius:6px;background:var(--tb-f0fdf4,#f0fdf4)}.automation-test{margin-top:12px}.automation-log>summary{display:grid;gap:4px;padding:12px 16px;cursor:pointer}.automation-log-preview{gap:4px;flex-wrap:wrap}.automation-log[open] .automation-log-preview{display:none}.automation-log-body{display:grid;gap:10px;padding:12px 16px 16px;border-top:1px solid var(--border)}.automation-log-label{font-size:12px;line-height:16px}.automation-resolved{display:grid;gap:2px;padding:8px;border-radius:6px;background:var(--soft);font-size:12px;line-height:16px}.automation-webhook{display:grid;gap:6px;margin-top:12px;padding:12px;border:1px solid var(--border);border-radius:6px;background:var(--soft)}.automation-webhook p{margin:0;font-size:12px;line-height:16px}.automation-webhook-url{display:block;padding:8px;border:1px solid var(--border);border-radius:6px;background:var(--tb-ffffff,#fff);font-size:12px;line-height:16px;overflow-wrap:anywhere;user-select:all}.automation-step-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.automation-mapping{display:grid;gap:6px;margin:0;padding:0;border:0}.automation-mapping legend{font-size:12px;font-weight:600;line-height:16px;margin-bottom:4px}.automation-mapping p{margin:0;font-size:12px;line-height:16px}.automation-mapping-row{display:grid;grid-template-columns:160px minmax(0,1fr);gap:6px;align-items:start}.automation-webhook>.button{justify-self:start}@media(max-width:639px){.automation-mapping-row,.automation-step-row{grid-template-columns:minmax(0,1fr)}}@media(max-width:767px){.automation-name{flex:1;width:auto}}
/* sweep-p13:begin */
.automation-table .at-c-when{width:200px}.automation-table .at-c-count{width:72px}.automation-table .at-c-last{width:152px}.automation-table .at-c-on{width:88px}.automation-table .at-c-act{width:128px}
.automation-row.inactive td{color:var(--muted)}
.automation-table form{margin:0}.automation-table .pov-act,.update-log-table .pov-act{text-align:right;overflow:visible}
.automation-table .kebab summary.button.small,.update-log-table .kebab summary.button.small{min-height:28px;height:28px;padding:0 8px}
.automation-table .at-c-on{width:176px}.automation-table td .automation-setup{margin-left:8px;vertical-align:middle;color:var(--tf-b45309,#b45309);border-color:var(--tl-fcd34d,#fcd34d);text-decoration:none}.automation-table td:has(>.automation-setup){white-space:nowrap}.automation-table td:has(>.automation-setup)>form{display:inline-block;vertical-align:middle}@media(max-width:700px){main#content .automation-table td:has(>.automation-setup){white-space:normal;overflow:visible;grid-column:1/-1}}
.page-header .automation-active{display:inline-flex;align-items:center;gap:8px;padding:0;background:none;font-size:14px;line-height:20px}
.automation-builder .automation-canvas{padding:24px 16px}.automation-panel .automation-webhook{padding:0;border:0;background:none}.automation-panel .automation-option,.automation-panel .automation-option:has(:checked){padding:4px 0;border:0;border-radius:0;background:none}.automation-panel .automation-name{width:100%}
/* SET20-27 / SET20-15 (audit 2026-11-20): the trigger choices sit one grid step below the name; the list gives the chain (ทำ) the room the fixed columns left; the failed-run label reads like the setup one. */
.automation-panel .automation-trigger-types{margin-top:16px}.automation-table .at-c-when{width:168px}.automation-table .at-c-count{width:56px}.automation-table .at-c-last{width:136px}.automation-table .at-c-on{width:280px}.automation-table .at-c-act{width:112px}.automation-table td .automation-failed{margin-left:8px;vertical-align:middle;color:var(--tf-b91c1c,#b91c1c);border-color:var(--tl-fecaca,#fecaca);text-decoration:none}.automation-table td:has(>.automation-failed){white-space:nowrap}.automation-table td:has(>.automation-failed)>form{display:inline-block;vertical-align:middle}@media(max-width:700px){main#content .automation-table td:has(>.automation-failed){white-space:normal;overflow:visible;grid-column:1/-1}}
.automation-log-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.automation-log-body .row-between>.actions{flex:1 1 100%;min-width:0;justify-content:flex-start}.automation-log-preview{display:block;margin-top:4px;font-size:12px;line-height:16px}.automation-failed{color:var(--tf-b91c1c,#b91c1c)}
.automation-result{padding:8px 0;border-top:1px solid var(--border)}.automation-result .pov-st{display:inline-flex}
.update-log-table .ul-c-status{width:152px}.update-log-table .ul-c-act{width:128px}.update-log-table .ul-c-ver{width:104px}.update-log-table .ul-c-date{width:128px}
.update-log-table .update-log-items td{height:auto;padding:0 8px 8px;white-space:normal;overflow:visible}.update-log-table .admin-updatelog-items{margin:0;padding-left:20px}
.update-log-table tbody tr:has(+.update-log-items)>td{border-bottom:0}
.update-log-table .update-log-add td{height:32px}.update-log-table .update-log-add a{display:inline-flex;align-items:center;gap:4px;color:var(--muted);font-size:12px;line-height:16px}.update-log-table .update-log-add .icon{width:12px;height:12px}
.admin-updatelog-section{margin-top:16px}.admin-updatelog-section h2.update-log-title{margin-bottom:8px}.admin-audit-card,.admin-audit-timeline{margin-top:16px}.admin-audit-card h2,.admin-audit-timeline h2{margin:0 0 8px;font-size:16px;line-height:24px}
.audit-table .au-c-module{width:200px}.audit-table .au-c-count{width:264px}.audit-table .au-c-door{width:200px}.audit-table .au-c-time{width:152px}.audit-table .au-c-area{width:144px}.audit-table .au-c-actor{width:168px}
/* SH-04: the history on a phone is time, item and person; the item takes what is left (the two muted columns leave, .ph-x). */
@media(max-width:700px){main#content table.audit-table.pov-phone col.au-c-time{width:116px}main#content table.audit-table.pov-phone col.au-c-actor{width:92px}}
.admin-audit-timeline .filters{margin-bottom:8px}
.profile-page .profile-section{padding:0;border:0;background:none;box-shadow:none}.profile-page .profile-section+.profile-section,.profile-page .profile-security{margin-top:8px}
.profile-page .profile-signature{border:1px solid var(--border);padding:16px}.profile-page .profile-signature.is-empty{background:none}.profile-page .profile-signature.has-image{padding:12px}
.profile-page .profile-image-actions{padding-top:0;border-top:0}.profile-page .profile-image-actions .button{gap:8px}
.profile-page .profile-security-box{padding:0;border:0;background:none}
/* SH-12: ออกจากระบบทุกอุปกรณ์อื่น sits under its own heading, at the left */
.profile-security-box.profile-everywhere .form-actions{justify-content:flex-start}
.profile-theme .field{max-width:240px}
/* sweep-p13:end */
.external-upload-head{text-align:center;margin-bottom:16px}.external-upload-head h1{font-size:24px;line-height:32px}.external-upload-head p{margin:4px 0}.external-upload-remaining{display:grid;gap:2px;text-align:center;padding:16px;margin-bottom:16px;background:var(--soft);border-radius:6px}.external-upload-remaining strong{font-size:24px;line-height:32px}.external-upload-done{margin-bottom:16px;color:var(--tf-166534,#166534)}.external-upload-done .list-row{padding:8px 10px;margin-top:6px;border:0;border-radius:6px;background:var(--tb-f0fdf4,#f0fdf4)}.external-upload-picker{display:grid;gap:8px}.external-upload-drop{display:grid;place-items:center;min-height:96px;border:1px dashed var(--border);border-radius:6px;color:var(--muted);cursor:pointer}.external-upload-maxed{margin:0;text-align:center}.external-upload-brand{margin-bottom:16px}.external-upload-sent{margin-bottom:16px}.external-upload-sent .list-row{display:flex;align-items:center;justify-content:flex-start;gap:8px;padding:6px 0;border:0}.external-upload-sent .list-row svg{width:16px;height:16px;color:var(--tf-166534,#166534);flex:none}.external-upload-left{margin:0}.external-upload-card .button.primary{width:100%}
.external-expense-mark{display:inline-grid;place-items:center;width:48px;height:48px;margin-bottom:8px;background:var(--tb-dbeafe,#dbeafe);color:var(--tf-1d4ed8,#1d4ed8);border-radius:var(--radius-xl)}.external-expense-steps{display:flex;gap:16px;margin:0;padding:14px 20px;list-style:none;border-bottom:1px solid var(--border);background:var(--tb-fafafa,#fafafa);color:var(--muted);font-size:12px;line-height:16px}.external-expense-steps li{display:flex;align-items:center;gap:8px}.external-expense-steps span{display:inline-grid;place-items:center;width:28px;height:28px;border:1px solid var(--border);border-radius:50%;background:var(--tb-ffffff,#fff);font-weight:700}.external-expense-steps .active{color:var(--tf-1d4ed8,#1d4ed8)}.external-expense-steps .active span{border-color:var(--tl-2563eb,#2563eb);background:var(--tb-dbeafe,#dbeafe)}.external-expense-steps .done{color:var(--tf-059669,#059669)}.external-expense-body{padding:20px}.external-expense-drop{display:grid;place-items:center;gap:4px;min-height:120px;padding:24px;border:2px dashed var(--border);border-radius:6px;text-align:center;cursor:pointer}.external-expense-review-head{align-items:flex-end}.external-expense-item{overflow:visible}.external-expense-reason{padding:8px;border:1px solid var(--tl-fed7aa,#fed7aa);border-radius:6px;background:var(--tb-fff7ed,#fff7ed)}.external-expense-item-errors{margin:0;padding:8px 8px 8px 24px;border:1px solid var(--tl-fecaca,#fecaca);border-radius:6px;background:var(--tb-fef2f2,#fef2f2);color:var(--tf-b91c1c,#b91c1c);font-size:12px;line-height:16px}.external-expense-summary{display:grid;gap:4px;padding:16px;border:1px solid var(--border);border-radius:6px;background:var(--tb-fafafa,#fafafa)}.external-expense-summary strong{color:var(--tf-047857,#047857);font-size:16px;line-height:24px}.external-expense-footer{padding:12px 20px;border-top:1px solid var(--border);background:var(--tb-fafafa,#fafafa)}.external-expense-note{text-align:center;font-size:12px;line-height:16px}.external-expense-done{text-align:center}
.feedforward-report-head h1{font-size:24px;margin:2px 0;line-height:32px}.feedforward-report-head p{margin:2px 0}.feedforward-report-head .actions{flex-wrap:wrap;margin-top:12px}.feedforward-report-tabs a{display:grid;gap:2px}.feedforward-report-tabs small{font-size:12px;line-height:16px}.feedforward-report-daybox{display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--border);border-radius:6px;background:var(--soft);line-height:1.1}.feedforward-report-daybox small{font-size:12px;color:var(--muted);line-height:16px}.feedforward-report-daybox+div small{display:block}.feedforward-report-person{padding:14px 16px;border-bottom:1px solid var(--border)}.feedforward-report-person:last-child{border-bottom:0}.feedforward-report-avatar{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--soft);font-size:12px;font-weight:600;line-height:16px}.feedforward-report-submitted{background:var(--tb-f0fdf4,#f0fdf4);color:var(--tf-15803d,#15803d)}.feedforward-report-waiting{background:var(--tb-fffbeb,#fffbeb);color:var(--tf-b45309,#b45309)}.feedforward-report-answers{padding-left:36px}@media(max-width:767px){.external-expense-body{padding:14px}.external-expense-steps{padding:12px 14px}.external-expense-review-head .actions{width:100%;flex-wrap:wrap}.feedforward-report-answers{padding-left:0}.feedforward-report-tabs{overflow-x:auto}}
.tax-report-page,.ops-ta-page,.reconcile-page,.import-governance-page{display:flex;flex-direction:column;gap:16px}.tax-report-table td small,.tax-report-detail td small{display:block;margin-top:2px}.tax-report-section{overflow:hidden}.tax-report-title{margin:0;padding:12px 16px;font-size:16px;line-height:24px}.tax-report-selected td,.tax-report-total td{background:var(--soft)}.tax-report-sort{color:var(--muted)}.tax-report-sort.active{color:var(--fg)}.tax-report-filters{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.tax-report-filters .search{flex:1;min-width:180px}
/* sweep-p6:begin */
/* Finance reports A (design sweep P6; DESIGN-SYSTEM 3.1, 5): TaxReport, CreditTermReport, LegacyTaxSplit, AccountingAudit, AccountingNotifications, SystemHealth on the one .pov table, one toolbar line with the totals at its right. Column widths are named classes (DESIGN-SYSTEM 1.5). */
.tx-c-date{width:132px}.tx-c-type{width:120px}.tx-c-project{width:200px}.tx-c-n{width:96px}.tx-c-payee{width:200px}.tx-c-code{width:96px}.tx-c-desc{width:220px}.tx-c-vat{width:104px}@media(min-width:701px){.tx-all{min-width:1380px}.ct-all{min-width:1260px}}.fw-bar.credit-term-filters{display:flex;align-items:center;gap:8px}
.ct-c-n{width:96px}.ct-c-money{width:148px}.ct-c-who{width:180px}.ct-c-date{width:104px}.ct-c-proj{width:300px}
.aa-c-rule{width:220px}.aa-c-project{width:120px}.aa-c-code{width:180px}
.lt-c-status{width:150px}.lt-c-project{width:104px}.lt-c-split{width:200px}.lt-c-rule{width:180px}.lt-c-act{width:136px}
.an-c-who{width:220px}.an-c-when{width:156px}.an-c-act{width:288px}
.sh-c-name{width:260px}.sh-c-act{width:104px}.sh-c-kind{width:104px}.sh-c-route{width:220px}.sh-c-n{width:80px}.sh-c-when{width:156px}
.sh-wrap td{white-space:normal;height:auto}
.tax-report-page .fw-bar,.credit-term-filters,.accounting-audit-filters{margin-bottom:0}.fw-bar>.fw-count{margin-left:auto}
.tax-report-page .fw-bar .tax-report-export{margin-left:auto}.tax-report-title .muted{font-weight:400}
.ct-lab{display:inline-flex;align-items:center;gap:8px;font-size:12px;line-height:16px;white-space:nowrap}.ct-lab input{width:auto}
.fw-bar.credit-term-filters>.combobox,.accounting-audit-filters>.combobox{flex:0 0 190px;width:190px;min-width:0}.credit-term-filters .search{flex:0 1 240px}.credit-term-filters .credit-term-export{flex:none}
.credit-term-totals{margin:0}.credit-term-totals small{font-size:12px;line-height:16px}
.sh-wrap+.set-head{margin-top:16px}
@media(max-width:700px){main#content .tx-all td.num,main#content .tax-report-page .pov-stack td.num,main#content .credit-term-table td.num,main#content .accounting-audit-table td.num,main#content .error-watch-errors td.num,main#content .error-watch-refused td.num{text-align:right}.tax-report-page .pov-stack td.num::before,.credit-term-table td.num::before,.accounting-audit-table td.num::before,.error-watch-errors td.num::before,.error-watch-refused td.num::before{text-align:left}}
@media(max-width:767px){.fw-bar>.fw-count,.tax-report-page .fw-bar .tax-report-export{margin-left:0}.credit-term-filters .search{flex:1 1 100%}.ct-lab{flex:1 1 100%}.ct-lab input{flex:1}}
/* sweep-p6:end */
.ops-ta-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:16px;align-items:start}.ops-ta-list{overflow:hidden}.ops-ta-filters{margin:0}.ops-ta-projects,.ops-ta-members,.reconcile-issues{list-style:none;margin:0;padding:0}.ops-ta-project{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border-bottom:1px solid var(--border)}.ops-ta-project:hover,.ops-ta-project.active{background:var(--soft)}.ops-ta-meta{display:flex;flex-wrap:wrap;gap:12px;font-size:12px;line-height:16px}.ops-ta-missing{color:var(--tf-c2410c,#c2410c);font-weight:600}.ops-ta-detail{display:flex;flex-direction:column;gap:12px}.ops-ta-placeholder{display:flex;flex-direction:column;align-items:center;gap:8px;border:1px dashed var(--border);border-radius:6px}.ops-ta-back{display:none;align-self:flex-start}.ops-ta-project-head h2,.ops-ta-project-head p{margin:0}.ops-ta-day-head{padding-bottom:8px;border-bottom:1px solid var(--border);flex-wrap:wrap;gap:8px}.ops-ta-complete{color:var(--tf-15803d,#15803d);font-weight:600}.ops-ta-members{margin:8px 0;display:flex;flex-direction:column;gap:6px}.ops-ta-empty-day{text-align:center;margin:12px 0}.ops-ta-day-actions{padding-top:8px;border-top:1px solid var(--border);flex-wrap:wrap;align-items:flex-start}.ops-ta-overview-body,.ops-ta-add-form{display:flex;flex-direction:column;gap:8px;margin-top:8px}.ops-ta-overview-body .list-row small{display:block}
/* sweep-p14:begin */
.ops-ta-bar .ops-ta-search{flex:0 1 280px;min-width:160px;margin:0}.ops-ta-bar .ops-ta-search .search{width:100%}
.ops-ta-project .pov-st{font-size:12px;line-height:16px}
.ops-ta-detail .ops-ta-placeholder{display:block;padding:48px 16px;border:0;border-radius:0}
.reconcile-table .rc-c-kind{width:88px}.reconcile-table .rc-c-why{width:240px}.reconcile-table .rc-c-act{width:128px}.reconcile-table .rc-c-decision{width:120px}.reconcile-table .rc-c-type{width:176px}.reconcile-table .rc-c-sev{width:120px}
.reconcile-table .pov-act{text-align:right;overflow:visible}.reconcile-table .kebab summary.button.small{min-height:28px;height:28px;padding:0 8px}
.reconcile-table .kebab-menu form.actions{display:flex;gap:8px;align-items:center;flex-wrap:nowrap}.reconcile-table .kebab-menu form.actions>input{width:240px}
.reconcile-page .reconcile-queue h2,.reconcile-page .reconcile-legacy h2{margin:0 0 8px;font-size:16px;line-height:24px}.reconcile-page .reconcile-legacy h2 .muted{font-size:12px;font-weight:400}
.reconcile-page .reconcile-empty{padding:48px 16px}
/* sweep-p14:end */
.reconcile-close form{margin-top:8px}@media(max-width:767px){.ops-ta-layout{grid-template-columns:minmax(0,1fr)}.ops-ta-has-selection .ops-ta-list{display:none}.ops-ta-has-selection .ops-ta-bar{display:none}.ops-ta-has-selection .ops-ta-back{display:inline-flex}}
.deal-transfer-inline>summary{list-style:none;cursor:pointer}.deal-transfer-inline>summary::-webkit-details-marker{display:none}.deal-transfer-inline[open]{flex-basis:100%}.deal-transfer-inline form{display:flex;flex-direction:column;gap:12px;margin-top:8px;padding:12px;border-radius:6px;background:var(--soft)}.deal-transfer-inline p{margin:8px 0 0}.int-log-detail{padding:12px;border-radius:6px;background:var(--soft)}.int-log-detail h3{margin:0;font-size:16px;line-height:24px}.int-log-detail pre{margin:0;max-height:360px;overflow:auto;white-space:pre-wrap;word-break:break-word}
.auth-screen-head{text-align:center;margin-bottom:40px}.auth-screen-mark{display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px;border-radius:6px;background:var(--primary);color:var(--on-primary,#fff);margin-bottom:16px}.auth-screen-mark .icon{width:28px;height:28px}.auth-screen-head h1{margin:0;font-size:24px;font-weight:700;letter-spacing:-.02em;line-height:32px}.auth-screen-subtitle{margin:8px 0 0;color:var(--muted)}.auth-screen-card{padding:24px}.auth-screen-alert{margin-bottom:0}.auth-screen-lead{margin:0 0 8px;font-weight:500}.auth-screen-tools{list-style:none;margin:0 0 24px;padding:0;display:grid;gap:8px}.auth-screen-tools li{display:flex;flex-direction:column}.auth-screen-tool{font-weight:500}.auth-screen-actions{display:flex;gap:12px}.auth-screen-actions .button{flex:1;min-height:36px;font-weight:500}.auth-screen-status{display:grid;gap:16px;justify-items:center;text-align:center}.auth-screen-mark-error{width:64px;height:64px;margin-bottom:0;background:var(--tb-fee2e2,#fee2e2);color:var(--tf-dc2626,#dc2626)}.auth-screen-mark-error .icon{width:32px;height:32px}.auth-screen-error-title{margin:0;font-size:18px;font-weight:600;color:var(--tf-b91c1c,#b91c1c);line-height:28px}.auth-screen-error{margin:0;color:var(--tf-dc2626,#dc2626)}.auth-screen-stack{display:grid;gap:8px;width:100%}@media(max-width:767px){.auth-screen-card{padding:20px}.auth-screen-head h1{font-size:24px;line-height:32px}}
.expense-list-filters .search{margin-bottom:0}.expense-list-table td small{display:block}.expense-list-project a,.expense-list-project span{display:block;white-space:nowrap}.expense-list-amount{text-align:right;white-space:nowrap}.list-pager{margin-top:12px;flex-wrap:wrap;gap:8px}.list-pager-info{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.list-pager-info>p{margin:0}.list-page-size label{display:inline-flex;align-items:center;gap:8px;margin:0;font-size:14px;line-height:20px;font-weight:400;color:var(--muted)}.list-page-size :is(select,.combobox){width:88px}.card>.list-pager{margin:0;padding:12px 16px;border-top:1px solid var(--border)}.expense-list-group-card>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;cursor:pointer}.expense-list-group-card>summary span{display:flex;gap:8px;align-items:baseline}.expense-list-status.urgent_fix{background:var(--tb-fee2e2,#fee2e2);color:var(--tf-991b1b,#991b1b)}@media(max-width:767px){.expense-list-filters>*{width:100%}.expense-list-group-card>summary{padding:12px}}
.card.card-popover-host{overflow:visible;position:relative}
.badge.admin-panel-finance_workflow-tone-yellow{background:var(--tb-fef9c3,#fef9c3);color:var(--tf-854d0e,#854d0e)}.badge.admin-panel-finance_workflow-tone-blue{background:var(--tb-dbeafe,#dbeafe);color:var(--tf-1e40af,#1e40af)}.badge.admin-panel-finance_workflow-tone-purple{background:var(--tb-f3e8ff,#f3e8ff);color:var(--tf-6b21a8,#6b21a8)}.badge.admin-panel-finance_workflow-tone-red{background:var(--tb-fee2e2,#fee2e2);color:var(--tf-991b1b,#991b1b)}.badge.admin-panel-finance_workflow-tone-indigo{background:var(--tb-e0e7ff,#e0e7ff);color:var(--tf-3730a3,#3730a3)}.badge.admin-panel-finance_workflow-tone-green{background:var(--tb-dcfce7,#dcfce7);color:var(--tf-166534,#166534)}.badge.admin-panel-finance_workflow-tone-orange{background:var(--tb-ffedd5,#ffedd5);color:var(--tf-9a3412,#9a3412)}.badge.admin-panel-finance_workflow-tone-pink{background:var(--tb-fce7f3,#fce7f3);color:var(--tf-9d174d,#9d174d)}.badge.admin-panel-finance_workflow-tone-sky{background:var(--tb-e0f2fe,#e0f2fe);color:var(--tf-075985,#075985)}.badge.admin-panel-finance_workflow-tone-gray{background:var(--tb-f3f4f6,#f3f4f6);color:var(--tf-374151,#374151)}

.kanban-column{flex-shrink:0;transition:outline-color .12s,background .12s;min-width:280px;width:280px;border:0;border-radius:var(--radius-lg)}
.kanban-column-head{display:flex;justify-content:space-between;gap:8px}
.kanban-more{display:flex}.kanban-more[data-skeleton]{display:none}.kanban-more-note{margin:0 8px 8px;font-size:12px;line-height:16px}
.sk-deal-card{display:grid;align-content:start;gap:6px;cursor:default}.sk-deal-card>.sk-line{width:70%}.sk-deal-card>.sk-line.is-short{width:40%}.sk-deal-card>.sk-deal-foot{width:45%;margin-top:auto}.sk-deal-cards>.deal-card:first-child{margin-top:0}
.kanban-column-title{min-width:0;flex:1}
.kanban-column-title h3{display:flex;align-items:center;gap:8px;margin:0;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kanban-column-title p{margin:0;font-size:14px;line-height:20px;color:var(--muted)}
.deal-card:first-of-type{margin-top:8px}
.deal-card:hover{border-color:var(--tl-171717a30,rgb(23 23 23 / .3))}
.deal-identity-line .record-link,.deal-identity-primary{font-size:14px;line-height:20px}
/* DEAL-02 ก / audit OPS-18 (2026-11-18): on a phone a board has no 65vh floor, a column is as tall as its own cards, and the next column peeks in at the right */
@media(max-width:639px){.kanban:not(.tk-kanban){min-height:0;align-items:flex-start}.kanban:not(.tk-kanban)>.kanban-column{width:calc(100vw - 72px);min-width:0;max-width:320px}}
@media(min-width:640px){.kanban{gap:16px}.kanban-column{width:288px}}
/* DEAL-02: on a phone the board has no 65vh floor and a short column is its own height (no grey gap); the next column peeks with its count */@media(max-width:639px){.kanban:not(.tk-kanban){min-height:0;align-items:flex-start}}
@media(min-width:1024px){.kanban-column{width:320px}}
.expense-list-filters .button.primary:hover{background:var(--tb-15803d,rgb(21 128 61));border-color:var(--tl-15803d,rgb(21 128 61));filter:none}
.cash-day-amount::before{content:"";display:inline-block;width:6px;height:6px;border-radius:9999px;margin-right:4px;vertical-align:middle;background:currentColor}










.page-max-3xl{max-width:768px;margin-inline:auto}
.page-max-5xl{max-width:1024px;margin-inline:auto}
.page-max-7xl{max-width:1280px;margin-inline:auto}

.admin-updatelog-section h2{margin:0;font-size:16px;line-height:24px;font-weight:600}
.admin-updatelog-section>.stack>.muted{font-size:14px;font-style:italic;line-height:20px}
.legacy-tax-split-table td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.legacy-tax-split-table td>.muted:is(div){overflow:hidden;text-overflow:ellipsis}

.form-stack label .req{color:var(--tf-ef4444,#ef4444);margin-left:4px}


.dashboard-limited p:first-child{color:var(--tf-1e40af,#1e40af)}
.dashboard-limited .muted{color:var(--tf-2563eb,#2563eb)}
.project-table .record-link.muted{font-size:14px;line-height:20px}
/* sweep-p11:begin */
/* /Projects, /ProjectOverview, /Products, /Inventory (design sweep P11) */
.pj-c-code{width:120px}.pj-c-customer{width:144px}.pj-c-status{width:104px}.pj-c-pm{width:104px}.pj-c-type{width:152px}.pj-c-days{width:64px}.pj-c-date{width:120px}.pj-c-act{width:112px}
.projects-table td.is-main a{font-weight:600}.projects-table td.pov-act{overflow:visible}
.inv-c-lot{width:140px}.inv-c-custody{width:240px}.inv-c-net{width:220px}.inv-c-ref{width:140px}.inv-c-state{width:176px}.inv-c-date{width:104px}.inv-c-qty{width:112px}.inv-c-cash{width:152px}.inv-c-doc{width:160px}.inv-c-act{width:104px}
.material-lots tr.is-selected td{background:var(--soft)}.material-lots td a{font-weight:600}
.products-alias-risk ul{display:flex;flex-wrap:wrap;gap:4px 12px;margin:0;padding:0;list-style:none}
@media(min-width:701px){main#content .pov-ch{grid-template-columns:minmax(56px,1fr) repeat(3,116px) 124px}}
.projects-table .pj-m{display:none}.projects-table .pj-away{font-size:12px;line-height:16px}
/* Owner 2026-11-16: a phone keeps the table, three columns (ProjectID · ชื่องาน + ลูกค้า · วันถัดไป), the header row stays. */
@media(max-width:700px){main#content .projects-table thead{display:block}main#content .projects-table :is(thead,tbody) tr{grid-template-columns:88px minmax(0,1fr) 84px;align-items:start;gap:0 8px}main#content .projects-table th{display:block;padding:0 0 4px;height:auto}main#content .projects-table .pj-x{display:none}main#content .projects-table .pj-d{display:none}main#content .projects-table .pj-m{display:block}main#content .projects-table td[data-l]::before{display:none}main#content .projects-table td.is-main{grid-column:auto}main#content .projects-table td.mono{font-size:12px;line-height:20px}main#content .projects-table th{border:0}main#content .projects-table thead tr{border-bottom:1px solid var(--border)}main form.projects-bar>:is(select[name=type],select[name=model],.combobox:has(select[name=type]),.combobox:has(select[name=model])){display:none}main#content form.projects-bar>.search{order:-1}main#content form.projects-bar>:not(.search):not(.fw-count):not(.year-pick){flex:0 0 auto;width:auto;max-width:none}main#content form.projects-bar>:is(select[name=sort],.combobox:has(select[name=sort])){flex:1 1 0;min-width:0;width:auto}main#content form.projects-bar>.fw-count{flex:1 1 100%;margin:0}}
/* sweep-p11:end */
/* phone-tables:begin. Owner 2026-11-16 (/Projects on a phone, "ไม่ควรเปลี่ยนให้กลายเป็นการ์ด ควรจะเป็นตาราง ... เห็นแค่สิ่งสำคัญ"): these tables
   stay tables at 700px and below, as /Projects (.projects-table): the head row stays, two to four grid columns hold the key facts, the
   other cells (.ph-x) leave, a cell for the phone only (.ph-m) shows, a desktop-only part (.ph-d) leaves, and no cell carries a label.
   Each table is named here; the shared .pov-stack rule is not touched. Desktop is unchanged (.ph-m is hidden there). */
main#content :is(.board-table,.dash-pipe,.contact-table,.prp-table,.tax-report-table,.cr-table,.sr-stages,.sales-report-months,.journey-table,.ffo-table,.ffo-issues) .ph-m{display:none}
main#content .board-table :is(th,td).board-select-cell{text-overflow:clip;overflow:visible}
.board-table .deal-identity-secondary{display:block;font-size:12px;line-height:16px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.journey-form.journey-outside{margin-top:16px}
@media(max-width:700px){
 main#content :is(.board-table,.dash-pipe,.contact-table,.prp-table,.tax-report-table,.cr-table,.sr-stages,.sales-report-months,.journey-table,.ffo-table,.ffo-issues) thead{display:block}
 main#content :is(.board-table,.dash-pipe,.contact-table,.prp-table,.tax-report-table,.cr-table,.sr-stages,.sales-report-months,.journey-table,.ffo-table,.ffo-issues) :is(thead,tbody) tr{align-items:start;gap:0 8px}
 main#content :is(.board-table,.dash-pipe,.contact-table,.prp-table,.tax-report-table,.cr-table,.sr-stages,.sales-report-months,.journey-table,.ffo-table,.ffo-issues) th{display:block;height:auto;padding:0 0 4px;border:0;white-space:normal}
 main#content :is(.board-table,.dash-pipe,.contact-table,.prp-table,.tax-report-table,.cr-table,.sr-stages,.sales-report-months,.journey-table,.ffo-table,.ffo-issues) :is(td,th){grid-column:auto}
 main#content :is(.board-table,.dash-pipe,.contact-table,.prp-table,.tax-report-table,.cr-table,.sr-stages,.sales-report-months,.journey-table,.ffo-table,.ffo-issues) :is(td,th).ph-x,main#content :is(.board-table,.dash-pipe,.contact-table,.prp-table,.tax-report-table,.cr-table,.sr-stages,.sales-report-months,.journey-table,.ffo-table,.ffo-issues) .ph-d{display:none}
 main#content :is(.board-table,.dash-pipe,.contact-table,.prp-table,.tax-report-table,.cr-table,.sr-stages,.sales-report-months,.journey-table,.ffo-table,.ffo-issues) .ph-m{display:block}main#content :is(.board-table,.dash-pipe,.contact-table,.prp-table,.tax-report-table,.cr-table,.sr-stages,.sales-report-months,.journey-table,.ffo-table,.ffo-issues) tr.ph-m,main#content :is(.board-table,.dash-pipe,.contact-table,.prp-table,.tax-report-table,.cr-table,.sr-stages,.sales-report-months,.journey-table,.ffo-table,.ffo-issues) thead.ph-m tr{display:grid}main#content :is(.board-table,.dash-pipe,.contact-table,.prp-table,.tax-report-table,.cr-table,.sr-stages,.sales-report-months,.journey-table,.ffo-table,.ffo-issues) thead.ph-m{display:block}
 main#content :is(.board-table,.dash-pipe,.contact-table,.prp-table,.tax-report-table,.cr-table,.sr-stages,.sales-report-months,.journey-table,.ffo-table,.ffo-issues) td[data-l]::before{display:none}
 main#content :is(.board-table,.dash-pipe,.contact-table,.prp-table,.tax-report-table,.cr-table,.sr-stages,.sales-report-months,.journey-table,.ffo-table,.ffo-issues) :is(td,th).num{text-align:right}
 main#content :is(.board-table,.dash-pipe,.contact-table,.prp-table,.tax-report-table,.cr-table,.sr-stages,.sales-report-months,.journey-table,.ffo-table,.ffo-issues) td[colspan]{grid-column:1/-1}
 main#content .board-table :is(thead,tbody) tr{grid-template-columns:minmax(0,1fr) 128px 52px}
 main#content .board-table .board-stage-select select{width:100%}main#content .board-table :is(th,td){width:auto;min-width:0}main#content .board-table .board-table-age{white-space:nowrap}
 main#content .dash-pipe :is(thead,tbody) tr{grid-template-columns:minmax(0,1fr) 40px 104px}main#content .dash-pipe tr.pov-day{background:var(--soft)}main#content .dash-pipe tr.pov-day td{background:none}
 main#content .contact-table :is(thead,tbody) tr{grid-template-columns:minmax(0,1fr) 88px 108px}
 main#content .contact-table.has-pick :is(thead,tbody) tr{grid-template-columns:20px minmax(0,1fr) 80px 104px}
 main#content .contact-table td.fw-pick-cell{padding:2px 0 0}main#content .contact-table td.contact-roles-cell{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 /* Crawl 2026-11-21: on a phone the 44px touch box sat in the 20px pick column and the cell cut the box off at the left edge; the box is the column's width, its touch area grows around it (::after) */ main#content .contact-table td.fw-pick-cell{overflow:visible}main#content .contact-table td.fw-pick-cell .board-select-hit{position:relative;width:20px;min-width:20px;min-height:20px;align-items:flex-start;justify-content:flex-start}main#content .contact-table td.fw-pick-cell .board-select-hit::after{content:"";position:absolute;inset:-12px}
 main#content .prp-table{min-width:0}main#content .prp-table :is(thead,tbody) tr{grid-template-columns:minmax(0,1fr) 72px 104px}
 main#content .prp-table tr>:is(:nth-child(3),:nth-child(4),:nth-child(5),:nth-child(7)){display:none}
 main#content .prp-table tr>:first-child{position:static}
 main#content .tax-report-table :is(thead,tbody) tr{grid-template-columns:minmax(0,1fr) 76px 104px}
 main#content .tax-report-table th{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 main#content .tax-report-table tr.tx-none{display:none}main#content .tax-report-table tr.tx-none-line td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:16px}
 /* FIN-22 (audit 2026-11-20): the period (ช่วง) takes the row's first line in full, its three figures share the second line: every row two lines, nothing cut */
 main#content .cr-table :is(thead,tbody) tr{grid-template-columns:repeat(3,minmax(0,1fr));gap:0 6px}main#content .cr-table :is(td,th):first-child{grid-column:1/-1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 main#content .cr-table td.num{font-size:12px;line-height:20px}main#content .cr-table th.num{font-size:12px}
 main#content .cr-table .cr-mark{display:inline;margin-left:4px}
 main#content .sr-stages :is(thead,tbody) tr{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 96px}main#content .sr-stages tbody tr{align-items:baseline}main#content .sales-report-bars.sr-stages td{padding:0}
 main#content .sr-stages td:first-child{display:contents}main#content .sr-stages td:first-child>*{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 main#content .sales-report-months thead{display:block}main#content .sales-report-months :is(thead,tbody) tr{grid-template-columns:minmax(0,1fr) 104px 104px}
 main#content .journey-table :is(thead,tbody) tr{grid-template-columns:minmax(0,1fr) auto}
 main#content .ffo-table{min-width:0}main#content .ffo-table :is(thead,tbody) tr{grid-template-columns:minmax(0,1fr) 64px 48px 32px}main#content .ffo-table tr>:first-child{position:static}main#content .ffo-table td .pov-st span{overflow:hidden;text-overflow:ellipsis}main#content .ffo-table tr.ffo-group.is-open{background:var(--soft)}main#content .ffo-issues :is(thead,tbody) tr{grid-template-columns:96px minmax(0,1fr)}main#content .ffo-issues td.ffo-review{grid-column:1/-1}main#content .ffo-issues .ffo-acts{display:flex;flex-wrap:wrap;margin:6px 0 0}main#content .ffo-issues .ffo-act{display:flex;margin:0}main#content .ffo-issues .ffo-task{flex:1 1 100%}main#content .ffo-issues .ffo-task>:is(.combobox,select,.datepicker,input[type=date]){flex:1 1 0;min-width:0;width:auto}main#content .ffo-issues tr>:first-child{position:static}
 main#content .journey-table tr:not(.journey-phase-note):not(.journey-add-row)>:is(:nth-child(2),:nth-child(4),:nth-child(5)){display:none}
 main#content .journey-table tr.pov-day td{height:auto}main#content .journey-table td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}main#content .journey-table tr.journey-phase-note td{white-space:normal}main#content .journey-table td:nth-child(3){overflow:visible;text-overflow:clip}main#content .journey-table tr.pov-day{background:var(--soft)}main#content .journey-table tr.pov-day td{background:none}
}
/* Audit OPS-24 (2026-11-18): the asset register and its holder history stay tables on a phone, ชื่อ · ผู้ถือ · อยู่ที่ and ตั้งแต่ · ผู้ถือ · อยู่ที่ */
@media(max-width:700px){
 main#content :is(.asset-list,.asset-history) thead{display:block}
 main#content :is(.asset-list,.asset-history) :is(thead,tbody) tr{display:grid;grid-template-columns:minmax(0,1fr) 96px 96px;gap:0 8px;align-items:start}
 main#content .asset-history :is(thead,tbody) tr{grid-template-columns:88px minmax(0,1fr) 96px}
 main#content :is(.asset-list,.asset-history) th{display:block;height:auto;padding:0 0 4px;border:0}
 main#content :is(.asset-list,.asset-history) :is(td,th){grid-column:auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 main#content :is(.asset-list,.asset-history) td[data-l]::before{display:none}
 main#content .asset-list tr>:is(:nth-child(2),:nth-child(3),:nth-child(4),:nth-child(7)),main#content .asset-history tr>:is(:nth-child(4),:nth-child(5),:nth-child(6)){display:none}
 /* the history keeps ตั้งแต่ with its · ตอนนี้ whole: the date column takes the room it needs, the other two share the rest */ main#content .asset-history :is(thead,tbody) tr{grid-template-columns:minmax(124px,auto) minmax(0,1fr) minmax(0,1fr)}
 main#content .asset-detail .fact.is-big dd{font-size:16px;line-height:24px}
 main#content form.asset-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}main#content form.asset-filters>:first-child{grid-column:1/-1}main#content form.asset-filters select{width:100%;min-width:0}
}
/* Audit OPS-40/36/43/46 (2026-11-18): the accounting worklists and reports stay tables on a phone (owner 2026-11-16), the key columns only */
@media(max-width:700px){
 main#content :is(.legacy-tax-split-table,.accounting-audit-table,.credit-term-table,.cost-center-table,.cost-center-picker,.rc-queue) thead{display:block}
 main#content :is(.legacy-tax-split-table,.accounting-audit-table,.credit-term-table,.cost-center-table,.cost-center-picker,.rc-queue) :is(thead,tbody) tr{display:grid;gap:0 8px;align-items:start}
 main#content :is(.legacy-tax-split-table,.accounting-audit-table,.credit-term-table,.cost-center-table,.cost-center-picker,.rc-queue) th{display:block;height:auto;padding:0 0 4px;border:0}
 main#content :is(.legacy-tax-split-table,.accounting-audit-table,.credit-term-table,.cost-center-table,.cost-center-picker,.rc-queue) :is(td,th){grid-column:auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}
 main#content :is(.legacy-tax-split-table,.accounting-audit-table,.credit-term-table,.cost-center-table,.cost-center-picker,.rc-queue) :is(td,th).num{text-align:right}
 main#content :is(.legacy-tax-split-table,.accounting-audit-table,.credit-term-table,.cost-center-table,.cost-center-picker,.rc-queue) :is(td,th).ph-x{display:none}
 main#content :is(.legacy-tax-split-table,.accounting-audit-table,.credit-term-table,.cost-center-table,.cost-center-picker,.rc-queue) td[data-l]::before{display:none}
 main#content :is(.legacy-tax-split-table,.accounting-audit-table,.credit-term-table,.cost-center-table,.cost-center-picker,.rc-queue) td[colspan]{grid-column:1/-1}
 main#content .legacy-tax-split-table :is(thead,tbody) tr{grid-template-columns:minmax(0,1fr) 104px 96px}
 main#content .legacy-tax-split-table tr>:is(:nth-child(1),:nth-child(3)){display:none}
 main#content .accounting-audit-table :is(thead,tbody) tr{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 96px}
 main#content .credit-term-table :is(thead,tbody) tr{grid-template-columns:minmax(0,1fr) 96px 96px}
 main#content :is(.cost-center-table,.cost-center-picker) :is(thead,tbody) tr{grid-template-columns:minmax(0,1fr) 112px 112px}
 main#content .rc-queue :is(thead,tbody) tr{grid-template-columns:minmax(0,1fr) 104px 80px}main#content .rc-queue td.pov-act{overflow:visible}
}
/* phone-tables:end */
.project-form{max-width:768px;margin:0 auto}
.project-form>.card.padded{padding:20px}
.project-form .form-stack{gap:20px}
.project-form .grid-2{gap:12px}


.profile-page{max-width:768px;margin:0 auto}
.profile-page .stack{gap:16px}
.profile-page h2{font-size:16px;margin:0 0 6px;line-height:24px}
.profile-page h2 .icon{width:16px;height:16px}
.profile-page h2+.muted{font-size:14px;margin:0 0 16px;line-height:20px}
.avatar{border:1px solid var(--border);border-radius:50%;display:grid;place-items:center;width:96px;height:96px;border-width:2px;font-size:24px;background:var(--tb-171717a10,rgb(23 23 23 / .1));color:var(--primary);line-height:32px}
.profile-signature,.profile-security{border-radius:var(--radius-lg)}
.partner-portal-unlinked-page{max-width:576px}
/* Partner portal OCD 2026-09-29: one 1024px column on every portal tab, section header rows align their title with the action button. */
.partner-portal-upcoming>.row-between{margin-bottom:12px}.partner-portal-upcoming>.row-between h2{margin:0}.partner-portal-payouts>h2{margin:0 0 12px;min-height:36px;display:flex;align-items:center}.partner-portal-stats{grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:767px){.partner-portal-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
.ops-ta-page{max-width:1280px;margin:0 auto}
.import-governance-page{max-width:1024px;margin:0 auto}
.reconcile-page{max-width:1152px;margin:0 auto}
.partner-portal-summary .metric strong{font-size:24px;line-height:32px}
.partner-portal-summary .metric:nth-child(1) strong{color:var(--tf-2563eb,#2563eb)}
.partner-portal-summary .metric:nth-child(2) strong{color:var(--tf-16a34a,#16a34a)}
.auth-screen{max-width:448px;margin:0 auto;min-height:100vh;display:flex;flex-direction:column;justify-content:center}
.external-expense-mark .icon{width:24px;height:24px}
.public-main.public-externalupload .public-card{max-width:512px}
.public-main.public-projecthub .public-card{max-width:672px}
.public-main.public-feedforwardreport .public-card{max-width:768px}
.public-main.public-submitexpense .public-card{max-width:896px}
.board-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:12px}
.board-toolbar>.tabs{margin:0}
.board-archive-title{margin:0;font-size:14px;line-height:20px;font-weight:600}
.board-toolbar>.filters{flex:1 1 320px;min-width:0;margin:0}
/* sweep-p2:begin */
.board-toolbar .board-toggle[aria-pressed=true]{background:var(--soft);border-color:var(--fg)}
.board-pov{margin-top:0}.board-pov td.board-kebab-cell{overflow:visible;text-align:right}.board-pov .board-col-select{width:36px}.board-pov .board-col-actions{width:104px}.board-pov .board-col-hidden{width:260px}
.board-pov .board-stage-select select{height:28px}.board-pov .board-stage-select{margin:0}
.board-pov.is-archived td{white-space:normal;height:auto;padding:4px 8px}.board-pov.is-archived td:last-child{overflow:visible}
/* sweep-p2:end */
.board-toolbar>.actions{margin:0}
.board-toolbar .search{width:auto;min-width:180px;max-width:320px;margin:0}
.field-required{color:var(--tf-ef4444,#ef4444);font-weight:700}







.sales-report-board-head .muted{font-size:12px;line-height:16px}
.calendar-month .calendar-weekday{border-bottom:1px solid var(--border)}
@media(hover:hover) and (pointer:fine){
.board-toolbar .field.compact{gap:2px}.board-toolbar .board-filter-label{font-size:12px;line-height:16px}}
/* Record folder tabs (owner 2026-10-17 answer 17ก, recordTabs()): the parts of a Project, Deal, Contact or E-Learning course. The bar's line is the panel's top edge at every width; a phone shows one row that scrolls sideways, the open tab scrolled into view (app.js). A list's status or view switch is the grey .tabs strip (tabBar()). */
.project-detail-tabs-scroll{overflow-x:auto;margin:0;scrollbar-width:none}.project-detail-tabs-scroll::-webkit-scrollbar{display:none}
.project-detail-tabs{display:flex;flex-wrap:nowrap;gap:0;padding:0;margin:0;background:transparent;border-radius:0;border-bottom:1px solid var(--border);width:max-content;min-width:100%;max-width:none;overflow:visible}
.project-detail-tabs a{margin-bottom:-1px;padding:8px 16px;border:1px solid transparent;border-bottom:0;border-radius:var(--radius-md) var(--radius-md) 0 0;background:var(--tb-f5f5f5a40,rgb(245 245 245 / .4));font-size:14px;line-height:20px;white-space:nowrap}
.project-detail-tabs a.active{border-color:var(--border);background:var(--bg);box-shadow:none;color:var(--fg);padding-bottom:9px}
.project-detail-panel{border:1px solid var(--border);border-top:0;border-radius:0 0 var(--radius-lg) var(--radius-lg);background:var(--bg);padding:16px;overflow:visible}
main#content:not(.public-main)>:is(.project-detail-tabs-scroll,.deal-tabs-head)+.project-detail-panel,.project-detail-tabs-scroll+.project-detail-panel{margin-top:0;border-top-width:0;border-top-left-radius:0;border-top-right-radius:0}
.project-detail-unknown-tab{border-color:var(--tl-fde68a,#fde68a);background:var(--tb-fffbeb,#fffbeb);color:var(--tf-92400e,#92400e);font-size:12px;line-height:16px;padding:6px 12px;border-radius:var(--radius-md);margin-bottom:8px}
@media(max-width:767px){.project-detail-tabs a{padding:8px 12px;font-size:12px;line-height:16px}.project-detail-panel{padding:12px}}
/* A tab switched off (owner 2026-11-08 6ข: รายรับ on a Project ticked ไม่มีรายได้): greyed, its why in the tooltip; a span is no link. */
.tabs .is-off{color:var(--muted);opacity:.6}
/* ux-misc 4: a phone press needs room; at 700px or less a tab of the grey strip (views, ranges, status strips) is 36px high, the bar 44px
   (its skeleton too). The desktop strip keeps its 36px bar; the folder tabs of a record are 36px already. */
@media(max-width:700px){.tabs:not(.project-detail-tabs) :is(a,button,.is-off){min-height:36px}.tabs:not(.project-detail-tabs) .is-off{display:inline-flex;align-items:center}.sk-tpl-tabs{height:44px}}
/* ux-misc 5: the calendar legend wraps on a phone (every layer readable, no sideways scroll); the word วันงาน leads its layers with no ":". */
@media(max-width:767px){.calendar-legend{flex-wrap:wrap;justify-content:flex-start;overflow:visible;white-space:normal;gap:4px 10px}}.tabs span.is-off{cursor:not-allowed;padding:8px 16px;font-size:14px;line-height:20px;white-space:nowrap;flex-shrink:0}
@media(max-width:767px){.tabs span.is-off{padding:8px 12px;font-size:12px;line-height:16px}}
/* The why beside a switched-off revenue input (6ข, App\Query\ProjectNoRevenue::lockedNote): one muted line. */
.button.is-off[aria-disabled=true]{opacity:.5;cursor:not-allowed}
.no-revenue-note{margin:4px 0 0;font-size:12px;line-height:16px;color:var(--muted)}
:is(.ig-wrap,.cr)>.no-revenue-note{margin:0 0 8px}
/* 6ข: a new income line on a Project ticked ไม่มีรายได้: its บันทึก greyed (the why sits under the Project picker). */
.iwf[data-no-revenue] .button.primary{opacity:.5;pointer-events:none}
:is(input,select,textarea)[data-revenue-off]{background:var(--soft);color:var(--muted);cursor:not-allowed}
.public-main.public-quotationpublic:has(.public-quotation-denied){max-width:none;padding:0}
.public-quotation-denied{display:flex;align-items:center;justify-content:center;min-height:calc(100vh - 24px);padding:16px;text-align:center}
.tax-report-gaps{padding:12px 16px;border:1px solid var(--tl-fde68a,#fde68a);background:var(--tb-fffbeba60,#fffbeb99);border-radius:var(--radius-xl);font-size:12px;line-height:16px;color:var(--tf-78350f,#78350f)}
.tax-report-gaps p{margin:0 0 4px;font-weight:500}
.tax-report-gaps ul{margin:0;padding-left:16px;list-style:disc}
.tax-report-gaps li+li{margin-top:2px}

.tax-report-month-link{display:inline-flex;align-items:center;gap:8px}
.tax-report-month-link .icon{width:16px;height:16px;transform:rotate(180deg);transition:transform .15s ease}
.tax-report-selected .tax-report-month-link .icon{transform:rotate(-90deg)}
.tax-report-wht{font-weight:500}.tax-report-pnd a{display:inline-flex;align-items:center;gap:4px;margin-left:12px;font-size:12px}.tax-report-pnd .icon{width:14px;height:14px}
.tax-report-wht-total{font-weight:700}
.tax-report-total td{font-weight:700}
@media(min-width:640px){.tax-report-title{padding-left:24px;padding-right:24px}}
/* ===== REQ-005 parity: Contacts, ContactForm, Products, ElearningWorkspace ===== */

/* Contacts — row actions are ghost icon buttons in an 80px column.
   ContactsListTab.jsx: <TableHead className="w-[80px]">; Button variant="ghost" size="icon"
   (button.jsx: icon = h-9 w-9 = 36px, ghost = no border/bg + hover:bg-accent (#f5f5f5),
   [&_svg]:size-4 = 16px); Trash2 carries text-destructive = hsl(0 84.2% 60.2%). */
@media(pointer:coarse){.contact-table .fw-pick-cell .board-select-hit{min-width:44px;min-height:44px}}
.button.ghost{border-color:transparent;background:transparent;box-shadow:none}
.button.ghost:hover{background:var(--soft);filter:none}


/* phone / email cells: `flex items-center gap-1 text-sm` with `w-3 h-3` glyphs */

/* ContactForm — section 1 pickers (ContactForm.jsx L567-613).
   Heading: `text-sm font-semibold mb-3 block`. */
.form-stack label.picker-label{display:block;margin:0 0 12px;font-size:14px;font-weight:600;line-height:20px}
.picker-label .picker-hint{margin-left:8px;font-size:12px;font-weight:400;color:var(--muted);line-height:16px}

/* Role picker — `grid grid-cols-2 sm:grid-cols-3 gap-3` of
   `flex items-center gap-3 p-3 rounded-lg border` tiles; checked tile takes the role's
   lightBg/border/text (contactTypes.js) and shadow-sm, the w-5 h-5 rounded box fills with the
   role's solid colour and shows a 14px CheckCircle2; the role glyph is w-4 h-4. */
.role-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media(max-width:639px){.role-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Screen check 2026-10-29: at 390 with text 130% (about 300 px of layout) วิทยากร / TA/MC / Partner ran 16 px past a half-width tile: one per row there, and a long label wraps inside its tile. */
@media(max-width:359px){.role-grid{grid-template-columns:1fr}}
.role-body>span{min-width:0;overflow-wrap:anywhere}
.form-stack label.role-tile{position:relative;display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--tb-ffffff,#fff);font-size:14px;font-weight:500;cursor:pointer;line-height:20px}
.role-tile:hover{background:var(--tb-f5f5f5a50,rgb(245 245 245 / .5))}
.role-tile>input{position:absolute;width:1px;height:1px;min-height:0;padding:0;border:0;opacity:0;box-shadow:none}
.role-check{width:20px;height:20px;border-radius:var(--radius-sm);border:1px solid var(--tl-737373a30,rgb(115 115 115 / .3));background:var(--tb-ffffff,#fff);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.role-check .icon{width:14px;height:14px;opacity:0}
.role-body{display:flex;align-items:center;gap:8px;min-width:0}
.role-body .icon{width:16px;height:16px;color:var(--muted)}
.role-tile:has(>input:checked){background:var(--soft);border-color:var(--primary);box-shadow:var(--shadow-sm)}
.role-tile:has(>input:checked) .role-check{background:var(--primary);border-color:transparent;color:var(--on-primary,#fff)}
.role-tile:has(>input:checked) .role-check .icon{opacity:1}
.role-tile:has(>input:checked) .role-body .icon{color:inherit}
.role-tile:focus-within{outline:2px solid var(--tl-2563eb,#2563eb);outline-offset:2px}
.form-actions>.contact-delete{margin-right:auto}.form-actions:has(>.contact-delete)>.button{white-space:nowrap}
@media (max-width:639px){.form-actions:has(>.contact-delete){flex-wrap:wrap}.form-actions>.contact-delete{flex-basis:100%;margin-right:0}}
.contact-vehicles{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;align-content:start;min-width:0}.contact-vehicle-row{display:flex;align-items:center;gap:8px;min-width:0}.contact-vehicle-row select,.contact-vehicle-row>.combobox{width:140px;flex:0 0 140px;min-width:0}.contact-vehicle-row>input{flex:1 1 0;width:auto;min-width:100px}.contact-vehicle-row>.icon-button{flex:none}.contact-vehicles>.button{justify-self:start}

/* ContactForm section headings: `flex items-center gap-2 mb-1` with an `h2 text-sm font-semibold`. */
.form-section-head{display:flex;align-items:center;gap:8px;margin-bottom:4px}
.form-section-head h2{margin:0;font-size:14px;font-weight:600;line-height:20px}
.form-section-head .badge.outline{background:var(--tb-ffffff,#fff);border-color:var(--border);color:var(--fg);font-size:10px;line-height:14px;padding:2px 8px}
/* ContactForm field labels: `Label text-xs text-muted-foreground` + Input `mt-1`; grids grid-cols-3 (name col-span-2), grid-cols-4 address row. */
.contact-form label:not(.picker-label):not(.role-tile):not(.check-row){font-weight:400;color:var(--muted);gap:4px}
.contact-form label input,.contact-form label select,.contact-form label textarea{color:var(--fg)}
.contact-form .mono-input{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.contact-form .contact-hint{font-size:10px;line-height:14px;margin-top:-2px}
main[data-route="/ContactForm"] .card.padded{padding:24px}
/* ContactForm layout (owner 2026-10-23: "สักแต่ว่าวาง Form กองๆ"): one page, one grid. The page is one panel; a section is a 12-column grid
   told apart from the next by a heading and a thin line, never by a box. A field is .cf-6 (half) or .cf-12 (full), labels above, one
   column at 767 and below. .cf-group only groups (no box). Same 16px between fields, 24px between sections. */
:is(.contact-form .contact-sec,.contact-sec-extra){display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px;align-content:start;align-items:start;min-width:0;margin:0;padding:0;border:0}
:is(.contact-form .contact-sec,.contact-sec-extra)>*{grid-column:1/-1;min-width:0;margin:0}
:is(.contact-form .contact-sec,.contact-sec-extra) .cf-6{grid-column:span 6}
:is(.contact-form .contact-sec,.contact-sec-extra) .cf-12{grid-column:1/-1}
.contact-form .cf-group,.contact-form fieldset.plain-fieldset{display:contents}
.contact-form fieldset.plain-fieldset{border:0;padding:0;margin:0;min-width:0}
.contact-form .contact-sec~.contact-sec,.contact-detail-panel>.contact-sec-extra{margin-top:24px;padding-top:24px;border-top:1px solid var(--border)}
.contact-detail-panel>.contact-deals{padding-bottom:24px;border-bottom:1px solid var(--border);margin-bottom:24px}
.contact-form .form-section-head{margin:0;min-height:20px}
.contact-form:has(input[name=kind][value=person]:checked) .cf-name{grid-column:1/-1}
:is(.contact-form,.contact-sec-extra) label:not(.picker-label):not(.role-tile):not(.check-row):not(.contact-image-empty){gap:6px;line-height:16px}
.contact-form .contact-vehicles>.label-line{font-size:12px;font-weight:400;line-height:16px;color:var(--muted);margin-bottom:-2px}
.contact-form label.picker-label,.contact-form legend.picker-label{display:block;float:none;width:auto;margin:0 0 6px;padding:0;font-size:12px;font-weight:400;line-height:16px;color:var(--muted)}
.contact-form .picker-label .picker-hint{margin-left:6px;font-size:12px}
.contact-form .contact-payout-question{grid-template-columns:minmax(0,1fr);gap:8px;align-content:start}
.contact-form .contact-payout-question>.check-row{min-height:36px;padding:0 12px;border-radius:var(--radius-md);background:var(--tb-ffffff,#fff);box-shadow:var(--shadow-sm)}
.contact-form .contact-payout-question>.check-row .muted{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
/* Live check 2026-10-23: on a tablet the panel is narrow, so the two head questions (บุคคล/นิติบุคคล, รับเงินไหม) take the full row and their words never break. */
.contact-form .contact-payout-question>.check-row{white-space:nowrap;overflow:hidden}
@media(min-width:768px) and (max-width:1199px){.contact-form .contact-sec.contact-sec-head>.cf-6{grid-column:1/-1}}
.contact-form .contact-roles .role-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.contact-form label.role-tile{padding:7px 12px;min-height:36px;gap:12px}
.contact-form .contact-peak-code{display:grid;gap:6px;align-content:start}
.contact-form .contact-peak-code .row-between{min-height:32px}
.contact-form .contact-bank-panel{padding-top:16px;border-top:1px solid var(--border)}
.contact-form .contact-validation-summary{margin-top:24px;padding-top:24px;border-top:1px solid var(--border)}
.contact-form>.form-actions{margin-top:16px}
.contact-sec-extra .contact-doc-upload{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px;align-items:start;min-width:0}.contact-sec-extra .contact-doc-upload>.button{grid-column:1/-1;justify-self:start}
/* The lower sections' labels read as the form's: grey 12px above the control (the form's own rule is scoped to .contact-form). */
.contact-sec-extra label.cf{font-weight:400;color:var(--muted)}.contact-sec-extra label.cf :is(input:not(.file-pick-input),select,textarea){color:var(--fg)}
.contact-sec-extra .contact-doc-empty{margin:0}
/* A saved document: its name on the left (one line, cut with …), its two buttons on the right on one line, also on a phone. */
.contact-sec-extra .list-row{align-items:center;flex-wrap:nowrap;gap:12px}.contact-sec-extra .list-row>div:first-child{min-width:0}.contact-sec-extra .list-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.contact-sec-extra .list-row .actions{flex:none;flex-wrap:nowrap}
@media(max-width:767px){
 :is(.contact-form .contact-sec,.contact-sec-extra) .cf-6,.contact-form:has(input[name=kind][value=person]:checked) .cf-name{grid-column:1/-1}
 main#content form.contact-form>.form-actions:last-child{margin:16px -12px -12px;padding:12px}
}

/* Products — TabsTrigger `text-xs px-3 py-2 gap-1.5` with a `w-3.5 h-3.5` icon
   (Products.jsx L69-79); course row tile keeps its 36px bg-blue-50 square but the glyph is
   BookOpen `w-4 h-4` (CourseListPanel.jsx L140-141); module count is
   `Badge variant="secondary" text-[10px]` with `Layers w-3 h-3 mr-0.5` (L156). */






/* ElearningWorkspace — day panel header `p-6 border-b` with
   `h2 text-2xl font-bold tracking-tight` (ElearningWorkspace.jsx L442-444); target rows lead
   with `CheckCircle2 text-green-500 w-4 h-4` inside a `flex items-center gap-3` (L477-480);
   the Action / จำนวนเงิน columns are text-right (L464, L526, L483, L551). */
.form-stack label>.label-line{display:inline}

.inline-mobile{display:none}















@media(max-width:639px){.inline-mobile{display:inline}.inline-desktop{display:none}}

/* Legacy switches list tables at sm (640px), not 768: between 640 and 767 the legacy pages show a real table that scrolls. */
@media(max-width:639px){.project-table thead{display:none}.project-table tr{display:block;padding:12px;border-bottom:1px solid var(--border)}.project-table td{display:block;padding:2px 0;border:0}.project-table .record-link{font-size:14px;line-height:20px}}
.route-error{max-width:448px;margin:64px auto;padding:32px 24px}
.route-error h1{font-size:18px;line-height:28px;font-weight:600;margin:0 0 6px}
.route-error p{margin:0;font-size:14px;color:var(--muted);line-height:20px}
.route-error .actions{justify-content:center;margin-top:16px}
/* sweep-p7:begin */
/* Finance reports B (design sweep P7; DESIGN-SYSTEM 3.5, 5, 9.5): P&L, Cost Center, DocumentArchive, Partner Statements, CommercialAuthorization. */
.pnl-c-name{width:240px}.pnl-c-who{width:120px}.pnl-c-money{width:112px}.pnl-c-profit{width:136px}.pnl-c-ar{width:170px}@media(min-width:701px){.pnl-table{min-width:1462px}.cost-center-table{min-width:1040px}}
.pnl-table td:first-child{white-space:normal;height:auto}.pnl-table .pov-st{margin-top:2px}.pnl-table th a{display:inline}.pnl-filters,.cost-center-filters,.partner-statement-filters{margin-bottom:0}
.pov .pnl-table tr.finance-drill-row td{white-space:normal;height:auto;background:transparent}
.cc-c-code{width:120px}.cc-c-name{width:240px}.cost-center-picker td:nth-child(3){white-space:normal}
.ps-c-ref{width:180px}.ps-c-partner{width:200px}.ps-c-period{width:240px}.ps-c-n{width:88px}.ps-c-money{width:156px}.ps-c-acct{width:240px}.ps-c-date{width:132px}
#content .pov .doc-tree tbody td.doc-tree-name{padding-left:8px;white-space:nowrap}#content .pov .doc-tree tbody tr[data-level="1"] td.doc-tree-name{padding-left:28px}#content .pov .doc-tree tbody tr[data-level="2"] td.doc-tree-name{padding-left:48px}#content .pov .doc-tree tbody tr[data-level="3"] td.doc-tree-name{padding-left:68px}
.commercial-kpis{display:block}.commercial-kpis .pov-st{display:inline-flex}
.fw-bar.pnl-filters>.combobox,.fw-bar.cost-center-filters>.combobox,.fw-bar.partner-statement-filters>.combobox{flex:0 0 190px;width:190px;min-width:0}.fw-bar.pnl-filters>.search,.fw-bar.partner-statement-filters>.search{flex:0 1 280px}
@media(max-width:700px){main#content .pnl-table td.num,main#content .cost-center-table td.num,main#content .ps-lines td.num,main#content .partner-statement-table td.num{text-align:right}main#content .pnl-table td.num::before,main#content .cost-center-table td.num::before,main#content .ps-lines td.num::before,main#content .partner-statement-table td.num::before{text-align:left}}
@media(max-width:767px){.fw-bar.pnl-filters>.combobox,.fw-bar.cost-center-filters>.combobox,.fw-bar.partner-statement-filters>.combobox{flex:1 1 100%;width:auto}.fw-bar.pnl-filters>.search,.fw-bar.partner-statement-filters>.search{flex:1 1 100%}}
/* sweep-p7:end */
/* CORE-07: the list fits 1440 (Partner takes the rest, the period 180px) and the phone stack has no fixed width */
@media(min-width:701px){.partner-statement-table{min-width:920px}}.partner-statement-table col.ps-c-partner{width:auto}.partner-statement-table col.ps-c-period{width:180px}
.partner-statement-filters{align-items:flex-end}
.partner-statement-filters .search{flex:1 1 260px;margin:0}

@media(max-width:767px){.check-row input[type=checkbox],.check-row input[type=radio]{min-height:0}.form-grid>.field>label.check-row{min-height:44px}}
.alert.info{border-color:var(--tl-bfdbfe,#bfdbfe);background:var(--tb-eff6ff,#eff6ff);color:var(--tf-1e40af,#1e40af)}

.sales-report-months th:not(:first-child){text-align:right}
.external-upload-picker,.external-expense-drop{position:relative}
.external-upload-picker input[type=file],.external-expense-drop input[type=file]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;border:0;box-shadow:none;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.empty h3{margin:0 0 4px;font-size:14px;font-weight:600;color:var(--fg);line-height:20px}
.empty p{margin:0;font-size:14px;line-height:20px}
.empty>p+.button,.empty>p+form{margin-top:16px}
fieldset{border:0;padding:0;margin:0;min-width:0}
fieldset.field{display:flex;flex-direction:column;gap:6px}
legend{padding:0;font-size:12px;font-weight:600;line-height:16px}
/* REQ-005 legacy shell (measured on base.solutionsimpact.com, 1440 viewport) */
.sidebar{background:var(--tb-ffffffa50,rgba(255,255,255,.5));backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px)}
.brand{border-bottom:1px solid var(--tl-e5e5e5a50,rgba(229,229,229,.5))}
.brand strong{font-weight:600}
.sidebar nav{padding:16px 8px}
.sidebar .nav-link{color:var(--muted);height:40px;margin-bottom:6px}
.sidebar .nav-link.active{color:var(--on-primary,#fafafa)}
.sidebar .nav-link .icon,.sidebar .nav-link svg{width:20px;height:20px;flex:none}
.nav-group-toggle .nav-chevron{margin-left:auto;width:16px;height:16px}
.nav-group-toggle[aria-expanded=true]{color:var(--fg)}
.nav-chevron{transition:transform .15s}
.nav-sub{position:relative;margin:0 0 6px 16px;padding-left:12px}.nav-sub::before{content:'';position:absolute;left:0;top:0;bottom:0;width:1px;background:var(--tb-e5e5e5a50,rgba(229,229,229,.5))}
.nav-sub-link{display:flex;align-items:center;gap:10px;height:32px;padding:8px 10px;margin-bottom:2px;border-radius:6px;font-size:12px;font-weight:500;color:var(--muted);white-space:nowrap;line-height:16px}
.nav-sub-link .icon,.nav-sub-link svg{width:16px;height:16px;flex:none}
.nav-sub-link:hover{background:var(--soft)}
.sidebar footer{padding:12px}
.sidebar footer .nav-link{height:32px;padding:0 8px;font-size:12px;margin-bottom:8px;line-height:16px}
.sidebar footer .nav-collapse-mark{margin-left:auto}
.nav-user{display:flex;align-items:center;gap:12px;height:56px;padding:8px;border-radius:8px;font-size:14px;overflow:hidden;white-space:nowrap;line-height:20px}
.nav-user:hover{background:var(--soft)}
.nav-avatar{display:inline-flex;align-items:center;justify-content:center;flex:none;width:28px;height:28px;border-radius:9999px;color:var(--primary);font-style:normal;font-size:10px;line-height:15px}
.nav-user-text{display:grid;min-width:0}.nav-user-text b{font-weight:500;overflow:hidden;text-overflow:ellipsis}.nav-user-text small{font-size:10px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;line-height:15px}
.collapsed .nav-sub,.collapsed .nav-chevron,.collapsed .nav-user-text{display:none!important}
.collapsed .nav-user{justify-content:center;padding:8px 0}
.collapsed .sidebar .nav-link{padding:0}
@media(max-width:767px){.mobile-open .nav-user-text{display:grid!important}.mobile-open .nav-chevron{display:block!important}.mobile-open .nav-sub:not([style*="display: none"]):not([x-cloak]){display:block!important}}
/* SH-16 (audit 2026-11-20): the phone drawer opens only the group of the page on screen, as the computer does; a folded group stays folded (Alpine x-show). */
/* content column: legacy <main> is flex-1 (no cap); each legacy page root sets its own max-w-* with p-6.
   Route widths below are those page roots (outer width, 24px padding = main's padding), read from ../erp/src/pages and spot-checked live at 1860px. */
main{max-width:none}
main[data-route="/AdminSettings"],main[data-route="/SalesExecutiveDashboard"]{max-width:1920px}
main[data-route="/AccountingAudit"],main[data-route="/ElearningWorkspace"],main[data-route="/PersonReport"],main[data-route="/ProjectPnlReport"],main[data-route="/SystemHealth"],main[data-route="/UnifiedCalendar"],main[data-route="/OpsTAHub"]{max-width:1280px}
main[data-route="/FinanceReconciliationWorkbench"]{max-width:1152px}
main[data-route="/ElearningCourseDetail"]{max-width:1072px}
main[data-route="/AuditActivityHub"],main[data-route="/AutomationLogs"],main[data-route="/Automations"],main[data-route="/CalendarReconciliation"],main[data-route="/FinanceHub"],main[data-route="/ImportGovernanceHub"],main[data-route="/ManagementReports"],main[data-route="/PartnerDashboard"],main[data-route="/PartnerProjects"],main[data-route="/PartnerProfile"],main[data-route="/RLSSettings"],main[data-route="/Products"]{max-width:1024px}
main[data-route="/ContactForm"]{max-width:896px}
main[data-route="/UserProfile"],main[data-route="/UpdateLog"]{max-width:768px}
.page-header .button,.page-header .icon-button{min-height:32px;height:32px;padding:0 12px;font-size:12px;line-height:16px;box-shadow:none}
input,select,textarea{box-shadow:none;background:transparent}
th{background:transparent;line-height:20px;padding-top:1px;padding-bottom:1px}
td{line-height:inherit}
@media(pointer:coarse){.page-header .button,.page-header .icon-button{min-height:44px;height:auto}}
.heading{gap:4px}.heading>.icon-button{width:32px;height:32px;min-height:32px;padding:0}
/* REQ-005 list controls (legacy Projects measured: combobox 36px pad 8/12, toggle button 12/16/500, type pill 11/20/600 #64748b, kebab 28px) */
.filters select{appearance:none;-webkit-appearance:none;padding:8px 32px 8px 12px;line-height:20px;background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center}
.filters .check-row{height:36px;min-height:36px;padding:0 12px;font-size:12px;line-height:16px;box-shadow:none;cursor:pointer}
.filters .check-row input{height:auto;margin:0;box-shadow:none}
.kebab{position:relative;display:inline-block}.kebab summary{list-style:none}.kebab summary::-webkit-details-marker{display:none}


.kebab-menu{position:absolute;right:0;top:100%;z-index:20;min-width:128px;padding:4px;background:var(--tb-ffffff,#fff);border:1px solid var(--border);border-radius:8px;box-shadow:var(--shadow-lg)}
.kebab-menu a{padding:6px 8px;border-radius:4px;font-size:14px;color:var(--fg);white-space:nowrap;line-height:20px}.kebab-menu a:hover{background:var(--soft)}
.project-table td.mono{font-size:12px;line-height:16px}
/* REQ-005 Contacts/Expenses (legacy measured at 1440: Contacts column 976 wide; KPI tile 371x86 pad 16 r12; filter row 176px controls, gap 8; active group toggle rgba(23,23,23,.1)/.3) */

.expense-list-filters .search{width:auto;margin:0}
.expense-list-filters select{width:176px}
.expense-list-filters{align-items:center}
.contact-table td.contact-internal-cell,.contact-table td.is-main{font-weight:500}
.nav-group-toggle.active,.nav-group-toggle.active[aria-expanded=true]{background:var(--primary);color:var(--on-primary,#fafafa)}
.nav-sub-link.active{background:var(--tb-e5e5e5,#e5e5e5);color:var(--fg)}
/* Round two: measured against live Base44 at 1440 */
.page-header-copy{flex:1}

.dashboard-stat-icon{width:36px;height:36px}
.dashboard-card-head h2{font-weight:600}

.dashboard-card-head small{line-height:16px}
.page-header p{margin:0}
.page-header .heading>.icon-button{margin-left:-4px;background:transparent;border-color:transparent;width:32px;min-width:32px}
.page-header .heading{gap:8px}
.page-header .actions .icon-button[data-financial-toggle]{width:32px;min-width:32px;border-radius:var(--radius-full)}
.project-detail-panel .card.padded{border-radius:var(--radius-lg);box-shadow:none;padding:12px}
.project-detail-panel .card.padded>h2,.project-detail-panel .card.padded h2:first-child{font-weight:600}
.source-deal-card strong{font-weight:600}
.source-deal-card .button{line-height:16px;box-shadow:var(--shadow-sm)}
.source-deal-carry{margin:0;font-size:12px;line-height:16px}

.form-no-title>h2:first-child{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.form-no-title{gap:23px}.form-no-title label{gap:2px}.form-no-title .field-label{line-height:16px}
.form-stack input:not([type=checkbox]):not([type=radio]),.form-stack select,.form-stack textarea{box-shadow:var(--shadow-sm)}
.project-form-required{color:var(--tf-ef4444,#ef4444)}
.page-header{margin-bottom:16px}
main:has(.project-detail-tabs) .page-header{margin-bottom:24px}
.form-no-title{padding-top:23px}.form-no-title label{line-height:16px}
.form-no-title .project-form-type-card{border-radius:var(--radius-lg);min-height:58px;align-items:center}.form-no-title .project-form-type-card strong{font-size:14px;line-height:20px;font-weight:600}.form-no-title .project-form-type-card small{font-size:12px;line-height:16px}
.form-no-title .project-form-type-card span{gap:0}
main:has(.form-no-title) .page-header{margin-top:0}

.board-toolbar .board-filter-label{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media(min-width:768px){.deal-form-modal{width:min(var(--modal-w-lg),calc(100vw - 24px))}.deal-form-modal .button,.deal-form-modal input:not([type=hidden]),.deal-form-modal select{min-height:36px}.deal-form-modal input:not([type=hidden]),.deal-form-modal select,.deal-form-modal .button{height:36px}}
.deal-form-modal h1{font-size:18px;line-height:28px;font-weight:600}.deal-form-modal .modal-inner>p.muted{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0)}.deal-form-modal label{font-size:14px;line-height:20px;font-weight:500}
/* Expenses income: legacy card rows on the existing table markup */
main:has(.profile-summary) .card>h2{font-weight:600}
@media(min-width:768px){.calendar-nav{justify-content:center;gap:16px}.calendar-legend{flex-wrap:wrap;justify-content:center;overflow:visible;white-space:normal;line-height:16px;margin:8px 0;gap:0 10px}.calendar-legend span{line-height:16px}.calendar-legend .calendar-dot{border-radius:var(--radius-full)}}
@media(min-width:768px){.calendar-nav{margin-bottom:8px}}
/* UI round three: legacy weekday cell 32 + 1px row border, 12/16/500, muted, bg muted/30 */
.calendar-month .calendar-weekday{padding:8px 0;font-weight:500;color:var(--tf-737373,#737373);background:var(--tb-f5f5f5a30,rgb(245 245 245 / .3))}.calendar-month .calendar-weekday.calendar-weekend{color:var(--tf-737373,#737373)}
/* Balance audit: a control inside a bold label inherited weight 600 (shadcn Input is weight 400); select is text-sm (14px) at every width, Input/Textarea text-base below md; profile labels are shadcn Label 14/500 */
input,select,textarea,label input,label select,label textarea{font-weight:400}
@media(max-width:767px){form select,.field select{font-size:16px;line-height:24px}.profile-page label{font-size:14px;font-weight:500;line-height:20px}}
.profile-page label{font-size:14px;font-weight:500;line-height:20px}
/* Legacy cards are compact and move by drag; the per-card stage select stays as the keyboard fallback, visible only on focus */
.kanban .deal-card{position:relative}.kanban .deal-card .board-card-action:not(:focus-within){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* DEAL-06: where a card cannot be dragged with a mouse (touch, a phone), its ย้าย Stage select is shown on the card, tappable, not only a long press */@media(pointer:coarse),(hover:none),(max-width:767px){.kanban .deal-card .board-card-action:not(:focus-within){position:static;width:auto;height:auto;margin:12px 0 0;padding:10px 0 0;overflow:visible;clip:auto;white-space:normal;border:0;border-top:1px solid var(--border)}}
/* hover and focus states measured on the live Base44 (transition .15s, hover accent, 1px ring) */
.nav-link,.button,.icon-button,.tabs :is(a,button){transition:all .15s}
.nav-link:hover:not(.active),.nav-sub-link:hover:not(.active){color:var(--fg)}
.button:hover:not(.primary),.icon-button:hover{filter:none;background:var(--soft)}
.button.primary:hover{filter:none;background:var(--tb-171717a90,rgb(23 23 23 / .9))}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid transparent;outline-offset:2px;box-shadow:0 0 0 1px #0a0a0a}
.button:focus-visible{box-shadow:0 0 0 1px #0a0a0a,var(--shadow-sm)}
/* Round 4 — Expenses รายรับ: legacy RevenueTableRows card rows (12-column grid 4/1/2/2/1/1/1, text-xs) */

.income-row{background:var(--tb-ffffff,#fff);transition:background-color .15s}.income-row:hover{background:var(--tb-f9fafba60,rgb(249 250 251 / .6))}
.income-date{color:var(--tf-4b5563,#4b5563)}
/* the second status flag as a mark (2026-11-03): keeps the รายรับ row on its 44px line */#content .fw-income td.fw-nw:has(>.pov-st):has(>.is-mark){white-space:nowrap}.income-account-missing.is-mark{padding:0 4px;vertical-align:middle}.income-account-missing.is-mark svg{width:12px;height:12px}
.expense-list-income-status{font-size:12px;line-height:16px;padding:0 6px;font-weight:600;border:1px solid transparent;max-width:100%;overflow-wrap:anywhere}
.expense-list-income-status.pending{background:var(--tb-fef3c7,#fef3c7);color:var(--tf-b45309,#b45309);border-color:var(--tl-fde68a,#fde68a)}.expense-list-income-status.partial{background:var(--tb-dbeafe,#dbeafe);color:var(--tf-1d4ed8,#1d4ed8);border-color:var(--tl-bfdbfe,#bfdbfe)}.expense-list-income-status.received{background:var(--tb-dcfce7,#dcfce7);color:var(--tf-15803d,#15803d);border-color:var(--tl-bbf7d0,#bbf7d0)}.expense-list-income-status.void{background:var(--tb-f3f4f6,#f3f4f6);color:var(--tf-4b5563,#4b5563);border-color:var(--tl-e5e7eb,#e5e7eb)}
.expense-list-income-status.unbilled{background:var(--tb-f3f4f6,#f3f4f6);color:var(--tf-374151,#374151);border-color:var(--tl-d1d5db,#d1d5db)}.expense-list-income-status.overdue{background:var(--tb-fee2e2,#fee2e2);color:var(--tf-b91c1c,#b91c1c);border-color:var(--tl-fecaca,#fecaca);margin-left:4px}
.income-more{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--radius-md);color:var(--tf-6b7280,#6b7280);cursor:pointer}.income-more:hover{background:var(--soft);color:var(--tf-374151,#374151)}.income-more svg{width:16px;height:16px}
/* legacy IncomeListTab StatCard: 20px icon, gap 6, row mb-1, value text-xl bold with no padding */
/* Round 4 — legacy ExpenseTable + CanonicalExpenseCells (all tabs that list Bills): text-xs cells, px-2 py-1.5, fixed column widths */
.expense-list-table thead tr{background:var(--tb-f5f5f5a50,rgb(245 245 245 / .5))}
.expense-list-table th{height:40px;padding:6px 8px;font-size:12px;line-height:16px;font-weight:500;color:var(--muted);text-align:left;vertical-align:middle}
.expense-list-table th:first-child{width:50px;text-align:center;padding:1px 8px}
.expense-list-table .expense-list-h-project{width:115px}.expense-list-table .expense-list-h-header{width:140px}.expense-list-table .expense-list-h-account{width:130px}.expense-list-table .expense-list-h-payee{width:120px}.expense-list-table .expense-list-h-amount{width:100px;text-align:right;padding:6px 12px}.expense-list-table .expense-list-h-state{width:90px;text-align:center}
.expense-list-table td{padding:6px 8px;vertical-align:top;font-size:12px;line-height:16px}
.expense-list-table tbody tr:hover{background:var(--tb-f5f5f5a30,rgb(245 245 245 / .3))}
.expense-list-table td:first-child{text-align:center}
.expense-list-eye{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--radius-md);color:var(--tf-2563eb,#2563eb)}.expense-list-eye:hover{background:var(--soft)}.expense-list-eye svg{width:16px;height:16px}
.expense-list-table .expense-list-project a,.expense-list-table .expense-list-project span{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;line-height:16px;color:var(--tf-2563eba70,rgb(37 99 235 / .7));white-space:nowrap}.expense-list-table .expense-list-project a:hover{text-decoration:underline}
.expense-list-table .expense-list-header{max-width:160px}.expense-list-table .expense-list-header strong{display:block;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.expense-list-table .expense-list-account{max-width:140px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.expense-list-table .expense-list-desc{max-width:220px}.expense-list-table .expense-list-desc>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:16px}.expense-list-table .expense-list-desc small{font-size:12px;line-height:16px}
.expense-list-table .expense-list-payee{max-width:130px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.expense-list-table .expense-list-amount{padding:6px 12px;text-align:right;white-space:nowrap;font-family:inherit;font-weight:600;color:var(--tf-dc2626,#dc2626);font-variant-numeric:tabular-nums}.expense-list-table .expense-list-amount small{font-size:12px;line-height:16px;font-weight:400;color:var(--muted)}
.expense-list-table .expense-list-state{text-align:center}
.expense-list-table td:first-child{padding:8px;line-height:20px;font-size:14px}
.expense-list-table .expense-list-status{font-size:12px;line-height:16px;padding:2px 10px;font-weight:500;white-space:nowrap}
/* legacy StatusFilteredExpenseTab: KPI Cards p-3, grid 2/3 cols gap 12; h-8 text-xs selects; StatusFilteredRoundGroup cards */
.expense-list-status-kpis{grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 16px}
.expense-list-status-kpis .card.padded{padding:12px}
.expense-list-status-kpis .metric{padding:0;font-variant-numeric:tabular-nums}
.expense-list-status-kpis section:nth-child(2) .metric{color:var(--tf-9333ea,#9333ea)}
.expense-list-status-filters{margin-bottom:16px}
.expense-list-status-filters select{width:130px}
.expense-list-status-filters select[name="project_id"]{width:auto;min-width:98px;max-width:240px}
.expense-list-status-filters .button.primary{margin-left:auto;background:var(--primary);border-color:var(--primary)}
.expense-list-group-card{margin-bottom:16px;border-radius:var(--radius-lg);box-shadow:none;overflow:hidden;background:var(--tb-ffffff,#fff)}
.expense-list-group-card>summary{min-height:0;padding:8px 16px;background:var(--tb-f8fafca60,rgb(248 250 252 / .6));border-bottom:1px solid var(--border);user-select:none}
.expense-list-group-card>summary::-webkit-details-marker{display:none}.expense-list-group-card>summary{list-style:none}
.expense-list-group-card>summary>span:first-child{display:flex;align-items:center;gap:8px}
.expense-list-group-card>summary strong{font-size:12px;line-height:16px;font-weight:500;color:var(--tf-475569,#475569)}
.expense-list-group-card>summary small.muted{font-size:12px;line-height:16px;color:var(--tf-94a3b8,#94a3b8)}
.expense-list-group-cal{width:14px;height:14px;color:var(--tf-94a3b8,#94a3b8);flex-shrink:0}
.expense-list-group-card .expense-list-table thead tr{background:var(--tb-f8fafca30,rgb(248 250 252 / .3))}
.expense-list-group-card .expense-list-table th{height:auto;padding:6px 8px;font-size:12px;line-height:16px;font-weight:500;color:var(--tf-94a3b8,#94a3b8);text-transform:uppercase;letter-spacing:.025em}
.expense-list-group-card .expense-list-table th:first-child{width:32px;padding:6px 4px}
.expense-list-group-card .expense-list-table td:first-child{padding:6px 4px;vertical-align:top;font-size:12px;line-height:16px}
.expense-list-group-card .expense-list-table tbody tr{border-color:var(--tl-f1f5f9a80,rgb(241 245 249 / .8))}.expense-list-group-card .expense-list-table tbody tr:hover{background:var(--tb-eff6ffa30,rgb(239 246 255 / .3))}
.expense-list-group-card .expense-list-eye{width:24px;height:24px;color:var(--tf-94a3b8,#94a3b8)}.expense-list-group-card .expense-list-eye svg{width:14px;height:14px}.expense-list-group-card tr:hover .expense-list-eye{color:var(--tf-3b82f6,#3b82f6)}
.expense-list-group-card .approval-view-cell{flex-direction:column;align-items:center;gap:0}.expense-list-group-card .approval-files{font-size:11px}
.expense-list-check{padding:6px 4px;text-align:center}.expense-list-ok,.expense-list-bad{width:14px;height:14px;vertical-align:middle}.expense-list-ok{color:var(--tf-10b981,#10b981)}.expense-list-bad{color:var(--tf-ef4444,#ef4444)}.expense-list-check .muted{font-size:12px;color:var(--tf-cbd5e1,#cbd5e1);line-height:16px}
@media(max-width:639px){.expense-list-status-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
.expense-list-group-card .expense-list-table th[title]{width:44px;padding:6px 4px;text-align:center}.expense-list-group-card .expense-list-table th[title]:nth-of-type(11){width:52px}
.expense-list-group-card .expense-list-table th[title]+th[title]+th[title]+th{width:110px}.expense-list-group-card .expense-list-table th[title]+th[title]+th[title]+th+th{width:100px}
/* payment queues reuse the legacy round-group card header (StatusFilteredRoundGroup) */
.payment-group{border-radius:var(--radius-lg);box-shadow:none}
.payment-group>summary{padding:8px 16px;min-height:0;background:var(--tb-f8fafca60,rgb(248 250 252 / .6));border-bottom:1px solid var(--border)}
.payment-group>summary>span{display:flex;align-items:center;gap:8px}.payment-group>summary strong{font-size:12px;line-height:16px;font-weight:500;color:var(--tf-475569,#475569)}.payment-group>summary small{font-size:12px;line-height:16px;color:var(--tf-94a3b8,#94a3b8)}
.payment-group>summary>strong.mono{font-family:inherit;font-weight:600;color:var(--tf-334155,#334155);font-variant-numeric:tabular-nums}
.payment-group th{font-size:12px;line-height:16px;font-weight:500;color:var(--tf-94a3b8,#94a3b8);text-transform:uppercase;letter-spacing:.025em;padding:6px 8px;height:auto;background:var(--tb-f8fafca30,rgb(248 250 252 / .3))}
.payment-group td{font-size:12px;line-height:16px;padding:6px 8px;vertical-align:top}
/* Round 4 — ProjectDetail: legacy RequirementCollapsibleCard and the overview Project Hub row */
/* Quiet (owner 2026-10-26 "ลดความเด่นมันลง"): a neutral card like the page's others, never the blue block above every tab. */
/* Owner 2026-10-28: the Requirement card's light blue is back (still quiet: no shadow, a soft icon, the closed card a thin row) */.project-requirement{margin-bottom:16px;border:1px solid var(--tl-93c5fd,#93c5fd);border-radius:var(--radius-xl);background:var(--tb-eff6ffa60,rgb(239 246 255 / .6));overflow:hidden}
.project-requirement-head{display:flex;align-items:center;gap:10px;padding:8px 16px;background:var(--tb-dbeafea70,rgb(219 234 254 / .7));border-bottom:1px solid var(--tl-bfdbfe,#bfdbfe)}
.project-requirement-icon{display:flex;align-items:center;justify-content:center;width:28px;height:28px;flex-shrink:0;border-radius:var(--radius-lg);background:var(--tb-bfdbfea60,rgb(191 219 254 / .6));color:var(--tf-1d4ed8,#1d4ed8)}.project-requirement-icon svg{width:16px;height:16px}
.project-requirement-title{flex:1;min-width:0;cursor:pointer}.project-requirement-title p{margin:0}.project-requirement-title p:first-child{font-size:14px;line-height:20px;font-weight:600;color:var(--tf-1e3a8a,#1e3a8a)}.project-requirement-title p+p{font-size:12px;line-height:16px;color:var(--tf-1d4ed8a70,rgb(29 78 216 / .7));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-requirement-toggle{display:inline-flex;align-items:center;justify-content:center;min-height:0;padding:0;border:0;border-radius:var(--radius-md);background:transparent;color:var(--tf-1d4ed8,#1d4ed8);flex-shrink:0;cursor:pointer}.project-requirement-toggle:hover{background:var(--tb-bfdbfea60,rgb(191 219 254 / .6))}.project-requirement-toggle svg{width:16px;height:16px}
.project-requirement-body{padding:16px}
.project-requirement-label{margin:0 0 8px;font-size:12px;line-height:16px;font-weight:500;color:var(--muted)}
.project-requirement-value{margin:0;font-size:14px;line-height:20px;color:var(--fg);white-space:normal}
.project-requirement-empty{margin:0;font-size:12px;line-height:16px;font-style:italic;color:var(--muted)}
.project-requirement-hint{margin:4px 0 0;font-size:12px;line-height:16px;color:var(--muted)}
.requirement-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:12px 16px}.requirement-grid+.requirement-free-form,form+.requirement-free-form{margin-top:12px}@media(min-width:768px){.requirement-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.requirement-grid>.field{grid-column:span 3}.requirement-grid>.requirement-wide{grid-column:span 6}.requirement-grid>.requirement-short{grid-column:span 2}}
.requirement-grid .field>label,.requirement-grid .field>.field-label{font-size:12px;line-height:16px;font-weight:500;color:var(--muted)}.requirement-grid input,.requirement-grid select,.requirement-grid textarea{background:var(--tb-ffffff,#fff)}.requirement-grid small{font-size:10px;line-height:14px;color:var(--muted)}
.requirement-value{margin:0;font-size:14px;line-height:20px;color:var(--fg);white-space:normal;overflow-wrap:anywhere}
.requirement-checks{display:flex;flex-wrap:wrap;gap:12px;padding:8px 12px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--tb-ffffff,#fff)}.requirement-checks label{display:inline-flex;align-items:center;gap:6px;font-size:14px;line-height:20px;cursor:pointer}.requirement-checks input{width:auto;height:auto}
/* Owner 2026-10-28 ("เด้งเมื่อ expand ผูกกับดีล"): one grid row, ผูกกับดีล on the left at the save's height, บันทึก fixed on the right; opening the link grows the left cell only, nothing moves and nothing is cut */.requirement-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:12px;margin-top:12px}.requirement-actions .requirement-save{grid-column:2;grid-row:1}.requirement-actions .requirement-link{grid-column:1;grid-row:1;min-width:0;margin-top:0}.requirement-actions .requirement-link>summary{line-height:32px}.requirement-link-form{justify-items:start}.requirement-link-form .field{justify-self:stretch}.button.primary.requirement-save{background:var(--tb-2563eb,#2563eb);border-color:var(--tl-2563eb,#2563eb);color:var(--tf-ffffff,#fff)}
.requirement-description{margin:0 0 12px;font-size:12px;line-height:16px;font-style:italic;color:var(--muted)}
.requirement-empty{gap:4px;border-radius:var(--radius-lg);font-size:14px;line-height:20px}.requirement-empty p{margin:0}.requirement-empty a{font-size:12px;line-height:16px;color:var(--primary);text-decoration:underline}
.requirement-free-text{margin-top:12px}.requirement-link{margin-top:12px}.requirement-link>summary{cursor:pointer;font-size:13px;line-height:20px;font-weight:500;color:var(--muted)}.requirement-link p{margin:8px 0;font-size:12px;line-height:16px}.requirement-link-search{display:flex;gap:8px;margin-bottom:8px}.requirement-link-search input{flex:1;min-width:0}.requirement-link-form{display:grid;gap:8px}
.project-hub-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px;padding:12px;border:1px solid var(--border)}
.project-hub-main{display:flex;align-items:center;gap:12px;min-width:0}.project-hub-main h3{margin:0;font-size:14px;line-height:20px;font-weight:600}.project-hub-main p{margin:0;font-size:12px;line-height:16px;color:var(--muted)}
.project-hub-icon{display:flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border-radius:var(--radius-lg);background:var(--tb-171717a10,rgb(23 23 23 / .1));color:var(--primary)}.project-hub-icon svg{width:16px;height:16px}
.project-hub-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}
.project-hub-actions .button{padding:0 12px;font-size:12px;line-height:16px}.project-hub-actions .button svg{width:12px;height:12px}
@media(max-width:639px){.project-hub-row{align-items:flex-start;flex-direction:column}}
.project-hub-actions .button{gap:8px;color:var(--fg)}.project-hub-actions .button.primary{color:var(--on-primary,#fafafa)}.project-hub-actions .button svg{margin-right:4px}
/* legacy ProjectManageTab header (h3 16/600 + blue Users icon, h-7 outline text-xs buttons) and matrix head */
.project-manage-head{align-items:center}.project-manage-head h2{display:flex;align-items:center;gap:8px;margin:0;font-size:16px;line-height:24px;font-weight:600}
.project-manage-icon{width:16px;height:16px;color:var(--tf-3b82f6,#3b82f6)}
.project-manage-head .actions{gap:8px}.project-manage-head .button{height:32px;min-height:32px;padding:0 8px;font-size:12px;line-height:16px;font-weight:400;gap:4px}.project-manage-head .button .icon{width:14px;height:14px}

/* Round 4 — legacy pickers: shadcn Select trigger + Command list, the CreateProject/Deal customer card, Popover + Calendar DatePicker.
   The native control stays in the form (visually hidden) so posting and validation are unchanged. */
.combobox,.datepicker{position:relative;display:block;width:100%;min-width:0}
/* [data-picker-ready][aria-hidden]: htmx settle restores the swapped-in class list and drops .picker-native, which showed both the native control and its picker after a modal re-render (e.g. a 422 on สร้างดีล). */
.picker-native,[data-picker-ready][aria-hidden="true"]{position:absolute!important;left:0;bottom:0;width:1px!important;height:1px!important;min-height:0!important;padding:0!important;border:0!important;opacity:0;pointer-events:none}
.combobox-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;height:36px;min-height:36px;padding:8px 12px;border:1px solid var(--border);border-radius:var(--radius-md);background:transparent;color:var(--fg);font:inherit;font-size:14px;line-height:20px;font-weight:400;text-align:left;cursor:pointer}
.combobox-trigger:disabled{cursor:not-allowed;opacity:.5}
.combobox-trigger .combobox-value{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.combobox-trigger.is-placeholder .combobox-value{color:var(--muted)}
.combobox-caret{width:16px;height:16px;flex-shrink:0;opacity:.5}.combobox-lead{width:16px;height:16px;flex-shrink:0;color:var(--muted)}
.combobox.is-invalid .combobox-trigger,.datepicker.is-invalid .datepicker-trigger{border-color:hsl(0 84.2% 60.2%)}
.combobox-customer .combobox-trigger{height:auto;min-height:0;gap:12px;padding:12px;border:1px dashed var(--tl-fdba74,#fdba74);border-radius:var(--radius-lg);background:var(--tb-fff7eda30,rgb(255 247 237 / .3));transition:box-shadow .15s,background-color .15s}
.combobox-customer .combobox-trigger:hover{background:var(--tb-fff7eda50,rgb(255 247 237 / .5));box-shadow:var(--shadow-sm)}
.combobox-customer.has-value .combobox-trigger{border-style:solid;background:var(--tb-fff7eda50,rgb(255 247 237 / .5));padding-right:44px}
.combobox-avatar{display:flex;align-items:center;justify-content:center;width:36px;height:36px;flex-shrink:0;border-radius:var(--radius-lg);background:var(--tb-ffedd5a50,rgb(255 237 213 / .5));color:var(--tf-fb923c,#fb923c)}.combobox-avatar svg{width:16px;height:16px}
.combobox-customer.has-value .combobox-avatar{background:var(--tb-ffedd5,#ffedd5);color:var(--tf-ea580c,#ea580c)}
.combobox-customer .combobox-value{display:grid;gap:0}.combobox-customer .combobox-value>span{font-size:14px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.combobox-customer .combobox-trigger.is-placeholder .combobox-value{color:var(--tf-ea580c,#ea580c)}.combobox-customer .combobox-value small{font-size:12px;line-height:16px;color:var(--tf-ea580ca80,rgb(234 88 12 / .8))}
.combobox-customer.has-value .combobox-value>span{font-weight:500;color:var(--fg)}
.combobox-customer .combobox-caret{opacity:1;color:var(--tf-fb923c,#fb923c)}
.combobox-clear{position:absolute;right:12px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;min-height:0;padding:4px;border:0;border-radius:var(--radius-full);background:transparent;color:var(--muted);cursor:pointer}.combobox-clear:hover{background:var(--soft)}.combobox-clear svg{width:14px;height:14px}
.combobox-pop{position:absolute;left:0;top:calc(100% + 4px);z-index:60;max-width:min(480px,calc(100vw - 32px));background:var(--tb-ffffff,#fff);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:0 4px 6px -1px rgb(0 0 0 / .1),0 2px 4px -2px rgb(0 0 0 / .1)}
.combobox-search{display:flex;align-items:center;gap:8px;padding:0 12px;border-bottom:1px solid var(--border)}.combobox-search svg{width:16px;height:16px;opacity:.5;flex-shrink:0}
.combobox-search input{flex:1;height:40px;min-height:40px;padding:12px 0;border:0;border-radius:0;background:transparent;font-size:14px;line-height:20px;outline:none;box-shadow:none}
.combobox-search input:focus-visible{outline:none;box-shadow:none}
.combobox-list{max-height:300px;margin:0;padding:4px;overflow-y:auto;list-style:none}
.combobox-option{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 8px;border-radius:var(--radius-sm);font-size:14px;line-height:20px;cursor:pointer;user-select:none}
.combobox-option.is-active{background:var(--soft)}.combobox-option[aria-disabled=true]{opacity:.5;cursor:not-allowed}
.combobox-check{width:16px;height:16px;flex-shrink:0}
.combobox-empty{margin:0;padding:24px 8px;text-align:center;font-size:14px;line-height:20px;color:var(--muted)}
.combobox-more{padding:8px;border-top:1px solid var(--border);font-size:12px;line-height:16px}
.datepicker-trigger{display:flex;align-items:center;justify-content:flex-start;gap:0;width:100%;height:36px;min-height:36px;padding:0 12px;border:1px solid var(--border);border-radius:var(--radius-md);background:transparent;color:var(--fg);font:inherit;font-size:14px;line-height:20px;font-weight:400;text-align:left;cursor:pointer}
.datepicker-trigger.is-placeholder{color:var(--muted)}.datepicker:has(>.combobox-clear:not([hidden]))>.datepicker-trigger{padding-right:40px}.datepicker-trigger:disabled{opacity:.5;cursor:not-allowed}
.datepicker-icon{width:16px;height:16px;margin-right:8px;flex-shrink:0}
.datepicker-pop{position:absolute;left:0;top:calc(100% + 4px);z-index:60;padding:12px;background:var(--tb-ffffff,#fff);border:1px solid var(--border);border-radius:var(--radius-xl);box-shadow:0 4px 6px -1px rgb(0 0 0 / .1),0 2px 4px -2px rgb(0 0 0 / .1)}
.datepicker-caption>span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.datepicker-year{-webkit-appearance:none;appearance:none;box-sizing:border-box;height:28px;min-height:0;padding:0 8px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg);color:inherit;font:inherit;line-height:26px;cursor:pointer}
.datepicker-caption{position:relative;display:flex;align-items:center;justify-content:center;height:28px;margin-top:4px;font-size:14px;line-height:20px;font-weight:500}
.datepicker-nav{position:absolute;top:0;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;min-height:0;padding:0;border:1px solid var(--border);border-radius:var(--radius-xl);background:transparent;color:var(--fg);opacity:.5;cursor:pointer}.datepicker-nav:hover{opacity:1;background:var(--soft)}.datepicker-nav svg{width:16px;height:16px}
.datepicker-nav[data-step="-1"]{left:4px}.datepicker-nav[data-step="1"]{right:4px}
.datepicker-pop table{margin-top:16px;border-collapse:collapse;border:0}.datepicker-pop th{width:32px;height:auto;padding:0;border:0;background:none;font-size:12px;line-height:16px;font-weight:400;color:var(--muted);text-align:center;text-transform:none;letter-spacing:0}
.datepicker-pop td{padding:8px 0 0;border:0;text-align:center}.datepicker-pop tbody tr:hover{background:none}
.datepicker-day{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:0;padding:0;border:0;border-radius:var(--radius-xl);background:transparent;color:var(--fg);font:inherit;font-size:14px;line-height:20px;font-weight:400;cursor:pointer;font-variant-numeric:tabular-nums}
.datepicker-day:hover{background:var(--soft)}.datepicker-day.is-today{background:var(--soft);color:var(--tf-171717,#171717)}.datepicker-day.is-outside{color:var(--muted)}
.datepicker-day.is-selected,.datepicker-day.is-selected:hover{background:var(--primary);color:var(--on-primary,#fafafa)}.datepicker-day:disabled{opacity:.5;cursor:not-allowed}
.combobox-clear[hidden],.combobox-pop[hidden],.datepicker-pop[hidden]{display:none}
/* legacy GenericBoardView header: owner filter + ซ่อนดีลค้างนาน + สร้างดีลใหม่ (Button size sm) */
.board-header-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.board-owner-filter{margin:0}.board-owner-filter .combobox{width:auto}
.combobox-owner .combobox-trigger{width:auto;padding:0 12px;gap:6px;border-radius:var(--radius-md);background:var(--tb-ffffff,#fff);font-weight:500}
.combobox-owner .combobox-trigger:hover{background:var(--soft)}.combobox-owner .combobox-trigger.is-placeholder .combobox-value{color:var(--fg)}
.combobox-owner .combobox-lead{color:var(--fg)}.combobox-owner .combobox-pop{left:auto;right:0;min-width:224px}
.board-stale-button{gap:8px}.board-stale-button .icon{margin-right:4px}
/* Audit SALES-02 2026-11-18: the stale-hide window, one tick per Deal, rows of one height (RULES 5.23). */
.deal-stale-tabs{margin:0 0 12px}
.deal-stale-list{max-height:min(52vh,420px);overflow:auto}
.deal-stale-row{display:grid;grid-template-columns:20px minmax(0,1fr) auto;gap:10px;align-items:center;height:36px;padding:0 4px;border-bottom:1px solid var(--border);cursor:pointer}
.deal-stale-row span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.deal-stale-row b{font-weight:500;color:var(--muted);font-variant-numeric:tabular-nums}
.deal-stale-all{font-weight:600}

/* legacy UserProfile CardTitle: text-base + 16px lucide icon, gap 8; role Badge variant secondary */
main[data-route="/UserProfile"] .card>h2{display:flex;align-items:center;gap:8px;font-size:16px;line-height:24px}
main[data-route="/UserProfile"] .profile-identity .badge{background:var(--soft);color:var(--tf-171717,#171717);border-color:transparent;font-size:12px;width:max-content;line-height:16px}
/* legacy ContactsListTab: the role cell shrinks to its widest badge, so a second role wraps below (flex gap-1 flex-wrap) */
/* Round 4 audit — legacy money cells use tabular-nums; legacy empty rows are text-center py-12 text-muted-foreground */
.mono,.metric,.stat,.money,.amount,.expense-list-amount,td.num,th.num{font-variant-numeric:tabular-nums}
.row-between>.amount{margin-left:auto;white-space:nowrap}
.empty{padding:48px 16px;text-align:center;color:var(--muted);font-size:14px;line-height:20px}p.empty{margin:0}.empty.is-inline{padding:8px 0;text-align:left}
/* Round 4 — legacy page-root padding by breakpoint (compiled CSS: sm=640px, md=768px). Most pages are p-3 sm:p-6,
   so 640-767px is 24px, not 12px. Pages with other roots follow their own classes (CSS-derived, not a paired 390px capture). */
@media(min-width:640px) and (max-width:767px){main{padding:24px}}
@media(max-width:639px){main[data-route="/TaxReport"],main[data-route="/RLSSettings"],main[data-route="/PartnerDashboard"],main[data-route="/PartnerProfile"],main[data-route="/PartnerProjects"],main[data-route="/CreditTermReport"]{padding:16px}main[data-route="/ContactForm"]{padding:24px}main[data-route="/UpdateLog"]{padding:32px 16px}}
@media(min-width:640px) and (max-width:767px){main[data-route="/CreditTermReport"]{padding:16px}}
@media(min-width:768px){main[data-route="/UpdateLog"]{padding:32px 16px}}
/* legacy compiled CSS has no mobile body font change (text stays text-sm); income KPI grid is grid-cols-1 sm:grid-cols-3 */
@media(max-width:767px){body{font-size:14px;line-height:20px}}
.file-store-cap{display:grid;gap:6px}
.file-store-bar{height:8px;border-radius:var(--radius-full);background:var(--soft);overflow:hidden}
.file-store-bar svg{display:block;width:100%;height:100%;color:var(--tf-16a34a,#16a34a)}
.file-store-bar .file-store-bar-warning{color:var(--tf-d97706,#d97706)}
.file-store-bar .file-store-bar-critical{color:var(--tf-dc2626,#dc2626)}

.bill-attachment-list{display:flex;flex-wrap:wrap;gap:8px}
.bill-attachment{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:4px 8px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--tb-f5f5f5a50,rgb(245 245 245 / .5));font-size:12px;line-height:16px}
.bill-attachment a{display:inline-flex;align-items:center;gap:4px;min-width:0;color:var(--primary)}
.bill-attachment a:hover{text-decoration:underline}
.bill-attachment a span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:240px}
.bill-attachment .icon{width:12px;height:12px}
.bill-attachment small{color:var(--muted);white-space:nowrap}

/* Sign-in (mysql mode): one centred column, brand above the title, no back link */
.auth-wrap{max-width:400px;margin:12vh auto 0}.auth-wrap:has(.register-group){max-width:520px;margin-top:6vh}
.auth-brand{display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:24px}.auth-brand img{border-radius:8px}.auth-brand strong{font-size:18px;line-height:28px}
.auth-card .register-group{display:grid;gap:12px;margin:0;padding:0;border:0;min-width:0}.auth-card .register-group legend{padding:0;margin:0 0 4px;font-size:14px;line-height:20px;font-weight:600}.auth-card .register-types{display:grid;gap:8px}.auth-card .register-choice{display:flex;align-items:center;justify-content:flex-start;gap:8px;padding:10px 12px;border:1px solid var(--border);border-radius:6px;font-weight:600}.auth-card .register-choice input{margin:0;width:18px;height:18px;min-height:0;flex:none;padding:0}.auth-card .grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}@media(max-width:480px){.auth-card .grid-2{grid-template-columns:minmax(0,1fr)}}
.auth-wrap>h1{text-align:center;font-size:24px;line-height:32px;margin:0}
.auth-wrap>p{text-align:center;margin:4px 0 24px;color:var(--muted);font-size:14px;line-height:20px}
.auth-wrap .auth-card{max-width:none;margin:0 0 14px}.auth-wrap .alert{margin-bottom:14px}
.public-main:has(.auth-wrap){max-width:none}
/* Public sign-up /Register (owner 2026-10-23, "the company's public face"): the brand, one 3-step indicator on every screen, then one card laid out like /ContactForm:
   a 12-column grid (a field is .reg-6 half or .reg-12 full, labels above, 36px fields), sections told apart by a heading and 32px of space (owner 2026-11-03: no lines), never a box, steps centred with no subtitle, one column at 767px, one primary button. */
.public-main:has(.reg){max-width:none;padding:24px 16px 48px}
.reg{max-width:720px;margin:0 auto;display:grid;gap:24px;min-width:0}
/* Audit 2026-11-18 PP-28: the /Register brand is the /Login one (.auth-brand): logo and name, centred. */
.reg-brand{display:flex;align-items:center;justify-content:center;gap:10px;min-width:0}
.reg-brand img{width:36px;height:36px;border-radius:8px;flex:none}
.reg-brand strong{font-size:18px;line-height:28px}
.reg-head{display:grid;gap:8px;justify-items:center;text-align:center}/* SALES21-28: /Register heads like /Login (centred title and line) */
.reg-head h1{margin:0;font-size:24px;line-height:32px;font-weight:700}
.reg-head p{margin:0;max-width:60ch;color:var(--muted);font-size:14px;line-height:20px}
.reg-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.reg-steps li{position:relative;display:grid;justify-items:center;gap:8px;min-width:0;text-align:center}
.reg-steps li:not(:last-child)::after{content:"";position:absolute;top:14px;left:calc(50% + 22px);right:calc(-50% + 22px);height:1px;background:var(--border)}
.reg-steps .is-done:not(:last-child)::after{background:var(--primary)}
.reg-step-n{display:grid;place-items:center;width:28px;height:28px;border:1px solid var(--border);border-radius:var(--radius-full);background:var(--bg);color:var(--muted);font-size:12px;line-height:16px;font-weight:600}
.reg-step-n .icon{width:14px;height:14px}
.reg-steps .is-current .reg-step-n{background:var(--primary);border-color:var(--primary);color:var(--on-primary,#fafafa)}
.reg-steps .is-done .reg-step-n{border-color:var(--primary);color:var(--primary)}
.reg-step-t{font-size:12px;line-height:16px;font-weight:600;color:var(--muted)}
.reg-steps .is-current .reg-step-t,.reg-steps .is-done .reg-step-t{color:var(--fg)}
.reg-alert{margin:0}
.reg-form{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
.reg-sec{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px;align-content:start;min-width:0;margin:0;padding:0;border:0}
.reg-sec>*{grid-column:1/-1;min-width:0;margin:0}
.reg-sec>.reg-6{grid-column:span 6}
.reg-sec~.reg-sec,.reg-form>.reg-actions{margin-top:32px}
.reg-sec>h2{margin:0;font-size:14px;line-height:20px;font-weight:600}
/* PT-03: the optional part, closed until needed */.reg-form>.reg-more{margin-top:32px}.reg-more>summary{cursor:pointer;font-size:14px;line-height:20px;font-weight:600;color:var(--fg)}.reg-more>.reg-sec{margin-top:16px}
.reg-f{display:grid;gap:6px;align-content:start;border:0;padding:0;min-width:0;font-size:12px;line-height:16px;font-weight:400;color:var(--muted)}
.reg-f legend{padding:0;margin:0 0 6px;font-size:12px;line-height:16px;font-weight:400;color:var(--muted)}
.reg-f input:not([type=radio]):not([type=checkbox]),.reg-f select,.reg-f textarea{width:100%;color:var(--fg)}
.reg-l{display:block}
.reg .req{color:var(--tf-ef4444,#ef4444);margin-left:4px}
.reg-f small{font-size:12px;line-height:16px;color:var(--muted)}
.reg-f small.field-error{color:var(--tf-b91c1c,#b91c1c)}
.reg-mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.reg-fixed{background:var(--soft);color:var(--muted)}
.reg-tiles{display:grid;gap:8px}
.reg-tiles-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.reg-tiles-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.reg-tile{display:flex;align-items:center;gap:8px;min-width:0;min-height:36px;padding:7px 12px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg);color:var(--fg);font-size:14px;line-height:20px;cursor:pointer}
.reg-tile input{margin:0;width:16px;height:16px;min-height:0;padding:0;flex:none}
.reg-tile:has(input:checked){border-color:var(--primary);background:var(--soft)}/* PP-41 (11-20): the profile form draws the tiles as /Register does (a form label rule stacked the tick above the words) */.partner-portal-profile label.reg-tile{display:flex;flex-direction:row;align-items:center;gap:8px;min-height:36px;padding:7px 12px;font-weight:400}.partner-portal-profile label.reg-tile>span{margin:0}
.reg-tile:has(input:focus-visible){outline:2px solid var(--tl-2563eb,#2563eb);outline-offset:2px}
.reg-sign{display:grid;gap:8px}
/* Owner 2026-11-13: /Register step 2 of an old Contact shows each file on record (an image as a picture that opens full size) and an optional new one. */
.reg-doc-thumb{display:block;width:120px;height:90px;border:1px solid var(--border);border-radius:var(--radius-md);overflow:hidden;background:var(--soft)}
.reg-doc-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.reg-doc-new{display:grid;gap:6px;min-width:0}
.reg-doc-others li{display:grid;gap:6px;align-items:start}
.reg-nda-done .doc-file{max-width:100%}
.reg-sign canvas{display:block;width:100%;height:160px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg);touch-action:none;cursor:crosshair}
.reg-sign-row{display:flex;align-items:flex-end;justify-content:space-between;gap:8px}
/* The NDA as paper (owner 2026-11-12 "จัดหน้าให้เหมือนที่สุด"): an A4 sheet in the company's letterhead; always white paper, so its colours are fixed. */
.nda-doc{display:grid;gap:24px;justify-items:center}
.nda-sheet{box-sizing:border-box;width:100%;max-width:210mm;background:var(--tb-ffffff,#fff);color:var(--tf-1f1f1f,#1f1f1f);border:1px solid var(--border);border-radius:var(--radius-md);border-collapse:separate;border-spacing:0;font-size:14px;line-height:1.7}
.nda-sheet>thead>tr>td,.nda-sheet>tfoot>tr>td,.nda-sheet>tbody>tr>td{padding:0 16mm;border:0;background:none}
.nda-sheet>thead>tr>td{padding-top:12mm}
.nda-sheet>tfoot>tr>td{padding-bottom:8mm;vertical-align:bottom}
.nda-head{display:flex;justify-content:flex-end;padding-bottom:10px;margin-bottom:16px;border-bottom:2px solid var(--tl-f2b51c,#f2b51c)}
.nda-head img{height:44px;width:auto}
.nda-body{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}.sign-text-vars{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 8px}.sign-text-area{min-height:320px;max-height:60vh;overflow:auto;padding:12px;border:1px solid var(--border);border-radius:6px;background:var(--bg);outline:none}.sign-text-area:focus{border-color:var(--primary)}
.nda-body p{margin:0}
.nda-title{margin:12px 0 0;text-align:center;text-wrap:balance;font-size:20px;line-height:1.4}
.nda-subtitle{text-align:center}
.nda-where{justify-self:end;display:grid;gap:2px;margin:8px 0}
.nda-indent{text-indent:2.2em}
.nda-indent2{text-indent:4.4em}
.nda-indent3{padding-left:4.4em}
.nda-annex-title,.nda-body h3,.nda-body h4{color:var(--tf-1f3b73,#1f3b73);margin:12px 0 0;line-height:1.4}
.nda-annex-title{font-size:18px}
.nda-body h3{font-size:16px}
.nda-body h4{font-size:14px}
.nda-muted{color:var(--tf-6b6b6b,#6b6b6b);font-size:12px}
.nda-small{font-size:12px;color:var(--tf-6b6b6b,#6b6b6b)}
.nda-table{width:100%;border-collapse:collapse;font-size:13px}
.nda-table th,.nda-table td{border:1px solid var(--tl-c9d3e6,#c9d3e6);padding:6px 10px;text-align:left;vertical-align:top}
.nda-table th{background:var(--tb-e8eef8,#e8eef8);font-weight:600;font-size:inherit;color:var(--tf-1f1f1f,#1f1f1f)}
.nda-table tr:last-child>td{border-bottom:1px solid var(--tl-c9d3e6,#c9d3e6)}
.nda-table tr.nda-hl td{background:var(--tb-fff6d6,#fff6d6)}
.nda-note{border:1px solid var(--tl-f2d27a,#f2d27a);background:var(--tb-fff8e1,#fff8e1);border-radius:4px;padding:10px 14px;font-size:13px}
.nda-pill{display:inline-block;margin-left:8px;padding:0 10px;border-radius:999px;background:var(--tb-f2b51c,#f2b51c);color:var(--tf-1f1f1f,#1f1f1f);font-size:12px;vertical-align:middle}
.nda-quote{text-align:center;font-style:italic;color:var(--tf-9a6b00,#9a6b00)}
.nda-photos{display:flex;gap:24px;justify-content:center;flex-wrap:wrap}
.nda-photos figure{margin:0;display:grid;gap:6px;justify-items:center;font-size:12px}
.nda-photos img{width:150px;height:auto;border-radius:6px}
.nda-checks{list-style:none;padding-left:2.2em;margin:0}
.nda-checks li{padding-left:1.3em;text-indent:-1.3em}
.nda-checks li::before{content:"☐ ";}
.nda-signs{width:100%;border-collapse:collapse;margin-top:16px}
.nda-signs td{width:50%;vertical-align:top;padding:8px;text-align:center}
.nda-signs p{margin:2px 0}
.nda-sign-line{display:flex;align-items:flex-end;justify-content:center;gap:6px;white-space:nowrap}
.nda-sig{height:56px;width:auto;max-width:220px}
.nda-blank{display:inline-block;min-width:140px;border-bottom:1px dotted var(--tl-8a8a8a,#8a8a8a);height:.8em;vertical-align:baseline}
.nda-blank-sig{min-width:180px;height:40px}
.nda-val{font-weight:600}
.nda-foot{margin-top:24px;border-top:1px solid var(--tl-f2b51c,#f2b51c);padding-top:6px;display:grid;font-size:10px;line-height:1.5;color:var(--tf-555555,#555)}
@media screen and (max-width:640px){.nda-sheet>thead>tr>td,.nda-sheet>tfoot>tr>td,.nda-sheet>tbody>tr>td{padding-left:16px;padding-right:16px}.nda-sheet>thead>tr>td{padding-top:16px}.nda-sheet>tfoot>tr>td{padding-bottom:12px}.nda-signs,.nda-signs tbody,.nda-signs tr{display:block}.nda-signs td{display:block;width:auto;padding:8px 0}.nda-sign-line{flex-wrap:wrap}.nda-blank{min-width:96px;max-width:100%}.nda-indent2{text-indent:2.2em}.nda-indent3{padding-left:2.2em}.nda-table{font-size:12.5px;display:block;overflow-x:auto}.nda-table th,.nda-table td{padding:5px 6px}.nda-table:has(tr>:nth-child(5)) :is(th,td){min-width:96px}.nda-body ul,.nda-body ol{padding-left:1.4em}.nda-checks{padding-left:0}}
.nda-meta{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px 16px;margin:0;max-width:210mm;width:100%}
.nda-meta dt{color:var(--muted)}
.nda-meta dd{margin:0}
@media print{.nda-doc{gap:0;display:block}.nda-sheet{max-width:none;border:0;border-radius:0;break-after:page;font-size:12.5px;line-height:1.6}.nda-body{gap:5px}.nda-table{font-size:11.5px}.nda-table th,.nda-table td{padding:4px 8px}.nda-title{font-size:18px}.nda-annex-title{font-size:16px}.nda-body h3{font-size:14px}.nda-body h4{font-size:13px}.nda-signs{margin-top:8px}.nda-sheet:last-child{break-after:auto}.nda-sheet>thead>tr>td{padding-top:10mm}.nda-sheet>tfoot>tr>td{padding-bottom:6mm}.nda-page{break-before:page}.nda-sheet *{-webkit-print-color-adjust:exact;print-color-adjust:exact}.nda-table tr,.nda-signs,.nda-note,.nda-photos{break-inside:avoid}.nda-meta{display:none}}
.reg-note{margin:0;color:var(--muted);font-size:12px;line-height:16px}
.reg-list{margin:0;padding-left:20px;display:grid;gap:4px;color:var(--fg);font-size:14px;line-height:20px}
.public-shell .reg-nda{margin-top:0}
.reg-nda summary{cursor:pointer;font-size:14px;line-height:20px;font-weight:600;color:var(--fg)}
.reg-nda-body{margin-top:8px;max-height:min(60vh,480px);overflow:auto;padding:12px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border);font-size:14px;line-height:20px}
.reg-nda-body p{margin:0 0 8px}
/* The register preview shows the text only: the summary already names the document, and the signer signs in the pad below (the copy and print keep the paper's title and sign blocks). */
.reg-nda-body .nda-title,.reg-nda-body .nda-subtitle,.reg-nda-body .nda-annex-title,.reg-nda-body .nda-signs,.reg-nda-body .nda-where{display:none}
.reg-nda-body .nda-blank{min-width:64px}
.reg-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px 16px}
.reg-actions .button.primary{width:auto;min-width:220px}
.reg-actions .reg-note{flex:1 1 240px}
.reg-link{display:inline-flex;align-items:center;min-height:36px;color:var(--fg);font-size:14px;line-height:20px;text-decoration:underline}
/* PP-18: a case answered on step 1 keeps the form folded behind one quiet line; PP-24 the optional fields fold the same way. */
.reg-again{margin-top:16px}.reg-again>summary{cursor:pointer;list-style:none}.reg-again>summary::-webkit-details-marker{display:none}.reg-again[open]>summary{margin-bottom:16px}
.reg-more>summary{cursor:pointer;list-style:none;display:flex;align-items:center;min-height:36px}.reg-more>summary::-webkit-details-marker{display:none}.reg-more>summary h2{margin:0}.reg-more>summary::after{content:"";width:8px;height:8px;margin-left:auto;border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);transform:rotate(45deg)}.reg-more[open]>summary::after{transform:rotate(-135deg)}
.reg-sent{grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}
.reg-sent-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:var(--radius-full);background:var(--soft);color:var(--fg)}
.reg-sent-text{display:grid;gap:8px;min-width:0}
.reg-sent-text p{margin:0;overflow-wrap:anywhere}
.reg-sent>.reg-actions{margin-top:8px}
.reg-case{display:grid;gap:16px}
.reg-case>p{margin:0;font-size:14px;line-height:20px}
.reg-case>.reg-sec{margin:0}
/* A document already on file (owner 2026-11-03: show what was sent): one 36px row like the picker, the name, มีแล้ว, and in the Portal
   profile เปลี่ยนไฟล์ (choosing a file saves it). Used by /Register (returning person) and /PartnerProfile. */
.doc-file{display:flex;align-items:center;gap:8px;box-sizing:border-box;width:100%;min-width:0;height:36px;padding:3px 3px 3px 12px;border:1px solid var(--border);border-radius:var(--radius-md);font-size:14px;line-height:20px;font-weight:400;color:var(--fg)}
.doc-file-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--fg)}
a.doc-file-name{text-decoration:underline;text-underline-offset:2px}
.doc-file .badge{flex:none}
.doc-file:not(:has(.doc-file-change)){padding-right:6px}
.doc-file-change{flex:none;display:inline-flex;align-items:center;height:28px;padding:0 12px;border:1px solid var(--border);border-radius:6px;background:var(--bg);color:var(--fg);font-size:12px;line-height:16px;font-weight:500;white-space:nowrap;cursor:pointer}
.doc-file-change:hover{background:var(--soft)}
.doc-file-change:focus-visible{outline:2px solid var(--fg);outline-offset:1px}
.doc-file-change input{display:none}
.doc-slots{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.doc-slot{display:grid;gap:6px;align-content:start;min-width:0;margin:0}
.doc-slot-l{font-size:12px;line-height:16px;color:var(--muted)}
.doc-slot .req{color:var(--tf-ef4444,#ef4444);margin-left:4px}
.doc-slot>[data-upload-status-slot]:empty{display:none}
.doc-others-h{margin:0;font-size:14px;line-height:20px;font-weight:600}
.doc-others{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.doc-others li{display:flex;align-items:baseline;gap:8px;min-width:0;font-size:14px;line-height:20px}
.doc-others a{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:underline;text-underline-offset:2px}
.doc-others small{flex:none;color:var(--muted);font-size:12px;line-height:16px}
@media(max-width:767px){.doc-slots{grid-template-columns:minmax(0,1fr)}}
.reg-end{align-self:end}
@media(max-width:767px){.public-main:has(.reg){padding:16px 16px 48px}.reg-card.padded{padding:16px}.reg-sec>.reg-6{grid-column:1/-1}.reg-tiles-3,.reg-tiles-2{grid-template-columns:minmax(0,1fr)}.reg-actions .button.primary{width:100%}.reg-head h1{font-size:18px;line-height:28px}}

/* Scale layer: the type scale is 12/16, 14/20, 16/24, 18/28, 24/32 and controls are 36 (default) or 32 (small, page header, toolbars); ui_consistency_check.py enforces both. */
small{font-size:12px;line-height:16px}
b,strong{font-weight:600}


main[data-route="/CreateProject"]>.page-header{max-width:768px;margin-left:auto;margin-right:auto}
.reconcile-close form input,.reconcile-close form .button{height:32px;min-height:32px}
@media(min-width:768px){.button,.icon-button{white-space:nowrap}}
@media(min-width:768px) and (max-width:1023px){.credit-term-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.material-form-layout,.ops-ta-layout,.grid-main{grid-template-columns:minmax(0,1fr)}.commercial-builder-tools{grid-template-columns:80px minmax(0,1fr)}.card{overflow-x:auto}}
/* Spacing scale: top-level blocks sit 16px apart, cards pad 24 (nested tiles 16), table cells pad 8 with 40px headers, modals are 512 wide (672 for wide forms). ui_consistency_check.py enforces these. */
main#content:not(.public-main)>*{margin-top:0;margin-bottom:0}
main#content:not(.public-main)>*+*{margin-top:16px}
td,th{font-variant-numeric:tabular-nums}
.num{text-align:right}
@media(min-width:768px){.card.padded,.project-form>.card.padded{padding:24px}.project-detail-panel .card.padded,.expense-list-status-kpis .card.padded{padding:16px}main#content td{padding:8px}main#content th{padding:8px;height:40px}}
.modal{width:min(var(--modal-w-md),calc(100vw - 32px));padding:24px;max-height:calc(100dvh - 32px)}
.modal h1{font-size:18px;line-height:28px}
.deal-form-modal,.conversion-modal{width:min(var(--modal-w-lg),calc(100vw - 32px))}
@media(max-width:639px){.modal,.deal-form-modal,.conversion-modal{width:calc(100vw - 32px);padding:16px}}
@media(min-width:768px){.card .card.padded,.card section.card{padding:16px}}

@media(min-width:768px){.commercial-kpis .metric{padding:16px}}
form .grid-2,form .grid-3,.form-grid{align-items:start;gap:16px}
.form-stack{gap:16px}
.stat,.metric strong,.amt{white-space:nowrap}
.metric .amt,.expense-list-status-kpis .amt{display:block}.metric .amt-sep{display:none}
/* Income board: a 12-column row (3/2/2/2/1/1/1) whose header lines up with the rows; below 900px of board width each row stacks into two labelled lines instead of overlapping. */
.income-row{position:relative}
.expense-list-filters .search{flex:1 1 220px;min-width:200px}
@media(pointer:fine){.payment-form input,.payment-form select,.payment-form textarea,.payment-form .button,.bank-blocker .button{min-height:36px}}
.expense-list-filters input,.expense-list-filters select,.expense-list-filters .button{height:36px;min-height:36px}
.payment-queue td.mono{text-align:right;white-space:nowrap}
.finance-table th:nth-child(2){text-align:left}
.card.padded.form-stack.form-no-title{padding-top:24px}
@media(max-width:767px){.project-form>.card.padded,.auth-screen-card,.card.padded{padding:16px}}
.actions:has(input:not([type=hidden]),select) .button.small,.filters:has(input:not([type=hidden]),select) .button.small{height:36px;min-height:36px}
/* Vertical rhythm inside stacks and cards comes from the gap/padding only, never from stray default margins. */
ul.stack,ol.stack{margin:0;padding:0;list-style:none}
.stack>*{margin-top:0;margin-bottom:0}
.card.padded>:first-child,.modal-inner>:first-child{margin-top:0}
.card.padded>:last-child,.modal-inner>:last-child{margin-bottom:0}
.card.padded>form:only-child>:first-child{margin-top:0}
.list-row p{margin:0}.card.padded>.list-row:first-child{padding-top:0}.card.padded>.list-row:last-child{padding-bottom:0}
@media(max-width:1023px){.commercial-builder-tools{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px}.commercial-builder-tools>input,.commercial-builder-tools label{width:90px}}
main#content .sales-report-bars th{padding:6px 8px 6px 0;height:auto;white-space:normal}main#content .sales-report-bars td{padding:6px 0 6px 8px}.sales-report-bars{table-layout:auto}.sales-report-bars td:nth-child(2){width:auto;min-width:48px}

.petty-cash-head{align-items:center;margin-bottom:16px}.petty-cash-head>div{display:flex;align-items:center;gap:8px}.petty-cash-list>li{align-items:center;margin-bottom:0}.petty-cash-list>li>div{display:flex;flex-direction:column;gap:2px;min-width:0}.petty-cash-list>li>div:first-child{flex:1 1 220px}.petty-cash-list>li>div.num{align-items:flex-end;text-align:right}.petty-cash-list small,.petty-cash-ledger td small{display:block;font-size:12px;line-height:16px}.petty-cash-fund h2{display:flex;align-items:center;gap:8px}.petty-cash-ledger td:first-child{white-space:nowrap}
/* PettyCash OCD 2026-09-29: KPI cards fill the row, amounts align with their labels, ledger cells share one size, 390 scrolls the ledger instead of squeezing it. */
.petty-cash-fund .payment-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.petty-cash-fund .payment-kpis .metric{padding:0;font-size:24px;line-height:32px}.petty-cash-ledger td,.expense-list-table.petty-cash-ledger td:first-child{padding:6px 8px;font-size:12px;line-height:16px}.petty-cash-ledger td small{margin-top:2px}@media(max-width:767px){.petty-cash-fund .payment-kpis{grid-template-columns:minmax(0,1fr)}.petty-cash-ledger:has(th:nth-child(5)){min-width:720px}}

/* Loading states (docs/api/STANDARD.md 4b): one skeleton primitive (.sk) with the legacy pulse shimmer
   (owner rule: a moving shimmer sweep; the only gradient allowed by ui_parity_check.py). A live region is skeletonised in place: same DOM,
   same boxes, text runs and controls painted over by .sk bars, so the region keeps its exact size. Pop-ups open
   as a skeleton dialog of the same class and the height of the real one, so nothing jumps when data lands. */
@keyframes sk-shimmer{from{background-position:100% 0}to{background-position:0 0}}
/* Owner 2026-09-29 "no shimmer anywhere": the bars used --tb-e5e5e5/--tb-f5f5f5, which the dark theme maps to #131313/#0e0e0e
   (invisible on the #0a0a0a page), and the OS-dark rule ignored the in-app theme. Own tokens, set for both dark selectors. */
.sk{display:block;border-radius:var(--radius-md);background:linear-gradient(90deg,var(--sk-base) 30%,var(--sk-hi) 50%,var(--sk-base) 70%) 0 0/300% 100% var(--sk-base);animation:sk-shimmer 1.4s linear infinite}
/* .sk sets display:block, which beat the hidden attribute: the Bill window's ประวัติ kept a shimmer bar after it loaded (live 2026-11-03) */.sk[hidden]{display:none}.sk-line{height:12px;margin:4px 0}.sk-line.is-short{width:40%}
.sk-control{height:36px}.sk-card{height:96px;border-radius:var(--radius-lg)}.sk-chart{height:240px;border-radius:var(--radius-lg)}
.sk-field{display:grid;gap:6px}.sk-field>.sk-line{width:30%}
.sk-modal .sk-title{height:20px;width:45%;margin:4px 0 16px}.sk-modal .sk-fields{display:grid;gap:14px}.sk-modal .sk-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.sk-modal .sk-actions>.sk{width:88px;height:36px}
[data-skeleton]{position:relative}
[data-skeleton] :not(.sk-keep,.sk-keep *){color:transparent!important;caret-color:transparent;text-decoration-color:transparent!important}
[data-skeleton] :not(.sk-keep,.sk-keep *)::placeholder{color:transparent!important}
[data-skeleton] :is(svg,img,canvas,video):not(.sk-keep *){visibility:hidden}
.combobox-option.sk-option{cursor:default}.combobox-option.sk-option>.sk{width:60%;height:12px;margin:4px 0}
@media(prefers-reduced-motion:reduce){.sk{animation:none}}
/* Declared skeleton templates (app.js erpSkeleton.tpl; map in app/Support/view.php). The old page is hidden, the destination's
   template stands in its place with the real page classes, so it lines up; same-page refreshes only dim. */
[data-sk-swap]>:not(.sk-tpl){display:none!important}
[data-sk-dim]{opacity:.5;transition:opacity .15s;pointer-events:none}
.sk-tpl{display:grid;gap:16px;align-content:start}.sk-tpl .page-header{margin:0}.sk-tpl-head .page-header-copy{display:grid;gap:8px}
.sk-tpl-tabs{display:inline-flex;gap:4px;align-items:center;height:36px;padding:4px 12px;margin:16px 0;background:var(--soft);border-radius:var(--radius-lg);max-width:100%}.sk-tpl-tabs.is-folder{display:flex;gap:32px;height:37px;padding:0 16px;margin:16px 0 0;background:transparent;border-radius:0;border-bottom:1px solid var(--border)}
.sk-tpl-filters,.sk-tpl-actions{display:flex;gap:8px;flex-wrap:wrap}.sk-tpl-actions{justify-content:flex-end}
.sk-table{overflow:hidden}.sk-row{display:flex;align-items:center;gap:16px;min-height:44px;padding:0 16px;border-bottom:1px solid var(--border)}.sk-row:last-child{border-bottom:0}.sk-row>.sk{flex:1 1 0}.sk-row>.sk:first-child{flex:2 1 0}.sk-row.is-head{min-height:40px}
.sk-tpl-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.sk-tpl-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.sk-tpl-cards.is-kpi{grid-template-columns:repeat(4,minmax(0,1fr))}.sk-tpl-cards.is-wide{grid-template-columns:minmax(0,1fr)}.sk-tpl-cards.is-wide .sk-tpl-card{min-height:200px}
.sk-tpl-card{display:grid;gap:10px;align-content:start;min-height:96px}
.sk-tpl-board{display:grid;grid-template-columns:repeat(4,minmax(240px,1fr));gap:16px;overflow:hidden}.sk-tpl-col{display:grid;gap:12px;align-content:start;padding:12px;border-radius:var(--radius-lg);background:var(--soft)}
.sk-tpl-cal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));overflow:hidden}.sk-tpl-day{display:grid;gap:6px;align-content:start;min-height:96px;padding:8px;border-right:1px solid var(--border);border-bottom:1px solid var(--border)}
.sk-tpl-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.sk-tpl-panel{display:grid;gap:12px}
@media(max-width:767px){.sk-row>.sk:nth-child(n+4){display:none}.sk-tpl-form,.sk-tpl-cards,.sk-tpl-panels{grid-template-columns:minmax(0,1fr)!important}.sk-tpl-cards.is-kpi{grid-template-columns:repeat(2,minmax(0,1fr))!important}.sk-tpl-day{min-height:56px}}
.upload-progress{display:grid;gap:4px;margin-top:6px;min-width:0}.upload-progress[hidden]{display:none}.upload-progress-head{display:flex;justify-content:space-between;gap:8px;min-width:0;color:var(--muted);font-size:12px;line-height:16px}.upload-progress-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.upload-progress-pct{flex-shrink:0;font-variant-numeric:tabular-nums}.upload-progress-track{height:6px;border-radius:var(--radius-full);background:var(--soft);overflow:hidden}.upload-progress-bar{height:100%;width:0;border-radius:var(--radius-full);background:var(--primary);transition:width .15s linear}.upload-progress-error{margin:0}.upload-noscript{margin:4px 0 0}
@media(prefers-reduced-motion:reduce){.upload-progress-bar{transition:none}}
/* design-main audit fixes (2026-09-27) */
.deal-card-timeline{align-items:center;min-width:0}
.deal-card-close{display:inline-flex;align-items:center;gap:2px;white-space:nowrap}.deal-card-close .icon{width:12px;height:12px;opacity:.6}
.deal-card-sep{opacity:.4}.deal-card-title{min-width:0;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.deal-card-timer{display:inline-flex;align-items:center;gap:6px;min-width:0;padding:2px 6px;border-radius:4px;background:var(--tb-f5f5f5a40,rgb(245 245 245 / .4));color:var(--muted);white-space:nowrap;overflow:hidden}
.deal-card-timer>.icon{width:12px;height:12px}
.deal-urgency-badge{padding:0 4px;border-radius:4px;background:var(--tb-b91c1c,#b91c1c);color:var(--tf-ffffff,#fff);font-size:12px;font-weight:700;line-height:16px}.deal-urgency-badge.tier-60{background:var(--tb-991b1b,#991b1b)}.deal-urgency-badge.tier-100{background:var(--tb-7f1d1d,#7f1d1d)}
.kanban-more{width:calc(100% - 16px);margin:0 8px 8px}
.deal-owner-avatar.is-empty{border:2px dashed var(--tl-a3a3a3a40,rgb(163 163 163 / .4));background:transparent;color:var(--muted)}.deal-owner-avatar.is-empty .icon{width:12px;height:12px}
.deal-owner-row{display:grid;grid-template-columns:minmax(0,1fr) 30px;align-items:center;border-radius:6px}.deal-owner-row:hover{background:var(--soft)}.deal-owner-row[hidden]{display:none}

.dashboard-more .icon{transform:none}
.dashboard-list{grid-template-columns:minmax(0,1fr)}.dashboard-list>li{min-width:0}
/* Legacy Dashboard.jsx Tailwind: quick grid 3/sm:4/md:6 cols, label text-[10px] sm:text-xs leading-tight, stat cards p-4, money text-xl, columns gap-3 sm:gap-6 */
/* 2026-10-07: the stat figures are not links, so they carry no card chrome (they read as tiles beside the ลัดไปยัง links otherwise). */
@media(max-width:639px){.dashboard-columns{gap:12px}}



@media(min-width:768px){.ops-ta-list{align-self:start}}
.kebab-menu a{display:flex;align-items:center;gap:8px}.kebab-menu a .icon{width:16px;height:16px}
.project-table:not(.contact-table) th:nth-child(1){width:100px}.project-table:not(.contact-table) th:nth-child(4){width:100px}.project-table:not(.contact-table):not(.credit-term-table):not(.tax-report-table) th:nth-child(5){width:80px;text-align:center}.project-table:not(.contact-table) th:nth-child(6){width:120px}
.project-table:not(.contact-table):not(.credit-term-table):not(.tax-report-table) td:nth-child(5){text-align:center}.project-table:not(.contact-table) td:nth-child(n+4),.project-table:not(.contact-table) th{white-space:nowrap}
.project-table:not(.contact-table) td:nth-child(2)>.record-link,.project-table:not(.contact-table) td:nth-child(2)>.muted{display:block;max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-table:not(.contact-table) td:nth-child(3){max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.contact-table th,.contact-table td:not(.contact-roles-cell){white-space:nowrap}.contact-table .badge{white-space:nowrap}
input[type=file]{height:auto;min-height:36px;padding:3px 12px 3px 3px;font-size:12px;line-height:16px;color:var(--muted)}
input[type=file]::file-selector-button{height:28px;margin-right:8px;padding:0 12px;border:1px solid var(--border);border-radius:6px;background:var(--tb-ffffff,#fff);color:var(--fg);font:500 12px/16px 'IBM Plex Sans Thai',sans-serif;cursor:pointer}
dialog.modal h1{font-weight:600}
.kebab-menu form{margin:0}.kebab-menu-item{display:flex;align-items:center;gap:8px;width:100%;height:32px;padding:6px 8px;border:0;border-radius:4px;background:transparent;color:var(--fg);font-size:14px;line-height:20px;text-align:left;white-space:nowrap}.kebab-menu-item:hover{background:var(--soft)}.kebab-menu-item .icon{width:16px;height:16px}.kebab-menu-item.danger{color:var(--tf-dc2626,#dc2626)}

.contact-doc-upload>.button{justify-self:start;align-self:end}.contact-doc-empty{margin:0}
.products-row-title{font-weight:500}

.nav-collapse{justify-content:space-between;color:var(--muted);font-size:12px;line-height:16px}.nav-collapse>span{flex:1}
.nav-user-menu{position:relative}.nav-user-menu>summary{list-style:none;cursor:pointer}.nav-user-menu>summary::-webkit-details-marker{display:none}
.nav-avatar{border:1px solid var(--border);background:var(--tb-171717a10,rgb(23 23 23 / .1))}
.nav-user-popover{position:absolute;left:0;right:0;bottom:calc(100% + 4px);z-index:40;padding:4px;border:1px solid var(--border);border-radius:6px;background:var(--tb-ffffff,#fff);box-shadow:var(--shadow-lg)}
.collapsed .nav-user-popover{left:calc(100% + 8px);right:auto;bottom:0;width:208px}
.nav-user-popover form{margin:0}.nav-user-popover a,.nav-user-logout{display:flex;align-items:center;gap:8px;width:100%;height:32px;padding:6px 8px;border:0;border-radius:4px;background:transparent;color:var(--fg);font-size:14px;line-height:20px;text-align:left;white-space:nowrap}
.nav-user-popover a:hover,.nav-user-logout:hover{background:var(--soft)}.nav-user-popover .icon{width:16px;height:16px}.nav-user-logout{color:var(--tf-dc2626,#dc2626)}


/* DealDetail (legacy DealDetail.jsx / DealActivityFeed.jsx / DealInfoEditableSection.jsx) */
main[data-route="/DealDetail"] .page-header h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.deal-stage-path{align-items:center;gap:0;padding:2px 0}
.deal-stage-chip{flex:0 0 auto;padding:2px 4px;border-radius:4px;color:var(--muted);font-size:12px;line-height:16px;white-space:nowrap}
.deal-stage-chip.passed{background:var(--tb-171717a10,rgb(23 23 23 / .1));color:var(--fg)}
.deal-stage-chip.current{background:var(--primary);color:var(--on-primary,#fff);font-weight:600}
.deal-stage-link{flex:0 0 12px;width:12px;height:1px;background:var(--border)}.deal-stage-link.is-reached{background:var(--tb-171717a40,rgb(23 23 23 / .4))}
.deal-stage-timer{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;line-height:16px;color:var(--muted)}.deal-stage-timer .icon{width:12px;height:12px}
.deal-stage-timer.urgency-watch{color:var(--tf-a16207,#a16207)}.deal-stage-timer.urgency-late{color:var(--tf-b91c1c,#b91c1c)}.deal-stage-timer.urgency-critical{color:var(--tf-7f1d1d,#7f1d1d);font-weight:700}
.deal-tabs-head{margin:16px 0 0}.deal-tabs-head .project-detail-tabs-scroll{flex:1;min-width:0;margin-bottom:-1px}@media(max-width:767px){.deal-tabs-head .project-detail-tabs-scroll{align-self:stretch;width:100%;max-width:100%}}
/* sweep-p3:begin */
.deal-info .facts{margin-bottom:16px}.deal-info .facts .is-warn{color:var(--tf-d97706,#d97706)}.deal-info .facts .is-late{color:var(--tf-dc2626,#dc2626)}
@media(max-width:767px){main#content .deal-info-pair{grid-template-columns:minmax(0,1fr)}}
.deal-composer .deal-composer-modes.tabs{display:flex;width:fit-content;max-width:100%;margin:0 0 8px;border:0;padding:4px;background:var(--soft)}
.deal-composer .deal-composer-modes.tabs button{position:static;flex:none;justify-content:flex-start;height:auto;font-size:14px;line-height:20px}.deal-composer .deal-composer-modes.tabs button::after{display:none}
.deal-composer .deal-composer-modes.tabs button.active,.deal-composer .deal-composer-modes.tabs button.is-plan.active{background:var(--bg);color:var(--fg);box-shadow:var(--shadow)}
@media(max-width:767px){
 .deal-composer .deal-composer-modes.tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
 .deal-composer .deal-composer-modes.tabs button{justify-content:center;white-space:normal;min-height:44px;padding:6px 8px}
 /* DEAL-03: folded until a mode is pressed (the timeline right under it) */.deal-composer.is-folded .deal-composer-body{display:none}.deal-composer.is-folded .deal-composer-modes.tabs{margin:0} /* SALES-41: folded, no mode reads as chosen; one tap opens it */.deal-composer.is-folded .deal-composer-modes.tabs button.active,.deal-composer.is-folded .deal-composer-modes.tabs button.is-plan.active{background:transparent;color:var(--muted);box-shadow:none}
}
.deal-composer .deal-composer-types select{width:auto;min-width:200px;max-width:100%}
main#content .deal-finance-trace{padding:4px 8px}
/* sweep-p3:end */
.deal-detail-panel>.card.padded+.card.padded{margin-top:12px}
.deal-activity{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
.deal-next-appointment{display:flex;align-items:flex-start;gap:10px;padding:10px;border:1px solid var(--tl-ddd6fe,#ddd6fe);border-radius:var(--radius-lg);background:var(--tb-f5f3ffa50,rgb(245 243 255 / .5))}.deal-next-appointment>.icon{width:16px;height:16px;margin-top:2px;color:var(--tf-8b5cf6,#8b5cf6);flex:0 0 auto}.deal-next-appointment p{margin:0;font-size:12px;line-height:16px;font-weight:500}.deal-next-appointment small{font-size:12px;line-height:16px;color:var(--tf-7c3aed,#7c3aed)}
.deal-composer{border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden;background:var(--bg)}
.deal-composer-modes{display:flex;border-bottom:1px solid var(--border);background:var(--tb-f5f5f5a30,rgb(245 245 245 / .3))}
.deal-composer-modes button{position:relative;flex:1;display:inline-flex;align-items:center;justify-content:center;gap:6px;height:32px;border:0;background:transparent;color:var(--muted);font-size:12px;line-height:16px;font-weight:500;cursor:pointer}
.deal-composer-modes button.active{color:var(--fg)}
.deal-composer-modes button.active::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--primary)}
.deal-composer-body{display:grid;gap:10px;padding:12px}
.deal-composer-types{display:flex;flex-wrap:wrap;gap:6px}
.deal-composer textarea{min-height:120px;border:0;border-radius:var(--radius-md);background:var(--tb-f5f5f5a30,rgb(245 245 245 / .3));font-size:14px;line-height:20px}
.deal-composer-foot{display:flex;align-items:flex-end;justify-content:flex-end;gap:8px}.deal-composer-foot input{height:32px;min-height:32px;font-size:12px}
.deal-composer-foot .button{height:32px;min-height:32px;padding:0 12px}.deal-composer-when{display:inline-flex;gap:8px;align-items:center;margin-left:auto}.deal-composer-when>.datepicker{width:168px}.deal-composer-when select{height:32px;width:auto}
.deal-system-toggle{display:flex;align-items:center;gap:6px;width:100%;height:32px;box-sizing:border-box;margin-bottom:4px;padding:0;border:0;border-bottom:1px solid var(--border);background:transparent;color:var(--muted);font-size:12px;line-height:16px;cursor:pointer;text-align:left}
.deal-system-toggle .icon{width:12px;height:12px}.deal-system-toggle:hover{color:var(--fg)}

.activity-timeline{margin:0;padding:0;list-style:none}
.activity-row{display:flex;gap:12px;padding:10px 0}
.activity-rail{display:flex;flex-direction:column;align-items:center;flex:0 0 24px}.activity-rail::after{content:"";flex:1;width:1px;margin-top:4px;background:var(--border)}
/* the halo over the rail line is a ring, not a border: a bordered dot inside the Deal panel read as a box in a box (design probe) */
.activity-icon{display:flex;align-items:center;justify-content:center;flex:none;width:20px;height:20px;margin:2px;border-radius:var(--radius-full);background:var(--soft);box-shadow:0 0 0 2px var(--bg)}.activity-icon .icon{width:12px;height:12px}
.activity-body{flex:1;min-width:0;padding-bottom:4px}
.activity-head{display:flex;align-items:baseline;gap:6px;min-width:0}.activity-head strong{font-size:12px;line-height:16px;font-weight:500}
.activity-type{font-size:12px;line-height:16px}
.activity-system{padding:0 4px;border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--muted);font-size:10px;line-height:14px}
.activity-head time{margin-left:auto;flex:0 0 auto;color:var(--muted);font-size:12px;line-height:16px;white-space:nowrap}
.activity-text,.activity-stage,.activity-meta{margin:2px 0 0;font-size:12px;line-height:16px;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--tf-0a0a0aa80,rgb(10 10 10 / .8))}
.activity-stage{color:var(--muted)}.activity-stage strong{color:var(--fg);font-weight:500}.activity-meta{color:var(--muted)}.deal-composer-modes button .icon,.activity-meta .icon{width:14px;height:14px;flex-shrink:0}p.activity-meta{display:flex;align-items:center;gap:4px}
/* DEAL-01: a refused edit shows the text saved meanwhile above the kept draft */.activity-edit-latest{margin:0 0 6px;font-size:12px;line-height:16px}.activity-edit-latest>span{color:var(--fg);white-space:pre-wrap}
.tone-slate .activity-icon,.tone-slate .activity-type{color:var(--tf-64748b,#64748b)}.tone-blue .activity-icon,.tone-blue .activity-type{color:var(--tf-3b82f6,#3b82f6)}.tone-amber .activity-icon,.tone-amber .activity-type{color:var(--tf-f59e0b,#f59e0b)}.tone-indigo .activity-icon,.tone-indigo .activity-type{color:var(--tf-6366f1,#6366f1)}.tone-green .activity-icon,.tone-green .activity-type{color:var(--tf-22c55e,#22c55e)}.tone-purple .activity-icon,.tone-purple .activity-type{color:var(--tf-a855f7,#a855f7)}.tone-cyan .activity-icon,.tone-cyan .activity-type{color:var(--tf-06b6d4,#06b6d4)}.tone-emerald .activity-icon,.tone-emerald .activity-type{color:var(--tf-10b981,#10b981)}.tone-orange .activity-icon,.tone-orange .activity-type{color:var(--tf-f97316,#f97316)}.tone-pink .activity-icon,.tone-pink .activity-type{color:var(--tf-ec4899,#ec4899)}.tone-teal .activity-icon,.tone-teal .activity-type{color:var(--tf-14b8a6,#14b8a6)}.tone-violet .activity-icon,.tone-violet .activity-type{color:var(--tf-8b5cf6,#8b5cf6)}
.deal-info{display:grid;gap:16px}.deal-detail-panel>.card.deal-info,.deal-detail-panel>.card.deal-file-list,.deal-detail-panel>.card.deal-projects-tab{border:0;padding:0;box-shadow:none}/* SALES-35 (11-20): the Projects tab is not a box in the tab's box */
.deal-info-warning{display:flex;align-items:flex-start;gap:12px;padding:12px;border:2px solid var(--tl-fcd34d,#fcd34d);border-radius:var(--radius-lg);background:var(--tb-fffbeb,#fffbeb)}.deal-info-warning>.icon{width:20px;height:20px;color:var(--tf-d97706,#d97706);flex:0 0 auto}.deal-info-warning p{margin:0;color:var(--tf-78350f,#78350f);font-size:14px;line-height:20px;font-weight:600}.deal-info-warning small{color:var(--tf-b45309,#b45309);font-size:12px;line-height:16px}
.deal-info-label{gap:8px;font-size:14px;line-height:20px;font-weight:500}

.deal-info-contact{display:grid;gap:8px;padding:12px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--tb-f5f5f5a30,rgb(245 245 245 / .3))}
.deal-info-contact-grid{display:grid;gap:6px 16px;font-size:12px;line-height:16px}@media(min-width:640px){.deal-info-contact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.deal-info-contact-grid .is-wide{grid-column:1/-1}}
.deal-info-contact-grid span{display:flex;align-items:center;gap:6px;min-width:0}.deal-info-contact-grid .icon{width:12px;height:12px;color:var(--muted);flex:0 0 auto}.deal-info-contact-grid b{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.deal-info-contact-grid em{font-style:normal;color:var(--muted)}
.deal-info-missing{display:flex;align-items:flex-start;gap:6px;margin:0;padding-top:8px;border-top:1px solid var(--tl-fde68aa50,rgb(253 230 138 / .5));color:var(--tf-b45309,#b45309);font-size:12px;line-height:16px}.deal-info-missing .icon{width:12px;height:12px;margin-top:2px;flex:0 0 auto}.deal-info-missing a{display:inline-block;color:inherit;font-weight:500;text-decoration:underline}

.deal-quotation .actions,.deal-detail-panel .actions{display:flex;flex-wrap:wrap;gap:8px}

.deal-file-list{padding:4px}.deal-file-row{display:flex;align-items:center;gap:12px;padding:8px;border-radius:var(--radius-lg)}.deal-file-row:hover{background:var(--soft)}
.deal-file-icon{display:flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px;border-radius:var(--radius-lg);background:var(--soft);color:var(--muted)}.deal-file-icon .icon{width:20px;height:20px}
.deal-file-main{display:grid;flex:1;min-width:0}.deal-file-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--fg);font-size:14px;line-height:20px;font-weight:500;text-decoration:none}.deal-file-name:hover{text-decoration:underline}.deal-file-main small{font-size:12px;line-height:16px}
.deal-file-main .deal-file-type{justify-self:start;margin:2px 0}.deal-file-note{color:var(--fg);white-space:pre-line;overflow-wrap:anywhere}
.deal-file-actions{display:flex;align-items:center;gap:2px;flex:0 0 auto}.deal-file-actions form{margin:0}
/* UnifiedCalendar (legacy CalendarEventCard.jsx / UnifiedCalendar.jsx Sheet) */
.calendar-detail-card{gap:12px}
/* Owner 2026-09-29: no coloured side bar on event cards (status shows by text/badge). */
.calendar-detail-card>.calendar-mark:not(.calendar-mark-icon){display:none}
.calendar-mark.calendar-mark-icon{display:flex;align-items:center;justify-content:center;align-self:flex-start;width:28px;height:28px;border-radius:var(--radius-lg);color:var(--tf-ffffff,#fff)}.calendar-mark-icon .icon{width:14px;height:14px}
.calendar-detail-meta{gap:4px 12px}.calendar-detail-meta>span{display:inline-flex;align-items:center;gap:4px;min-width:0}.calendar-detail-meta .icon{width:12px;height:12px;opacity:.5;flex:0 0 auto}
.calendar-detail-meta .calendar-meta-location{max-width:180px}.calendar-detail-meta .calendar-meta-location>span,.calendar-detail-meta .calendar-meta-trainer>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.calendar-detail-subtitle{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:16px}
.calendar-settings[open]>.calendar-settings-backdrop{position:fixed;inset:0;z-index:60;background:var(--tb-000000a80,rgb(0 0 0 / .8))}
.calendar-settings-panel{position:fixed;top:0;right:0;bottom:0;z-index:61;width:310px;max-width:100vw;max-height:none;height:100vh;padding:24px 16px 16px;border:0;border-left:1px solid var(--border);border-radius:0;box-shadow:var(--shadow-lg);overflow:auto}
.calendar-settings-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.calendar-settings-head h2{margin:0;font-size:18px;line-height:28px;font-weight:600}
.calendar-settings-panel .calendar-option>.switch{margin-left:auto}
/* Legacy CalendarSidebar: layer rows space-y-1.5 with a rounded-sm 12px swatch; card-field rows are a Checkbox left of the label, dimmed when off. */
.calendar-settings-panel .calendar-option{padding:3px 0}.calendar-settings-panel .calendar-swatch{border-radius:2px}
/* Legacy CalendarSidebar group labels: text-[11px] font-medium text-muted-foreground, mb-1.5 (layers) / mb-1 (card fields). */
.calendar-settings-panel .calendar-settings-group>p.muted{margin:0 0 6px;font-size:11px;line-height:16px;font-weight:500;color:var(--muted)}.calendar-settings-panel [data-calendar-field-group]>p.muted{margin-bottom:4px}
.calendar-settings-panel h3+p.muted{margin:0 0 12px;font-size:10px;line-height:14px}.calendar-settings-group:has(.calendar-field-option){border-bottom:0;margin-bottom:4px}
.calendar-settings-panel .calendar-field-option{padding:6px;border-radius:6px}.calendar-settings-panel .calendar-field-option:hover{background:var(--tb-f5f5f5a50,#f5f5f580)}.calendar-settings-panel .calendar-field-option:has(input[type=checkbox]:not(:checked)){opacity:.5}.calendar-settings-panel .calendar-field-option span{flex:1}.calendar-settings-panel .calendar-field-option{cursor:grab;user-select:none}.calendar-settings-panel .calendar-field-option>.icon{width:14px;height:14px;flex-shrink:0;color:var(--tf-a3a3a3a40,#a3a3a366)}.calendar-settings-panel .calendar-field-option.is-dragging{background:var(--tb-171717a10,#1717171a);box-shadow:inset 0 0 0 1px #1717174d}
/* ProjectDetail (legacy TrainingScheduleTab.jsx:160-298, ProjectOverviewTab.jsx:223-383) */
.project-day-chip{display:inline-flex;align-items:center;height:auto;min-height:0;cursor:pointer}
.project-readiness li{display:flex;align-items:center;gap:8px;min-width:0}.project-readiness li .mono{flex:0 0 auto}
.project-readiness-name{flex:1 1 96px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-readiness-missing,.project-readiness-ok{flex-shrink:0;white-space:nowrap}.project-readiness li{flex-wrap:wrap}.project-readiness-missing{white-space:normal;max-width:100%}
/* E-Learning filming-day month picker (legacy shadcn Calendar in ElearningWorkspace.jsx:426-437) */
/* Inventory: header action stays a readable text button at phone width (LIVE-13); an empty Lot list spans the grid (DM-30) */
@media(max-width:767px){.page-header .material-header-action{flex:0 0 auto;width:auto;padding:0 12px;font-size:12px;white-space:nowrap}}
.material-lots>.card.empty{grid-column:1/-1}
/* Modals: read-only facts are text, not input chrome; on phones the footer stays visible while the fields scroll (DM-27) */
.field-static{display:block;min-height:20px;padding:0;font-size:14px;line-height:20px;font-weight:500;color:var(--fg)}
@media(max-width:639px){dialog.modal .modal-inner>form>.form-actions,dialog.modal form>.form-actions{position:sticky;bottom:-16px;z-index:2;margin:16px -16px -16px;padding:12px 16px 16px;border-top:1px solid var(--border);background:var(--bg)}}
/* UserProfile: save inside its card, security card with icon title and inner muted boxes (legacy UserProfile.jsx) */
.profile-card-actions{margin-top:0}
.profile-security>h2{display:flex;align-items:center;gap:8px}.profile-security>h2 .icon{width:20px;height:20px}
.profile-security-box{padding:16px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--tb-f5f5f5a30,rgb(245 245 245 / .3));gap:12px}.profile-security-box h3{margin:0}.profile-security-box .form-actions{margin-top:0}.profile-security-box p{margin:0}
/* end design-main audit fixes */

/* Finance design audit (2026-09-27, lane design-finance; the legacy source is cited per rule). */
/* DF-01 legacy Expenses.jsx TabsList w-max inside overflow-x-auto: a tab never shrinks under its label; the strip scrolls.
   The coarse-pointer 44px min-width replaced the flex item's min-content minimum, so labels piled on top of each other. */
.tabs :is(a,button){flex-shrink:0}
@media(pointer:coarse){.tabs :is(a,button){min-width:max(44px,max-content)}}
/* DF-02 a KPI amount (totalsHtml .amt) takes its card's size, weight and colour, not the 12px muted .metric span label style. */
.metric .amt,.metric .amt-sep{font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}

/* DF-04 payment queues in the StatusFilteredExpenseTab language: compact p-3 KPI cards (text-lg ฿, "N รายการ" caption),
   ฿ amounts in the sans face with tabular figures (CanonicalExpenseRow), amounts and badges on one line. */

.expense-list-table .badge{white-space:nowrap}

.payment-group>summary .expense-list-group-cal{width:14px;height:14px;color:var(--tf-94a3b8,#94a3b8);flex:0 0 auto}

/* one column geometry for every round group (DF-05 applies the same rule to the status-tab groups) */

@media(pointer:fine){.payment-queue .record-link{min-height:0}}
/* DF-05 legacy StatusFilteredRoundGroup fixes each column's width, so every round group of a status tab shares one geometry.
   Widths are the legacy ones widened only where the 12px floor of the type scale needs it (badges, check headers). */
.expense-list-group-card .expense-list-round-table{table-layout:fixed;width:100%;min-width:1340px}
.expense-list-round-table th{white-space:normal;overflow-wrap:normal;word-break:keep-all}
.expense-list-group-card .expense-list-table.expense-list-round-table th.expense-list-h-view{width:32px}
.expense-list-group-card .expense-list-table.expense-list-round-table th.expense-list-h-project{width:110px}.expense-list-group-card .expense-list-table.expense-list-round-table th.expense-list-h-header{width:130px}.expense-list-group-card .expense-list-table.expense-list-round-table th.expense-list-h-account{width:120px}
.expense-list-group-card .expense-list-table.expense-list-round-table th.expense-list-h-payee{width:120px}.expense-list-group-card .expense-list-table.expense-list-round-table th.expense-list-h-amount{width:112px}.expense-list-group-card .expense-list-table.expense-list-round-table th.expense-list-h-state{width:136px}
.expense-list-group-card .expense-list-table.expense-list-round-table th.expense-list-h-check{width:60px}.expense-list-group-card .expense-list-table.expense-list-round-table th.expense-list-h-check+th.expense-list-h-check{width:64px}
.expense-list-group-card .expense-list-table.expense-list-round-table th.expense-list-h-bankno{width:96px}
/* DF-13 legacy ExpenseListTab: เพิ่มรายจ่าย is the default (black) primary Button and stays right-aligned when the row wraps;
   only เพิ่มรายรับ is green (IncomeListTab). The status Select is 150px with an ellipsis; every cell, the eye included, is align-top;
   pagination is h-8 w-8 with prev/next shown disabled at the ends. */
.expense-list-filters .button.primary{background:var(--primary);border-color:var(--primary)}
.expense-list-filters .button.primary:not(.income-add):hover{background:var(--tb-171717a90,rgb(23 23 23 / .9));border-color:var(--tl-171717a90,rgb(23 23 23 / .9))}
.expense-list-filters select{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
.expense-list-filters select[name=status]{width:150px}
.expense-list-table td:first-child{vertical-align:top}
.expense-list-table td:first-child .expense-list-eye{margin-top:-6px}
.list-pager .button{width:32px;min-width:32px;height:32px;min-height:32px;padding:0;justify-content:center}
.list-pager .button.is-disabled{opacity:.5;pointer-events:none}
/* DF-06 legacy TaxReport.jsx is full width (p-3 sm:p-6, no max-w); ExpenseDetailTab KPIs are text-lg bold sans, and date,
   amount and status cells are whitespace-nowrap. The year is one Select that applies on change. */
.tax-report-detail td.mono,.tax-report-table td.mono{font-family:inherit}
.tax-report-detail td,.tax-report-detail .badge{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* DF-10 legacy CashflowCalendar: one card, 7 day columns plus an 8th สรุปสัปดาห์ column (65%) with the day detail beside it
   (35%) from lg; day cells carry compact ฿ figures (fmtK) in the sans face. Below 640px the week summary becomes a line under its week. */
.cash-day-amount{font-family:inherit;white-space:nowrap}
.cashflow-project-chip{display:inline-block;margin-left:6px;padding:0 6px;border:1px solid var(--border);border-radius:4px;font-size:12px;font-weight:500;line-height:18px;color:var(--muted);cursor:pointer;vertical-align:1px}
.expense-list-round-table td{overflow-wrap:break-word}
.expense-list-round-table .expense-list-project span.muted{display:block;white-space:normal}
.expense-list-round-table .expense-list-header,.expense-list-round-table .expense-list-account,.expense-list-round-table .expense-list-desc,.expense-list-round-table .expense-list-payee{max-width:none}
/* DF-12 one money face: ฿ amounts in the sans face with tabular figures (legacy CanonicalExpenseRow / ExpenseDetailTab); .mono stays for codes. */
.num{font-variant-numeric:tabular-nums;white-space:nowrap}td.num,th.num{text-align:right}.nowrap{white-space:nowrap}

/* DF-17 an incomplete-data notice is amber (legacy TaxReport bg-amber-50); red stays for errors. */
.alert.warning{border-color:var(--tl-fcd34d,#fcd34d);background:var(--tb-fffbeb,#fffbeb);color:var(--tf-92400e,#92400e)}
.alert.warning ul{margin:4px 0 0;padding-left:20px}
/* DF-08 legacy approval panel: labelled fields stacked, a footer action row with gaps, a destructive button in the destructive variant. */
.button.danger{background:hsl(0 84.2% 60.2%);color:var(--tf-ffffff,#fff);border-color:transparent}
.button.danger:hover{background:hsl(0 84.2% 60.2% / .9)}
.button.danger .icon{color:var(--tf-ffffff,#fff)}

fieldset:disabled :is(input,select,textarea){background-color:var(--soft);color:var(--muted);cursor:not-allowed}
/* DF-11 Cost Center rows: dates and money on one line, headers never split mid-word, one column geometry. */
.cost-center-table{table-layout:fixed;min-width:1040px}
.cost-center-table th{white-space:nowrap}
.cost-center-table .cost-center-c-bill{width:24%}.cost-center-table .cost-center-c-deliverable{width:20%}.cost-center-table .cost-center-c-date{width:96px}
.cost-center-table td small{display:block}
.cost-center-date{white-space:nowrap}
/* DF-18 legacy AdminSettings: domain tabs and finance sub-tab pills carry their icons; searches sit on one line with the icon they
   pad for and apply as the User types; the add-submitter disclosure reads as a card header; partner rows share one column grid. */


.finw-projects{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:4px 16px;max-height:280px;overflow:auto;border:1px solid var(--border);border-radius:var(--radius-md);padding:8px 12px}
.finw-projects legend{padding:0 4px}
.users-partner-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:12px;align-items:center}
.users-partner-row>div:first-child{display:grid;gap:2px}
@media(max-width:639px){.users-partner-row{grid-template-columns:minmax(0,1fr)}}
/* DF-23 legacy Automations empty state (py-12, a 40px Zap at muted/30, the button mt-4); PersonReport picker 280px / 1fr from lg. */
.expense-list-filters .expense-list-add{min-height:36px;height:36px}

.approval-cash{margin-bottom:12px}.approval-cash-balance{display:flex;gap:6px;align-items:center;margin:0}.approval-cash-balance input{width:100%;min-width:0;height:36px;text-align:right}

/* Owner answers A7 (2026-09-27): the Project Model badge (Client / Company-owned) on Projects and the E-Learning Workspace. */
/* Owner answers A4 (2026-09-27): Base44 Deal card extras: tags (existing badge tones), the reader's star, win % and training date. */
.deal-card-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}.badge.deal-tag{padding:0 6px;font-weight:500;white-space:nowrap}.badge.deal-tag-green{background:var(--tb-dcfce7,#dcfce7);color:var(--tf-166534,#166534)}.badge.deal-tag-red{background:var(--tb-fee2e2,#fee2e2);color:var(--tf-991b1b,#991b1b)}.badge.deal-tag-amber{background:var(--tb-fef9c3,#fef9c3);color:var(--tf-854d0e,#854d0e)}.badge.deal-tag-purple{background:var(--tb-f3e8ff,#f3e8ff);color:var(--tf-6b21a8,#6b21a8)}.badge.deal-tag-gray{background:var(--tb-f3f4f6,#f3f4f6);color:var(--tf-374151,#374151)}.badge.deal-tag-blue{background:var(--tb-dbeafe,#dbeafe);color:var(--tf-1e40af,#1e40af)}.badge.deal-tag-orange{background:var(--tb-ffedd5,#ffedd5);color:var(--tf-9a3412,#9a3412)}.badge.deal-tag-pink{background:var(--tb-fce7f3,#fce7f3);color:var(--tf-9d174d,#9d174d)}.badge.deal-tag-teal{background:var(--tb-ccfbf1,#ccfbf1);color:var(--tf-115e59,#115e59)}.deal-star{flex-shrink:0;color:var(--tf-a3a3a3,#a3a3a3);font-size:14px;line-height:16px}.deal-star.is-on{color:var(--tf-f59e0b,#f59e0b)}.deal-star-toggle{border:0;background:transparent;padding:0 4px;min-height:32px;cursor:pointer}.activity-outcome{margin:4px 0 0;font-size:12px;line-height:16px;color:var(--muted)}

/* OpsTAHub remove / Feedforward-link per TA (audit PAR-17) */
.ops-ta-member-actions{gap:2px;flex-wrap:nowrap;flex-shrink:0}.ops-ta-member>.row-between{flex-wrap:nowrap;align-items:flex-start}.ops-ta-member>.row-between>span:first-child{flex:1;min-width:0}.icon-button.danger{color:var(--tf-b91c1c,#b91c1c)}.icon-button.small{width:28px;min-width:28px;height:28px;min-height:28px;padding:0}.icon-button.small .icon{width:16px;height:16px}.ops-ta-ffw-link{display:flex;flex-direction:column;gap:4px;margin-top:6px}.ops-ta-ffw-link input{flex:1;min-width:0}.modal.ops-ta-overview{width:min(var(--modal-w-lg),calc(100vw - 32px));position:fixed}.ops-ta-overview .modal-inner{min-height:0}.external-expense-thumbs{display:flex;flex-wrap:wrap;gap:8px}.external-expense-thumb{width:56px;height:56px;border:1px solid var(--border);border-radius:8px;overflow:hidden;padding:0;background:var(--soft);display:flex;align-items:center;justify-content:center;cursor:pointer}.external-expense-thumb:hover{box-shadow:0 0 0 2px var(--primary,#2563eb)}.external-expense-thumb img{width:100%;height:100%;object-fit:cover}.ops-ta-copy{position:relative;display:inline-flex}.ops-ta-copy-status{position:absolute;right:0;top:calc(100% + 4px);z-index:30;white-space:nowrap;background:var(--surface,var(--tb-ffffff,#fff));border:1px solid var(--border);border-radius:6px;padding:4px 8px;font-size:12px;line-height:16px;box-shadow:var(--shadow-lg)}/* Schedule day revenue + delete (audit DM-13) */
/* Quotation actions after issue (live QA 2026-09-27): note, button bar and the one-time customer link are full-width rows */
.quotation-actions{flex-direction:column;align-items:stretch;justify-content:flex-start;gap:12px}.quotation-actions>.success{margin:0}.quotation-actions>.actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin:0;width:100%;min-width:0}.quotation-actions>.actions>.inline-form{display:flex}.quotation-actions .quotation-public-link{width:100%;min-width:0}.quotation-public-link p{margin:0 0 12px}.quotation-public-link-row{display:flex;gap:8px;align-items:center;min-width:0}.qe-issued-link,.qe-issued-actions{margin-top:12px}.quotation-public-link-row .project-link-url{flex:1;min-width:0}.quotation-public-link-row .button{flex:0 0 auto}
@media(max-width:767px){.quotation-actions>.actions{justify-content:flex-start}.quotation-actions>.actions>.button,.quotation-actions>.actions>.inline-form{flex:1 1 auto}.quotation-actions>.actions>.inline-form>.button{flex:1}.quotation-public-link-row{flex-direction:column;align-items:stretch}}
.commercial-batch-panels{display:grid;gap:12px;margin-top:12px}.commercial-batch-panels .commercial-lifecycle{border:1px solid var(--border);border-radius:8px;padding:12px 16px;background:var(--bg);min-width:0}.commercial-batch-panels .commercial-lifecycle input,.commercial-batch-panels .commercial-lifecycle select,.commercial-batch-panels .commercial-lifecycle textarea{max-width:100%;min-width:0}
@media (max-width:1100px){.commercial-entitlements table,.commercial-document-matrix table{min-width:0}.commercial-entitlements td,.commercial-entitlements th,.commercial-document-matrix td,.commercial-document-matrix th{white-space:normal;overflow-wrap:break-word}.commercial-document-matrix td small,.commercial-document-matrix td strong,.commercial-entitlements td small,.commercial-entitlements td strong{overflow-wrap:normal}}
/* Quotation sheet: legacy QuotationPrint.jsx .a4-page (210mm, padding 4mm 6mm, slate-100 backdrop) + QuotationPreview.jsx (p-10, min 600px, max 850px, gray-800 rules) */
.qp-sheet{background:var(--tb-f1f5f9,#f1f5f9);margin:0 -24px -24px;padding:24px 0;overflow-x:auto}.public-main .qp-sheet{margin:0}.qp-page{width:210mm;min-height:297mm;margin:0 auto;background:var(--tb-ffffff,#fff);box-shadow:var(--shadow-lg);padding:calc(4mm + 40px) calc(6mm + 40px);color:var(--tf-1a1a1a,#1a1a1a);font-family:'IBM Plex Sans Thai',sans-serif;font-size:11px;line-height:16px}.qp-page p{margin:0}.qp-head{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:24px;padding-bottom:12px;border-bottom:2px solid var(--tl-1f2937,#1f2937)}.qp-seller h2{margin:0;color:var(--tf-1f2937,#1f2937);font-size:14px;font-weight:700;line-height:1.25}.qp-seller p{margin-top:2px;font-size:10px;line-height:1.375;color:var(--tf-4b5563,#4b5563)}.qp-contact{display:flex;flex-wrap:wrap;column-gap:12px;margin-top:2px;font-size:10px;line-height:15px;color:var(--tf-6b7280,#6b7280)}.qp-logo{display:flex;justify-content:center;align-items:flex-start}.qp-logo img{height:56px;width:auto;object-fit:contain}.qp-title{text-align:right}.qp-title h1{margin:0;color:var(--tf-1f2937,#1f2937);font-size:11px;font-weight:700;line-height:1.25}.qp-number{padding-top:4px;color:var(--tf-1f2937,#1f2937);font-size:16px;font-weight:700;line-height:24px}.qp-dates{margin-top:2px!important;color:var(--tf-4b5563,#4b5563);font-size:11px;line-height:16px}
.qp-customer{width:100%;margin-bottom:20px;border-collapse:collapse;font-size:11px;line-height:16px}.qp-customer th,.qp-customer td{height:auto;padding:2px 0;border:0;background:none;text-align:left;vertical-align:top;font-size:11px;line-height:16px}.qp-customer th{width:160px;padding-right:8px;white-space:nowrap;color:var(--tf-1f2937,#1f2937);font-weight:600}.qp-customer td{color:var(--tf-374151,#374151)}.qp-customer td.qp-strong{color:var(--tf-111827,#111827);font-weight:500}.qp-customer .qp-soft{margin-left:6px}.qp-email{margin-left:24px!important}.qp-customer tr:hover{background:none}
.qp-items-wrap{margin-bottom:16px}.qp-items{width:100%;border-collapse:collapse;font-size:11px;line-height:16px}.qp-items th{height:auto;padding:8px 0;background:var(--tb-f3f4f6a50,rgba(243,244,246,.5));color:var(--tf-1a1a1a,#1a1a1a);font-size:11px;font-weight:700;line-height:16px;border-top:1px solid var(--border);border-bottom:2px solid var(--tl-1f2937,#1f2937)}.qp-items td{padding:8px 0;border-bottom:1px solid var(--tl-e5e7eb,#e5e7eb);vertical-align:top;font-size:11px;line-height:16px}.qp-items tbody tr:last-child td{border-bottom:1px solid var(--tl-e5e7eb,#e5e7eb)}.qp-items tbody tr:hover{background:none}.qp-c{text-align:center!important}.qp-l{text-align:left;padding-left:8px!important}.qp-r{text-align:right!important}.qp-col-n{width:24px}.qp-col-q{width:50px}.qp-col-u{width:80px}.qp-col-a{width:130px;padding-right:4px!important}.qp-items td:last-child{padding-right:4px}.qp-desc{padding-left:8px!important;padding-right:8px!important}.qp-chips{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin-bottom:2px}.qp-chip{padding:1px 6px;border:1px solid var(--tl-e5e7eb,#e5e7eb);border-radius:4px;background:var(--tb-f3f4f6,#f3f4f6);color:var(--tf-4b5563,#4b5563);font-size:9px;line-height:13px}.qp-chip-type{border-color:transparent;background:var(--tb-e5e7eb,#e5e7eb);color:var(--tf-374151,#374151);font-weight:500}.qp-chip-public{border-color:var(--tl-bfdbfe,#bfdbfe);background:var(--tb-dbeafe,#dbeafe);color:var(--tf-1d4ed8,#1d4ed8);font-weight:500}.qp-chip-custom{border-color:var(--tl-e9d5ff,#e9d5ff);background:var(--tb-f3e8ff,#f3e8ff);color:var(--tf-7e22ce,#7e22ce);font-weight:500}.qp-name{margin-bottom:2px;font-weight:500}.qp-meta{display:flex;flex-wrap:wrap;gap:12px;margin-top:2px;color:var(--tf-6b7280,#6b7280);font-size:9px;line-height:13px}.qp-notes{margin-top:2px!important;color:var(--tf-6b7280,#6b7280);font-size:9px;line-height:1.375;white-space:pre-wrap}.qp-strong{font-weight:500}.qp-soft{color:var(--tf-6b7280,#6b7280)}.qp-xs{font-size:9px;line-height:13px}.qp-red{color:var(--tf-ef4444,#ef4444)}.qp-line-net{margin-top:2px;padding-top:2px;border-top:1px solid var(--border);font-size:10px;font-weight:600;line-height:15px}
.qp-summary{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:24px;padding-top:16px;border-top:1px solid var(--border)}.qp-sums{width:260px;flex-shrink:0;color:var(--tf-6b7280,#6b7280);font-size:10px;line-height:15px}.qp-sums>*+*{margin-top:4px}.qp-sums .qp-label{margin-bottom:8px}.qp-row{display:flex;justify-content:space-between}.qp-label{margin-bottom:6px;color:var(--tf-6b7280,#6b7280);font-size:10px;font-weight:500;line-height:15px}.qp-bank{flex:1;margin:0 8px;padding:0 16px;border-left:1px solid var(--border);border-right:1px solid var(--border)}.qp-bank-row{display:flex;align-items:flex-start;gap:10px}.qp-bank-mark{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:24px;height:24px;border-radius:50%;background:var(--tb-1f2937,#1f2937);color:var(--tf-ffffff,#fff);font-size:8px;font-weight:700}.qp-bank-row div{color:var(--tf-374151,#374151);font-size:10px;line-height:1.375}.qp-bank-name{color:var(--tf-111827,#111827);font-weight:700}.qp-bank-empty{color:var(--tf-9ca3af,#9ca3af);font-size:10px;font-style:italic}.qp-due{min-width:150px;padding:12px;border-radius:12px;background:var(--tb-eff6ff,#eff6ff);color:var(--tf-1d4ed8,#1d4ed8);text-align:right}.qp-due div{margin-bottom:2px;font-size:11px;line-height:16px}.qp-due strong{display:block;font-size:20px;line-height:1.25}
.qp-terms{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-bottom:32px;padding-top:12px;border-top:1px solid var(--border)}.qp-signatures{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:32px;margin:32px 0;font-size:11px;text-align:center}.qp-signatures>div{display:flex;flex-direction:column}.qp-sign-title{color:var(--tf-1f2937,#1f2937);font-weight:600}.qp-sign-space{display:flex;justify-content:center;align-items:flex-end;min-height:128px}.qp-signature{color:var(--tf-374151,#374151);font:14px/20px 'Brush Script MT','Segoe Script',cursive}.qp-sign-line{width:65%;margin:0 auto;border-top:1px solid var(--border)}.qp-sign-date{margin-top:4px!important;color:var(--tf-6b7280,#6b7280);font-size:10px;line-height:15px}
/* Audit 2026-11-21 SALES21-01: a draft quotation says ร่าง across the sheet, on screen, printed and in the PDF (fixed in print: on every page) */.qp-page.qp-draft{position:relative}.qp-draft-mark{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;z-index:1;color:var(--tf-ef4444,#ef4444);opacity:.14;font-size:92px;font-weight:700;line-height:1;white-space:nowrap;transform:rotate(-28deg)}.qp-draft-word{color:var(--tf-ef4444,#ef4444)}@media print{.qp-draft-mark{position:fixed}}
@media print{.qp-sheet{margin:0!important;padding:0;background:var(--tb-ffffff,#fff);overflow:visible}.qp-page{width:210mm;min-height:0;margin:0!important;box-shadow:none;padding:calc(4mm + 40px) calc(6mm + 40px);-webkit-box-decoration-break:clone;box-decoration-break:clone}.qp-page *{-webkit-print-color-adjust:exact;print-color-adjust:exact}.qp-items tr,.qp-summary,.qp-signatures{break-inside:avoid}}
@media print{@page{size:A4;margin:0}}
@media(max-width:767px){}
main#content .qp-customer th{height:auto;padding:2px 8px 2px 0}main#content .qp-items th{height:auto;padding:8px 0}main#content .qp-items th.qp-l{padding-left:8px}main#content .qp-items th.qp-col-a{padding-right:4px}
@media(max-width:767px){.qp-sheet{margin:0 -12px -12px}}
/* phones and tablets: the A4 sheet scales to the screen width instead of scrolling sideways */
@media screen and (max-width:767px){.qp-sheet{overflow-x:hidden;padding:12px 0}.qp-page{zoom:.72}}
/* Audit SALES-30 2026-11-18: the customer opens the link on a phone (LINE). The public page reads as a page there, never a shrunk A4;
   print and the staff preview keep the A4 sheet. */
@media screen and (max-width:640px){.public-main .qp-sheet{padding:0;background:var(--bg);overflow:visible}.public-main .qp-page{zoom:1!important;width:auto;min-height:0;padding:20px 16px;box-shadow:none;font-size:14px;line-height:20px}
.public-main .qp-head{grid-template-columns:1fr;gap:12px}.public-main .qp-logo{justify-content:flex-start;order:-1}.public-main .qp-title{text-align:left}.public-main .qp-seller p,.public-main .qp-contact{font-size:12px;line-height:18px}
.public-main .qp-customer th{width:auto;display:block;padding-top:8px}.public-main .qp-customer td{display:block}.public-main .qp-customer tr{display:block}.public-main .qp-customer th,.public-main .qp-customer td{font-size:14px;line-height:20px}
.public-main .qp-items th,.public-main .qp-items td{font-size:13px;line-height:18px}.public-main .qp-col-u,.public-main .qp-items td:nth-child(4){display:none}.public-main .qp-col-a{width:96px}.public-main .qp-meta,.public-main .qp-notes,.public-main .qp-xs,.public-main .qp-chip{font-size:12px;line-height:16px}
.public-main .qp-summary{flex-direction:column;align-items:stretch}.public-main .qp-sums{width:auto;font-size:14px;line-height:20px}.public-main .qp-bank{margin:0;padding:12px 0 0;border:0;border-top:1px solid var(--border)}.public-main .qp-bank-row div{font-size:13px}.public-main .qp-due{text-align:left}
.public-main .qp-terms,.public-main .qp-signatures{grid-template-columns:1fr;gap:16px}.public-main .qp-sign-space{min-height:64px}}@media screen and (max-width:595px){.qp-page{zoom:.6}}@media screen and (max-width:499px){.qp-page{zoom:.46}}@media screen and (max-width:389px){.qp-page{zoom:.4}}
/* Quotation editor = legacy DealQuotationTab.jsx + QuotationLineItem.jsx (owner uses it daily; values from the Tailwind classes in ../erp/dist) */
.qe{display:grid;gap:20px}.qe h3{font-size:14px;line-height:20px;font-weight:600;margin:0}.qe .qe-title{margin-bottom:12px}.qe-hr{border:0;border-top:1px solid var(--border);margin:0;width:100%}.qe-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.qe-ghost{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 8px;border-radius:var(--radius-md);font-size:12px;line-height:16px;font-weight:500}.qe-ghost:hover{background:var(--soft)}.qe-ghost .icon{width:14px;height:14px}
.qe-box{background:var(--tb-f5f5f5a40,rgb(245 245 245 / .4));border-radius:var(--radius-lg);padding:12px;font-size:14px;line-height:20px;display:grid;gap:2px}.qe-box p{margin:0}.qe-strong{font-weight:500}.qe-sub,.qe-meta{font-size:12px;line-height:16px;color:var(--muted);font-weight:400}.qe-meta{display:flex;gap:16px;flex-wrap:wrap}
.qe-warn{background:var(--tb-fffbeb,#fffbeb);border:1px solid var(--tl-fde68a,#fde68a);color:var(--tf-92400e,#92400e);border-radius:var(--radius-lg);padding:12px;font-size:14px;line-height:20px;display:grid;gap:8px;justify-items:start}.qe-warn p{margin:0}.qe-warn a:not(.button){text-decoration:underline;font-weight:500}.qe .qe-sm{min-height:32px;height:32px;padding:0 12px;font-size:12px}
.qe-banner{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:var(--radius-lg);font-size:14px;line-height:20px}.qe-banner .icon{width:16px;height:16px}.qe-dirty{position:sticky;top:0;z-index:30;background:var(--tb-fffbeb,#fffbeb);border:1px solid var(--tl-fcd34d,#fcd34d);color:var(--tf-78350f,#78350f)}.qe-readonly{background:var(--tb-f8fafc,#f8fafc);border:1px solid var(--tl-cbd5e1,#cbd5e1);color:var(--tf-334155,#334155)}

.qe label,.qe .qe-label{display:flex;align-items:center;gap:4px;font-size:12px;line-height:16px;font-weight:500;margin-bottom:4px}.qe label small{font-size:12px;line-height:16px;color:var(--muted);font-weight:400}.qe label .icon{width:12px;height:12px}
.qe input:not([type=hidden]),.qe select{width:100%;height:36px}.qe textarea{width:100%}.qe-field{min-width:0}
.qe-doc{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.qe-vat{display:flex;align-items:center;gap:8px;padding-bottom:4px}.qe-vat .qe-label{margin:0}


.qe-lines{border:0;margin:0;padding:0;min-width:0;display:grid;gap:12px}.qe-lines:disabled{opacity:.9}
.qe-card{position:relative;display:flex;align-items:flex-start;gap:12px;border:1px solid var(--border);border-radius:var(--radius-lg);padding:12px;background:var(--tb-ffffff,#fff);transition:box-shadow .15s}.qe-card:hover{box-shadow:var(--shadow-sm)}
.qe-move{display:flex;flex-direction:column;align-items:center;gap:4px;padding-top:4px;flex-shrink:0}.qe-move button,.qe-trash{display:flex;align-items:center;justify-content:center;width:28px;height:28px;min-height:0;padding:0;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--muted);box-shadow:none}.qe-move button:hover:not(:disabled){background:var(--tb-f5f5f5a60,rgb(245 245 245 / .6));color:var(--fg)}.qe-move button:disabled{opacity:.3;cursor:not-allowed}.qe-move .icon{width:16px;height:16px}
.qe-body{flex:1;min-width:0;display:grid;gap:8px}.qe-type{margin-bottom:8px}.qe .qe-type select{width:192px;max-width:100%}
.qe-grid4{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;align-items:end}.qe-grid7{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.qe-time{display:flex;gap:6px}.qe .qe-time select{width:128px;flex-shrink:0}.qe-time-own{display:flex;gap:6px;min-width:0}.qe-time-own input{min-width:0}
.qe-join{display:flex}.qe-join{min-width:0}.qe .qe-join input{flex:1 1 auto;width:auto;min-width:0;border-top-right-radius:0;border-bottom-right-radius:0}.qe-unit-toggle{height:36px;min-height:0;min-width:32px;padding:0 8px;border:1px solid var(--border);border-left:0;border-radius:0 var(--radius-md) var(--radius-md) 0;background:var(--soft);font-size:12px;line-height:16px;font-weight:500;flex-shrink:0;box-shadow:none}.qe-unit-toggle:hover{background:var(--tb-f5f5f5a80,rgb(245 245 245 / .8))}
.qe-static{height:36px;display:flex;align-items:center;padding:0 12px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--tb-f5f5f5a60,rgb(245 245 245 / .6));color:var(--muted);font-size:14px}.qe-sum{height:36px;display:flex;align-items:center;padding:0 8px;border-radius:var(--radius-md);background:var(--soft);font-size:14px;font-weight:600;white-space:nowrap}
.qe-side{display:flex;flex-direction:column;align-items:center;gap:4px;flex-shrink:0;margin:-4px -4px 0 0}.qe .qe-trash{width:32px;height:32px;border-radius:var(--radius-md)}.qe-trash:hover{color:hsl(0 84.2% 60.2%);background:hsl(0 84.2% 60.2% / .1)}.qe-trash .icon{width:16px;height:16px}.qe-seq{min-width:22px;height:20px;padding:0 6px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-full);background:var(--tb-f5f5f5a60,rgb(245 245 245 / .6));color:var(--muted);font-size:12px;line-height:16px;font-weight:500}
.qe .qe-add{width:100%;margin-top:12px;min-height:32px;height:32px;border-style:dashed;font-size:12px;line-height:16px;box-shadow:none}.qe-add .icon{width:16px;height:16px}
.qe-totals{margin-top:24px;padding-top:20px;border-top:1px solid var(--border);display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;gap:16px}
.qe-summary{width:100%;display:grid;gap:8px;font-size:14px;flex-shrink:0}.qe-cap{font-size:12px;line-height:16px;color:var(--muted);margin-bottom:4px}.qe-cap-xs{font-size:12px;line-height:16px;color:var(--muted)}.qe-italic{font-style:italic}.qe-italic a{text-decoration:underline}
.qe-row{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;line-height:16px;color:var(--muted)}.qe-row-top{padding-top:8px;border-top:1px solid var(--border);margin-top:4px}
.qe-join-sm{color:var(--fg)}.qe .qe-join-sm input{width:112px;text-align:right}
.qe-pay{flex:1;width:100%;min-height:120px;opacity:.7}.qe-pay .qe-cap-xs{margin-bottom:8px}.qe-bank{display:flex;align-items:flex-start;gap:8px;font-size:12px;line-height:16px;color:var(--muted)}.qe-bank p{margin:0}.qe-bank-dot{width:24px;height:24px;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-full);background:var(--primary);color:var(--on-primary,#fff);font-size:12px;line-height:16px;font-weight:700;box-shadow:var(--shadow-sm)}
.qe-due{width:100%;flex-shrink:0;background:var(--tb-171717a05,rgb(23 23 23 / .05));border-radius:var(--radius-xl);padding:16px;text-align:right;color:var(--primary)}.qe-due-cap{font-size:12px;line-height:16px;font-weight:500;margin-bottom:4px}.qe-due-value{font-size:24px;line-height:32px;font-weight:700}
.qe-terms{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.qe-terms textarea{font-size:14px}
.qe-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap;padding-top:12px;border-top:1px solid var(--border)}.qe .qe-sign{display:flex;align-items:center;gap:8px;margin:0;font-size:14px;line-height:20px;font-weight:400;cursor:pointer;user-select:none}
.qe-save .icon{width:16px;height:16px}
@media(min-width:640px){.qe-doc{grid-template-columns:repeat(3,minmax(0,1fr));align-items:end}.qe-grid4{grid-template-columns:repeat(4,minmax(0,1fr))}.qe-grid7{grid-template-columns:repeat(4,minmax(0,1fr))}}
button.qe-ghost{height:32px;min-height:0;border:0;background:transparent;box-shadow:none;color:var(--fg)}
/* Quotation editor beyond legacy (owner 2026-09-28): duplicate button beside the trash, Thai inline errors, autosave status, item-type / customer / copy dialogs, skeleton while Alpine starts. */
.qe-dup{display:flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:0;padding:0;border:0;border-radius:var(--radius-md);background:transparent;color:var(--muted);box-shadow:none}.qe-dup:hover{background:var(--tb-f5f5f5a60,rgb(245 245 245 / .6));color:var(--fg)}.qe-dup .icon{width:16px;height:16px}
.qe-err{margin:4px 0 0;font-size:12px;line-height:16px;color:hsl(0 72% 45%)}.qe [aria-invalid=true]{border-color:hsl(0 72% 51%)}.qe-hint{display:block;margin-top:4px;font-size:12px;line-height:16px;color:var(--muted)}
.qe-chips{display:flex;flex-wrap:wrap;gap:4px}.qe-chips:not(:empty){margin-top:6px}.qe-chip{display:inline-flex;align-items:center;gap:4px}.qe-chip-x{border:0;background:none;padding:0 2px;cursor:pointer;color:inherit;font-size:14px;line-height:1}
.qe-keys{margin:8px 0 0;font-size:12px;line-height:16px;color:var(--muted);text-align:center}
.qe-saved{margin-right:auto;font-size:12px;line-height:16px;color:var(--muted);display:flex;gap:8px;flex-wrap:wrap;min-width:0}.qe-save-error{color:hsl(0 72% 45%)}
.qe-skeleton{display:grid;gap:12px}.qe-skeleton .sk-line{height:12px}.qe-sk-line{height:280px}
.qe-dialog .modal-inner{display:grid;gap:12px}.qe-dialog .modal-inner>p{margin:0}.qe-dialog-wide{width:min(var(--modal-w-lg),calc(100vw - 32px))}
.qe-type-list,.qe-pick-list{display:grid;gap:8px;max-height:min(60vh,480px);overflow:auto}
.qe .qe-type-option,.qe-type-option{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;width:100%;height:auto;min-height:36px;padding:12px;border:2px solid var(--border);border-radius:var(--radius-lg);background:var(--bg);color:var(--fg);text-align:left;box-shadow:none}.qe-type-option:hover{border-color:var(--fg)}.qe-type-option .icon{width:16px;height:16px;margin-top:2px;color:var(--muted)}
.qe-type-main{display:grid;gap:2px;min-width:0}.qe-type-name{font-size:14px;line-height:20px;font-weight:600}.qe-type-price{justify-self:start;font-size:12px;line-height:16px;font-weight:500;background:var(--soft);border-radius:var(--radius-sm);padding:0 6px}.qe-type-main small{font-size:12px;line-height:16px;color:var(--muted)}
.qe-pick{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;height:auto;min-height:36px;padding:8px 12px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg);color:var(--fg);text-align:left;font-size:14px;line-height:20px;box-shadow:none}.qe-pick:hover{background:var(--soft)}.qe-pick small{font-size:12px;line-height:16px}
.qe-prev{display:grid;gap:6px;padding:12px;border:1px solid var(--border);border-radius:var(--radius-lg)}.qe-prev-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:14px;line-height:20px}.qe-prev-head small{font-size:12px;line-height:16px}
@media(min-width:640px){.qe-terms{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:639px){.qe-card{padding:8px;gap:8px}.qe-move{gap:2px}.qe-actions{justify-content:stretch}.qe-actions .qe-save{width:100%;justify-content:center}.qe .qe-time{flex-wrap:wrap}.qe .qe-time select,.qe .qe-type select,.qe .qe-time .combobox.combobox,.qe .qe-type .combobox.combobox{width:100%}.qe-keys{display:none}}
@media(min-width:1280px){.qe-grid7{grid-template-columns:repeat(6,minmax(0,1fr)) minmax(120px,1fr)}}@media(min-width:1024px){.qe-totals{flex-direction:row}.qe-summary{width:300px}.qe-pay{padding:0 24px;border-left:1px solid var(--border);border-right:1px solid var(--border)}.qe-due{width:180px}}
/* Project Day card: batch, course and participant counts (legacy TrainingScheduleTab) */
.project-header-customer{margin:-12px 0 12px;font-size:12px;line-height:16px}

/* Approval decisions from the lists (legacy ApprovalTab bulk approve, RejectExpenseDialog, ดึงกลับ batch, PmApprovalRow inline) */
.approval-bulk-bar{align-items:center}.approval-bulk-bar .button[disabled]{opacity:.5;cursor:not-allowed}
.approval-row-decision{display:flex;gap:6px;align-items:center;justify-content:flex-end;flex-wrap:nowrap}.approval-row-decision form{margin:0}
.approval-bulk-result ul{margin:6px 0 0;padding-left:18px;font-size:13px}.approval-bulk-result li{margin:2px 0}
.approval-row-approve{color:hsl(142 72% 29%);border-color:hsl(142 60% 75%)}.approval-row-approve:hover{background:hsl(142 76% 96%)}
.approval-view-cell{display:inline-flex;align-items:center;gap:6px}.approval-files{display:inline-flex;align-items:center;gap:2px;font-size:12px;line-height:16px;color:var(--muted);text-decoration:none;white-space:nowrap}.approval-files:hover{color:var(--fg,inherit)}.approval-files svg{width:14px;height:14px}
.approval-ffw{white-space:nowrap;font-size:12px;line-height:16px}.approval-ffw.is-submitted{background:hsl(142 76% 96%);color:hsl(142 72% 29%);border-color:hsl(142 60% 85%)}.approval-ffw.is-missing{background:hsl(48 100% 96%);color:hsl(32 95% 35%);border-color:hsl(45 90% 80%)}
.catalog-tiers{display:grid;gap:8px;border:0;padding:0;margin:0;min-width:0}.catalog-tiers-head{gap:8px;flex-wrap:wrap}.catalog-tiers-table{max-height:400px;overflow:auto}.catalog-tiers-table table{min-width:420px}.catalog-tiers-table input{width:100%;min-width:64px}.catalog-tiers-table td:last-child,.catalog-tiers-table th:last-child{width:40px}
.catalog-course-list .catalog-tiers-table table{min-width:0}.catalog-course-list .inline-form{display:flex;gap:8px;flex-wrap:nowrap}.catalog-course-list .inline-form input{flex:1 1 0;min-width:0;width:auto}.catalog-course-list .inline-form input[type=text]:first-child:not(:last-of-type){flex:0 1 33%}
.products-info-links{display:grid;gap:8px}.products-info-links .products-info-label{margin:0}.products-info-video{display:inline-flex;align-items:center;gap:8px;color:var(--tf-9333ea,#9333ea)}.products-info-video .icon{width:14px;height:14px;flex-shrink:0}.products-info-pair{display:grid;gap:12px}.products-info-list{list-style:none;margin:0;padding:0;display:grid;gap:4px;font-size:14px;line-height:20px}.products-info-list li{display:flex;align-items:flex-start;gap:6px;overflow-wrap:anywhere}.products-info-mark.selling{color:var(--tf-22c55e,#22c55e)}.products-info-mark.custom{color:var(--tf-3b82f6,#3b82f6)}
@media(min-width:640px){.products-info-pair{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Legacy BuildBadge: running build and deploy time, bottom-right of every signed-in page, links to the Update Log. */
html.soft-loading .build-badge,html.fin-loading .build-badge,html.erp-swapping .build-badge,html.nav-settle .build-badge{visibility:hidden}.build-badge{padding:8px 12px;text-align:right;font-family:monospace;font-size:12px;line-height:16px}.build-badge a,.build-badge span{color:var(--muted);opacity:.6;text-decoration:none}.build-badge a:hover{opacity:1}@media print{.build-badge{display:none!important}}
/* Deal Kanban per-column tools (deal-kanban.php dealKanbanColumnTools) */
.kanban-column-head{flex-wrap:wrap}.kanban-column-tools{display:flex;align-items:center;flex:0 0 auto}.kanban-tool{display:inline-grid;place-items:center;padding:0;border:0;background:transparent;color:var(--muted);cursor:pointer;list-style:none}.kanban-tool::-webkit-details-marker{display:none}.kanban-tool:hover,.kanban-menu[open]>.kanban-tool,.kanban-menu.is-active>.kanban-tool{background:var(--soft);color:var(--fg)}.kanban-menu.is-active>.kanban-tool{color:var(--primary)}
.kanban-menu{position:relative}.kanban-menu-body{position:absolute;z-index:24;top:calc(100% + 4px);right:0;display:flex;flex-direction:column;gap:2px;width:220px;padding:8px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg);box-shadow:var(--shadow-xl);font-size:12px;line-height:16px}.kanban-menu-body>button{min-height:32px;padding:6px 8px;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--muted);text-align:left;cursor:pointer}.kanban-menu-body>button:hover{background:var(--soft);color:var(--fg)}.kanban-menu-body>button[aria-checked=true]{background:var(--soft);color:var(--primary);font-weight:600}.kanban-menu-label{display:flex;align-items:center;gap:6px;margin:4px 0 2px;color:var(--muted);font-size:12px}.kanban-menu-label .icon{width:14px;height:14px}
.kanban-menu-switch{display:flex;align-items:center;gap:6px;min-height:32px;font-size:12px;line-height:16px;color:var(--muted);cursor:pointer}.kanban-menu-switch .icon{width:14px;height:14px}.kanban-menu-switch[hidden]{display:none}
.kanban-column-search{display:flex;flex-wrap:wrap;align-items:center;gap:4px;flex:1 0 100%}.kanban-column-search[hidden]{display:none}.kanban-column-search .search{flex:1;min-width:0;margin:0}.kanban-column-search small{flex:1 0 100%;font-size:12px}
.kanban-column-filter{display:flex;flex-wrap:wrap;align-items:center;flex:1 0 100%}
.kanban-column>.deal-card[hidden]{display:none}.kanban-column.hide-stage-timer .deal-card-timer{display:none}
.deal-card-project{display:inline-grid;place-items:center;color:var(--tf-16a34a,#16a34a)}.deal-card-project .icon{width:14px;height:14px}.deal-card-generate{gap:4px;min-height:24px;padding:0 8px;font-size:12px}.deal-card-generate .icon{width:12px;height:12px}
.deal-info-copy{display:inline-grid;place-items:center;width:28px;height:28px;margin-left:auto;padding:0;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--muted);opacity:.6}.deal-info-copy:hover,.deal-info-copy:focus-visible{opacity:1;background:var(--soft);color:var(--fg)}.deal-info-copy .icon{width:14px;height:14px}
.activity-body{position:relative}.activity-menu{position:absolute;top:-4px;right:0}.activity-body .activity-head{padding-right:32px}.activity-menu .kanban-menu-body{width:140px}.activity-menu .kanban-menu-body>button{display:flex;align-items:center;gap:6px}.kanban-menu-body>button.is-danger{color:var(--tf-dc2626,#dc2626)}.activity-edit-form{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.qe-draft-revision{gap:12px;margin:0 0 16px;padding:8px 12px;border-radius:8px;background:var(--soft);font-size:14px}.qe-draft-revision p{margin:0}.qe-contact-edit{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-bottom:8px}.quotation-contact-extra>summary{cursor:pointer;font-weight:600;padding:6px 0}.quotation-contact-vehicle{display:grid;grid-template-columns:120px minmax(0,1fr) 34px;gap:6px;margin-bottom:6px}
.kanban-column.is-column-loading>.deal-card{opacity:.5}
/* Legacy ContactSaveResultDialog, now the corner message after a save (owner "1ก" 2026-10-07): check title, what changed, the PEAK status. */
.contact-save-ok{display:flex;align-items:center;gap:8px}.contact-save-ok .icon{width:18px;height:18px;flex-shrink:0}.contact-save-body{display:grid;gap:4px;margin-top:4px;white-space:normal;overflow-wrap:anywhere}.contact-save-body p{margin:0}
.contact-save-peak{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px}.contact-save-peak .icon{width:14px;height:14px;flex-shrink:0}.contact-save-peak b{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.contact-save-warn{color:var(--tf-b45309,#b45309)}
/* /ContactForm รูปภาพ / เอกสาร (owner 2026-10-24, "piled up"): drawn as the sections above it, on the section's own 16px grid. The three slots are one
   flat row of equal tiles (one per row on a phone); a tile is one 56px line: coloured icon square + name, then "อัปโหลดรูป" when empty, or the
   preview, the file name and the small upload-again / remove buttons when filled. No card inside a card, no hover-only buttons. */
.contact-image-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.contact-image-slot{display:flex;align-items:center;min-width:0;min-height:56px;border:1px solid var(--border);border-radius:var(--radius-md);background:transparent}
.contact-image-upload{display:contents}
.contact-image-slot:has(.contact-image-upload :focus-visible){outline:2px solid var(--fg);outline-offset:1px}
.contact-sec-extra .contact-image-slot label.contact-image-empty{flex:1;display:flex;align-items:center;gap:12px;min-width:0;min-height:54px;padding:8px 12px;border-radius:var(--radius-md);color:var(--muted);font-size:12px;line-height:16px;font-weight:400;cursor:pointer;transition:background .15s}
.contact-image-empty:hover{background:var(--soft)}
.contact-image-badge{flex:none;width:24px;height:24px;border-radius:4px;display:flex;align-items:center;justify-content:center;color:var(--tf-ffffff,#fff)}.contact-image-badge .icon{width:14px;height:14px}.tone-blue .contact-image-badge{background:var(--tb-3b82f6,#3b82f6)}.tone-amber .contact-image-badge{background:var(--tb-f59e0b,#f59e0b)}.tone-emerald .contact-image-badge{background:var(--tb-10b981,#10b981)}
.contact-image-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:18px;font-weight:500;color:var(--fg)}
.contact-image-go{flex:none;display:inline-flex;align-items:center;gap:4px;color:var(--muted)}.contact-image-go .icon{width:14px;height:14px}
.contact-image-filled{flex:1;display:flex;align-items:center;gap:12px;min-width:0;padding:7px 12px}
.contact-image-preview{flex:none;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid var(--border);border-radius:var(--radius-sm,4px);overflow:hidden;background:var(--soft)}.contact-image-preview img{width:100%;height:100%;object-fit:cover;cursor:zoom-in}.contact-image-preview .icon{width:18px;height:18px}
.contact-image-text{flex:1;min-width:0;display:grid;gap:0}.contact-image-text small{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:16px;color:var(--muted)}
.contact-image-overlay{flex:none;display:flex;align-items:center;gap:4px}.contact-image-overlay form{margin:0;display:flex}
/* Legacy Contacts.jsx header: outline sm "จัดการข้อมูล" dropdown (w-56 menu, align end). */
.contact-tools-menu{position:relative}.contact-tools-menu>summary{list-style:none;display:inline-flex;align-items:center;gap:6px;cursor:pointer;white-space:nowrap}.contact-tools-menu>summary::-webkit-details-marker{display:none}.contact-tools-menu>summary .icon{width:14px;height:14px}.contact-tools-menu .kebab-menu{width:224px;margin-top:4px}.contact-tools-menu .kebab-menu .icon{width:14px;height:14px}

/* In-page confirm dialog (legacy shared ConfirmDialog): title, description, ยกเลิก + per-action label. */
dialog.confirm-dialog{width:min(var(--modal-w-sm),calc(100vw - 32px));background:var(--bg);color:var(--fg)}
.confirm-dialog-title{margin:0;font-size:18px;line-height:28px;font-weight:600;overflow-wrap:anywhere}
.confirm-dialog-desc{margin:8px 0 0;color:var(--muted);font-size:14px;line-height:20px;white-space:pre-line;overflow-wrap:anywhere}
.confirm-dialog-body{margin-top:16px}.confirm-dialog-body[hidden]{display:none}
dialog.confirm-dialog.is-wide{width:min(var(--modal-w-lg),calc(100vw - 32px))}
.approve-confirm-table{max-height:300px;overflow:auto;border:1px solid var(--border);border-radius:8px}.approve-confirm-table table{width:100%;font-size:12px}.approve-confirm-table th,.approve-confirm-table td{padding:6px 8px;text-align:left}.approve-confirm-table .num{text-align:right;white-space:nowrap}
.approve-confirm-warn{margin-top:12px;font-size:12px}.approve-confirm-warn ul{margin:6px 0;padding-left:18px;max-height:112px;overflow:auto}.approve-confirm-warn p{margin:0}
.approve-confirm-sum{display:grid;grid-template-columns:1fr auto;gap:8px 16px;margin:12px 0 0;padding:12px;border-radius:8px;background:var(--soft);font-size:14px}.approve-confirm-sum dd{margin:0;font-weight:700;text-align:right}.approve-confirm-negative{margin:8px 0 0;font-size:12px}

.confirm-dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:24px}
@media(max-width:639px){.confirm-dialog-actions{flex-direction:column-reverse}.confirm-dialog-actions .button{width:100%;min-height:44px}}
/* /Projects filter row and table, from legacy Projects.jsx: SelectTrigger w-[120px] / w-[160px] h-9 with ArrowUpDown w-3.5, Button outline|default size sm text-xs h-9, customer text-xs truncate max-w-[220px], "-" in muted. */




.public-main.public-submitexpense:has(.public-expense-denied){max-width:none;padding:0}
.public-expense-denied{display:flex;align-items:flex-start;justify-content:center;min-height:100vh;padding:clamp(24px,20vh,160px) 16px 24px;background:var(--tb-f9fafb,#f9fafb)}.public-expense-denied-card{width:100%;max-width:384px;padding:48px 24px;text-align:center;background:var(--tb-ffffff,#fff);border:1px solid var(--tl-e5e7eb,#e5e7eb);border-radius:12px;box-shadow:var(--shadow)}.public-expense-denied-lock{display:block;color:var(--tf-f87171,#f87171);margin:0 auto 12px;width:40px;height:40px}.public-expense-denied-lock svg{width:40px;height:40px}.public-expense-denied-title{margin:0;font-size:16px;line-height:24px;font-weight:700;color:var(--tf-111827,#111827)}.public-expense-denied-reason{margin:4px 0 0;font-size:14px;line-height:20px;color:var(--tf-4b5563,#4b5563)}
.ops-ta-project>strong,.ops-ta-project>small:not(.ops-ta-meta){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ops-ta-meta>span{display:inline-flex;align-items:center;gap:4px}.ops-ta-meta .icon{width:12px;height:12px}@media(max-width:767px){.ops-ta-page:not(.ops-ta-has-selection) .ops-ta-placeholder{display:none}}
.mobile-brand{display:flex;align-items:center;gap:8px;font-weight:600}.mobile-brand .icon{width:20px;height:20px}
/* sweep-p8:begin */
/* /CashFlow (design sweep P8; DESIGN-SYSTEM 3, 5, 11): no card around the page; the month bar is one line (calendarNav, the balance pop-over, the balance at the right); the month grid then the day list under it; a day cell shows its amounts in full from 768px and one dot per direction below. */
.cashflow-detail .calendar-detail-heading{margin-bottom:8px}.cashflow-detail>.totals-line{margin:0 0 8px}.cashflow-detail>nav.tabs{margin:0 0 8px}
.cash-day-dot{display:none;width:6px;height:6px;border-radius:9999px;margin:2px 1px 0 0;background:currentColor}.cash-day-dot.inflow{color:var(--tf-16a34a,rgb(22 163 74))}.cash-day-dot.outflow{color:var(--tf-dc2626,rgb(220 38 38))}
@media(max-width:767px){.cash-day-amount{display:none}.cash-day-dot{display:inline-block}}
@media(max-width:767px){.cashflow-bar>.fw-count{margin-left:0}}@media(max-width:700px){main#content .cashflow-rows td.num{text-align:right}main#content .cashflow-rows td.num::before{text-align:left}}
/* sweep-p8:end */
/* Legacy IncomeListTab.jsx filter row: flex-col below sm, so every control is full width on a phone (w-full sm:w-44). */
@media(max-width:639px){.expense-list-filters>*,.expense-list-filters select,.expense-list-filters select[name=status]{width:100%}}
/* Products pixel parity (legacy Products.jsx p-4 rounded-lg panel, flex-wrap TabsList; CourseListPanel truncate title) */
.card.padded.products-panel{padding:16px;border-radius:var(--radius-lg);box-shadow:none}
/* TaxReport pixel parity (legacy TaxReport.jsx + components/tax/WhtReportTab.jsx) */
.tax-report-page .tax-report-tabs{margin:0;width:max-content;max-width:100%}
.tax-report-table th{width:auto!important}
.tax-report-month td:first-child{font-weight:500}

/* Deal Kanban pixel parity (legacy GenericBoardView.jsx columns, DealCard.jsx, BoardViewToolbar.jsx, WonLostStageFilter.jsx). */
.kanban-column{background:var(--tb-f5f5f5a50,rgb(245 245 245 / .5))}
.kanban-column-head{align-items:center;padding:12px;border-bottom:1px solid var(--border)}
.kanban-column-title h3{font-size:16px;line-height:24px}
.kanban-column-tools{gap:4px}
.kanban-tool{width:22px;height:22px;border-radius:4px}.kanban-tool .icon{width:14px;height:14px}.kanban-tool:hover{background:var(--tb-f5f5f5a80,rgb(245 245 245 / .8));color:var(--fg)}
.kanban-tool.kanban-sort{display:inline-flex;gap:2px;width:auto;height:auto;padding:2px 6px;font-size:10px}.kanban-tool.kanban-sort .icon{width:12px;height:12px}.kanban-tool.kanban-sort .icon+.icon{width:10px;height:10px}
.kanban-menu.is-active>.kanban-sort{color:var(--primary);font-weight:500}
.badge.deal-stage-result{margin:0;padding:2px 10px;border:0;border-radius:6px;font-size:12px;line-height:16px;font-weight:600;color:var(--tf-ffffff,#fff)}
.badge.deal-stage-result.won{color:var(--tf-ffffff,#fff)}.badge.deal-stage-result.lost{background:var(--tb-ef4444,#ef4444);color:var(--tf-ffffff,#fff)}
.kanban-column-filter{gap:6px;margin-top:8px;padding-top:8px;border-top:1px dashed var(--border)}
.kanban-column-filter .kanban-menu-switch{min-height:20px;font-size:10px;line-height:14px;gap:6px}
.kanban-column-filter .kanban-exempt{padding-left:8px;border-left:1px solid var(--border)}
.kanban-column-filter .kanban-tool{width:20px;height:20px}.kanban-column-filter .kanban-tool .icon{width:12px;height:12px}
.kanban-column-filter .kanban-menu-body{left:0;right:auto}

.deal-card{padding:8px 10px}
.deal-card-head{gap:6px}
.deal-identity-line .record-link,.deal-identity-line .deal-identity-primary{font-size:13px;line-height:1.375;font-weight:600;color:var(--fg)}
.deal-card-tools{align-items:center;gap:6px}
.deal-card .deal-value{padding:2px 6px;border-radius:6px;background:var(--tb-171717a05,rgb(23 23 23 / .05));font-size:11px;line-height:16px}
.deal-card-star{display:flex;margin:0}.deal-card-star button{display:grid;place-items:center;padding:0;border:0;background:transparent;color:var(--tf-737373a30,rgb(115 115 115 / .3));cursor:pointer;transition:transform .15s}
.deal-card-star button:hover{transform:scale(1.25);color:var(--tf-facc15,#facc15)}.deal-card-star .icon{width:14px;height:14px}.deal-card-star button.is-on{color:var(--tf-facc15,#facc15)}.deal-card-star button.is-on .icon{fill:var(--tf-facc15,#facc15)}
.deal-card-timeline{flex-wrap:wrap;justify-content:flex-start;gap:6px;margin-top:2px;font-size:9.5px;line-height:1.25;color:var(--muted)}
.deal-card-training{display:inline-flex;align-items:center;gap:2px;color:var(--tf-2563eb,#2563eb);font-weight:500;white-space:nowrap}.deal-card-training .icon,.deal-card-close .icon{width:10px;height:10px}
.deal-card footer{display:flex;align-items:center;justify-content:space-between;gap:4px;margin-top:6px;font-size:10px;line-height:14px;color:var(--muted)}
.deal-card-meta{display:flex;align-items:center;flex-wrap:nowrap;gap:6px;min-width:0;padding:2px 6px;border-radius:4px;background:var(--tb-f5f5f5a40,rgb(245 245 245 / .4));overflow:hidden;white-space:nowrap}
.deal-card-win{font-weight:500;color:var(--fg)}
.deal-card .deal-card-timer{display:inline-flex;align-items:center;gap:6px;min-width:0;padding:0;background:transparent;overflow:visible;flex-shrink:0}
.deal-card .deal-age{display:inline-flex;align-items:center;gap:2px;white-space:nowrap}.deal-card .deal-age .icon{width:10px;height:10px}
.deal-card .deal-urgency-badge{padding:2px 4px;border-radius:4px;font-size:8.5px;line-height:1;font-weight:700}
.deal-card .deal-card-project .icon{width:10px;height:10px}
.deal-card-actions{display:flex;align-items:center;gap:4px;flex-shrink:0}
.deal-card .deal-owner-avatar{flex-basis:20px;width:20px;height:20px;border-color:var(--tl-171717a30,rgb(23 23 23 / .3));background:var(--tb-171717a10,rgb(23 23 23 / .1));color:var(--primary);font-size:7px;line-height:1}
.deal-card .deal-owner-avatar.is-empty{border:2px dashed var(--tl-737373a40,rgb(115 115 115 / .4));background:transparent}.deal-card .deal-owner-avatar.is-empty .icon{width:10px;height:10px;opacity:.5}
.deal-card .deal-card-generate{gap:2px;min-height:20px;height:20px;padding:0 6px;border-color:var(--tl-171717a30,rgb(23 23 23 / .3));color:var(--primary);font-size:9px;font-weight:500}.deal-card .deal-card-generate .icon{width:10px;height:10px}
.board-toolbar .filters select[name=min_stage_age_days]{width:150px}
.board-archived-link{margin-top:24px;padding-top:16px;border-top:1px solid var(--border)}.board-archived-link a{display:inline-flex;align-items:center;gap:8px;font-size:14px;line-height:20px;color:var(--muted)}.board-archived-link a:hover{color:var(--fg)}.board-archived-link .icon{width:16px;height:16px}
/* Legacy BoardViewToolbar is one flex-wrap row: views, search (flex-1, max 320), the aging select (150), ดีลซ้ำ. */
.board-toolbar>.filters{display:contents}
.board-toolbar .filters .field.compact{flex:0 0 auto;margin:0}
.board-toolbar .search{flex:1 1 180px}
@media(max-width:639px){.board-toolbar .search{flex:1 1 100%;max-width:none}.board-toolbar .filters .field.compact{flex:1 1 0;min-width:0}.board-toolbar>.actions{flex:0 0 auto}.board-toolbar .filters select[name=min_stage_age_days]{width:100%}}
.kanban-column-head{row-gap:0}
/* Project manage matrix: legacy TeamDayMatrix.jsx + matrix/categoryColors.js (Tailwind v3 50/700 pairs) */
.mx-c-teal{background:var(--mx-teal-bg);color:var(--mx-teal-fg)}.mx-c-cyan{background:var(--mx-cyan-bg);color:var(--mx-cyan-fg)}.mx-c-emerald{background:var(--mx-emerald-bg);color:var(--mx-emerald-fg)}.mx-c-orange{background:var(--mx-orange-bg);color:var(--mx-orange-fg)}.mx-c-purple{background:var(--mx-purple-bg);color:var(--mx-purple-fg)}.mx-c-blue{background:var(--mx-blue-bg);color:var(--mx-blue-fg)}.mx-c-slate{background:var(--mx-slate-bg);color:var(--mx-slate-fg)}
.mx-wrap{display:flex;flex-direction:column;gap:16px}
.mx-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.mx-head h2{display:flex;align-items:center;gap:8px;margin:0;font-size:16px;line-height:24px;font-weight:600}
.mx-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.mx-tool-icon{width:14px;height:14px;flex-shrink:0}
.mx-filter{display:flex;align-items:center;gap:6px;font-size:12px;line-height:16px;color:var(--mx-muted)}.mx-filter select{height:28px;padding:0 8px;font-size:12px;line-height:16px;border-radius:6px;box-shadow:none;color:var(--fg)}

.mx-views{margin:0}
.mx-legend{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;padding:0 4px;font-size:12px;line-height:16px;color:var(--mx-muted)}/* audit PROJ-25: legend text at the 12px floor */.mx-legend-title{font-weight:500}.mx-tag{display:inline-flex;padding:2px 6px;border-radius:4px;font-weight:500;font-size:10px;line-height:14px}
.mx-scroll{border:1px solid var(--mx-line);border-radius:8px;overflow-x:auto;scrollbar-width:none}.mx-scroll::-webkit-scrollbar{display:none}
.mx-table{width:100%;border-collapse:collapse;font-size:14px;line-height:20px}.mx-table th,.mx-table td{height:auto;border-bottom:1px solid var(--mx-line);border-right:1px solid var(--border);padding:0;background-clip:padding-box}
.mx-table thead th{background:var(--mx-head-bg);color:var(--fg);font-weight:500}.mx-table tbody tr:hover{background:transparent}.mx-table tbody tr:last-child td{border-bottom:1px solid var(--mx-line)}
.mx-table th.mx-person{position:sticky;left:0;z-index:3;min-width:150px;padding:8px 12px;text-align:left}
.mx-day{min-width:68px;padding:6px 4px!important;text-align:center;white-space:nowrap}.mx-day-top{display:flex;align-items:center;justify-content:center;gap:2px}.mx-day-sub{font-size:10px;line-height:14px;font-weight:400;color:var(--mx-muted)}
.mx-table th.mx-unscheduled{background:var(--mx-cream-head)}.mx-table td.mx-unscheduled{background:var(--mx-cream-cell)}
.mx-table th.mx-total{position:sticky;right:0;z-index:3;min-width:80px;padding:8px;text-align:right;border-right:0}
.mx-table td.mx-person{position:sticky;left:0;z-index:2;background:var(--mx-bg);padding:6px 12px;font-weight:500;white-space:nowrap}
.mx-table td.mx-total{position:sticky;right:0;z-index:2;background:var(--mx-bg);padding:6px 8px;text-align:right;font-weight:600;font-variant-numeric:tabular-nums;color:var(--mx-total);white-space:nowrap;border-right:0}
.mx-row-unassigned td{background:var(--mx-cream-row)!important}
.mx-person-in{display:flex;align-items:center;gap:4px}.mx-grip{display:inline-flex;align-items:center;padding:6px;margin:-4px;border-radius:4px;cursor:grab;touch-action:none;color:var(--tf-737373a60,rgb(115 115 115 / .6))}.mx-grip:hover{background:var(--mx-hover);color:var(--fg)}.mx-grip:active{cursor:grabbing}.mx-grip-icon{width:16px;height:16px}
.mx-names{display:flex;flex-direction:column;line-height:1.25}.mx-pname{font-size:14px}.mx-psub{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-weight:400;color:var(--mx-muted)}
.mx-info{display:inline-flex;flex-shrink:0;border:0;background:transparent;color:var(--mx-muted);border-radius:4px}.mx-info:hover{color:var(--primary);background:var(--mx-hover)}.mx-info-person{padding:4px}.mx-info-person .mx-info-icon{width:16px;height:16px}.mx-info-day{padding:2px;color:var(--tf-737373a50,rgb(115 115 115 / .5))}.mx-info-day .mx-info-icon{width:12px;height:12px}
.mx-move{margin-left:auto;display:flex;flex-direction:column;opacity:0;transition:opacity .15s}.mx-row:hover .mx-move{opacity:1}.mx-move button{display:inline-flex;padding:0;border:0;background:transparent;color:var(--mx-muted);border-radius:4px}.mx-move button:hover{background:var(--mx-hover)}.mx-move button:disabled{opacity:.3;cursor:not-allowed}.mx-move-icon{width:12px;height:12px}
.mx-row.mx-drop-over td{background-color:var(--tb-171717a08,rgb(23 23 23 / .08))}
.mx-td{vertical-align:top}.mx-cell{display:flex;align-items:stretch}.mx-cell.mx-empty{align-items:center}
.mx-item{display:flex;min-width:0}
.mx-chip{flex:1;min-width:0;display:flex!important;flex-direction:column;align-items:center;justify-content:center;text-align:center}.mx-chip:hover{filter:brightness(.95)}
.mx-amt{font-weight:600;font-variant-numeric:tabular-nums}
.mx-lab{display:flex;max-width:100%;align-items:center;justify-content:center;gap:2px;font-weight:500}.mx-name{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-align:center}
.mx-status{display:inline-flex;flex-shrink:0}.mx-si{width:10px;height:10px}.mx-paid{color:var(--mx-paid)}.mx-awaiting{color:var(--mx-awaiting)}.mx-waiting{color:var(--tf-737373a55,rgb(115 115 115 / .55))}.mx-void{color:var(--tf-737373a50,rgb(115 115 115 / .5))}
.mx-add{width:20px;flex-shrink:0;display:flex;align-items:center;justify-content:center;color:var(--tf-737373a30,rgb(115 115 115 / .3))}.mx-add:hover{color:var(--tf-3b82f6,#3b82f6);background:var(--tb-eff6ffa50,rgb(239 246 255 / .5))}.mx-add svg{width:12px;height:12px}
.mx-dot{width:100%;min-height:36px;display:flex;align-items:center;justify-content:center;font-size:18px;line-height:28px;color:var(--tf-737373a30,rgb(115 115 115 / .3))}a.mx-dot:hover{background:var(--tb-f5f5f5a50,rgb(245 245 245 / .5))}
.mx-table tfoot td{background:var(--tb-f9f9f9,#f9f9f9);font-weight:600;border-top:1px solid var(--border);border-bottom:0}.mx-table tfoot td.mx-person{font-size:12px;padding:8px 12px;background:var(--tb-f9f9f9,#f9f9f9)}.mx-foot{padding:8px 4px!important;text-align:center;font-size:11px;font-variant-numeric:tabular-nums;color:var(--mx-total);white-space:nowrap}.mx-table tfoot td.mx-total{background:var(--tb-f9f9f9,#f9f9f9);padding:8px}
.mx-none{padding:24px!important;text-align:center;color:var(--mx-muted);font-size:14px}
.mx-pop{margin:0;inset:auto;position:fixed;width:256px;padding:12px;border:1px solid var(--mx-line);border-radius:6px;background:var(--mx-bg);color:var(--fg);box-shadow:var(--shadow-lg);font-size:12px;line-height:16px;font-weight:400;text-align:left;white-space:normal}.mx-day .mx-pop{width:224px}
.mx-pop-title{font-weight:600;font-size:14px;line-height:20px}.mx-pop-row{margin-top:8px;color:var(--mx-muted)}
.mx-grid[hidden],.mx-list[hidden]{display:none}
@media(max-width:767px){.mx-tools{width:100%}.mx-filter select{height:36px}.mx-table th.mx-person{min-width:120px}.mx-psub{max-width:96px}}
/* A touch screen cannot drag the grip (HTML drag-and-drop is mouse only): the up/down buttons show instead, always (audit PJ-27). */
@media(pointer:coarse){.mx-move{display:flex;opacity:1}.mx-move button{min-width:32px;min-height:22px;justify-content:center;align-items:center}.mx-grip{display:none}}
main#content .mx-table td.mx-td{padding:0}main#content .mx-table td.mx-person{padding:6px 12px}main#content .mx-table td.mx-total{padding:6px 8px}main#content .mx-table tfoot td.mx-person,main#content .mx-table tfoot td.mx-total{padding:8px 12px}main#content .mx-table tfoot td.mx-foot{padding:8px 4px}main#content .mx-table td.mx-none{padding:24px}
main#content .mx-table th{height:auto}main#content .mx-table th.mx-person{padding:8px 12px}main#content .mx-table th.mx-day{padding:6px 4px}main#content .mx-table th.mx-total{padding:8px}
@media(max-width:767px){main#content .mx-table th.mx-total,main#content .mx-table td.mx-total{position:static}.mx-pname{max-width:120px;overflow:hidden;text-overflow:ellipsis}}

.mx-td{text-align:center}
/* ProjectDetail pixel parity with legacy TrainingScheduleTab.jsx / ProjectOverviewTab.jsx / DayTeamRoster.jsx */
.project-day-chip{gap:6px;padding:4px 10px;border:1px solid var(--tl-c7d2fe,#c7d2fe);border-radius:var(--radius-md);background:var(--tb-eef2ff,#eef2ff);color:var(--tf-4338ca,#4338ca);font-size:12px;line-height:16px;font-weight:600;box-shadow:var(--shadow-sm)}.project-day-chip:hover{background:var(--tb-e0e7ff,#e0e7ff)}.project-day-chip .icon{width:12px;height:12px;opacity:.6}
.project-daycounts{display:inline-flex!important;align-items:center;gap:6px!important;flex-wrap:wrap}
.project-schedule-roster{margin-top:12px;padding-top:8px;border-top:1px solid var(--border)}.project-schedule-roster>summary{list-style:none;display:inline-flex;align-items:center;gap:6px;font-size:12px;line-height:16px;font-weight:500;color:var(--muted);cursor:pointer}.project-schedule-roster>summary::-webkit-details-marker{display:none}.project-schedule-roster>summary:hover{color:var(--fg)}.project-schedule-roster>summary .icon{width:14px;height:14px}.project-schedule-roster>summary .icon:last-child{transition:transform .15s}.project-schedule-roster[open]>summary .icon:last-child{transform:rotate(180deg)}
.project-schedule-roster>div{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.project-schedule-roster>div>span{display:flex;align-items:center;gap:8px;padding:4px 10px 4px 6px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--tb-f5f5f5a30,rgb(245 245 245 / .3))}.project-schedule-roster>div>span>span{display:grid;line-height:1.25}.project-schedule-roster strong{font-size:12px;line-height:16px;font-weight:500;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-schedule-roster small{font-size:10px;line-height:14px;color:var(--muted)}
.project-schedule-empty{padding:48px 16px;border:1px dashed var(--border);border-radius:var(--radius-lg);box-shadow:none;color:var(--muted)}
/* Overview */
.project-overview-grid{gap:16px}.project-detail-panel .project-overview-card.card.padded{padding:12px;border-radius:var(--radius-lg);box-shadow:none}.project-overview-card h2{display:flex;align-items:center;gap:6px;margin:0 0 8px;font-size:14px;line-height:20px;font-weight:600}
/* sweep-p12a:begin */
/* Project ภาพรวม (design sweep P12a): sections told apart by a heading and 24px, not a card each; the checklist and the readiness are rows of the one table look. */
.po-body{display:grid;grid-template-columns:minmax(0,1fr);gap:24px}.project-detail-panel>.project-hub-row{padding:0;border:0;background:none;border-radius:0}
.po-sec{min-width:0}.po-sec>h2{margin:0 0 8px}
.po-sec .project-checklist{gap:0}.po-sec .project-checklist li{min-height:28px;padding:4px 8px;border:solid var(--border);border-width:0 0 1px}.po-sec .project-checklist li:last-child{border-width:0}
.po-sec .project-checklist-label{flex:1 1 auto;min-width:0;font-size:13px;line-height:18px}.po-sec .project-checklist small,.po-sec .project-checklist .project-checklist-due{font-size:12px;line-height:16px}
.po-sec .project-checklist .pov-dot{margin:0}
.po-sec .project-readiness{list-style:none;margin:0;padding:0}.po-sec .project-readiness li{min-height:28px;padding:4px 8px;border-bottom:1px solid var(--border);font-size:13px;line-height:18px}.po-sec .project-readiness li:last-child{border-bottom:0}.po-sec .project-readiness-name{font-size:13px}
.requirement-empty{display:block;padding:0;border:0;background:none;color:var(--muted)}
/* sweep-p12a:end */
.project-overview-days{margin-top:8px;padding-top:8px;gap:4px;color:var(--fg)}.project-overview-days .icon{width:12px;height:12px;color:var(--tf-3b82f6,#3b82f6)}.project-overview-notes{margin-top:6px;padding-top:6px}
.project-overview-customer strong{font-size:14px;line-height:20px;font-weight:500}.project-overview-card .project-overview-customer small{font-size:11px;line-height:16px}.project-overview-person{margin-top:8px;padding-top:8px;gap:0}.project-overview-card .project-overview-person>small{font-size:10px;line-height:14px;margin-bottom:4px}
.project-overview-person-row{display:flex;align-items:flex-start;gap:8px}.project-person-avatar{display:flex;align-items:center;justify-content:center;width:28px;height:28px;flex:0 0 auto;border-radius:50%;background:var(--tb-dbeafe,#dbeafe);color:var(--tf-2563eb,#2563eb)}.project-person-avatar .icon{width:14px;height:14px}.project-overview-person-body{display:grid;gap:4px;min-width:0}.project-overview-person-body strong{font-size:14px;line-height:20px;font-weight:500}.project-person-field{display:inline-flex;align-items:center;gap:6px;font-size:12px;line-height:16px}.project-person-field .icon{width:12px;height:12px;color:var(--muted)}
.project-overview-card>h2+p.muted{margin:0 0 4px;font-weight:500}.project-readiness li{font-size:12px}.project-readiness li .mono{min-width:42px;font-size:10px;line-height:14px;color:var(--muted)}.project-readiness-name{font-size:11px}.project-readiness-ok{display:inline-flex;color:var(--tf-22c55e,#22c55e)}.project-readiness-ok svg{width:14px;height:14px}.project-readiness-missing{display:inline-flex;align-items:center;gap:2px;color:var(--tf-d97706,#d97706);font-size:10px;line-height:14px}.project-readiness-missing svg{width:12px;height:12px;color:var(--tf-f59e0b,#f59e0b)}
.source-deal-card{justify-content:flex-start;padding:12px!important;border-color:var(--tl-fde68a,#fde68a);border-radius:var(--radius-lg);background:var(--tb-fffbeb,#fffbeb);box-shadow:none}.source-deal-card>div{flex:1;min-width:0}.source-deal-card strong{font-size:14px;line-height:20px}.source-deal-card small{color:var(--muted);font-size:11px;line-height:16px}.source-deal-icon{display:flex;align-items:center;justify-content:center;width:32px;height:32px;flex:0 0 auto;border-radius:var(--radius-lg);background:var(--tb-fef3c7,#fef3c7);color:var(--tf-d97706,#d97706)}.source-deal-icon svg{width:16px;height:16px}.source-deal-card .button{height:28px;min-height:28px;padding:0 12px;gap:4px;font-size:12px}.source-deal-card .button svg{width:12px;height:12px}
.project-hub-row{background:var(--tb-eff6ff,#eff6ff);border-radius:var(--radius-lg)}.project-hub-actions .button{height:28px;min-height:28px}
@media(max-width:767px){.source-deal-card{flex-direction:row;align-items:center}.source-deal-card .button{width:auto}}

/* ui_consistency scale: 12px minimum type, 32px buttons, 16px card padding */.project-readiness-name,.project-readiness li .mono,.project-readiness-missing,.project-overview-card .project-overview-person>small,.project-overview-card .project-overview-customer small,.source-deal-card small,.project-schedule-roster small{font-size:12px;line-height:16px}.project-hub-actions .button,.source-deal-card .button{height:32px;min-height:32px}.project-detail-panel .project-overview-card.card.padded,.source-deal-card{padding:16px!important}
/* Legacy DealTodoTab (flex gap-2 add form, text-xs summary, ListTodo w-10 empty, li p-2.5 rounded-lg border, hover pen/trash h-7 w-7). */
.deal-todo-tab{display:grid;gap:16px}.deal-todo-add{display:flex;gap:8px}.deal-todo-add input{flex:1;min-width:0;height:36px}.deal-todo-add .button{height:36px;min-height:36px;gap:4px}.deal-todo-add .button .icon{width:16px;height:16px}
.deal-todo-summary{margin:0;font-size:12px;line-height:16px;color:var(--muted)}.deal-todo-summary strong{color:var(--fg)}

.deal-todo-rows{list-style:none;margin:0;padding:0;display:grid;gap:6px}.deal-todo-row{display:flex;align-items:center;gap:8px;padding:10px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--bg)}.deal-todo-row:hover{background:var(--tb-f5f5f5a30,rgb(245 245 245 / .3))}
.deal-todo-check{display:flex}.deal-todo-check input{width:16px;height:16px;min-height:0;margin:0}.deal-todo-title{flex:1;min-width:0;font-size:14px;line-height:20px}.deal-todo-row.is-done .deal-todo-title>span{text-decoration:line-through;color:var(--muted)}.deal-todo-title small{display:block;margin-top:2px;font-size:10px;line-height:14px;color:var(--muted)}
.deal-todo-edit{display:flex;flex:1;align-items:center;gap:4px}.deal-todo-edit input[name=name]{flex:1;height:32px;min-height:32px}.deal-todo-tools{display:flex;gap:2px;opacity:0;transition:opacity .15s}.deal-todo-row:hover .deal-todo-tools,.deal-todo-tools:focus-within{opacity:1}@media(hover:none){.deal-todo-tools{opacity:1}}.deal-todo-tools form{display:contents}
.deal-todo-icon{display:inline-grid;place-items:center;width:28px;height:28px;padding:0;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--fg);cursor:pointer}.deal-todo-icon:hover{background:var(--soft)}.deal-todo-icon .icon{width:14px;height:14px}.deal-todo-icon.is-danger{color:var(--tf-dc2626,#dc2626)}.deal-todo-icon.is-ok{color:var(--tf-16a34a,#16a34a)}.deal-todo-icon.is-ok .icon{width:16px;height:16px}
@media(max-width:639px){.deal-todo-add .button span{display:none}}
/* Legacy DealDetail header row (lg+): stage chips text-[9px] px-1 py-0.5 with w-3 h-px links, timer text-[10px] mono, Tags outline h-7 px-2 text-xs, ซ่อนดีล ghost; below lg the chips get their own row. */
.page-header .actions:has(.deal-stage-context.is-header){align-items:center;gap:4px;flex-wrap:wrap;justify-content:flex-end;min-width:0;max-width:100%}
.deal-stage-context.is-header{display:none;margin:0 8px 0 0;flex-direction:row;align-items:center;gap:6px}
/* SALES-46 (still seen 11-21): ติดดาว / ซ่อนดีล sit on the title line; the Stage line is its own row under them (the actions box no longer takes the full width) */@media(min-width:1024px){main[data-route="/DealDetail"]>.page-header:has(#deal-header-actions){display:grid;grid-template-columns:minmax(0,1fr) repeat(4,auto);grid-auto-columns:auto;column-gap:0;row-gap:4px;align-items:center}main[data-route="/DealDetail"] #deal-header-actions>:not(.deal-stage-context){margin-left:8px}main[data-route="/DealDetail"]>.page-header:has(#deal-header-actions)>.heading{grid-row:1;grid-column:1}main[data-route="/DealDetail"] #deal-header-actions{display:contents}main[data-route="/DealDetail"] #deal-header-actions>:not(.deal-stage-context){grid-row:1}main[data-route="/DealDetail"] #deal-header-actions>.deal-stage-context{grid-row:2;grid-column:1/-1;min-width:0}main[data-route="/DealDetail"] #deal-header-actions>.deal-stage-context .deal-stage-path{flex:0 1 auto;min-width:0;overflow-x:auto;scrollbar-width:none}}
@media(min-width:1024px){.deal-stage-context.is-header{display:flex;order:2;flex-basis:100%;justify-content:flex-end;margin:4px 0 0}.deal-stage-context.is-row{display:none}}/* SALES-46: ติดดาว / ซ่อนดีล stay on the title line; the Stage line is always the next one, whatever the number of Stages */
.deal-stage-context.is-header .deal-stage-path{width:auto;overflow:visible;padding:0}.deal-stage-context.is-header .deal-stage-chip{padding:2px 4px;font-size:12px;line-height:16px}.deal-stage-context.is-header .deal-stage-link{width:12px}
.deal-stage-context.is-header .deal-stage-timer{font-size:12px;line-height:16px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;gap:2px}.deal-stage-context.is-header .deal-stage-timer .icon{width:12px;height:12px}
.deal-tags-button .icon,.deal-hide-button .icon{width:14px;height:14px}
.page-header .deal-hide-button{border-color:transparent;background:transparent;color:var(--muted)}.page-header .deal-hide-button:hover{background:var(--soft);color:var(--fg)}
@media(max-width:639px){.deal-hide-button span{display:none}}
.deal-tags-menu{position:relative}.deal-tags-menu>summary{list-style:none;cursor:pointer}.deal-tags-menu>summary::-webkit-details-marker{display:none}
.deal-tags-panel{position:absolute;z-index:30;top:calc(100% + 4px);right:0;width:208px;padding:8px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg);box-shadow:var(--shadow-lg)}
.deal-tags-panel>p{margin:0 0 8px;padding:0 4px;font-size:12px;line-height:16px;font-weight:500;color:var(--muted)}.deal-tags-panel form{margin:0}
.deal-tags-row{display:flex;align-items:center;gap:8px;width:100%;padding:6px 8px;border:0;border-radius:var(--radius-sm);background:transparent;font-size:14px;cursor:pointer;text-align:left}.deal-tags-row:hover{background:var(--soft)}.deal-tags-row.is-on{background:var(--soft)}.deal-tags-row>span:not(.badge){flex:1}.deal-tags-row .icon{width:14px;height:14px;color:var(--primary)}.deal-tags-row.is-readonly{cursor:default}
/* Legacy DealInfoEditableSection form: space-y-4 fields, grid-cols-2 gap-3 pairs, bottom save bar border-t with ย้ายบอร์ด / ยกเลิก/ซ่อนดีล left and บันทึกการแก้ไข right. */
.deal-info-form{margin-top:16px}.deal-info-form fieldset{display:grid;gap:16px;margin:0;padding:0;border:0;min-width:0}.deal-info-form .field{margin:0}.deal-info-label{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.deal-info-label .button{height:28px;min-height:28px;font-size:11px;gap:4px;color:var(--muted)}.deal-info-label .button .icon{width:12px;height:12px}
.deal-info-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.deal-info-loss{padding:12px;border-radius:var(--radius-lg);background:var(--tb-fef2f2,#fef2f2)}.deal-info-loss p{margin:0 0 4px;font-size:12px;font-weight:600;color:var(--tf-991b1b,#991b1b)}.deal-info-loss span{font-size:14px}
.deal-info-savebar{display:flex;align-items:center;gap:8px;margin:16px -16px -16px;padding:12px 16px;border-top:1px solid var(--border);background:var(--tb-ffffffa95,rgb(255 255 255 / .95))}.deal-info-savebar-tools{display:flex;flex-wrap:wrap;gap:8px;margin-right:auto}.deal-info-savebar-tools .button{gap:6px}.deal-info-savebar-tools .button .icon{width:16px;height:16px}.deal-info-hide{color:var(--muted)}.deal-info-hide:hover{color:var(--tf-dc2626,#dc2626);border-color:var(--tl-dc2626,#dc2626)}.deal-info-save{min-width:140px;gap:6px}.deal-info-save .icon{width:16px;height:16px}
@media(max-width:639px){.deal-info-savebar{flex-direction:column-reverse;align-items:stretch;margin:16px -12px -12px;padding:12px}.deal-info-savebar-tools{margin-right:0}.deal-info-savebar-tools>*{flex:1 1 0}.deal-info-savebar-tools .button{width:100%;justify-content:center}}
.deal-composer-attach{width:32px;padding:0!important;justify-content:center;cursor:pointer}.deal-composer-attach .icon{width:14px;height:14px}.deal-composer-files{display:flex;flex-wrap:wrap;gap:6px}.deal-composer-files>span{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:var(--radius-md);background:var(--soft);font-size:11px}.deal-composer-files .icon{width:12px;height:12px;color:var(--muted)}.deal-composer-file-remove{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-left:2px;padding:0;border:0;border-radius:50%;background:none;cursor:pointer;color:var(--muted)}.deal-composer-file-remove:hover{background:var(--line);color:var(--danger,var(--tf-b42318,#b42318))}
.deal-stage-context.is-header .deal-stage-chip.passed{background:transparent;color:var(--primary)}.deal-stage-context.is-header .deal-stage-chip.upcoming{color:var(--tf-737373a60,rgb(115 115 115 / .6))}.deal-stage-context.is-header .deal-stage-chip.current{background:var(--stage-color,var(--tb-333333,#333));font-weight:700}
/* Legacy DealFilesTab/DealFileManager: outline "+ อัปโหลดไฟล์" (mb-4), picked-file form border rounded-lg p-4 bg-muted/30, grid sm:grid-cols-2, empty Paperclip w-8 py-12. */
.deal-file-upload{margin-bottom:16px}.deal-file-trigger{height:32px;min-height:32px;padding:0 12px;font-size:14px;gap:4px;cursor:pointer}.deal-file-trigger .icon{width:16px;height:16px}
.deal-file-form{display:grid;gap:12px;padding:16px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--tb-f5f5f5a30,rgb(245 245 245 / .3))}.deal-file-form-title{margin:0;font-size:14px;font-weight:500}.deal-file-form-grid{display:grid;gap:12px}@media(min-width:640px){.deal-file-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}.deal-file-form .field{margin:0}.deal-file-form .field label{font-size:12px;color:var(--muted);font-weight:400}.deal-file-form-actions{display:flex;gap:8px}.deal-file-form-actions .button{gap:4px}.deal-file-form-actions .icon{width:14px;height:14px}

/* Legacy DealQuotationTab: the contact edit dialog opens from ข้อมูลลูกค้า "แก้ไข"; no extra trigger row above the form. */
.qe-contact-edit>button{display:none}.qe-contact-edit:not(:has(.muted)){margin:0}
/* Legacy mobile/tablet stage bar (below lg): text-[8px] chips, w-2 links, same colours as the header row. */
.deal-stage-context.is-row{flex-direction:row;align-items:center;gap:6px;margin-bottom:12px}.deal-stage-context.is-row .deal-stage-path{flex:1;overflow-x:auto;scrollbar-width:none;padding:0}.deal-stage-context.is-row .deal-stage-chip{padding:2px 4px;font-size:8px;line-height:12px}.deal-stage-context.is-row .deal-stage-link{width:8px}.deal-stage-context.is-row .deal-stage-chip.passed{background:transparent;color:var(--primary)}.deal-stage-context.is-row .deal-stage-chip.upcoming{color:var(--tf-737373a60,rgb(115 115 115 / .6))}.deal-stage-context.is-row .deal-stage-chip.current{background:var(--stage-color,var(--tb-333333,#333));font-weight:700}.deal-stage-context.is-row .deal-stage-timer{font-size:10px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
/* Legacy DealFileManager rows: border rounded-lg p-3 gap-3 space-y-2, w-12 icon tile, name + badge inline (text-[10px]), ghost h-7 w-7 actions, trash muted → destructive on hover. */
.card.deal-file-list{display:grid;gap:8px;padding:0;border:0;box-shadow:none;background:transparent}.deal-file-list .deal-file-row{display:flex;align-items:flex-start;gap:12px;padding:12px;border:1px solid var(--border);border-radius:var(--radius-lg)}.deal-file-list .deal-file-row:hover{background:var(--tb-f5f5f5a20,rgb(245 245 245 / .2))}
.deal-file-list .deal-file-icon{display:grid;place-items:center;width:48px;height:48px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--soft)}.deal-file-list .deal-file-icon .icon{width:20px;height:20px;color:var(--muted)}
.deal-file-list .deal-file-main{flex:1;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:0 8px}.deal-file-list .deal-file-name{font-size:14px;font-weight:500;color:var(--fg)}.deal-file-list .deal-file-type{font-size:10px}.deal-file-list .deal-file-main small{flex:1 0 100%;font-size:10px;line-height:15px;margin-top:4px}.deal-file-list .deal-file-note{margin-top:2px!important;font-size:12px!important;color:var(--muted)}
.deal-file-list .deal-file-actions{display:flex;gap:4px}.deal-file-list .deal-file-actions .button{width:28px;height:28px;min-height:28px;padding:0;border:0;background:transparent;color:var(--fg)}.deal-file-list .deal-file-actions .button.danger{color:var(--muted)}.deal-file-list .deal-file-actions .button.danger:hover{color:var(--tf-dc2626,#dc2626);background:var(--soft)}.deal-file-list .deal-file-actions .icon{width:14px;height:14px}
.deal-file-list .deal-file-actions .button .icon{color:inherit;stroke:currentColor}.deal-file-list .deal-file-actions form{display:flex}
/* Legacy StatusFilteredExpenseTab: KPI Card p-3 (text-xs label, text-lg bold value, 10px count) in a gap-3 grid; filters h-8 text-xs (month w-[130px], ProjectFilterDropdown auto width); batch bar only once something is selected, purple-50/200 p-3 rounded-lg. */
.expense-list-status-kpis{gap:12px;margin-bottom:16px}.expense-list-status-kpis>.card.padded{padding:12px;border-radius:var(--radius-lg);box-shadow:none;display:block}.expense-list-status-kpis small{display:block;font-size:12px;line-height:16px;color:var(--muted)}.expense-list-status-kpis .metric{display:block;font-size:18px;line-height:28px;font-weight:700;margin:0}.expense-list-status-kpis small.muted{font-size:10px;line-height:15px}.expense-list-status-kpis>.card:nth-child(2) .metric{color:var(--tf-9333ea,#9333ea)}
.expense-list-status-filters select{height:32px;min-height:32px;font-size:12px;line-height:16px;padding-top:0;padding-bottom:0}.expense-list-status-filters select[name=month]{width:130px}.expense-list-status-filters select[name=round]{width:140px}.expense-list-status-filters select[name=project_id]{width:auto;min-width:110px;max-width:240px}
.status-bulk-bar{padding:12px;background:var(--tb-faf5ff,#faf5ff);border:1px solid var(--tl-e9d5ff,#e9d5ff);border-radius:var(--radius-lg);gap:12px}.status-bulk-bar.payment-action-bar{color:var(--tf-581c87,#581c87)}
/* Legacy CashflowHeader balance chip, CHG-0118 opening note, CashflowWeekSummary คงเหลือจริง, CashflowDetailPanel title/balance card/income-expense cards/filter pills. */
.balance-snapshots{margin-top:16px}
.expense-list-round-table td.expense-list-bank{white-space:nowrap;max-width:110px;overflow:hidden;text-overflow:ellipsis}.expense-list-bank-icon{width:12px;height:12px;margin-right:4px;color:var(--tf-9ca3af,#9ca3af);vertical-align:-1px}
/* Legacy ExpenseQuickReviewDialog (max-w-4xl, two columns 3fr/2fr): facts card gray-50 border, yellow-50/amber-300 ข้อมูลการเงิน, slate-50 สำหรับบัญชี, green-600 advance button. */
dialog.expense-review-dialog{width:min(var(--modal-w-xl),calc(100vw - 32px));max-width:none;padding:0}

.expense-review-due{display:block;padding:6px 10px;border:1px solid var(--border);border-radius:6px;background:var(--tb-ffffff,#fff);color:var(--fg);font-size:13px}
.expense-review-approve{width:100%;justify-content:center;gap:6px;background:var(--tb-16a34a,#16a34a);border-color:var(--tl-16a34a,#16a34a);color:var(--tf-ffffff,#fff)}.expense-review-approve:hover{background:var(--tb-15803d,#15803d)}.expense-review-approve .icon{width:16px;height:16px}

/* Legacy รอทำจ่าย group header (select-all, Bank Payment outline button) and PEAK / ⋯ columns. */
.payment-group>summary>span:first-child{display:inline-flex;align-items:center;gap:8px}.payment-group-tools{display:inline-flex;align-items:center;gap:12px}.payment-group-bank{height:32px;min-height:32px;font-size:12px;gap:6px}.payment-group-bank .icon{width:14px;height:14px}.payment-group-pick,.payment-checkbox{width:16px;height:16px}
.payment-round-table .expense-list-desc{min-width:280px}.payment-round-table .payment-h-peak{width:90px;text-align:center}.payment-peak{text-align:center;font-size:10px}.payment-peak-ok{color:var(--tf-16a34a,#16a34a)}.payment-peak-wait{color:var(--tf-d97706,#d97706)}.payment-peak-bad{color:var(--tf-dc2626,#dc2626)}.payment-peak-muted{color:var(--tf-9ca3af,#9ca3af)}
/* PEAK status of a Bill (App\Integration\Peak\PeakBillStatus, 2026-10-06): the PEAK number or the state, then one small line saying when or why; the line wraps inside the cell so a reason is never cut */
.payment-peak-note{display:block;font-size:10px;line-height:13px;white-space:normal;overflow-wrap:anywhere}#content .fw-table td.fw-actions>.payment-peak-note{display:block;margin:0 0 2px}a.payment-peak-ok{text-decoration:underline}
.payment-more-link{display:inline-flex;color:var(--tf-9ca3af,#9ca3af)}.payment-more-link svg{width:16px;height:16px}.payment-more-link:hover{color:var(--fg)}.expense-list-status.pending_payment{background:var(--tb-faf5ff,#faf5ff);color:var(--tf-7e22ce,#7e22ce);border-color:var(--tl-e9d5ff,#e9d5ff)}.expense-list-status.paid{background:var(--tb-f0fdf4,#f0fdf4);color:var(--tf-15803d,#15803d);border-color:var(--tl-bbf7d0,#bbf7d0)}
.payment-action-bar{display:flex;align-items:center;margin-bottom:12px}.payment-action-bar .payment-actions{display:inline-flex;gap:8px}.payment-action-bar .icon{width:16px;height:16px}
/* Legacy ApprovalSidebar: Card p-2.5 rows text-xs gray-500 labels, amounts text-sm bold right (red selected, green income, blue after), mini calendar h-6 cells 9px income labels. */
.approval-side-row{padding:6px 0;border-bottom:1px solid var(--tl-f3f4f6,#f3f4f6)}.approval-side-label{display:flex;justify-content:space-between;align-items:center;font-size:12px;line-height:16px;color:var(--tf-6b7280,#6b7280)}.approval-side-label small{font-size:10px;color:var(--tf-9ca3af,#9ca3af)}
.approval-side-amount{display:flex;justify-content:flex-end;align-items:baseline;gap:4px;margin-top:2px}.approval-side-amount .cur{font-size:12px;color:var(--tf-9ca3af,#9ca3af)}.approval-side-amount strong{font-size:14px;font-weight:700;color:var(--tf-202224,#202224)}.approval-side-amount.neg .cur{color:var(--tf-f87171,#f87171)}.approval-side-amount.neg strong{color:var(--tf-ef4444,#ef4444)}.approval-side-amount.pos .cur{color:var(--tf-22c55e,#22c55e)}.approval-side-amount.pos strong{color:var(--tf-16a34a,#16a34a)}.approval-side-amount.blue .cur{color:var(--tf-60a5fa,#60a5fa)}.approval-side-amount.blue strong{color:var(--tf-2563eb,#2563eb)}.approval-side-amount strong.is-neg{color:var(--tf-ef4444,#ef4444)}
.approval-side-cal{margin-top:8px;padding-top:12px;border-top:1px solid var(--tl-f3f4f6,#f3f4f6)}.approval-side-cal summary{font-size:12px;font-weight:600;color:var(--tf-374151,#374151);cursor:pointer;list-style:none}.approval-cal-nav{display:flex;justify-content:space-between;align-items:center;margin:12px 0 8px}.approval-cal-nav a{width:28px;height:28px;display:grid;place-items:center;border-radius:6px;color:var(--fg);text-decoration:none}.approval-cal-nav a:hover{background:var(--tb-f3f4f6,#f3f4f6)}.approval-cal-nav strong{font-size:12px}
.approval-cal-grid{display:grid;grid-template-columns:repeat(7,1fr)}.approval-cal-grid .dow{text-align:center;font-size:9px;color:var(--tf-9ca3af,#9ca3af);font-weight:500;padding:2px 0}.approval-cal-grid .d{min-height:24px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:10px;color:var(--tf-374151,#374151);border-radius:4px;text-decoration:none}.approval-cal-grid .d em{font-style:normal;font-size:7px;line-height:8px;color:var(--tf-f59e0b,#f59e0b)}.approval-cal-grid .out{color:var(--tf-d1d5db,#d1d5db)}.approval-cal-grid .past{color:var(--tf-d1d5db,#d1d5db)}.approval-cal-grid .today{background:var(--tb-111827,#111827);color:var(--tf-ffffff,#fff);font-weight:700}.approval-cal-grid .end{background:var(--tb-2563eb,#2563eb);color:var(--tf-ffffff,#fff);font-weight:700}.approval-cal-grid .today em,.approval-cal-grid .end em{color:var(--tf-fde047,#fde047)}.approval-cal-grid .range{background:var(--tb-eff6ff,#eff6ff)}a.d:hover{background:var(--tb-f3f4f6,#f3f4f6)}
.expense-review-amounts{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-bottom:8px}.expense-review-amounts label{display:grid;gap:4px;font-size:11px;color:var(--tf-6b7280,#6b7280)}.expense-review-amounts b{color:var(--tf-dc2626,#dc2626)}.expense-review-amounts input{height:32px;min-height:32px;background:var(--tb-ffffff,#fff);width:100%;min-width:0}

input.expense-review-due{height:32px;min-height:32px;background:var(--tb-ffffff,#fff)}
/* pixel-project-pass2: legacy ProjectDetail header/overview (ProjectDetail2__overview.png) */
.project-requirement-toggle{width:28px;height:28px}
.project-overview-course{margin:2px 0 0;font-size:12px;line-height:16px;color:var(--muted)}
.project-overview-links{margin:8px 0 0;padding-top:8px;border-top:1px solid var(--border)}
.project-overview-links{display:grid;gap:6px}.project-overview-drive.project-overview-relearn{color:var(--tf-9333ea,#9333ea)}.project-overview-drive.project-overview-relearn:hover{color:var(--tf-6b21a8,#6b21a8)}
.project-overview-drive{display:inline-flex;align-items:center;gap:8px;font-size:12px;line-height:16px;color:var(--tf-16a34a,#16a34a);text-decoration:none}.project-overview-drive:hover{color:var(--tf-166534,#166534);text-decoration:underline}.project-overview-drive svg{width:14px;height:14px;flex-shrink:0}.project-overview-drive .project-overview-ext{width:12px;height:12px;opacity:.5}
/* pixel-project-pass2: legacy ProjectEditTab type cards (ProjectDetail2__settings_1.png) */
/* legacy CostBreakdownView (Matrix summary view) */
.mx-summary:not([hidden]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:8px}@media(max-width:1023px){.mx-summary:not([hidden]){grid-template-columns:minmax(0,1fr)}}
.mx-summary>.empty,.mx-sum-set>.empty{grid-column:1/-1}.mx-sum-set:not([hidden]){display:contents}
.mx-sum-card{border:1px solid var(--border);border-radius:8px;overflow:hidden}.mx-sum-card header{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:var(--tb-f1f5f9a50,rgb(241 245 249/.5));border-bottom:1px solid var(--border)}.mx-sum-card header>span{display:flex;align-items:center;gap:6px;font-size:14px;line-height:20px;font-weight:600}
.mx-sum-icon{width:16px;height:16px}.mx-sum-blue{color:var(--tf-3b82f6,#3b82f6)}.mx-sum-green{color:var(--tf-10b981,#10b981)}.mx-sum-grand{font-size:14px;line-height:20px;font-weight:700;color:var(--tf-ea580c,#ea580c);font-variant-numeric:tabular-nums}
.mx-sum-role,.mx-sum-person{padding:8px 12px;border-top:1px solid var(--border)}.mx-sum-card header+div{border-top:0}
.mx-sum-line{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}.mx-sum-line>span{display:flex;align-items:center;gap:6px;font-size:14px}.mx-sum-line .mx-tag{font-size:10px;line-height:14px;padding:2px 6px;border-radius:4px;font-weight:500}
.mx-summary small{font-size:10px;line-height:14px;color:var(--muted);font-variant-numeric:tabular-nums}.mx-sum-line strong,.mx-sum-person strong{font-size:14px;line-height:20px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.mx-sum-bar{display:flex;align-items:center;gap:8px}.mx-sum-bar>span{flex:1;height:6px;background:var(--soft);border-radius:9999px;overflow:hidden}.mx-sum-bar i{display:block;height:100%;background:var(--tb-60a5fa,#60a5fa);border-radius:9999px}.mx-sum-bar small{width:32px;text-align:right}
.mx-sum-person{display:flex;align-items:center;justify-content:space-between;gap:8px}.mx-sum-person>span{display:flex;align-items:center;gap:8px;min-width:0}.mx-sum-person>span:last-child{flex-shrink:0}.mx-sum-rank{width:16px;text-align:right}.mx-sum-name{font-size:14px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mx-sum-person strong{color:var(--tf-ea580c,#ea580c)}
/* รายรับ grid (app/View/project-income-grid.php, owner 2026-10-16 "like excel", RULES 5.18): one row height (32px), every cell one line, inputs that look like the cell until focused. */
.ig-scroll{position:relative;border:0;border-radius:0;overflow-x:auto}.ig{width:100%;min-width:1440px;border-collapse:collapse;table-layout:fixed;font-size:13px;line-height:18px}.ig.ig-narrow{min-width:720px}@media(max-width:700px){.pov.calendar-detail td[data-l]:not([data-l=""])::before{content:attr(data-l);display:block;font-size:11px;line-height:14px;color:var(--muted)}.pov.calendar-detail td.num{text-align:left}.pov.calendar-detail .ig.ig-narrow{min-width:0}main#content .pov.calendar-detail table.ig>tbody>tr>td{height:auto;min-height:28px;white-space:normal}}
.ig .ig-c-qt{width:136px}.ig .ig-c-date{width:116px}.ig .ig-c-due{width:132px}.ig .ig-c-to{width:180px}.ig .ig-c-num{width:116px}.ig .ig-c-vat{width:108px}.ig .ig-c-wht{width:120px}.ig .ig-c-doc{width:120px}.ig .ig-c-x{width:64px}
/* E-Learning money tables on a phone (audit 2026-10-28 E2): the stacked table (.pov-stack); a group row's totals keep the three columns of its courses; a figure stands right under its column name (money right-aligned, RULES 5.18). */
/* EL-02: a money cell of a course is never cut: two values a line on a phone, whole */@media(max-width:700px){#elearning-course-panel .pov-stack tr{grid-template-columns:repeat(2,minmax(0,1fr))}}:is(#elearning-courses,#elearning-course-panel) .pov td.num{text-overflow:clip;overflow:visible;white-space:nowrap}
@media(max-width:700px){#elearning-courses .pov-stack tr.pov-day td.num{grid-column:auto}:is(#elearning-courses,#elearning-course-panel) .pov-stack td.num{text-align:right}:is(#elearning-courses,#elearning-course-panel) .pov-stack td.num::before{text-align:left}}
/* The course's cost tab: the "หารกับคอร์สอื่น" sentence is a second tree level under its cost (audit 2026-10-28 E4). */
#elearning-course-panel tr.pov-l2 .pov-elbow{margin-left:22px}
/* The money eye of วันถ่ายทำ (audit 2026-10-28 E5): a figure is its mask and its amount side by side, the eye shows one (.el-eye-open: on <html> after a press, app.js "money eye"; on the page's two wrappers for ?eye=1); the eye's two icons follow. */
.el-fig-open{display:none}.elearning-eye .el-fig-shut{display:inline-flex}.el-eye-open .el-fig-open{display:inline}.el-eye-open .elearning-eye .el-fig-open{display:inline-flex}.el-eye-open .el-fig-shut{display:none}
.calendar-day-number.calendar-day-phone{display:none}
@media(max-width:639px){
 .calendar-day-summary>.calendar-day-number:not(.calendar-day-phone),.calendar-day-summary>.calendar-mini-list{display:none}
 .calendar-day-number.calendar-day-phone{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:flex-start;gap:2px;padding:0}
 .calendar-day-phone small{font-size:10px;line-height:13px;color:var(--fg);text-align:center}
 .calendar-day-phone:focus-visible::after{outline:2px solid var(--primary);outline-offset:-2px}
}
/* /ElearningWorkspace วันถ่ายทำ (owner 2026-10-29 D8 ก): from 1200px the month on the left, the chosen day's tables on the right; below, one under the other. The day column keeps 520px so a course name stays readable; its tables take narrower fixed columns there. */
@media(min-width:1200px){.el-filming{display:grid;grid-template-columns:minmax(0,1fr) minmax(520px,1.25fr);gap:24px;align-items:start}.el-filming>.calendar-detail{margin-top:12px}.el-filming .calendar-detail-heading{min-height:36px}.el-filming .ig.ig-narrow{min-width:0}.el-filming .ig .ig-c-to{width:112px}.el-filming .ig .ig-c-num{width:88px}.el-filming .ig .ig-c-x{width:40px}.el-filming .ig .pov-c-status{width:104px}}
main#content .ig th:first-child,main#content .ig td:first-child{position:sticky;left:0;z-index:1;background:var(--bg)}main#content .ig tfoot td:first-child{background:var(--soft)}main#content .ig th,main#content .ig td{height:32px;padding:0 2px;border-bottom:1px solid var(--border);text-align:left;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
main#content .ig th{padding:0 9px;font-size:12px;line-height:16px;font-weight:500;color:var(--muted);background:transparent}.ig .num{text-align:right;font-variant-numeric:tabular-nums}
.ig .ig-t{display:block;padding:0 7px;overflow:hidden;text-overflow:ellipsis}
.ig .ig-in,.pp .ig-in{display:block;width:100%;height:28px;min-height:28px;margin:0;padding:0 6px;border:1px solid transparent;border-radius:var(--radius-sm);background:transparent;font:inherit;color:inherit;box-shadow:none}
.ig .ig-in:hover,.pp .ig-in:hover{border-color:var(--border)}.ig .ig-in:focus,.pp .ig-in:focus{outline:none;border-color:var(--primary);background:var(--bg)}.ig .ig-in.num{text-align:right}.ig select.ig-in{appearance:none;-webkit-appearance:none;cursor:pointer;text-overflow:ellipsis;padding-right:6px;background-image:none}.ig select.ig-in.ig-box{appearance:auto;-webkit-appearance:menulist;background-image:none}main#content .ig select.ig-in:not(.ig-box){appearance:none;-webkit-appearance:none;background-image:none;padding:0 6px}main#content .ig .ig-in{min-height:28px;height:28px}
.ig .ig-in::placeholder,.pp .ig-in::placeholder{color:var(--muted)}
.ig .ig-x{text-align:right}.ig .ig-x form{margin:0}
.ig tbody tr:hover td{background:var(--soft)}.ig tr.ig-new td{background:transparent}main#content .ig tfoot td{padding:0 2px;font-weight:600;background:var(--soft)}


.ig .ig-open svg,.ig .ig-open .icon{transition:transform .15s}.ig .ig-open[aria-expanded="true"] svg,.ig .ig-open[aria-expanded="true"] .icon{transform:rotate(90deg)}
main#content .ig tr.ig-detail[hidden]{display:none}main#content .ig tr.ig-detail>td{position:static;height:auto;padding:12px 9px 16px 9px;background:var(--soft);white-space:normal;overflow:visible}
.ig .ig-detail-grid{position:sticky;left:9px;display:grid;grid-template-columns:repeat(3,minmax(0,320px));gap:12px 24px;align-items:start;max-width:1040px}.ig .ig-f{display:grid;gap:4px;min-width:0}.ig .ig-f-wide{grid-column:1/-1}
.ig .ig-l{font-size:12px;line-height:16px;color:var(--muted)}.ig .ig-v{font-size:13px;line-height:28px}.ig .ig-box{border-color:var(--border);background:var(--bg)}
.tk-note-conflict{display:grid;justify-items:start;gap:6px;min-width:0;padding:12px;background:var(--soft);border-radius:var(--radius-md)}
.tk-note-conflict>[role="alert"]{margin:0;color:var(--tf-b91c1c,#b91c1c)}
.tk-note-conflict>[data-tk-note-latest]{white-space:pre-wrap;overflow-wrap:anywhere;min-width:0;max-width:100%}
main#content .ig textarea[data-tk-field="notes"]{height:auto;min-height:88px;padding:6px;resize:vertical}
.ig .ig-inline{display:flex;gap:8px;align-items:center}.ig .ig-inline .ig-in{flex:1}.ig .ig-detail .button{height:28px;min-height:28px;padding:0 12px;font-size:13px}
.ig tr.ig-contract td{font-weight:600}.ig tr.ig-contract .muted{font-weight:400}

main#content .ig th.num,main#content .ig td.num{text-align:right}main#content .ig th.ctr,main#content .ig td.ctr{text-align:center}.ig .ctr select.ig-in{text-align:center;text-align-last:center}
.ig .ig-date{display:block}.ig .ig-date .datepicker{display:block;width:100%}main#content .ig .ig-date .datepicker-trigger{display:flex;align-items:center;gap:6px;width:100%;height:28px;min-height:28px;padding:0 6px;border:1px solid transparent;border-radius:var(--radius-sm);background:transparent;font:inherit;font-size:13px;color:inherit;box-shadow:none;justify-content:flex-start}
main#content .ig .ig-date .datepicker-trigger:hover{border-color:var(--border)}main#content .ig .ig-date .datepicker-trigger.is-placeholder{color:var(--muted)}.ig .ig-date .datepicker-icon{width:13px;height:13px;color:var(--muted);flex:none}

main#content .ig .ig-date .datepicker-icon{display:none}
main#content .ig td.ig-x{line-height:0;white-space:nowrap}.ig .ig-x>*,.ig .ig-x form>*{vertical-align:middle}.ig .ig-x form{display:inline-block}
/* Contract tree (owner 2026-10-16): a contract row on the soft background, its bills under it with the /ProjectOverview elbow; editable cells always show their box. */
main#content .ig tr.ig-contract td{background:var(--soft);font-weight:600}.ig tr.ig-contract .ig-in{font-weight:600}.ig .ig-left-note{color:var(--warning-fg,var(--tf-b45309,#b45309));font-weight:500}
.ig .ig-tree{display:flex;align-items:center;min-width:0}.ig .ig-tree .pov-elbow{flex:none;margin:0 6px 4px 8px}.ig .ig-tree .ig-t{flex:1;min-width:0;padding-left:0}
main#content .ig tbody .ig-in,main#content .ig tbody .ig-date .datepicker-trigger{border-color:transparent;background:color-mix(in srgb,var(--soft) 55%,transparent)}main#content .ig tbody .ig-in:hover,main#content .ig tbody .ig-date .datepicker-trigger:hover{border-color:var(--border)}main#content .ig tbody .ig-in:focus{border-color:var(--primary);background:var(--bg)}main#content .ig tbody .ig-in::placeholder{color:var(--muted)}
main#content .ig tr.ig-new-contract td{background:transparent}
.ig .ig-save{height:28px;min-height:28px;padding:0 12px;font-size:13px;white-space:nowrap}.ig tr.ig-new .ig-save{visibility:hidden}.ig tr.ig-new.is-active .ig-save,.ig tr.ig-new:focus-within .ig-save{visibility:visible}
.ig .ig-addlink,.pp .ig-addlink{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 6px;border:0;background:transparent;color:var(--muted);font:inherit;font-size:12px;line-height:16px;font-weight:500;cursor:pointer;border-radius:var(--radius-sm)}.ig .ig-addlink svg,.ig .ig-addlink .icon,.pp .ig-addlink svg,.pp .ig-addlink .icon{width:14px;height:14px}
/* รายการในบิล (app/View/income-bill-lines.php, owner 2026-10-17 ข้อ 7): the รายรับ tree's expand row and the income window. One line is its
   ผังบัญชีรายได้ select and "+ เพิ่มรายการ"; 2+ lines are a small table on the .pov tokens (28px rows, a hairline between rows), the
   คำอธิบาย a textarea that grows; at phone width a line's fields stack. */
.bill-lines{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;min-width:0;font-size:13px;line-height:18px}.bill-lines .bl-l{font-size:12px;line-height:16px;color:var(--muted)}.bill-lines .bl-v{line-height:28px}
.bill-lines .bl-one{display:flex;gap:8px;align-items:center;max-width:520px}.bill-lines .bl-one select{flex:1;min-width:0}
.bill-lines .bl-table{display:grid;max-width:960px}.bill-lines .bl-table[hidden]{display:none}
.bill-lines .bl-head,.bill-lines .bl-row{display:grid;grid-template-columns:minmax(0,220px) minmax(0,1fr) 128px 132px 28px;gap:8px;align-items:start;padding:4px 0;border-bottom:1px solid var(--border)}
.bill-lines .bl-head{font-size:12px;line-height:16px;font-weight:500;color:var(--muted)}.bill-lines .bl-foot{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:4px 0}
.bill-lines .num{text-align:right}.bill-lines .bl-text{white-space:pre-wrap;overflow-wrap:anywhere}
.bill-lines .bl-in{display:block;width:100%;min-height:28px;margin:0;padding:4px 6px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg);font:inherit;font-size:13px;line-height:18px;color:inherit;box-shadow:none}
.bill-lines textarea.bl-in{min-height:44px;resize:vertical}.bill-lines .bl-in:focus{outline:none;border-color:var(--primary)}.bill-lines .bl-in.num{text-align:right}
.bill-lines .bl-del{align-self:center}.bill-lines .bl-del[hidden]{display:none}
/* ส่วนลด (owner 2026-10-22 2ก+ข): the value and its ฿ / % toggle as one joined control (the quotation editor's .qe-join), on a line and at the foot of the bill. */
.bill-lines .bl-disc{display:flex;align-items:stretch;min-width:0}.bill-lines .bl-disc .bl-in{flex:1 1 auto;width:auto;min-width:0;border-top-right-radius:0;border-bottom-right-radius:0}
.bill-lines .bl-unit{flex:none;min-width:28px;height:auto;padding:0 6px;border:1px solid var(--border);border-left:0;border-radius:0 var(--radius-sm) var(--radius-sm) 0;background:var(--soft);color:var(--fg);font:inherit;font-size:12px;line-height:16px;font-weight:500;cursor:pointer;box-shadow:none}.bill-lines .bl-unit:hover{background:var(--border)}
.bill-lines .bl-dfoot{display:flex;align-items:center;justify-content:flex-end;gap:8px;max-width:960px;padding:4px 0}.bill-lines .bl-dfoot .bl-disc{width:132px}.bill-lines .bl-dfoot .bl-l{white-space:nowrap}
.bill-lines .bl-add{display:inline-flex;flex:none;align-items:center;gap:4px;height:28px;white-space:nowrap;padding:0 6px;border:0;background:transparent;color:var(--muted);font:inherit;font-size:12px;line-height:16px;font-weight:500;cursor:pointer;border-radius:var(--radius-sm)}
.bill-lines .bl-add:hover{color:var(--fg);background:var(--soft)}.bill-lines .bl-add svg,.bill-lines .bl-add .icon{width:14px;height:14px}
main#content .bill-lines :is(select,input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=range])).bl-in.bl-in{min-height:28px;height:auto}main#content .bill-lines :is(button).bl-add.bl-add,main#content .bill-lines :is(button).bl-del.bl-del,main#content .bill-lines :is(button).bl-unit.bl-unit{min-height:28px;height:auto}
@media(max-width:700px){.bill-lines .bl-head{display:none}.bill-lines .bl-row{grid-template-columns:minmax(0,1fr) 28px}.bill-lines .bl-row>:not(.bl-del){grid-column:1}.bill-lines .bl-row .bl-del{grid-column:2;grid-row:1}.bill-lines .bl-one{max-width:none}.bill-lines .bl-dfoot{justify-content:space-between}}
main#content .ig tr.ig-contract .ig-in{background:transparent}main#content .ig tr.ig-contract .ig-in:hover{border-color:var(--border)}
.ld-income{border-top:1px solid var(--border);padding-top:12px}.ld-income summary{cursor:pointer;font-size:14px;font-weight:500}.ld-income summary small{color:var(--muted);font-weight:400}.ld-income[open] summary{margin-bottom:12px}.ld-income .ld-row+.ld-row{margin-top:12px}

/* legacy ProjectOverviewTab checklist card */


.project-checklist{list-style:none;margin:0;padding:0;display:grid;gap:4px}.project-checklist li{display:flex;align-items:center;gap:8px;padding:2px 0}.project-checklist form{display:contents}.project-checklist svg{width:14px;height:14px;flex-shrink:0}.project-checklist svg.ok{color:var(--tf-22c55e,#22c55e)}.project-checklist svg.warn{color:var(--tf-f59e0b,#f59e0b)}.project-checklist-label{font-size:12px;line-height:16px}.project-checklist li.done .project-checklist-label{color:var(--muted);text-decoration:line-through}.project-checklist small{font-size:9px;line-height:12px;color:var(--muted)}
.project-checklist .project-checklist-due{flex-shrink:0;white-space:nowrap;font-size:10px;line-height:14px}.project-checklist .project-checklist-due.late{color:var(--tf-d97706,#d97706);font-weight:500}.project-checklist li.done .project-checklist-due{display:none}
/* legacy ExpenseGroupedView (Matrix list view) */
.mx-list:not([hidden]){margin-top:8px}.mx-list-table .mx-list-c-day{width:150px}.mx-list-table .mx-list-c-amount{width:200px}.mx-list-table .mx-list-c-status{width:168px}.mx-list-table td:has(>.lv-bank-form){overflow:visible}

/* Legacy ExportBankPaymentButton in a รอทำจ่าย month row (outline h-7 text-xs). */
.lv-bank-form{display:inline-flex;margin:0}



/* Dashboard legacy rhythm: Dashboard.jsx space-y-4 sm:space-y-6 between header, quick links, stats and columns */
/* sweep-p9:begin */
/* ตรวจคุณภาพข้อมูล (/Expenses?tab=data_quality, design sweep P9): the strip, one toolbar line, the one .pov table, 28px picks in the row, the sticky bulk bar. */
.expense-dq{display:grid;gap:16px}.expense-dq>*{margin:0}
.expense-dq-bar select{flex:0 1 300px;min-width:0}.expense-dq-bar .combobox{flex:0 1 300px;width:auto}.expense-dq-bar .fw-count{margin-left:auto}
.dq-c-pick{width:36px}.dq-c-issue{width:260px}.dq-c-fix{width:360px}.dq-c-code{width:112px}.dq-c-group{width:220px}
.expense-dq-table td.dq-pick{padding-right:0}.expense-dq-table td.dq-title a{font-weight:600}
.expense-dq-table td.dq-fix{white-space:normal;overflow:visible}
.dq-fixes{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.dq-fixes form{display:flex;gap:8px;align-items:center;margin:0;min-width:0}.dq-fixes form>:is(select,.combobox){flex:1 1 140px;width:auto;min-width:0}.dq-fixes input[type=text]{flex:1 1 120px;min-width:0}
.expense-dq-table :is(select,input[type=text]){height:28px;min-height:28px;padding:0 8px;font-size:13px;line-height:18px}
main#content .expense-dq-table td .combobox .combobox-trigger{height:28px;min-height:28px;padding:0 8px;font-size:13px;line-height:18px}
.expense-dq-table .button.small{flex:none;height:28px;min-height:28px;padding:0 8px}
.expense-dq-bulk form{display:flex;align-items:center;gap:8px;margin:0}.expense-dq-bulk select{height:32px;min-height:32px;max-width:240px}.expense-dq-bulk .combobox{width:240px}
.expense-dq-bulk .combobox-trigger{height:32px;min-height:32px;background:var(--tb-ffffff,#fff);color:var(--tf-111827,#111827)}
.expense-dq-panel{display:grid;gap:8px}.expense-dq-panel h3,.expense-dq-panel p{margin:0}.expense-dq-warn{color:var(--tf-b45309,#b45309)}.expense-dq-coa-scroll{max-height:420px;overflow:auto}
@media(pointer:coarse){.expense-dq-table .button.small,main#content .expense-dq-table td .combobox .combobox-trigger,.expense-dq-table :is(select,input[type=text]){height:44px;min-height:44px}}
@media(max-width:700px){
 .expense-dq-table tr{position:relative}
 .expense-dq-table td{white-space:normal;overflow-wrap:anywhere}
 .expense-dq-table td.dq-pick{position:absolute;top:8px;right:8px;padding:0}
 .expense-dq-table td.dq-title,.expense-dq-table td.dq-fix{grid-column:1/-1}.expense-dq-table td.dq-title{padding-right:32px}
 .dq-fixes,.dq-fixes form{flex:1 1 100%;width:100%}
 .expense-dq-bar :is(select,.combobox){flex:1 1 100%}.expense-dq-bar .fw-count{margin-left:0}
 .expense-dq-bulk{flex-wrap:wrap}.expense-dq-bulk .combobox{width:100%}
}
/* sweep-p9:end */
.balance-snapshots{margin:0 0 16px;display:grid;gap:12px}.balance-snapshots strong{display:inline-flex;gap:8px;align-items:center}.balance-snapshot-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px;align-items:end}.balance-snapshot-form label{display:flex;flex-direction:column;gap:4px;font-size:12px}.balance-snapshot-notes{grid-column:1/-1}.balance-snapshot-list{max-height:200px;overflow-y:auto;border-top:1px solid var(--border);padding-top:8px;display:grid;gap:6px;font-size:12px}.balance-snapshot small{display:block}
/* Legacy IncomeRemarkDialog: the clickable remark opens one small dialog. */
.income-remark-form{display:grid;gap:12px;margin-top:12px}.income-remark-form textarea{width:100%}.income-remark-form .form-actions{display:flex;justify-content:flex-end;gap:8px}
/* legacy ProjectDayDialog (Matrix เพิ่มวัน) */
.modal.ld-dialog{width:min(var(--modal-w-sm),calc(100vw - 32px))}.ld-dialog .modal-inner{min-height:0}
.ld-form{display:grid;gap:14px}.ld-field{display:grid;gap:6px;min-width:0}.ld-field label{font-size:14px;line-height:20px;font-weight:500}.ld-field label small{font-size:12px;font-weight:400;color:var(--muted)}.ld-req{color:var(--tf-ef4444,#ef4444)}
.ld-field input,.ld-field select{height:36px;min-height:36px;font-size:14px;padding:0 12px}.ld-when{display:grid;grid-template-columns:minmax(0,1fr) 92px auto 92px;gap:8px;align-items:center}.ld-dash{color:var(--muted)}
.ld-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.ld-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}
.ld-field input,.ld-field select{width:100%;min-width:0;box-sizing:border-box}
/* legacy ContactPickerDialog (Matrix เพิ่มคน/บริษัท) */
.modal.cp-dialog{width:min(var(--modal-w-md),calc(100vw - 32px));height:min(70vh,640px);padding:0;display:flex;flex-direction:column}.cp-dialog[open]{display:flex}.modal.cp-dialog:not([open]){display:none}.cp-dialog .modal-inner{min-height:0;display:flex;flex-direction:column;height:100%}
.cp-search{position:relative;padding:0 16px 8px}
.cp-scroll{flex:1;min-height:0;overflow-y:auto;border-top:1px solid var(--border);padding:4px 8px}.cp-list{display:grid;gap:2px}
.cp-item{display:grid;gap:2px;width:100%;text-align:left;padding:10px 12px;border:0;border-radius:var(--radius-md);background:none;cursor:pointer;min-height:0}.cp-item:hover{background:var(--soft)}.cp-name{font-size:14px;line-height:20px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cp-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.cp-role{font-size:12px;line-height:16px;padding:0;color:var(--muted);font-weight:400}/* audit PROJ-35: the role is quiet text, not a pill on every row */.cp-phone{display:inline-flex;align-items:center;gap:4px;font-size:10px;color:var(--muted)}.cp-phone svg{width:12px;height:12px}
.cp-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px;border-top:1px solid var(--border)}
/* Phone (owner 2026-10-13, every modal looked at 375px): the add-new link takes its own row and the pager keeps one line; before, ถัดไป broke in two and the buttons were squeezed. */
@media (max-width:700px){.cp-foot{flex-wrap:wrap}.cp-foot>a{flex:1 1 100%;justify-content:center}.cp-foot-pager{flex:1 1 100%;justify-content:flex-end}.cp-foot .cp-sm{white-space:nowrap}}.cp-foot-right,.cp-foot-pager{display:flex;align-items:center;gap:8px}.cp-foot-right{margin-left:auto}.cp-total{font-size:10px;color:var(--muted)}.button.cp-sm{height:32px;min-height:32px;padding:0 12px;font-size:12px}.button.cp-sm svg{width:14px;height:14px}
/* legacy MatrixCellPopover */
.mx-pop.mx-cellpop{width:288px;padding:12px;display:none;gap:8px}.mx-pop.mx-cellpop:popover-open{display:grid}.mx-chip{font:inherit;border:0;cursor:pointer}
.mx-cp-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.mx-cp-head strong{font-size:12px;line-height:16px;font-weight:600}.mx-cp-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;min-height:0;padding:0;border:0;border-radius:var(--radius-sm);background:none;color:var(--muted);cursor:pointer}.mx-cp-icon:hover{background:var(--soft)}.mx-cp-i{width:14px;height:14px;flex-shrink:0}
.mx-cp-cancel{display:grid;gap:6px}.mx-cp-cancel[hidden]{display:none}.mx-cp-cancel input{height:32px;min-height:32px;font-size:12px}.button.mx-cp-danger{height:28px;min-height:28px;font-size:12px;color:var(--tf-dc2626,#dc2626)}
.mx-cp-ffw{display:flex;align-items:center;justify-content:space-between}.mx-cp-ffw-open{margin:0}.mx-cp-ffw-link{display:inline-flex;align-items:center;gap:2px;padding:0;border:0;background:none;color:var(--tf-2563eb,#2563eb);font-size:10px;line-height:14px;cursor:pointer}.mx-cp-ffw-link:hover{text-decoration:underline}.mx-cp-ffw-link .mx-cp-i{width:12px;height:12px}.mx-cp-ffw-badge{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border:1px solid var(--tl-fcd34d,#fcd34d);border-radius:var(--radius-md);background:var(--tb-fffbeb,#fffbeb);color:var(--tf-b45309,#b45309);font-size:10px;line-height:14px;font-weight:600}.mx-cp-ffw-badge.done{border-color:var(--tl-86efac,#86efac);background:var(--tb-f0fdf4,#f0fdf4);color:var(--tf-15803d,#15803d)}.mx-cp-ffw-badge .mx-cp-i{width:12px;height:12px}
/* The FFW answers make a cell box taller than the 420px cap of .mx-pop; the box (overflow visible for its outside close) grows to the screen instead, mxPlace keeps it on screen. */.mx-pop.mx-cellpop{max-height:calc(100vh - 60px)}.mx-cp-ffw-ans{display:grid;gap:6px}.mx-cp-ffw-q{display:grid;min-width:0}.mx-cp-ffw-l{color:var(--muted);font-size:11px;line-height:15px}.mx-cp-ffw-t{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;white-space:pre-line;font-size:12px;line-height:16px}.mx-cp-ffw-score{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;font-size:12px;line-height:16px}.mx-cp-ffw-of,.mx-cp-ffw-avg{color:var(--muted)}.mx-cp-ffw-score .badge{padding:0 6px;font-size:10px;line-height:14px}.mx-cp-ffw-n{margin:0;color:var(--muted);font-size:10px;line-height:14px}
.mx-cp-cat{display:grid;gap:8px}.mx-cp-select{position:relative;display:block}.mx-cp-select .mx-cp-tag{position:absolute;left:10px;top:9px;color:var(--tf-2563eb,#2563eb);pointer-events:none}.mx-cp-select select{width:100%;height:32px;min-height:32px;padding-left:30px;font-size:12px;border-color:var(--tl-93c5fd,#93c5fd);background-color:var(--tb-eff6ff,#eff6ff);color:var(--tf-1e3a8a,#1e3a8a)}.button.mx-cp-save{height:32px;min-height:32px;font-size:12px;width:100%;justify-content:center}
.mx-cp-icons{display:inline-flex;align-items:center;gap:2px}.mx-cp-icons [hidden]{display:none}.mx-cp-act{display:grid;gap:6px;margin:0}.mx-cp-act[hidden]{display:none}.mx-cp-new{display:grid;gap:8px}
.mx-cp-round{display:grid;gap:2px;font-size:12px;color:var(--muted)}.mx-cp-round input{width:100%;box-sizing:border-box;height:32px;min-height:32px;font-size:14px}
/* Round prompt after PM อนุมัติ: a sm window of the modal standard that opens by itself (docs/ui/MODAL.md), so it is seen wherever the Matrix is scrolled. */
.modal.mx-round-dialog{width:min(var(--modal-w-sm),calc(100vw - 32px))}.mx-round{margin:0}.mx-round input[type=date]{display:block;width:100%}
.mx-cp-amt{display:flex;height:32px;border:1px solid var(--border);border-radius:6px;overflow:hidden}.mx-cp-amt input{flex:1;min-width:0;height:30px;min-height:30px;border:0;border-radius:0;text-align:right;font-size:14px}.mx-cp-amt .button{height:30px;min-height:30px;border-radius:0;padding:0 12px;font-size:12px}
.button.mx-cp-ok{width:100%;height:32px;min-height:32px;font-size:12px;background:var(--tb-16a34a,#16a34a);border-color:var(--tl-16a34a,#16a34a);color:var(--tf-ffffff,#fff)}.button.mx-cp-ok-outline{width:100%;height:32px;min-height:32px;font-size:12px;color:var(--tf-15803d,#15803d);border-color:var(--tl-86efac,#86efac);list-style:none}.mx-cp-warn{margin:0;font-size:10px;color:var(--tf-dc2626,#dc2626)}
.mx-cp-close summary::-webkit-details-marker{display:none}.mx-cp-close[open] summary{display:none}.mx-cp-closed{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 8px;border:1px solid var(--tl-bbf7d0,#bbf7d0);border-radius:6px;background:var(--tb-f0fdf4,#f0fdf4);color:var(--tf-15803d,#15803d);font-size:11px}.button.mx-cp-reopen{height:24px;min-height:24px;padding:0 8px;font-size:11px;color:var(--tf-dc2626,#dc2626);border:0;background:none}
button.mx-dot,button.mx-add{border:0;background:none;padding:0;cursor:pointer;font-family:inherit}button.mx-dot:hover{background:var(--tb-f5f5f5a50,rgb(245 245 245 / .5))}.mx-item.mx-new{display:contents}
.button.mx-cp-foot{display:inline-flex;align-items:center;justify-content:center;gap:4px;width:100%;height:32px;min-height:32px;font-size:12px;text-decoration:none}.mx-cp-foot .mx-cp-i{width:14px;height:14px}.mx-box-status{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;font-size:12px;line-height:16px}.mx-box-label{font-weight:600}.mx-cp-where{flex-basis:100%;color:var(--muted);font-size:11px;line-height:16px}.mx-cp-where a{color:inherit;text-decoration:underline}.mx-box-body{display:grid;gap:8px}.mx-box-body:empty{display:none}.mx-box-foot{display:grid;gap:8px;padding-top:8px;border-top:1px solid var(--border)}
/* Board table view = legacy BoardTableView: one-line rows, in-row stage Select (h-7 text-xs), text-xs cells, ghost icon actions */
.table-wrap table:has(.board-col-stage) th{font-size:12px;font-weight:500;color:var(--muted,var(--tf-64748b,#64748b));white-space:nowrap}
.table-wrap table:has(.board-col-stage) td{padding-top:6px;padding-bottom:6px;font-size:12px;vertical-align:middle}
.board-col-stage{width:190px}.board-col-date{width:110px}.board-col-age{width:80px}.board-col-owner{width:130px}.board-col-actions{width:90px}
.board-table-name .deal-identity-line{font-size:13px;font-weight:500}
.board-table-name .record-link{color:inherit;text-decoration:none}.board-table-name .record-link:hover{color:var(--primary,var(--tf-0f172a,#0f172a))}
@media(max-width:767px){.board-table-name .record-link{display:inline-flex;align-items:center;min-height:24px;max-width:100%}}
.board-stage-select{margin:0}.board-stage-select select{height:28px;min-height:28px;width:100%;font-size:12px;padding:0 8px}
.board-table-date{color:var(--tf-64748b,#64748b);white-space:nowrap}.board-table-date.is-training{color:var(--tf-2563eb,#2563eb);font-weight:500}
.board-table-age{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--tf-64748b,#64748b);background:none;padding:0}
.board-table-age.is-warn{color:var(--tf-d97706,#d97706)}.board-table-age.is-late{color:var(--tf-dc2626,#dc2626);font-weight:600}
.board-table-amount{font-weight:500;white-space:nowrap}.board-table-owner{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Legacy SalesFinanceTraceLine: mb-3 rounded-md bg-slate-50 border-slate-200 px-2.5 py-1.5 text-[10px] text-slate-600 */
.deal-finance-trace{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;margin:0 0 12px;padding:6px 10px;border:1px solid var(--tl-e2e8f0,#e2e8f0);border-radius:6px;background:var(--tb-f8fafc,#f8fafc);color:var(--tf-475569,#475569);font-size:12px;line-height:16px}
.deal-finance-trace strong{color:var(--tf-1e293b,#1e293b);font-weight:600}.deal-trace-won{margin:0 0 0 auto}.deal-finance-trace .deal-trace-code{margin-left:4px}.deal-finance-trace a.deal-trace-code{color:var(--tf-2563eb,#2563eb);margin-left:0}
/* Keep the board name and its primary action reachable with long assignee names on a phone. */
@media(max-width:767px){
 .page-header:has(.board-header-actions){flex-direction:column;align-items:stretch;gap:8px}
 .page-header:has(.board-header-actions) .heading{min-width:0}
 .page-header:has(.board-header-actions) .board-header-actions{justify-content:flex-start;max-width:100%}
 .board-header-actions .board-owner-filter{max-width:100%}
}
@media(max-width:767px){.board-owner-filter .combobox-trigger.is-placeholder .combobox-value{display:none}}
/* Create-Deal Requirement box (legacy DealFormDialog: rounded-lg border-blue-200 bg-blue-50/40 p-3). */
.deal-create-requirement{border:1px solid var(--tl-bfdbfe,#bfdbfe);background:var(--tb-eff6ffa40,rgba(239,246,255,.4));border-radius:8px;padding:12px;display:grid;gap:12px}.deal-create-requirement-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.deal-create-requirement-head strong{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:500;color:var(--tf-1e3a8a,#1e3a8a)}.deal-create-requirement-head strong .icon{width:16px;height:16px}.deal-create-requirement-head>span{display:flex;gap:6px;flex-wrap:wrap}.deal-create-requirement-head .badge{font-size:10px;background:var(--tb-ffffff,#fff)}.deal-create-requirement-head .badge.warning{color:var(--tf-b45309,#b45309);border-color:var(--tl-fcd34d,#fcd34d)}.deal-create-requirement-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.deal-create-requirement-grid .field.full{grid-column:1/-1}.deal-create-requirement-grid input,.deal-create-requirement-grid select,.deal-create-requirement-grid textarea{background:var(--tb-ffffff,#fff)}.deal-create-requirement .warning-text{color:var(--tf-b45309,#b45309);font-size:12px}@media(max-width:767px){.deal-create-requirement-grid{grid-template-columns:minmax(0,1fr)}}

/* Legacy ExportBankPaymentButton dialog (sm:max-w-md): two bank tiles with counts, amber blocked note. */
dialog.bank-export-dialog{width:min(var(--modal-w-sm),calc(100vw - 32px));padding:0}.bank-export-dialog .modal-inner{display:grid;gap:8px}.bank-export-dialog .muted{margin:0 0 8px;font-size:13px}
.bank-export-opt{width:100%;display:flex;align-items:center;gap:12px;padding:16px;border:1px solid var(--border,var(--tl-e5e7eb,#e5e7eb));border-radius:8px;background:var(--tb-ffffff,#fff);text-align:left;cursor:pointer}.bank-export-opt:disabled{opacity:.5;cursor:not-allowed}.bank-export-opt.is-scb:not(:disabled):hover{background:var(--tb-faf5ff,#faf5ff);border-color:var(--tl-d8b4fe,#d8b4fe)}.bank-export-opt.is-other:not(:disabled):hover{background:var(--tb-eff6ff,#eff6ff);border-color:var(--tl-93c5fd,#93c5fd)}
.bank-export-ic{width:40px;height:40px;border-radius:8px;flex:0 0 auto;background:var(--tb-f3e8ff,#f3e8ff)}.is-other .bank-export-ic{background:var(--tb-dbeafe,#dbeafe)}.bank-export-txt{flex:1;min-width:0;display:grid}.bank-export-txt b{font-size:14px;font-weight:500}.bank-export-txt small{font-size:12px;color:var(--muted)}
.bank-export-n{display:grid;text-align:right}.bank-export-n b{font-size:18px;color:var(--tf-7e22ce,#7e22ce)}.is-other .bank-export-n b{color:var(--tf-1d4ed8,#1d4ed8)}.bank-export-n small{font-size:10px;color:var(--muted)}
.bank-export-blocked{margin:0;font-size:12px;color:var(--tf-b45309,#b45309);background:var(--tb-fffbeb,#fffbeb);border:1px solid var(--tl-fde68a,#fde68a);border-radius:6px;padding:8px}.bank-export-dialog .actions{display:flex;justify-content:flex-end}
.payment-slip .button.small{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 8px;font-size:12px;white-space:nowrap}.payment-slip .icon{width:14px;height:14px}
/* Legacy PaymentSlipUploader: 36px slip tiles (image / PDF), a red ✕ on hover, the อัปสลิป / เพิ่ม picker and the no-ref warning. */
.payment-slip-tiles{display:flex;flex-wrap:wrap;align-items:center;gap:4px}.payment-slip-tile{position:relative;display:inline-flex}.payment-slip-tile>a{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border:1px solid var(--tl-e5e5e5,#e5e5e5);border-radius:6px;background:var(--tb-ffffff,#fff);color:var(--tf-737373,#737373)}.payment-slip-tile>a:hover{border-color:var(--tl-171717,#171717);color:var(--tf-171717,#171717)}.payment-slip-tile .icon{width:16px;height:16px}
.payment-slip-remove{position:absolute;top:-6px;right:-6px;display:none;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:0;border-radius:9999px;background:var(--tb-dc2626,#dc2626);color:var(--tf-ffffff,#fff);cursor:pointer}.payment-slip-remove .icon{width:10px;height:10px}.payment-slip-tile:hover .payment-slip-remove,.payment-slip-remove:focus-visible{display:inline-flex}
@media (hover:none){.payment-slip-remove{display:inline-flex}}
.payment-slip-add{cursor:pointer}.payment-slip-noref{display:block;margin-top:2px;font-size:10px;color:var(--tf-d97706,#d97706);white-space:nowrap}
/* Legacy แท็ก column: 9px tag chips in the tag's colour (click removes), +N popover and the ⋯ tag menu. */
.payment-tag-cell{display:flex;align-items:center;gap:4px}.payment-tag{display:inline-flex;align-items:center;min-height:0;height:auto;padding:2px 6px;border:1px solid transparent;border-radius:4px;font-size:9px;line-height:1;font-weight:500;white-space:nowrap;cursor:pointer}.payment-tag:hover{opacity:.7}.payment-tag:disabled{cursor:default;opacity:1}
.payment-tag-more,.payment-tag-menu{position:relative}.payment-tag-more>summary,.payment-tag-menu>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 4px;border-radius:4px;font-size:9px;color:var(--tf-94a3b8,#94a3b8)}.payment-tag-more>summary::-webkit-details-marker,.payment-tag-menu>summary::-webkit-details-marker{display:none}.payment-tag-more>summary:hover,.payment-tag-menu>summary:hover{background:var(--tb-f1f5f9,#f1f5f9);color:var(--tf-475569,#475569)}.payment-tag-menu>summary .icon{width:12px;height:12px}
.payment-tag-pop{position:absolute;z-index:30;top:100%;right:0;min-width:160px;margin-top:4px;padding:4px;border:1px solid var(--tl-e5e5e5,#e5e5e5);border-radius:8px;background:var(--tb-ffffff,#fff);box-shadow:var(--shadow-lg)}.payment-tag-more .payment-tag-pop{left:0;right:auto}.payment-tag-pop button{display:flex;align-items:center;gap:8px;width:100%;min-height:0;padding:6px 8px;border:0;border-radius:4px;background:none;font-size:12px;text-align:left;color:var(--tf-475569,#475569);cursor:pointer}.payment-tag-pop button:hover{background:var(--tb-f8fafc,#f8fafc)}.payment-tag-pop .icon{width:14px;height:14px;color:var(--tf-cbd5e1,#cbd5e1)}.payment-tag-pop .is-on .icon{color:currentColor}
.payment-tag-dot{width:8px;height:8px;border-radius:9999px;flex:none}
.ptag-slate{background:var(--tb-f1f5f9,#f1f5f9);color:var(--tf-1e293b,#1e293b);border-color:var(--tl-e2e8f0,#e2e8f0)}.ptag-gray{background:var(--tb-f3f4f6,#f3f4f6);color:var(--tf-1f2937,#1f2937);border-color:var(--tl-e5e7eb,#e5e7eb)}.ptag-red{background:var(--tb-fee2e2,#fee2e2);color:var(--tf-991b1b,#991b1b);border-color:var(--tl-fecaca,#fecaca)}.ptag-orange{background:var(--tb-ffedd5,#ffedd5);color:var(--tf-9a3412,#9a3412);border-color:var(--tl-fed7aa,#fed7aa)}.ptag-amber{background:var(--tb-fef3c7,#fef3c7);color:var(--tf-92400e,#92400e);border-color:var(--tl-fde68a,#fde68a)}.ptag-yellow{background:var(--tb-fef9c3,#fef9c3);color:var(--tf-854d0e,#854d0e);border-color:var(--tl-fef08a,#fef08a)}.ptag-green{background:var(--tb-dcfce7,#dcfce7);color:var(--tf-166534,#166534);border-color:var(--tl-bbf7d0,#bbf7d0)}.ptag-emerald{background:var(--tb-d1fae5,#d1fae5);color:var(--tf-065f46,#065f46);border-color:var(--tl-a7f3d0,#a7f3d0)}.ptag-teal{background:var(--tb-ccfbf1,#ccfbf1);color:var(--tf-115e59,#115e59);border-color:var(--tl-99f6e4,#99f6e4)}.ptag-blue{background:var(--tb-dbeafe,#dbeafe);color:var(--tf-1e40af,#1e40af);border-color:var(--tl-bfdbfe,#bfdbfe)}.ptag-indigo{background:var(--tb-e0e7ff,#e0e7ff);color:var(--tf-3730a3,#3730a3);border-color:var(--tl-c7d2fe,#c7d2fe)}.ptag-purple{background:var(--tb-f3e8ff,#f3e8ff);color:var(--tf-6b21a8,#6b21a8);border-color:var(--tl-e9d5ff,#e9d5ff)}.ptag-pink{background:var(--tb-fce7f3,#fce7f3);color:var(--tf-9d174d,#9d174d);border-color:var(--tl-fbcfe8,#fbcfe8)}
.payment-group-peak{height:32px;min-height:32px;font-size:12px;gap:6px;color:var(--tf-9333ea,#9333ea);border-color:var(--tl-e9d5ff,#e9d5ff)}.payment-group-peak:hover{background:var(--tb-faf5ff,#faf5ff);color:var(--tf-7e22ce,#7e22ce)}.payment-group-peak .icon{width:14px;height:14px}
/* Legacy CustomerEditDialog: close X top right, footer buttons right-aligned, bank section as a bordered collapsible row. */
.quotation-contact-dialog .modal-inner{position:relative}.quotation-contact-dialog .quotation-contact-extra{border:1px solid var(--line,var(--tl-e5e5e5,#e5e5e5));border-radius:8px;padding:10px 12px}.quotation-contact-dialog .quotation-contact-extra summary{font-size:13px;font-weight:600;cursor:pointer}.quotation-contact-dialog .quotation-contact-extra summary .muted{font-weight:400}
main[data-route="/ProjectDetail"]>.page-header{flex-wrap:nowrap}
main[data-route="/ProjectDetail"]>.page-header>.heading{flex:1;min-width:0}
main[data-route="/ProjectDetail"]>.page-header>.actions{flex-shrink:0}
@media(max-width:767px){
 main[data-route="/ProjectDetail"]>.page-header{flex-direction:column;align-items:stretch;gap:8px}
 main[data-route="/ProjectDetail"]>.page-header>.heading>.icon-button{flex:none;align-self:flex-start}
 main[data-route="/ProjectDetail"]>.page-header>.actions{flex-wrap:wrap;justify-content:flex-start;max-width:100%}
}
/* Create/edit Deal dialog on a phone (legacy DealFormDialog): the date pair and the Stage/lead-source pair stay two across (grid-cols-2), every other field full width, footer buttons stacked full width (flex-col, submit last). */
@media(max-width:767px){.deal-form-modal .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.deal-form-modal .form-grid>.field{grid-column:1/-1}.deal-form-modal .form-grid>.field:has(#expected_date),.deal-form-modal .form-grid>.field:has(#expected_training_date),.deal-form-modal .form-grid>.field:has(#lead_source),.deal-form-modal .form-grid>.field:has(#stage_id){grid-column:auto;min-width:0}.deal-form-modal .form-actions{flex-direction:column}.deal-form-modal .form-actions .button{width:100%;flex:none}}
/* Quotation editor pickers (legacy shadcn Select/DatePicker): the combobox takes the width the native select had. */
.qe .qe-type .combobox{width:192px;max-width:100%;display:block}.qe .qe-time .combobox{width:148px;flex-shrink:0}
.expense-list-project .expense-list-day-project{display:block;font-size:10px;line-height:14px}
dialog.income-add-modal{width:min(var(--modal-w-md),calc(100vw - 32px));padding:0}.income-add-modal .modal-inner{padding:24px;max-height:90vh;overflow:auto}.income-add-modal h1{display:flex;align-items:center;gap:8px;margin:0;font-size:16px}.income-add-modal h1 .icon{width:16px;height:16px;color:var(--tf-16a34a,#16a34a)}.income-add-form .form-grid{grid-template-columns:1fr}.income-add-form .form-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:8px}
.deal-info-people{display:grid;gap:6px}.deal-info-people ul{display:grid;gap:6px;margin:0;padding:0;list-style:none}.deal-info-people li{display:flex;align-items:center;gap:8px;padding:8px;border-radius:4px;background:var(--tb-171717a04,rgb(23 23 23 / .04));font-size:12px;line-height:16px}.deal-info-people li>div{min-width:0;flex:1}.deal-info-people small{display:flex;flex-wrap:wrap;gap:2px 12px;color:var(--muted);font-size:12px}.deal-info-people small>span{display:inline-flex;align-items:center;gap:4px}.deal-info-people small .icon{width:12px;height:12px}.deal-info-person-initial{display:flex;flex:0 0 28px;width:28px;height:28px;align-items:center;justify-content:center;border-radius:50%;background:color-mix(in srgb,var(--primary) 10%,transparent);color:var(--primary);font-size:10px;font-weight:500}.deal-info-people .badge{font-size:9px;padding:0 4px}

/* Payment round table = legacy StatusFilteredRoundGroup.jsx: the three check headers are text-center like their cells, the bank number is text-left, and the hidden "เลือก" label stays inside the scrolling table instead of widening the page. */
.payment-round-table th.expense-list-h-check{text-align:center}.payment-round-table th.expense-list-h-bankno,.payment-round-table td.expense-list-bankno{text-align:left}.payment-round-table th{position:relative}
/* รอตรวจสอบบัญชี "เพิ่มรายจ่าย" = legacy StatusFilteredExpenseTab <Button size="sm">: h-8 px-3 text-xs, the same 32px as the h-8 filter selects. */
.expense-list-status-filters .button.primary{height:32px;min-height:32px;padding:0 12px;font-size:12px;line-height:16px;gap:4px}.expense-list-status-filters .button.primary .icon{width:16px;height:16px}
/* Course ledger: legacy keeps search (w-64) and the create control on one row; where that row is a few px wider than the content, the search gives way instead of pushing the button off-screen. */
html.soft-loading,html.soft-loading *{cursor:progress}
/* Legacy BankAccountsPanel (ContactForm): bordered card, emerald landmark heading, eligibility strip, compact account rows, approve/reject. */
.contact-bank-panel{display:grid;gap:12px}.contact-bank-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.contact-bank-head h3{margin:0;font-size:14px;font-weight:600;display:inline-flex;align-items:center;gap:6px}.contact-bank-head h3 svg{width:16px;height:16px;color:var(--tf-059669,rgb(5 150 105))}
.contact-bank-eligibility{font-size:11px;border-radius:4px;padding:6px 8px}.contact-bank-eligibility.is-ready{background:var(--tb-f0fdf4,rgb(240 253 244));color:var(--tf-15803d,rgb(21 128 61))}.contact-bank-eligibility.is-hold{background:var(--tb-fffbeb,rgb(255 251 235));color:var(--tf-b45309,rgb(180 83 9))}
.contact-bank-list{display:grid;gap:6px}.contact-bank-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;border:0;border-bottom:1px solid var(--border);border-radius:0;padding:8px 0;min-width:0}.contact-bank-row .mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.contact-bank-status{font-size:10px}.contact-bank-status.status-pending{background:var(--tb-fef3c7,rgb(254 243 199));color:var(--tf-b45309,rgb(180 83 9))}.contact-bank-status.status-approved{background:var(--tb-dcfce7,rgb(220 252 231));color:var(--tf-15803d,rgb(21 128 61))}.contact-bank-status.status-rejected{background:var(--tb-fee2e2,rgb(254 226 226));color:var(--tf-b91c1c,rgb(185 28 28))}.contact-bank-inactive{font-size:10px;background:transparent;border:1px solid var(--border)}
.contact-bank-missing{color:var(--tf-dc2626,rgb(220 38 38));font-size:10px}.contact-bank-decide{display:flex;gap:4px;margin-left:auto}.contact-bank-decide button{height:24px;padding:0 8px;border-radius:6px;border:0;display:inline-flex;align-items:center;cursor:pointer}.contact-bank-decide svg{width:12px;height:12px}.contact-bank-approve{background:var(--tb-16a34a,rgb(22 163 74));color:var(--tf-ffffff,#fff)}.contact-bank-approve:hover{background:var(--tb-15803d,rgb(21 128 61))}.contact-bank-reject{background:transparent;color:var(--tf-dc2626,rgb(220 38 38))}
.contact-bank-add{display:grid;gap:16px}.contact-bank-add-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.contact-bank-add-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;line-height:16px;font-weight:400;color:var(--muted)}.contact-bank-add-grid input,.contact-bank-add-grid select{height:36px;font-size:14px;min-width:0;color:var(--fg)}@media(max-width:767px){.contact-bank-add-grid{grid-template-columns:minmax(0,1fr)}}.contact-bank-add-actions{display:flex;justify-content:flex-end;gap:8px}

/* iPhone Safari (owner 2026-09-28): focusing a control under 16px auto-zooms the page and it stays zoomed and cut off.
   Touch devices get 16px form text; pinch-zoom stays allowed (the legacy viewport meta never disabled it). */
@media(pointer:coarse){input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea{font-size:16px!important}}
@media(max-width:767px){.public-main>.tabs,.public-main>.tabs.public-card{max-width:100%}}
html,body{max-width:100%;overflow-x:clip}
/* Mobile drawer (owner 2026-09-28): the translucent blurred sidebar let the dim backdrop show through, so the drawer itself looked greyed out. */
@media(max-width:767px){.sidebar{background:var(--tb-ffffff,#fff);backdrop-filter:none;-webkit-backdrop-filter:none;z-index:40}.mobile-backdrop{z-index:35}}
/* JS-UX area (calendar / leave / upcoming): while a region waits for its patch it dims in place; nothing else moves. */
.calendar-month[aria-busy=true] .calendar-mini-list,.calendar-detail[aria-busy=true]>:not(.calendar-detail-heading),#leave-mine[aria-busy=true] tbody,form[aria-busy=true],.leave-row[aria-busy=true],[data-area-busy][aria-busy=true]{opacity:.45;transition:opacity .12s}
/* Header preferences (owner 2026-09-28): text size "A A" and the sidebar collapse toggle, top-right; saved per user
   (user_preferences via public/assets/prefs.js). The large size scales the whole app through one variable. */
html[data-text-size="large"]{--text-scale:1.125}
html[data-text-size="small"]{--text-scale:.875}
html[data-text-size="xs"]{--text-scale:.75}
html[data-text-size="xxs"]{--text-scale:.625}
html[data-text-size="xxxs"]{--text-scale:.5}
.text-size-btn:disabled{opacity:.35;cursor:default}
body{zoom:var(--text-scale)}
/* Owner 2026-09-29: no pinch or double-tap zoom and no rubber-band bounce on mobile; the A buttons set the size. */
html,body{touch-action:pan-x pan-y;overscroll-behavior:none}
.header-prefs{display:inline-flex;align-items:center;gap:2px;padding:2px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--bg)}
.text-size-btn{width:26px;height:24px;min-width:26px;min-height:24px;padding:0;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--muted);font-weight:600;line-height:1;cursor:pointer}
.text-size-btn:not(.text-size-large){font-size:12px}.text-size-btn.text-size-large{font-size:14px}
.text-size-btn.active{background:var(--soft);color:var(--fg)}
.public-shell .header-prefs{display:none}
.mobile-header .header-prefs{margin-left:auto}
@media(pointer:coarse){.text-size-btn{min-width:44px;min-height:40px}}
@media print{.header-prefs{display:none}}
/* Saving in place (erpInPlace, docs/ui/BEHAVIOUR.md): while an htmx swap puts new markup in, the browser does not anchor the scroll
   to a node being replaced (it jumped to the end of the page); the keeper puts the scroll back in the same task. */
.erp-swapping,.erp-swapping body{overflow-anchor:none}
html.fin-loading,html.fin-loading *{cursor:progress}
/* ElearningWorkspace inline expense row (ElearningWorkspace.jsx L559-621): bg-muted/10 row, p-2 cells, h-8 text-xs 220px outline pickers,
   dashed h-8 note / 120px amount, black 32px check; footer `p-4 border-t flex justify-between` with Wrap Day on the right. */

/* Course Ledger toolbar: w-64 search + w-[250px] CourseCombobox trigger (outline sm, h-8 text-xs font-normal border-dashed, muted, justify-start). */

/* Course Ledger kanban (ElearningWorkspace.jsx L725-748): Card > p-4 gap-4 bg-slate-50/50 horizontal scroller of w-[320px] rounded-xl
   border-slate-200/60 shadow-sm columns; header p-3 border-b, body p-3 min-h-[200px]. */
/* CreditTermReport parity (CreditTermFilters/KPICards/Table.jsx): filters Card p-3 grid-cols-2 md:grid-cols-6 gap-3, text-xs labels, search
   h-9 + outline Download button; KPI grid-cols-2 md:grid-cols-4 gap-3, Card p-4 xs label, text-2xl bold value, 11px hint, 16px icon top-right;
   tables keep their columns (overflow-x-auto) at every width, customer/project names on one line. */
.card.credit-term-filters{padding:12px;grid-template-columns:repeat(6,minmax(0,1fr))}.credit-term-filters label.field{font-size:12px;font-weight:500;gap:4px}
.credit-term-export{flex:none}
.credit-term-tone-good{color:var(--tf-16a34a,#16a34a)}.credit-term-tone-warn{color:var(--tf-d97706,#d97706)}.credit-term-tone-bad{color:var(--tf-dc2626,#dc2626)}
.credit-term-table td:first-child strong{white-space:nowrap}
.credit-term-table td,.credit-term-table th{padding:8px}
@media(max-width:767px){.card.credit-term-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:639px){.credit-term-table td:first-child{white-space:nowrap}}
.credit-term-table small{font-size:11px;line-height:16px}
section[aria-label="รายละเอียดรายรอบ"] .credit-term-table td{font-size:12px;line-height:16px}section[aria-label="รายละเอียดรายรอบ"] .credit-term-table td strong{font-weight:500}






/* AdminSettings → Pipeline boards (legacy BoardsSettings): space-y-2 list of border rounded-lg p-3 rows, 16px muted board glyph, sm medium name
   over xs muted code, outline sm "Stage" with a sliders glyph, ghost 32px edit icon. */
.pipe-board-glyph .icon{width:16px;height:16px;color:var(--muted)}
/* AdminSettings → โปรเจคกลาง (legacy OverheadBucketSettings): indigo glyph + base semibold title; bordered p-3 rows, blue mono code,
   grey 10px count badge, ghost red "✕ นำออก". */
.contact-peak-code .row-between .button.small{min-height:32px;height:32px;line-height:16px}.contact-peak-code .row-between .button.small span{display:inline-flex;align-items:center}.contact-peak-code .row-between .button.small .icon{width:14px;height:14px}
/* owner 28/09: micro-animation (drawer slide, backdrop fade, content fade after in-place swap, popover/dialog fade) */
@media(max-width:767px){.sidebar{transition:transform .2s ease}.mobile-backdrop{animation:fx-fade .2s ease}}
main#content.fx-in{animation:fx-fade .15s ease}
dialog[open],.combobox-pop:not([hidden]),.datepicker-pop:not([hidden]),details[open]>.menu,.popover:not([hidden]){animation:fx-pop .15s ease}
@keyframes fx-fade{from{opacity:0}to{opacity:1}}
@keyframes fx-pop{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:none}}
/* owner 28/09: one motion standard for the whole system: every add/edit/remove fades, swaps fade, menus/popovers pop (150ms ease, shadcn timing) */
.htmx-added,.fx-new{animation:fx-fade .15s ease}
/* owner 2026-10-17 (lead decision): a region an update of the same page swaps in place (a Project tab panel, the Matrix) never fades from blank */
.project-detail-panel.htmx-added,#project-matrix.htmx-added{animation:none}
.htmx-swapping{opacity:0;transition:opacity .15s ease}

details>:not(summary){animation:fx-fade .15s ease}
.toast,.alert,.success{animation:fx-fade .2s ease}
/* Legacy COLOR_PALETTE keys beyond the seven role colours (categoryColors.js) and the ผังบัญชี group / colour / PEAK cells */
.mx-c-pink{background:var(--mx-pink-bg);color:var(--mx-pink-fg)}.mx-c-amber{background:var(--mx-amber-bg);color:var(--mx-amber-fg)}.mx-c-rose{background:var(--mx-rose-bg);color:var(--mx-rose-fg)}.mx-c-indigo{background:var(--mx-indigo-bg);color:var(--mx-indigo-fg)}
/* Legacy UserProfile images: avatar photo (profile card, sidebar footer), signature image (profile card, quotation approver) */
.profile-avatar{position:relative;overflow:hidden;cursor:pointer}.profile-avatar img,.nav-avatar img{width:100%;height:100%;object-fit:cover;border-radius:9999px;display:block}.nav-avatar.has-photo{overflow:hidden;padding:0}.profile-avatar-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:var(--tb-000000a40,rgb(0 0 0/.4));color:var(--tf-ffffff,#fff);border-radius:9999px;opacity:0;transition:opacity .15s}.profile-avatar:hover .profile-avatar-overlay,.profile-avatar:focus-within .profile-avatar-overlay{opacity:1}.profile-image-actions{display:flex;flex-wrap:wrap;gap:8px;padding-top:12px;border-top:1px solid var(--border)}.profile-image-actions label.button{cursor:pointer}.profile-signature.has-image{padding:12px}.profile-signature.has-image img{height:80px;width:auto;max-width:280px;object-fit:contain}.profile-image-form{display:contents}.qp-signature-img{height:28px;width:auto;max-width:80%;object-fit:contain}
/* Legacy ExpenseDupTraceLine: "อาจซ้ำ ×N" review badge and its popover of matching Bills (warning only). */
.expense-dup{position:relative;display:block;margin-top:2px}.expense-dup>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;gap:2px;padding:0 6px;border:1px solid var(--tl-fcd34d,#fcd34d);border-radius:6px;background:var(--tb-fffbeb,#fffbeb);color:var(--tf-b45309,#b45309);font-size:12px;line-height:16px;font-weight:500}.expense-dup>summary::-webkit-details-marker{display:none}.expense-dup>summary:hover{background:var(--tb-fde68a,#fde68a)}.expense-dup-pop{position:absolute;z-index:30;left:0;top:calc(100% + 4px);width:min(360px,calc(100vw - 32px));padding:12px;border:1px solid var(--border);border-radius:8px;background:var(--bg);box-shadow:var(--shadow-lg);white-space:normal}.expense-dup-pop p{margin:4px 0 8px;font-size:12px;line-height:16px}.expense-dup-pop ul{display:grid;gap:6px;max-height:280px;margin:0;padding:0;overflow:auto;list-style:none}.expense-dup-pop li{display:grid;gap:2px;padding:6px 8px;border:1px solid var(--border);border-radius:6px;background:var(--soft);font-size:12px;line-height:16px}.expense-dup-pop li.is-self{border-color:var(--tl-bfdbfe,#bfdbfe);background:var(--tb-eff6ff,#eff6ff)}.expense-dup-pop .row-between{gap:8px}
/* Legacy ExpenseQuickReviewDialog สำหรับบัญชี: classify รหัสค่าใช้จ่าย / VAT / WHT in place. */

.partner-portal-unlinked-icon{display:flex;justify-content:center;color:var(--tf-ca8a04,#ca8a04);margin-bottom:8px}.partner-portal-unlinked-icon svg{width:24px;height:24px}.partner-portal-title{display:flex;align-items:center;gap:8px}.partner-portal-title svg{width:16px;height:16px}
.public-main .public-card.public-denied{max-width:384px;margin:clamp(24px,20vh,160px) auto 0;padding-block:48px;text-align:center}.public-denied-icon{display:block;width:40px;height:40px;margin:0 auto 12px;color:var(--tf-f87171,#f87171)}.public-denied h2{font-size:16px;margin-bottom:12px;color:var(--tf-111827,#111827)}


.update-log-title{display:flex;align-items:center;gap:8px}.update-log-title svg{width:16px;height:16px}
/* AccountingAudit legacy parity: info icon row, 3-up KPI with icons, search + w-64 rule filter on one row */
.card.padded.accounting-audit-intro{display:flex;align-items:flex-start;gap:8px;padding:12px;border-radius:8px;background:var(--tb-f5f5f5a40,rgb(245 245 245 / .4));box-shadow:none;margin-bottom:16px}.accounting-audit-intro>.icon{width:16px;height:16px;flex:none;margin-top:2px;color:var(--muted)}
.accounting-audit-filters{display:flex;flex-wrap:nowrap;align-items:center;gap:8px}.accounting-audit-filters .search{flex:1 1 auto;min-width:0}
@media(max-width:639px){.accounting-audit-filters{flex-wrap:wrap}main#content .accounting-audit-filters>.combobox{flex:1 1 0;width:auto}.accounting-audit-filters .search{flex:1 1 100%}.accounting-audit-filters>.fw-count{flex:1 1 100%;margin-left:0}}
/* AuditActivityHub legacy parity: bordered slate note with lock icon */
.project-pnl-close{margin-bottom:12px;gap:12px;flex-wrap:wrap}.project-pnl-close>div{display:grid;gap:2px;min-width:0;flex:1 1 220px}.project-pnl-close small{font-size:12px;line-height:16px}
.finance-table tr.pnl-closed>td{background:var(--tb-f0fdf4,#f0fdf4)}
.finance-table tr.pnl-critical>td{background:var(--tb-fef2f2,#fef2f2)}.finance-table tr.pnl-warning>td{background:var(--tb-fffbeb,#fffbeb)}.pnl-table th:nth-child(2),.pnl-table td:nth-child(2),.pnl-table th:nth-child(3),.pnl-table td:nth-child(3){text-align:left}.pnl-sort{display:inline-flex;align-items:center;gap:2px;color:inherit}.pnl-sort svg{width:12px;height:12px;opacity:.6}.pnl-incomplete-active{border-color:var(--bd-fca5a5,var(--tl-fca5a5,#fca5a5));color:var(--tf-dc2626,#dc2626)}


/* AdminSettings integration cards (owner 2026-09-29): one card per system; status, where-to-get steps, keys, test, advanced. */
.int-card{display:flex;flex-direction:column;gap:24px}.int-card .form-stack,.int-card .int-steps{max-width:720px}
.int-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.int-head h2{margin:0 0 4px;font-size:16px;line-height:24px}.int-head p{margin:0}.int-head .badge{flex-shrink:0;white-space:nowrap}
.badge.int-status-ok{background:var(--tb-22c55ea14,rgb(34 197 94 / .14));color:var(--tf-15803d,#15803d)}.badge.int-status-off{background:var(--soft);color:var(--muted)}.badge.int-status-error{background:var(--tb-ef4444a14,rgb(239 68 68 / .14));color:var(--tf-b91c1c,#b91c1c)}
:root[data-theme="dark"] .badge.int-status-ok{color:#86efac}:root[data-theme="dark"] .badge.int-status-error{color:#fca5a5}
.int-section{display:flex;flex-direction:column;gap:16px;padding-top:24px;border-top:1px solid var(--border)}
.int-peak-play-response{max-height:16rem;overflow:auto;white-space:pre-wrap;word-break:break-word;background:var(--bg);border:1px solid var(--border);border-radius:8px;padding:12px;font-size:12px;margin:0}
.int-sub-head h3{margin:0 0 4px;font-size:14px;line-height:20px}.int-sub-head p{margin:0}
.int-steps{background:none;padding:0}.int-steps-title{margin:0;font-size:13px;line-height:20px;font-weight:400;color:var(--muted);cursor:pointer}.int-steps[open]{background:var(--soft);border-radius:var(--radius-lg);padding:8px 12px}.int-steps[open]>.int-steps-title{margin-bottom:8px}
.int-steps ol{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px}.int-steps li{font-size:12px;line-height:16px}.int-steps li strong{font-weight:600;margin-right:6px}.int-steps li span{color:var(--muted)}
.int-card .field input,.int-card .field select,.int-card .field textarea{width:100%}.int-card .form-stack{display:flex;flex-direction:column;gap:16px}.int-card .form-actions{margin-top:0}

.int-advanced{border:1px solid var(--border);border-radius:var(--radius-lg)}.int-advanced>summary{cursor:pointer;padding:0 16px;min-height:40px;display:flex;align-items:center;font-size:14px;font-weight:500;line-height:20px}.int-advanced-body{padding:0 16px 16px}
.int-advanced-body .card{box-shadow:none}
@media (max-width:640px){.int-card{gap:16px}.int-head{flex-direction:column}.card.padded.int-card{padding:16px}.int-section{padding-top:16px}}

/* User permissions: find a person, read their current access, then edit one table (perm-page-17 ก). */
.perm-layout{display:grid;grid-template-columns:264px minmax(0,1fr);gap:16px;align-items:start}
.perm-users,.perm-user-search{display:grid;gap:8px;min-width:0}
.perm-users h2,.perm-matrix-bar h3{margin:0;font-size:14px;line-height:20px;font-weight:600}
.perm-user-search-row{display:flex;align-items:center;gap:8px}
.perm-user-search-row .combobox,.perm-user-search-row select{flex:1;min-width:0}
.perm-user-list{display:flex;flex-direction:column;max-height:clamp(160px,calc(100dvh - 280px),560px);overflow-y:auto;scrollbar-gutter:stable}
.perm-user-list>a{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px;border-bottom:1px solid var(--border);color:inherit;text-decoration:none}
.perm-user-list>a:last-child{border-bottom:0}
.perm-user-list>a:is(:hover,.active){background:var(--soft)}
.perm-user-list>a.active{box-shadow:inset 0 0 0 1px var(--muted);border-radius:var(--radius-md)}
.perm-user-list>a.active strong{font-weight:600}
.perm-user-list>a:focus-visible{outline-offset:-2px}
.perm-user-list>a>span:first-child{display:grid;min-width:0;flex:1}
.perm-user-list small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.perm-user-list strong{white-space:normal;overflow-wrap:anywhere}
.perm-user-list small{color:var(--muted);font-size:12px;line-height:16px}
.perm-user-badges{display:flex;gap:4px;flex-shrink:0}
.perm-user-list>a.is-pending:not(.active){background:var(--tb-fffbeb,var(--soft))}
.perm-invite{justify-self:start}.perm-invite-done{margin:0;font-weight:600;color:var(--tf-166534,#166534)}
.perm-editor{min-width:0;gap:8px}
.perm-editor:not(:has(> *)){display:none}
.perm-user-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.perm-user-id{display:grid;gap:4px;min-width:0}
.perm-user-id>strong{font-size:16px;line-height:24px;font-weight:600}
.perm-user-id>small{overflow-wrap:anywhere}
.perm-user-id .perm-user-badges{flex-wrap:wrap}
.perm-user-id .perm-user-badges:empty{display:none}
.perm-user-head>.actions{flex-shrink:0}
.perm-preview>summary,.perm-start>summary{display:flex;align-items:center;gap:8px;min-height:32px;cursor:pointer;list-style:none}
.perm-preview>summary::-webkit-details-marker,.perm-start>summary::-webkit-details-marker{display:none}
.perm-preview>summary{flex-wrap:wrap}
.perm-preview>summary .icon{width:16px;height:16px;color:var(--muted);flex:none}
.perm-preview[open]>summary .icon{transform:rotate(90deg)}
.perm-preview[open]>summary{margin-bottom:8px}
.perm-preview p{margin:0}
.perm-start>summary::before{content:"";width:7px;height:7px;box-sizing:border-box;border-right:1px solid currentColor;border-top:1px solid currentColor;transform:rotate(45deg);margin-inline:4px 5px;color:var(--muted)}
.perm-start[open]>summary::before{transform:rotate(135deg)}
.perm-start-body{display:grid;gap:8px;padding-block:4px 8px}
.perm-start-form,.perm-preset{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.perm-start-form select,.perm-start-form .combobox{flex:1 1 200px;min-width:0;max-width:360px;width:auto}
.perm-start-note{margin:0;font-size:12px;line-height:16px}
.perm-preset-field{display:inline-flex;gap:8px;flex:1 1 240px;min-width:0}
.perm-preset-field input{flex:1;min-width:0;max-width:280px}
.perm-matrix{display:grid;gap:8px;min-width:0;border-top:1px solid var(--border);padding-top:12px}
.perm-matrix-bar{display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap}
.perm-matrix-bar h3{flex-basis:100%}
.perm-matrix-bar .search{flex:0 1 288px;min-width:0;margin:0}
.perm-only-on{display:inline-flex;align-items:center;gap:6px;min-height:32px;cursor:pointer}
.perm-only-on input{margin:0}
.perm-filter-empty{margin:0;text-align:left}
.perm-ctl{display:grid;gap:4px;min-width:0}
.perm-ctl+.perm-ctl{margin-top:8px}
.perm-ctl-label,.perm-units,.perm-note{display:block;font-size:12px;line-height:16px;white-space:normal;overflow-wrap:anywhere}
.perm-ctl-label{color:var(--fg)}
.perm-ctl>:is(select,.combobox){max-width:100%}
.perm-ctl select{width:100%;height:32px;min-height:32px;padding-block:0;color:var(--muted)}
.perm-ctl.is-on select{color:var(--fg);font-weight:600}
.perm-ctl:is(.is-on,.is-changed) .combobox-trigger{color:var(--fg)}
.perm-ctl .combobox-trigger{height:auto}
.perm-ctl .combobox-value{white-space:normal;overflow:visible;overflow-wrap:anywhere}
.perm-ctl.is-on .combobox-value{font-weight:600}
.perm-ctl.is-changed :is(select,.combobox-trigger){background:var(--soft);border-color:var(--muted)}
.perm-ctl select:disabled{opacity:.6}
.perm-ctl select[multiple]{height:auto;font-weight:400}
.perm-unit-list{min-width:0;border:1px solid var(--border);border-radius:var(--radius-md)}
.perm-unit-list>summary{min-height:32px;padding:6px 8px;cursor:pointer;white-space:normal}
.perm-unit-body{padding:0 8px 4px}
.perm-unit-options{max-height:224px;overflow:auto}
.perm-unit-options .check-row[hidden]{display:none!important}
.perm-unit-options .check-row{min-height:32px;gap:8px;white-space:normal;overflow-wrap:anywhere}
.perm-unit-options input{flex:none}
.perm-note{margin-top:8px}
.perm-save-bar{position:sticky;bottom:12px;z-index:5;display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;padding:8px 12px!important;box-shadow:var(--shadow-lg)}
.perm-save-bar .field{max-width:none;margin:0;min-width:0}
.perm-save-bar .button{white-space:nowrap}
.perm-save-actions{justify-content:flex-end;flex-wrap:wrap}.perm-save-actions [aria-pressed=true]{background:var(--soft);border-color:var(--muted)}
.perm-save-error{grid-column:1/-1;margin:0}
@media(max-width:1023px){
 .perm-layout{grid-template-columns:minmax(0,1fr)}
 .perm-user-list{max-height:clamp(112px,24dvh,240px)}
 .perm-editor{border-top:1px solid var(--border);padding-top:12px}
}
@media(max-width:639px){
 .perm-user-head{flex-wrap:wrap}
 .perm-matrix-bar .search{flex-basis:100%}
 
 .perm-save-bar .button{justify-self:end}
}
@media(pointer:coarse){
 .perm-preview>summary,.perm-start>summary,.perm-only-on,.perm-user-list>a{min-height:44px}
 main#content .perm-ctl :is(select,.combobox-trigger){min-height:44px}
 main#content .perm-table .perm-ctl :is(select,.combobox-trigger){height:36px;min-height:36px}
 .perm-unit-list>summary,.perm-unit-options .check-row{min-height:44px}
}
/* The rights table (owner 2026-11-18, LIVE-02..05, LIVE-17): menu · level · who, one menu per row, its other rights as child rows behind the
   elbow on the same level column. The head sticks under the section index, the group row under the head. A level that is ไม่มี is muted.
   On a narrow screen the child rows fold behind the menu's +n (data-perm-fold). */
.perm-table-wrap{position:relative;overflow:visible}
/* Round 2 (owner 2026-11-18): the table takes the content width, the same width as its save bar; the room right of ระดับ says what a
   right needs and whether the table filled it in (SA-10). Below 1200px that column steps aside for the names. */
.perm-table{table-layout:fixed;width:100%}
.perm-c-menu{width:280px}.perm-c-level{width:220px}.perm-c-who{width:72px}
main#content .pov .perm-table td.perm-needs{font-size:12px;line-height:16px}.perm-auto-note{color:var(--fg)}
.perm-table td.perm-needs .perm-needs-text[hidden],.perm-auto-note[hidden]{display:none}
@media(max-width:1199px){.perm-c-menu{width:auto}.perm-c-needs,.perm-table .perm-needs{display:none}}
main#content .pov .perm-table thead th{position:sticky;top:var(--set-index-h,0px);z-index:3;background:var(--bg);height:28px;padding-top:4px;padding-bottom:4px;line-height:20px;box-sizing:border-box;border-bottom:0;box-shadow:inset 0 -1px 0 var(--border)}
.perm-table tr.perm-group-row td{position:sticky;top:calc(var(--set-index-h,0px) + 28px);z-index:2}
main#content .pov .perm-table td{height:32px;padding-block:2px;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
main#content .pov .perm-table td.perm-cell{overflow:visible;white-space:normal}
.perm-table tr.perm-row:hover td{background:var(--soft)}
.perm-table tr.perm-row{scroll-margin-top:calc(var(--set-index-h,0px) + 72px)}
.perm-name{display:flex;align-items:center;gap:8px;min-width:0}.perm-table tr.perm-group-row td{background:var(--soft);font-weight:600}
.perm-menu-name,.perm-sub-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}
.perm-menu-name{font-weight:600}.perm-table tr.is-sub .perm-sub-name{font-weight:400}
.perm-table tr.is-sub td.perm-menu{padding-left:16px}
.perm-fold{display:none;flex:none;margin-left:auto;padding:0 8px;min-height:28px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg);font-size:12px;line-height:16px;color:var(--muted)}
.perm-fold[aria-expanded=true]{background:var(--soft);color:var(--fg)}
/* SET20-17 (audit 2026-11-20): one person's rights fit the screen on every width: a menu's other rights fold behind its +n unless held,
   changed or found; the group row says how many it holds. */
.perm-fold{display:inline-flex;align-items:center}
main#content .perm-table tr.is-sub:not(.is-unfolded):not(:has(.perm-ctl.is-on)):not(:has(.perm-ctl.is-changed)){display:none}
.perm-group-count{margin-left:8px;font-weight:400;font-size:12px;line-height:16px;color:var(--muted)}
.perm-who-n{font-size:12px;line-height:16px;color:var(--muted);cursor:default}
main#content .perm-table .perm-ctl :is(select,.combobox-trigger){height:28px;min-height:28px;padding-block:0}main#content .perm-table .perm-ctl .combobox-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.perm-ctl:not(.is-on) :is(select,.combobox-trigger){color:var(--muted);background:var(--soft);border-color:transparent}
.perm-saved{display:block;font-size:12px;line-height:16px;color:var(--tf-166534,#166534)}
.perm-save-state{margin:0;flex:1 1 auto;font-size:13px;line-height:20px;color:var(--muted)}.perm-save-bar.is-dirty .perm-save-state{color:var(--fg);font-weight:600}
.perm-save-bar .field{flex:1 1 240px;max-width:360px}.perm-save-bar .field[hidden]{display:none}
.perm-matrix-bar h3{flex-basis:auto!important;margin-right:4px!important}
@media(max-width:700px){
 .perm-c-level{width:150px}.perm-c-who,.perm-table td.perm-who,.perm-table th:nth-child(4){display:none}
 .perm-fold{display:inline-flex;align-items:center}
 /* phone-tables rule (owner 2026-11-16): the rights stay a table, head kept, two columns (สิทธิ์ · ระดับ), child rows folded. */
 main#content .perm-table thead{display:block;position:sticky;top:var(--set-index-h,0px);z-index:3;background:var(--bg)}
 main#content .perm-table :is(thead,tbody) tr{display:grid;grid-template-columns:minmax(0,1fr) 168px;align-items:center;gap:0 8px;padding:0 4px}
 main#content .pov .perm-table thead th{position:static;display:block;height:28px;line-height:28px;padding:0;border:0;box-shadow:none}
 main#content .perm-table thead th:is(:nth-child(3),:nth-child(4)),main#content .pov .perm-table td:is(.perm-who,.perm-needs){display:none}
 main#content .pov .perm-table td{display:block;height:auto;min-height:40px;padding:2px 0;border:0;align-content:center}
 main#content .perm-table tr.perm-row{border-bottom:1px solid var(--border)}
 main#content .perm-table tr.perm-group-row{position:sticky;top:calc(var(--set-index-h,0px) + 28px);z-index:2;background:var(--soft)}
 main#content .perm-table tr.perm-group-row td{position:static;grid-column:1/-1;min-height:28px;padding:4px 0}
 main#content .perm-table tr.is-sub:not(.is-unfolded),main#content .perm-table tr[hidden]{display:none}
 main#content .perm-table tbody[hidden]{display:none}
}
.perm-user-list>a[hidden],.perm-user-list>.empty[hidden]{display:none}.perm-user-pick{display:none}
@media(max-width:700px){.perm-user-pick{display:block;order:-1}.perm-user-pick select{width:100%}.perm-users .perm-user-search,.perm-user-list{display:none}.perm-users h2{display:none}}
/* Read-only safety review and pending account actions. */
.perm-rls{margin-top:16px}.perm-rls>summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;font-weight:600}.perm-rls>summary::-webkit-details-marker{display:none}.perm-rls>summary .icon{width:16px;height:16px;color:var(--muted)}.perm-rls[open]>summary{margin-bottom:12px}
.perm-rls-part h3{margin:0 0 6px;font-size:14px;line-height:20px;font-weight:600}.perm-rls-part p{margin:0 0 6px}.perm-rls-list{display:grid;gap:4px;margin:0;padding:0;list-style:none;font-size:13px;line-height:18px}
.perm-approval{display:grid;gap:12px;border-color:var(--tb-fcd34d,var(--border))}.perm-approval h2{margin:0}.perm-approval p{margin:4px 0 0}.perm-approval-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.perm-approval-option{display:grid;gap:6px;align-content:start;padding:12px;border:1px solid var(--border);border-radius:var(--radius-lg)}.perm-approval-option small{font-size:12px;line-height:16px}.perm-approval-option .button{justify-self:start;margin-top:4px}
@media(max-width:767px){.perm-approval-options{grid-template-columns:minmax(0,1fr)}}
.navset-layout{display:grid;grid-template-columns:minmax(0,1fr) 272px;gap:16px;align-items:start}.navset-editor{padding:0;overflow:hidden}.navset-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:16px;border-bottom:1px solid var(--border)}.navset-head h2{margin:0}.navset-head p{margin:4px 0 0;font-size:13px;line-height:18px}
.navset-tree,.navset-children{list-style:none;margin:0;padding:0}.navset-tree{padding:8px}.navset-item,.navset-group-head{display:grid;grid-template-columns:24px minmax(0,1fr) auto 160px 76px;align-items:center;gap:12px;min-height:52px;padding:6px 8px;border-radius:var(--radius-md)}.navset-item:hover,.navset-group-head:hover{background:var(--soft)}
.navset-icon{display:inline-flex;color:var(--muted)}.navset-icon svg{width:20px;height:20px}.navset-name{display:grid;gap:2px;min-width:0}.navset-name input{height:36px;width:100%;min-width:0;max-width:320px}.navset-name small{font-size:11px;line-height:14px}
.navset-group{margin:4px 0}.navset-group-head{grid-template-columns:24px minmax(0,1fr) auto 76px}.navset-group-select{width:160px}.navset-item>.switch,.navset-item>.navset-lock{justify-self:end}.navset-group-head strong{font-weight:600}.navset-group-note{font-size:12px}.navset-children{margin-left:19px;padding-left:12px;border-left:1px solid var(--border)}.navset-children .navset-icon svg{width:16px;height:16px}
.navset-item.is-hidden .navset-icon,.navset-item.is-hidden .navset-name input{opacity:.45}.navset-item.is-hidden .navset-name input{text-decoration:line-through}
.navset-move{display:inline-flex;gap:2px}.navset-move .icon-button{color:var(--muted)}.navset-move .icon-button:hover{background:var(--border);color:var(--fg)}.navset-move svg{width:16px;height:16px}
.navset-tree>li:first-child>.navset-move .icon-button:first-child,.navset-tree>li:first-child>.navset-group-head .navset-move .icon-button:first-child,.navset-tree>li:last-child>.navset-move .icon-button:last-child,.navset-tree>li:last-child>.navset-group-head .navset-move .icon-button:last-child,.navset-children>li:first-child .navset-move .icon-button:first-child,.navset-children>li:last-child .navset-move .icon-button:last-child{visibility:hidden}
.navset-lock{display:inline-flex;align-items:center;gap:6px;font-size:12px;white-space:nowrap}.navset-lock svg{width:14px;height:14px}
.navset-off{border-top:1px solid var(--border);padding:12px 8px 4px}.navset-off h3{margin:0 8px 4px;font-size:13px;font-weight:600;color:var(--muted)}.navset-off .navset-tree{padding:0}.navset-off .navset-move{display:none}.navset-quiet{grid-template-columns:24px minmax(0,1fr) auto}
.navset-save{position:sticky;bottom:0;display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 16px;border-top:1px solid var(--border);background:var(--tb-ffffff,var(--bg))}.navset-save p{margin:0 auto 0 0;font-size:12px;line-height:16px}
.navset-preview{position:sticky;top:16px;padding:0;overflow:hidden}.navset-preview nav{padding:12px 8px}.navset-preview .nav-link{display:flex;justify-content:flex-start;padding:10px 12px;height:40px;margin-bottom:6px;color:var(--muted);cursor:default}.navset-preview .nav-link span,.navset-preview .nav-sub-link span{display:block;overflow:hidden;text-overflow:ellipsis}.navset-preview .nav-link svg{width:20px;height:20px;flex:none}.navset-preview .nav-group-toggle{color:var(--fg)}.navset-preview .nav-sub-link{cursor:default}
@media(max-width:1023px){.navset-layout{grid-template-columns:minmax(0,1fr)}.navset-preview{position:static}.navset-preview nav{max-height:none}}
@media(max-width:767px){.navset-group-select{width:auto}.navset-item{grid-template-columns:20px minmax(0,1fr) auto auto auto}.navset-item,.navset-group-head{gap:8px;padding:6px 4px}.navset-quiet{grid-template-columns:20px minmax(0,1fr) auto}.navset-name small{display:none}.navset-lock span{display:none}.navset-group-note{display:none}.navset-name input{max-width:none}.navset-children{margin-left:9px;padding-left:8px}.navset-save p{display:none}.navset-head{flex-direction:column;align-items:flex-start}}


/* OCD /UserProfile: security boxes share the card width, buttons end-aligned; theme options sized like other controls */
.profile-security.card{justify-items:stretch}.profile-security.card>.profile-security-box{width:100%;box-sizing:border-box}.profile-security-box .form-actions,.profile-security .form-actions{justify-content:flex-end;justify-self:stretch;margin-top:0}
/* OCD sidebar: collapsed footer shows the expand chevron instead of an empty button box */
.collapsed .sidebar footer .nav-collapse .nav-collapse-mark{display:block!important;margin:0;transform:rotate(180deg);width:16px;height:16px}.collapsed .sidebar footer .nav-collapse{justify-content:center}
/* OCD mobile forms: every text control in a zone uses one size (16px, the iOS no-zoom size) — page rules had selects at 14px beside 16px inputs */
@media(max-width:767px){input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea{font-size:16px!important}}
/* OCD /Dashboard: stage colour is a dot, not a left bar (banned); card-head links sit on the title line in every card; card titles one size */
.dashboard-card-head{align-items:flex-start}.dashboard-more{line-height:24px}
/* OCD /FinanceReconciliationWorkbench: close-case note and save button one height */
main .reconcile-close form.actions>input{height:36px;min-height:36px;box-sizing:border-box}
/* OCD list filters (390): search full row, selects share rows in even halves instead of ragged content widths */
@media(max-width:767px){main .filters>.search{flex:1 1 100%}main .filters>select,main .filters>.check-row{flex:1 1 calc(50% - 8px);min-width:0;width:auto}main .filters>.check-row{align-self:stretch;height:auto;box-sizing:border-box;justify-content:flex-start;padding-left:12px}}
/* OCD all forms: every single select uses the same drawn chevron as list filters and comboboxes (native arrows differed per page/OS) */
main select:not([multiple]):not([size]),dialog select:not([multiple]):not([size]){appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:16px 16px;padding-right:32px}
/* OCD tab strips: a scrolling tab row shows no grey scrollbar bar under the tabs (the cut-off last tab already says it scrolls) */
main .tabs{scrollbar-width:none}main .tabs::-webkit-scrollbar{display:none}

.deal-composer-body>*,.deal-composer-foot>*{min-width:0}.deal-composer-foot input{flex:1 1 0;width:auto}.deal-composer-foot .button{flex-shrink:0}

/* Dark theme: the active menu entry is a raised grey, not a white block (OCD 2026-09-29). */
@media screen and (prefers-color-scheme:dark){:root:not([data-theme="light"]) .sidebar .nav-link.active{background:var(--tb-262626,#262626);color:var(--tf-fafafa,#fafafa);box-shadow:none}}
:root[data-theme="dark"] .sidebar .nav-link.active{background:#262626;color:#fafafa;box-shadow:none}

/* OCD /Contacts: full page width like /Projects and /Approvals; row delete is an outline icon like edit, red on the icon only */

/* OCD /AccountingAudit: filter select text starts left like every select; KPI cards stack on phones instead of 3 squeezed columns */
/* OCD /CommercialAuthorization: KPI cards fill the row in thirds (amounts were clipped); card action buttons end-aligned like every form */
@media(min-width:768px){.commercial-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}.commercial-kpis .metric strong{overflow-wrap:anywhere}main[data-route="/CommercialAuthorization"] form .actions{justify-content:flex-end;grid-column:1/-1}
/* OCD /ContactForm: payout question laid out like the role picker above it (label, then two same-size options in a row) */
.contact-payout-question{border:0;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}.contact-payout-question>legend{margin-bottom:8px}.contact-payout-question>.check-row{display:flex;align-items:center;gap:8px;min-height:40px;padding:8px 12px;border:1px solid var(--border);border-radius:var(--radius-md);font-size:14px}
@media(max-width:767px){main .contact-image-grid{grid-template-columns:minmax(0,1fr)!important}}
/* OCD forms: a hint under a control inside its label is small muted text, not bold label text (e.g. /CreateProject) */
main form label>small,main .field>small{display:block;font-weight:400;font-size:12px;line-height:16px;color:var(--muted);margin-top:4px}main form label>small[hidden],main .field>small[hidden]{display:none}
/* OCD forms with hints under controls (/PartnerStatementForm): bottom alignment pushed the neighbour field down by the hint height; such grids align fields at the top */
.form-grid:has(>.field>:is(input,select,textarea,.combobox)+small){align-items:start}
/* OCD /ProjectHub (portal): tab strip starts on the cards' left edge; the saved notice is a padded rounded box of the card width */
.public-main.public-projecthub>.tabs.public-card{max-width:672px;width:max-content;margin-left:max(0px,calc((100% - 672px)/2));margin-right:auto}.public-main>.success.public-card{padding:12px 16px;border-radius:var(--radius-lg);box-sizing:border-box}
@media(max-width:720px){.public-main.public-projecthub>.tabs.public-card{margin-left:0;width:auto;max-width:100%}}


/* OCD /PaymentForm (finance review 2026-09-29): the payee / account / total cards fill the row, the form fields start 16px under the BillItem table, and on phones each BillItem is a stacked card so "จ่ายครั้งนี้" is never scrolled off-screen. The queue's saved notice carries its one-click slip upload on the right. */
.payment-form .payment-summary{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))}.payment-form .payment-items+.form-grid,.payment-form .table-wrap+.form-grid{margin-top:16px}
@media(max-width:767px){.payment-form table.payment-items thead{display:none}.payment-form table.payment-items,.payment-form table.payment-items tbody,.payment-form table.payment-items tr,.payment-form table.payment-items td{display:block;width:100%}.payment-form table.payment-items tr{padding:12px 0;border-bottom:1px solid var(--border)}.payment-form table.payment-items td{border:0;padding:2px 0;text-align:left}.payment-form table.payment-items td small{display:block}.payment-form table.payment-items td[data-label]{display:flex;justify-content:space-between;align-items:center;gap:12px}.payment-form table.payment-items td[data-label]::before{content:attr(data-label);color:var(--muted);font-size:12px;flex-shrink:0}.payment-form table.payment-items td[data-label="Project"]{text-align:right}.payment-form table.payment-items .payment-amount{width:160px;text-align:right}}
/* OCD /QuotationForm (sales review 2026-09-29): an empty trainer chip row takes no flex gap, so 'วิทยากร (อ.)' sits on the same line as the other fields of its row */
.qe-trainers .qe-chips:not(:has(.qe-chip)){display:none}

/* OCD /DealForm (sales review 2026-09-29): the two columns carry different hints (Stage/ผู้รับผิดชอบ read-only notes), so bottom alignment
   pushed one label 10px below its neighbour; every row starts at one top line instead. */
main[data-route="/DealForm"] .form-grid,.deal-modal-form .form-grid{align-items:start}

/* OCD /TaxReport phone (finance review 2026-09-29): the same 12px page gutter as every other finance page. */
@media(max-width:639px){main[data-route="/TaxReport"]{padding:12px}}

/* OCD /CommercialAuthorization phone (finance review 2026-09-29): the three steps share the width and wrap their labels instead of cutting "ติดตาม QO / IV / RT" off-screen. */
@media(max-width:767px){.commercial-steps{align-items:flex-start;gap:8px;overflow:visible}.commercial-steps span{flex:1 1 0;min-width:0;white-space:normal;align-items:center}.commercial-steps span:not(:last-child)::after{display:none}.commercial-steps b{flex-shrink:0}}


/* readiness warning links to the fix (review-projects) */a.project-readiness-missing{text-decoration:none;border-radius:4px}a.project-readiness-missing:hover{text-decoration:underline}

/* Ops TA: empty list offers the wider range; header count badge spaces its icon (review-projects) */.ops-ta-list>.empty{display:grid;justify-items:center;gap:8px}


/* E-Learning tabs scroll inside the page width on phones instead of being clipped (review-projects) */main[data-route="/ElearningWorkspace"] .tabs{max-width:100%}
/* OCD all forms (sales review 2026-09-29, coordinator ruling): the customer picker is one 36px control like every input and select
   beside it; the orange card keeps its colours, the avatar shrinks to 24px and the second hint line is dropped. */
.combobox-customer .combobox-trigger,.combobox-customer.has-value .combobox-trigger{height:36px;min-height:36px;padding-top:0;padding-bottom:0;padding-left:6px;gap:8px}
.combobox-customer .combobox-avatar{width:24px;height:24px;border-radius:var(--radius-md)}
.combobox-customer .combobox-avatar svg{width:14px;height:14px}
.combobox-customer .combobox-value small{display:none}


/* ==== Page width contract (owner 2026-09-29): one rule for every page ====
   1. Every page is left-aligned on the same edge: main has the same padding everywhere (24px desktop, 16px phone), never centred.
   2. Data pages (lists, tables, boards, calendar, reports, matrices, detail pages) use the full width.
   3. Form pages (the routes listed below) keep their content at most 880px, still left-aligned with the header.
   Page-level max-width/centring classes are neutralised here; new pages follow this contract instead of their own widths. */
main#content{max-width:none;margin:0;padding:24px}
@media(max-width:767px){main#content{padding:16px}}
main#content>.page-header,main#content :is(.page-max-3xl,.page-max-5xl,.page-max-7xl,.finance-hub,.ops-ta-page,.import-governance-page,.reconcile-page,.project-form,.profile-page){max-width:none;margin-inline:0}
main#content[data-route="/CreateProject"]>*,main#content[data-route="/IncomeForm"]>*,main#content[data-route="/PaymentForm"]>*,main#content[data-route="/DealForm"]>*,main#content[data-route="/ContactForm"]>*,main#content[data-route="/UserProfile"]>*,main#content[data-route="/PartnerStatementForm"]>*,main#content[data-route="/PartnerProfile"]>*,main#content[data-route="/RevenueStreamForm"]>*,main#content[data-route="/ProjectItem"]>*,main#content[data-route="/CatalogForm"]>*{max-width:880px;margin-inline:0}

/* Secret input rows (owner 2026-09-29): one pattern for every integration key: value/status and its buttons on one row, same height. */
.secret-row{display:flex;align-items:center;gap:8px;min-height:36px}.secret-row>input,.secret-row>textarea{flex:1 1 auto;min-width:0}.secret-row .button{flex-shrink:0}
.secret-value{display:flex;align-items:center;gap:8px;flex:1 1 auto;min-width:0;height:36px;padding:0 12px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--soft)}
@media(max-width:767px){.secret-row{flex-wrap:wrap}.secret-value{flex-basis:100%}}

/* ==== Settings layout contract (owner 2026-09-29, "stacked like pasted piles"): ONE pattern for every AdminSettings tab ====
   A section (.set-section, and the integration .int-section) is a row: header (title + one line) on the left 240px, content on
   the right in one column of at most 720px (.wide: tables use the rest of the width). Under 1100px the header sits above the
   content. Every control is 36px; a checkbox sits left of its label on one line; a field and its button share one row (button
   on the bottom edge); a section's buttons sit together bottom-right with the primary last; a read-only value is a locked
   value (.set-value), never a disabled input; plain status badges are one neutral style. */
main[data-route="/AdminSettings"] .int-section{display:flow-root;padding:24px 0 0 272px;border-top:1px solid var(--border)}
main[data-route="/AdminSettings"] .int-section>*{max-width:720px;min-width:0;margin-top:0;margin-bottom:0}main[data-route="/AdminSettings"] .int-section>*+*{margin-top:16px}main[data-route="/AdminSettings"] .int-section>.int-sub-head+*{margin-top:0}
main[data-route="/AdminSettings"] .int-section>.table-wrap,main[data-route="/AdminSettings"] .int-section.wide>*:not(form):not(.field):not(.set-list){max-width:none}
main[data-route="/AdminSettings"] .int-section>.int-sub-head{float:left;width:240px;margin-left:-272px;padding-bottom:8px}
.set-head h3,.set-head h2{margin:0 0 4px;font-size:14px;line-height:20px;font-weight:600}.set-head p{margin:0;font-size:12px;line-height:18px;color:var(--muted)}
main[data-route="/AdminSettings"] .int-sub-head p{font-size:12px;line-height:18px}
.set-sections{display:flex;flex-direction:column;gap:24px}
.set-body{display:flex;flex-direction:column;gap:16px;min-width:0}
.set-actions{flex-wrap:wrap}.set-actions form{margin:0}
.set-value{display:flex;align-items:center;gap:8px;min-height:36px;padding:0 12px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--soft);min-width:0;overflow-wrap:anywhere}
dl.set-list{display:grid;grid-template-columns:minmax(120px,200px) minmax(0,1fr);gap:8px 16px;margin:0;align-items:center}dl.set-list dt{font-size:12px;font-weight:600;line-height:16px;color:var(--muted)}dl.set-list dd{margin:0;min-width:0}
main[data-route="/AdminSettings"] .field{max-width:720px}
main[data-route="/AdminSettings"] .field>label,main[data-route="/AdminSettings"] .field>legend{font-size:12px;font-weight:600;line-height:16px}
main[data-route="/AdminSettings"] :is(input:not([type=checkbox]):not([type=radio]):not([type=color]),select){height:36px;min-height:36px}
main[data-route="/AdminSettings"] :is(.button,.button.small){min-height:36px}
main[data-route="/AdminSettings"] input[type=checkbox]{margin:0;flex:none}main[data-route="/AdminSettings"] input[type=radio]{width:16px;height:16px;min-height:0;margin:0;padding:0;flex:none;box-shadow:none}
main[data-route="/AdminSettings"] .check-row{display:flex!important;justify-content:flex-start;align-items:center;gap:8px;min-height:36px;width:fit-content;max-width:100%;font-size:14px;line-height:20px;font-weight:400!important;text-align:left}
main[data-route="/AdminSettings"] form.row-between{display:flex;flex-wrap:nowrap;justify-content:flex-start;align-items:flex-end;gap:12px;max-width:720px}main[data-route="/AdminSettings"] form.row-between>.field{flex:1 1 0;min-width:0}main[data-route="/AdminSettings"] form.row-between>.button{flex:none}
main[data-route="/AdminSettings"] .form-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-top:0}
main[data-route="/AdminSettings"] .form-grid{align-items:end}
main[data-route="/AdminSettings"] .badge[class="badge"]{background:var(--soft);color:var(--fg);border-color:var(--border)}
main[data-route="/AdminSettings"] :is(.int-advanced-body,.int-card,.set-sections,.stack)>*{min-width:0}
main[data-route="/AdminSettings"] .int-advanced-body>.int-section:first-child,main[data-route="/AdminSettings"] .int-advanced-body>.set-sections:first-child>.int-section:first-of-type{border-top:0}
main[data-route="/AdminSettings"] [hidden]{display:none!important}
main[data-route="/AdminSettings"] .int-list{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;font-size:12px;line-height:18px}
main[data-route="/AdminSettings"] :is(.int-drive-add){flex-wrap:nowrap}main[data-route="/AdminSettings"] :is(.int-drive-add)>input{flex:1 1 auto;min-width:0}main[data-route="/AdminSettings"] li.list-row.actions>input{flex:1 1 auto;min-width:0}
main[data-route="/AdminSettings"] .int-advanced>summary{min-height:44px}
/* Create/edit form cards of the list managers (Requirement Templates, Pipeline, Project Type, ผังบัญชี, ...) are one 720px column too. */
main[data-route="/AdminSettings"] form.card.padded.form-stack,main[data-route="/AdminSettings"] form.card.padded:has(>.form-actions){max-width:768px}
main[data-route="/AdminSettings"] .readonly-field{display:flex;align-items:center;min-height:36px;padding:0 12px;background:var(--soft)}
@media(max-width:1099px){main[data-route="/AdminSettings"] .int-section{padding-left:0}main[data-route="/AdminSettings"] .int-section>.int-sub-head{float:none;width:auto;margin-left:0;padding-bottom:0}main[data-route="/AdminSettings"] .int-section>.int-sub-head+*{margin-top:12px}}
@media(max-width:767px){main[data-route="/AdminSettings"] form.row-between{flex-wrap:wrap}main[data-route="/AdminSettings"] form.row-between>.field{flex-basis:100%}main[data-route="/AdminSettings"] form.row-between>.button{margin-left:auto}main[data-route="/AdminSettings"] :is(input:not([type=checkbox]):not([type=radio]),select){height:44px;min-height:44px}dl.set-list{grid-template-columns:minmax(0,1fr);gap:4px}dl.set-list dd{margin-bottom:8px}}
/* ==== Design consistency (owner 2026-09-29): one pattern per element across every page ====
   Header: the page header sits 16px above the first block on every page, also inside flex/gap page wrappers. */
:is(.reconcile-page,.import-governance-page,.tax-report-page,.ops-ta-page)>.page-header{margin-bottom:0}
/* Filter bars: one row on desktop — search grows first, then selects at their content width, then actions; 8px gaps, 36px controls. */
main .filters{row-gap:8px}main .filters>.search{margin:0}@media(min-width:768px){main .filters>.search{flex:1 1 280px;width:auto;margin:0}}
/* Badges: one style everywhere — 12px/16px semibold, never wraps inside a cell (a wrapped badge reads as three badges). */
main#content .badge{font-size:12px;line-height:16px;padding-top:2px;padding-bottom:2px;white-space:nowrap}
/* Switches: one component (audit 2026-10-17): <label|span class="switch"><input type="checkbox" role="switch"><span aria-hidden="true"></span>
   or <button class="switch" role="switch" aria-checked><span></span></button>; a 44x24 track, a 20px knob, on = primary. */
.switch{position:relative;display:inline-flex;flex:0 0 44px;width:44px;height:24px;min-height:0;margin:0;padding:0;border:0;background:none;box-shadow:none;cursor:pointer;vertical-align:middle}
.switch>input[type=checkbox]{position:absolute;inset:0;z-index:1;width:100%;height:100%;min-height:0;margin:0;padding:0;opacity:0;cursor:inherit}
.switch>span{position:relative;display:block;flex:none;width:44px;height:24px;border-radius:var(--radius-full);background:var(--switch-off);transition:background .15s;pointer-events:none}
.switch>span::after{content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:var(--radius-full);background:var(--switch-knob);box-shadow:var(--shadow-sm);transition:transform .15s}
.switch>input:checked+span,.switch[aria-checked=true]>span{background:var(--primary)}
.switch>input:checked+span::after,.switch[aria-checked=true]>span::after{transform:translateX(20px);background:var(--switch-knob-on)}
.switch>input:focus-visible+span,button.switch:focus-visible>span{outline:2px solid var(--primary);outline-offset:2px}
button.switch:focus-visible{outline:none}
.switch>input:disabled{cursor:not-allowed}.switch>input:disabled+span,button.switch:disabled>span{opacity:.45}button.switch:disabled{cursor:not-allowed}
/* Form fields one height and size everywhere: bill line items and the deal activity composer use the 36px / 14px field. */
main#content :is(.deal-composer-foot) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),select){height:36px;min-height:36px;font-size:14px}main#content .deal-composer-foot :is(.button,button){height:36px;min-height:36px}
/* Headings: one size per level inside cards and sections on every page: card h2 14px/20px semibold (the system majority), card h3 14px/20px. */
main#content :is(.card h2,section>h2){font-size:14px;line-height:20px}
/* KPI rows fill the row whatever the tile count (LegacyTaxSplit 4 tiles, Expenses paid 2 tiles): no orphan tile or empty column. */
main#content :is(.expense-list-status-kpis){grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr))}
/* DocumentArchive: the text search grows like every search field; amount stays compact. */
main#content form.filters>input[name="q"]{flex:1 1 280px}
/* Inventory register: short headers stay on one line on a desktop (one header height). */
@media(min-width:1400px){main#content[data-route="/Inventory"] thead th{white-space:nowrap}}
/* Page header icons: 18px in every header button and icon button (dropdown carets stay small). */
main#content .page-header :is(.icon-button>svg,.button>svg:first-child:not(:last-child)){width:18px;height:18px}
/* Dashboard shortcuts: 7-8 tiles fill one row on a desktop instead of leaving a half-empty second row. */

/* Legible solid badges: white text only on the 700 shade (the 500 shade was 2.3:1). */
.badge.deal-stage-result.won{background:var(--tb-15803d,#15803d)}
/* Empty states: a page-level "nothing here" is one card everywhere: solid border, 14px muted centred text. */
main#content :is(.card.empty){border-style:solid;font-size:14px;line-height:20px;text-align:center}main#content .card.empty:not(.padded){padding:48px 24px}main#content .card.padded:is(.empty){padding:24px}
/* KPI tiles: one tile on every page, 16px padding, 12px apart, the figure 24px bold in the body font. */
main#content :is(.card.metric>strong,.card .stat){font-size:24px;line-height:32px;font-weight:700;font-family:inherit}
/* Tables: one header style on every data table: 14px medium muted, sentence case (printed quotation, matrices and chart rows keep their own). */
main#content table:not(.qp-items):not(.qp-customer):not(.project-matrix):not(.mx):not(.sales-report-bars):not(.fw-table):not(.bqv-table):not(.pp table) thead th{font-size:14px;line-height:20px;font-weight:500;text-transform:none;letter-spacing:0;color:var(--muted)}
/* Dense money tables (expense lists, payment rounds, legacy tax split) keep the same header at 12px so every column fits without sideways scroll on real data. */
main#content table:is(.expense-list-table,.accounting-audit-table):not(.qp-items):not(.qp-customer):not(.project-matrix):not(.mx):not(.sales-report-bars) thead th{font-size:12px;line-height:16px}
/* Phone touch targets: every control you tap is at least 36px tall (icon buttons 36px square); the bill lines keep their 28px row (fields, ✕ and เพิ่มรายการ alike). */
@media(max-width:767px){main#content :is(button,.button,a.button,select,input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=range]),[role=button]):not(.badge,.bl-add,.bl-del){min-height:36px}}
/* Long forms on a phone: the submit row stays reachable — it sticks to the bottom edge while the form scrolls (form submit sits bottom-right). */
@media(max-width:767px){main#content form>:is(.form-actions,.qe-actions):last-child{position:sticky;bottom:0;z-index:5;margin:16px -16px -16px;padding:12px 16px;background:var(--bg);border-top:1px solid var(--border)}main#content .card:has(form>:is(.form-actions,.qe-actions):last-child),main#content form.card:has(>:is(.form-actions,.qe-actions):last-child){overflow:clip}main#content form.card>:is(.form-actions,.qe-actions):last-child{background:inherit}main#content .nav-collapse{min-height:36px}}
/* Card stacks: cards stacked on one page are 16px apart everywhere (stack wrappers, block wrappers, KPI rows). */
.stack:has(>.card+.card){gap:16px}
main[data-route="/SystemHealth"] .file-store-status{margin-bottom:16px}

/* Flow-sales 2026-09-29: the current Stage chip keeps its Stage colour but reads on any colour (white text on a pastel Stage colour was unreadable). */
.deal-stage-context .deal-stage-chip.current{background:color-mix(in srgb,var(--stage-color,var(--primary)) 28%,var(--bg));color:var(--fg);box-shadow:inset 0 0 0 1px var(--stage-color,var(--primary))}
/* Lead decision 2026-09-29 (flow-sales): on a phone the Deal header shows only the current Stage chip; a tap opens the whole path. */
@media (max-width:767px){.deal-stage-context .deal-stage-path{cursor:pointer}.deal-stage-context .deal-stage-path:not(.is-open) .deal-stage-chip:not(.current),.deal-stage-context .deal-stage-path:not(.is-open) .deal-stage-link{display:none}.deal-stage-context .deal-stage-chip.current{font-size:12px;line-height:16px;padding:2px 8px}.deal-stage-context .deal-stage-path.is-open{flex-wrap:wrap;row-gap:4px}}

/* Deal info KPIs (5 with the quotation-sourced Deal value): 2 on phones, 3 on tablets, 5 in one row from 1200px. */

.legacy-payload{white-space:pre-wrap;word-break:break-word;max-width:min(60ch,70vw);max-height:360px;overflow:auto;font-size:.8125rem}
/* ST-05: a switched-off Stage under its board keeps the 32px row; เปิดใช้อีกครั้ง is a 24px button in the status column. */
main#content .set-list tr.set-closed .button.small{height:24px;min-height:24px;padding:0 8px;font-size:12px;line-height:16px}
/* ST-29: the JSON row runs the full width of the table under its row; a phone stack keeps it shut until pressed. */
.legacy-payload-row .legacy-payload{max-width:none}main#content .table-stack tr.legacy-payload-row[hidden]{display:none}
.deal-stage-picker{margin:0;flex:0 0 auto}.deal-stage-picker .combobox-pop{left:auto;right:0;min-width:240px}/* SALES-15: the list opens under the picker's right edge, inside the screen */.deal-stage-picker select{height:28px;min-height:28px;max-width:160px;font-size:12px;padding:0 24px 0 8px}.deal-stage-context.is-header .deal-stage-picker select{height:24px;min-height:24px;font-size:11px}
/* Project P&L grouped cards (legacy ProjectPnlGroupedTable: collapsible card per group, header totals) */
.pnl-group{padding:0;overflow:hidden;border-radius:12px}.pnl-group>summary{list-style:none;display:flex;align-items:center;gap:8px;padding:10px 12px;cursor:pointer;text-align:left}.pnl-group>summary::-webkit-details-marker{display:none}.pnl-group>summary:hover{background:color-mix(in srgb,var(--soft) 40%,transparent)}.pnl-group>summary svg{width:16px;height:16px;flex-shrink:0;color:var(--muted);transition:transform .15s}.pnl-group[open]>summary svg{transform:rotate(90deg)}.pnl-group[open]>.table-wrap{border-top:1px solid var(--border);border-radius:0;box-shadow:none}

/* Legacy DayTeamRoster ⓘ (food allergies, vehicle plates) and MemberInfoPopover logistics/notes; add-day dialog any 24h time. */
.ld-when{grid-template-columns:minmax(0,1fr) 108px auto 108px}
/* Phone (owner 2026-10-13, every modal looked at 375px): the day's date takes its own row above the two times; before, the date box was about 30px wide and unreadable. */
@media (max-width:700px){.ld-when{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}.ld-when>[type=date]{grid-column:1/-1}}

.project-person-copy{min-height:0;width:auto;padding:2px;color:var(--muted)}.project-person-copy .icon{width:12px;height:12px}

/* Base44 ContactValidationSummary (S125) */
.contact-validation-summary p{display:flex;align-items:flex-start;gap:6px;margin:0;font-size:12px;line-height:16px}.contact-validation-summary .icon{width:14px;height:14px;flex-shrink:0}.contact-validation-ok{color:var(--tf-16a34a,#16a34a)}.contact-validation-summary .contact-save-refused{display:flex;flex-direction:column;gap:8px;padding:8px 12px}.contact-validation-summary .contact-save-refused p{display:block;font-size:14px;line-height:20px}.contact-save-refused p .icon{vertical-align:-2px;margin-right:6px}.contact-save-refused .check-row{font-size:14px}.contact-validation-issues{padding:8px 12px;display:flex;flex-direction:column;gap:2px}
/* Upload chosen-file change/clear (P049, Base44 ProjectFilesTab เปลี่ยน) */
.upload-progress-actions{display:inline-flex;gap:4px;flex-shrink:0}.upload-progress-actions .button{min-height:20px;padding:0 6px;font-size:12px;line-height:16px}

/* F1-01 (2026-09-30): Base44 cells truncate at max-w 160/140/130/220; the clamp sits on the inner block so the auto table cannot grow past the card at 1440. */
.expense-list-table .expense-list-header strong{max-width:160px}.expense-list-table .expense-list-clip{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.expense-list-table .expense-list-account .expense-list-clip{max-width:140px}.expense-list-table .expense-list-payee .expense-list-clip{max-width:130px}.expense-list-table .expense-list-desc>span{overflow-wrap:anywhere}

.project-type-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid var(--border);border-radius:8px;background:var(--soft);vertical-align:middle}
.admin-panel-users-manage{width:min(420px,calc(100vw - 32px));margin:auto}

/* Rsales-05 service type drag order (Base44 ServiceTypesSettings GripVertical). */
[data-service-type-order]>.products-row{cursor:grab}.products-drag-grip{display:flex;flex-shrink:0;color:var(--muted)}.products-drag-grip .icon{width:16px;height:16px}[data-service-type-order]>.products-row.is-dragging{opacity:.55}

.auth-card .login-forgot{justify-self:center;display:inline-flex;align-items:center;min-height:36px;font-size:12px;line-height:16px;color:var(--muted)}.auth-card .login-forgot:hover{text-decoration:underline}
.auth-alt{margin:16px 0 0;text-align:center;font-size:14px;line-height:20px;color:var(--muted)}.auth-alt a{display:inline-flex;align-items:center;min-height:36px;color:var(--fg);text-decoration:underline}

.deal-touch-ghost{position:fixed;z-index:1000;margin:0;pointer-events:none;opacity:.95;transform:rotate(2deg);box-shadow:var(--shadow-lg)}@media(pointer:coarse){.kanban .deal-card{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}}

/* RF-02: chart account = name first, code second and muted */
.coa-code{color:var(--muted);font-weight:400;font-variant-numeric:tabular-nums}

[popover]:popover-open::backdrop{background:var(--tb-000000a45,rgb(0 0 0 / .45))}

.field:has(>.combobox-pop:not([hidden])),.field:has(.combobox:focus-within),.combobox:has(.combobox-pop:not([hidden])){position:relative;z-index:80}
/* A floating layer opened from a sticky first-column cell (the cell is its own stacking level, z-index 1) is drawn above the cells after it (so is a row expansion's sticky grid): the open cell rises (owner 2026-10-20, the layers of a table are position:fixed, app.js erpFloat) */
main#content :is(td,.ig-detail-grid):has(.combobox-pop:not([hidden]),.datepicker-pop:not([hidden]),.dt-more.is-open){z-index:60}

@media (min-width:1024px){.calendar-month .calendar-day{min-height:88px}.calendar-month .calendar-mini-list{gap:3px}.calendar-month .calendar-mini-list>*{padding-top:2px;padding-bottom:2px}.calendar-month .calendar-mini-list .calendar-mini-line:nth-of-type(n+3){display:none}.calendar-month .calendar-mini-line{line-height:1.25;font-size:11px}}

[aria-invalid=true]{border-color:var(--tl-fca5a5,#fca5a5)}

.payment-tag-pop.is-floating{position:fixed;right:auto;margin:0;z-index:90}
.cs-menu .kebab-menu.is-floating,.fw-row-menu .kebab-menu.is-floating{position:fixed;right:auto;margin:0;z-index:90}

/* Calendar owner rule 2026-09-30: today/future = solid type colour + white text; past = light tint of the type colour. --calendar-strong is the solid darkened to >=4.5:1 against white. */
.calendar-tone-project-training{--calendar-strong:#1d4ed8}.calendar-tone-project-signature_program{--calendar-strong:#b45309}.calendar-tone-project-transformation_journey{--calendar-strong:#b91c1c}.calendar-tone-project-consulting_implementation,.calendar-tone-project-other,.calendar-tone-project-marketing_campaign{--calendar-strong:#334155}.calendar-tone-project-custom_elearning{--calendar-strong:#c2410c}.calendar-tone-project-own_elearning{--calendar-strong:#4d7c0f}.calendar-tone-project-go_to_market{--calendar-strong:#4338ca}.calendar-tone-project-product{--calendar-strong:#57534e}.calendar-tone-project-sme{--calendar-strong:#0e7490}.calendar-tone-cs-close{--calendar-strong:#134e4a}.calendar-tone-cs-training{--calendar-strong:#115e59}.calendar-tone-cs-activity{--calendar-strong:#0f766e}.calendar-tone-sales-close{--calendar-strong:#4c1d95}.calendar-tone-sales-training{--calendar-strong:#5b21b6}.calendar-tone-sales-activity{--calendar-strong:#6d28d9}.calendar-tone-pr-close{--calendar-strong:#164e63}.calendar-tone-pr-training{--calendar-strong:#155e75}.calendar-tone-pr-activity{--calendar-strong:#0e7490}.calendar-tone-leave{--calendar-strong:#a21caf}
.calendar-mini,.calendar-mini-mobile,.calendar-detail-card .calendar-label{background:var(--calendar-strong,var(--calendar-solid));border-color:var(--calendar-strong,var(--calendar-solid));color:var(--tf-ffffff,#fff)}
.calendar-mini.calendar-past,.calendar-mini-mobile.calendar-past,.calendar-detail-card.calendar-past .calendar-label{background:var(--calendar-bg);border-color:var(--calendar-border);color:var(--calendar-fg)}

.mx-pop:popover-open:not(.is-placed){visibility:hidden}
.mx-cellpop[data-mx-loading]:empty,.mx-cellpop[data-mx-loading]{min-height:140px;background:linear-gradient(90deg,var(--sk-base) 30%,var(--sk-hi) 50%,var(--sk-base) 70%) 0 0/300% 100% var(--mx-bg,var(--tb-ffffff,#fff));animation:sk-shimmer 1.4s linear infinite}
a[aria-pressed].is-busy{opacity:.55;pointer-events:none;transition:opacity .1s}

.status-tabs-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}.status-tabs-row>.tabs{margin-bottom:0}
.status-tabs a{display:inline-flex;align-items:center;gap:6px}
.status-dot{width:8px;height:8px;border-radius:50%;background:var(--muted);flex:none}
.status-dot.tone-info{background:var(--tb-3b82f6,#3b82f6)}.status-dot.tone-warning{background:var(--tb-f59e0b,#f59e0b)}.status-dot.tone-danger{background:var(--tb-ef4444,#ef4444)}.status-dot.tone-purple{background:var(--tb-8b5cf6,#8b5cf6)}.status-dot.tone-success{background:var(--tb-22c55e,#22c55e)}.status-dot.tone-muted{background:var(--tb-9ca3af,#9ca3af)}
.status-tabs .count{min-width:20px;height:16px;padding:0 6px;border-radius:var(--radius-pill);background:var(--surface-2,var(--tb-f1f5f9,#f1f5f9));color:var(--fg);font-size:12px;line-height:16px;text-align:center;font-weight:600}
.status-tabs .count.is-danger{background:var(--tb-ef4444,#ef4444);color:var(--tf-ffffff,#fff)}
/* quick review: หัวบิล / ผู้รับเงิน / โปรเจค edit in place (pencil → select) */
.expense-review-pencil{width:22px;height:22px;min-height:0;padding:2px;margin-left:4px;vertical-align:middle}
.expense-review-pencil svg{width:14px;height:14px}
.expense-review-inline{display:flex;flex-wrap:wrap;gap:6px;align-items:center;width:100%}
.expense-review-inline select{flex:1 1 180px;min-width:0}

@media (min-width:1024px){.expense-list-filters{display:flex;flex-wrap:wrap;gap:8px}.expense-list-filters>*{width:auto}.expense-list-filters .search{flex:1 1 260px}.expense-list-filters>.field,.expense-list-filters>select,.expense-list-filters>.combobox,.expense-list-filters>label{flex:0 0 200px}}

/* component-tokens: ONE look per kind (scripts/component_audit.py). Variant classes only set size/position. */
/* Window widths, the only ones (docs/ui/BEHAVIOUR.md "Windows and popovers"): sm a question or a short form, md a form, lg a form
   with a table or two columns, xl a record with its lines; viewer is the file viewer alone. */
:root{--modal-w-sm:448px;--modal-w-md:512px;--modal-w-lg:672px;--modal-w-xl:896px;--modal-w-viewer:960px;--modal-radius:var(--radius-lg);--modal-pad:24px;--modal-shadow:var(--shadow-lg);--modal-border:1px solid var(--border);--modal-head-fs:18px;--modal-head-lh:28px;--modal-head-fw:600;--modal-backdrop:rgb(0 0 0 / .8);
--pop-radius:var(--radius-md);--pop-shadow:var(--shadow-lg);--pop-border:1px solid var(--border);--pop-bg:var(--bg);--pop-pad:4px;--pop-panel-pad:12px;
--menu-item-h:32px;--menu-item-pad:6px 8px;--menu-item-fs:14px;--menu-item-lh:20px;--menu-item-radius:var(--radius-sm);
--tip-fs:12px;--tip-pad:4px 8px;--tip-radius:var(--radius-sm);--tip-bg:#0f172a;--tip-fg:#fff}
.modal{border:var(--modal-border);border-radius:var(--modal-radius);box-shadow:var(--modal-shadow)}.modal::backdrop,dialog::backdrop{background:var(--modal-backdrop)}
.modal h1,.income-add-modal h1,.bank-export-dialog h2{font-size:var(--modal-head-fs);line-height:var(--modal-head-lh);font-weight:var(--modal-head-fw)}
.nav-user-popover,.kebab-menu,.kanban-menu-body,.combobox-pop,.deal-owner-popover,.mx-pop,.datepicker-pop,.sales-report-popover{border:var(--pop-border);border-radius:var(--pop-radius);background:var(--pop-bg);box-shadow:var(--pop-shadow)}
.nav-user-popover,.kebab-menu,.kanban-menu-body{padding:var(--pop-pad)}
.deal-owner-popover,.mx-pop,.mx-pop.mx-cellpop,.datepicker-pop,.sales-report-popover{padding:var(--pop-panel-pad)}
.kebab-menu a,.kebab-menu-item,.kanban-menu-body>button,.nav-user-popover a,.nav-user-popover button,.combobox-option{min-height:var(--menu-item-h);padding:var(--menu-item-pad);font-size:var(--menu-item-fs);line-height:var(--menu-item-lh);border-radius:var(--menu-item-radius)}
[class*=tooltip]:not([class*=tooltip-trigger]){font-size:var(--tip-fs);padding:var(--tip-pad);border-radius:var(--tip-radius)}

.hub-day-chips{flex-wrap:wrap!important;overflow:visible!important;scroll-snap-type:none!important}
#hub-step-days{scroll-margin-top:16px}

/* /DocumentArchive tree (Finder list view): disclosure rows, indent per level, counts muted at right. */
.doc-tree tbody tr.doc-tree-row{height:36px;cursor:default}
/* Audit OPS-54 (PT-07): the name column takes the room, a document shows its number in full, its file name in the hint */
.doc-tree-file{display:inline-block;max-width:240px;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;font-size:12px}.doc-c-date{width:112px}.doc-c-party{width:200px}.doc-c-project{width:120px}.doc-c-amount{width:120px}.doc-c-count{width:72px}.doc-tree td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.doc-tree tbody tr.doc-tree-row:focus{outline:none;background:var(--soft)}
.doc-tree tbody tr.doc-tree-row:focus-visible{outline:2px solid var(--tl-2563eb,#2563eb);outline-offset:-2px}
.doc-tree td.doc-tree-name>*{vertical-align:middle}
.doc-tree-caret{display:inline-block;width:16px;height:16px;margin-right:2px;cursor:pointer;position:relative}
.doc-tree-caret::before{content:"";position:absolute;left:5px;top:4px;border:4px solid transparent;border-left:6px solid var(--muted);border-right:0;transition:transform .12s}
.doc-tree-row[aria-expanded="true"] .doc-tree-caret::before{transform:rotate(90deg)}
.doc-tree-row.is-busy .doc-tree-caret::before{opacity:.4}
.doc-tree-caret.is-leaf::before{display:none}
.doc-tree-icon{width:16px;height:16px;margin-right:6px;color:var(--muted)}
.doc-tree .doc-tree-count{text-align:right;color:var(--muted);font-variant-numeric:tabular-nums}
.doc-tree tr.is-more td{color:var(--muted);cursor:pointer}

/* income-layout (owner 2026-09-30): วันคาดรับ is plain text with a hover pencil */
.income-date-form{display:flex;align-items:center;gap:0;margin:0;position:relative;max-width:100%}/* 2026-11-03 screen check: the date and its pen stuck out of the cell by 3-4px */.income-date .icon-button.income-date-edit{width:20px;min-width:20px}.income-date-text{font:inherit;color:inherit;white-space:nowrap}
.income-date .icon-button.income-date-edit{width:24px;height:24px;min-height:24px;min-width:24px;padding:0;border:0;background:none;box-shadow:none;color:var(--muted);display:inline-flex;align-items:center;justify-content:center;opacity:0;border-radius:var(--radius-md)}
.income-date .icon-button.income-date-edit .icon{width:14px;height:14px}
.income-date .icon-button.income-date-edit:hover{background:var(--soft);color:var(--fg)}
:is(.income-line,.income-cols,tr):hover .income-date-edit,.income-date-edit:focus-visible,.income-date-form:focus-within .income-date-edit{opacity:1}
@media(pointer:coarse){.income-date .icon-button.income-date-edit{opacity:1}}

/* doc-tree quick look (owner 2026-09-30) */
.doc-thumb{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;width:32px;height:40px;margin-right:8px;border:1px solid var(--border);border-radius:var(--radius-sm);object-fit:cover;opacity:.85;background:var(--soft);color:var(--muted);vertical-align:middle}
.doc-thumb-icon{position:relative;overflow:hidden}.doc-thumb-icon img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:var(--bg)}
.doc-thumb-icon svg{width:16px;height:16px}.doc-thumb-icon b{font-size:8px;line-height:10px;font-weight:600;max-width:30px;overflow:hidden}
.doc-tree tbody tr.doc-tree-row.is-doc{height:48px}
/* PT-10: the file name after the bill no (two files of one bill); PT-09: the amount box carries its note under it; PT-06: the ZIP last */

.doc-amount{display:inline-flex;flex-direction:column;gap:2px}.fw-bar .doc-archive-export{margin-left:auto}
/* PRF-02: the text size in โปรไฟล์ › การแสดงผล */
.profile-text-size{display:flex;gap:8px;flex-wrap:wrap}

/* ผู้ใช้และสิทธิ์ declutter (owner 2026-09-30): จัดการบัญชี = one neutral action list, danger zone red text only, result in the modal. */
.users-manage{padding:0;border:var(--modal-border);border-radius:var(--modal-radius);box-shadow:var(--modal-shadow);background:var(--pop-bg,var(--tb-ffffff,#fff));width:min(var(--modal-w-sm),calc(100vw - 32px))}
.users-manage::backdrop{background:var(--modal-backdrop)}
.users-manage-head{display:flex;align-items:center;gap:8px;padding:16px 16px 12px 20px;border-bottom:var(--pop-border)}.users-manage-head strong{font-size:var(--modal-head-fs);line-height:var(--modal-head-lh);font-weight:var(--modal-head-fw);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.users-manage-head .button{margin-left:auto}
.users-manage-body{padding:8px;display:grid;gap:4px}
.users-manage-list{display:grid;gap:2px}
.users-manage-row{display:flex;align-items:flex-start;gap:12px;width:100%;padding:10px 12px;border:0;border-radius:var(--pop-radius);background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.users-manage-row:hover:not(:disabled),.users-manage-item.is-open>.users-manage-row{background:var(--soft)}.users-manage-row:disabled{cursor:not-allowed;opacity:.55}
.users-manage-row .icon{flex:none;width:18px;height:18px;margin-top:2px;color:var(--muted)}.users-manage-row>span{display:grid;gap:2px;min-width:0}.users-manage-row strong{font-size:14px;line-height:20px;font-weight:600}.users-manage-row small{font-size:12px;line-height:16px;color:var(--muted)}
.users-manage-row.is-danger strong,.users-manage-row.is-danger .icon{color:var(--danger,var(--tf-dc2626,#dc2626))}
.users-manage-danger-title{margin:8px 12px 0;padding-top:10px;border-top:var(--pop-border);font-size:12px;line-height:16px;font-weight:600;color:var(--danger,var(--tf-dc2626,#dc2626))}
.users-manage-form{display:grid;gap:10px;padding:4px 12px 12px 42px}.users-manage-foot{display:flex;justify-content:flex-end;gap:8px}
.users-manage-result{display:grid;gap:12px;padding:8px 12px 12px}.users-manage-ok{display:flex;gap:8px;align-items:flex-start;margin:0}.users-manage-ok .icon{flex:none;width:18px;height:18px;color:var(--success,var(--tf-16a34a,#16a34a))}
.users-manage-copy{display:flex;gap:8px}.users-manage-copy:has(textarea){flex-direction:column;align-items:flex-start}.users-manage-copy textarea{width:100%;font-family:ui-monospace,monospace;font-size:13px;resize:vertical}.users-manage-copy input{flex:1;min-width:0;font-family:ui-monospace,monospace;font-size:13px}
.doc-thumb-icon canvas.doc-thumb-pdf{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:var(--tb-ffffff,#fff)}
.doc-pdf-pages{display:flex;flex-direction:column;gap:8px;overflow:auto;max-height:70vh;background:var(--soft);padding:8px}.doc-pdf-page{display:block;width:100%;background:var(--tb-ffffff,#fff);border:1px solid var(--border)}

/* picker-selected (owner 2026-09-30): one list look; the chosen row is visibly selected (tint + check), active menu item tinted, lists scroll inside only. */
.combobox-option[aria-selected=true]{background:var(--soft);font-weight:600;color:var(--fg)}
.combobox-option[aria-selected=true].is-active{background:color-mix(in srgb,var(--primary) 10%,var(--tb-ffffff,#fff))}
.combobox-option:hover{background:var(--soft)}
.combobox-check{color:var(--primary)}
.combobox-pop{overflow:hidden;font-size:var(--menu-item-fs)}
.combobox-list{max-height:min(300px,50vh);overscroll-behavior:contain}
.combobox-trigger:focus-visible,.datepicker-trigger:focus-visible{outline:2px solid var(--ring,var(--primary));outline-offset:2px}
.kebab-menu :is(a,button)[aria-current],.kebab-menu .is-active,.nav-user-popover [aria-current]{background:var(--soft);font-weight:600}
.kebab-menu :is(a,button):hover{background:var(--soft)}
.datepicker-day.is-selected{background:var(--primary);color:var(--on-primary,#fff);font-weight:600}
.mx-pop,.deal-owner-popover,.datepicker-pop,.kebab-menu{max-height:min(420px,70vh);overflow-y:auto;overscroll-behavior:contain}
.combobox-pop .combobox-option{box-sizing:border-box;min-height:var(--menu-item-h);font-size:var(--menu-item-fs);line-height:var(--menu-item-lh)}
/* Day candidates (App\Domain\DayAvailability): a person's facts on a second line of the picker's own option row, and the same
   amber words beside a person who stands on two days at once (Project Matrix cell, day card). Text only: no box, no stripe. */
/* A day's person picker row is ONE line (owner 2026-10-20: ว่าง / ชน / ลา is short, two rows were not needed): the name left, the one word right. */
.combobox-facts{display:flex;flex-direction:row;align-items:baseline;justify-content:space-between;gap:12px;min-width:0;width:100%}
.combobox-facts>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.combobox-pop:has(.combobox-facts){max-width:min(360px,calc(100vw - 16px))}
.combobox-facts>small{flex:none;font-size:12px;line-height:16px;font-weight:400;color:var(--muted);white-space:nowrap}
.combobox-fact.is-warn,.day-clash{color:var(--tf-d97706,#d97706);font-weight:500}
.day-clash{display:block;font-size:12px;line-height:16px;overflow-wrap:anywhere}
.mx-td>.day-clash{padding:2px 4px;font-size:10px;line-height:14px;text-align:left;white-space:normal}
/* The day team pop-up ends with the person picker: it stands near the top and lets the picker's list hang below it, so the
   people and their facts are seen without scrolling inside the pop-up. */

.int-card .filters{margin-bottom:0}.int-card .filters>select{flex:0 0 220px;width:auto}.int-card .filters>.button{flex:none}
.import-data{display:grid;gap:16px;min-width:0}
.import-data h3,.import-data h4,.import-data p,.import-data .import-issues{margin-block:0}
.import-type-list{display:flex;flex-wrap:wrap;gap:8px}
.import-type-list>.button{max-width:100%;height:auto;min-height:36px;white-space:normal}
.import-prepare,.import-review-head,.import-result{border-top:1px solid var(--border);padding-top:16px}
.import-review-head{align-items:flex-start;flex-wrap:wrap;overflow-wrap:anywhere}
.import-modes{margin:0;min-width:0;border:0;padding:0}
.import-mode{display:flex;align-items:flex-start;gap:8px;padding-block:4px;cursor:pointer}
.import-mode input{margin:3px 0 0;flex:none}
.import-mode strong,.import-mode small{display:block}
.import-modes:not(:has(input[value="upsert"]:checked)) .import-match{display:none}
.import-check,.import-precheck{display:grid;gap:8px}
.import-issues{padding-inline-start:20px}
.import-issues+ .import-issues{margin-top:8px}
.import-issues a{text-decoration:underline}
.import-preview{max-width:100%}
.import-data #import-file{max-width:100%}
.import-type-list>.button[aria-current="page"]{background:var(--soft);border-color:var(--fg);color:var(--fg)}
.set-storage-summary{display:grid;gap:16px}
.set-storage-summary .file-store-status{margin:0}
.set-storage-summary .file-store-status dl{margin:0}
.set-storage-summary .file-store-status dd{margin-inline:0;overflow-wrap:anywhere}
.set-storage-summary #file-naming-rule{margin:8px 0 0}
@media(pointer:coarse){.import-type-list>.button,.import-mode{min-height:44px}}

/* approvals-b44:start — /Expenses?tab=approvals = Base44 ApprovalTab 1:1 (Tailwind v3 values; audit table .work/evidence/approvals-b44/SPEC.md) */
.ab-tab{display:flex;flex-direction:column;gap:16px;color:var(--tf-202224,#202224)}
.ab-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.ab-views{display:flex;gap:8px;width:fit-content;max-width:100%;overflow-x:auto;scrollbar-width:none}
.ab-view{white-space:nowrap;flex:none;display:inline-flex;align-items:center;padding:6px 16px;border-radius:9999px;font-size:14px;line-height:20px;font-weight:500;border:1px solid transparent;background:transparent;color:var(--tf-6b7280,#6b7280);text-decoration:none;transition:all .15s cubic-bezier(.4,0,.2,1)}
.ab-view:hover{color:var(--tf-374151,#374151)}
.ab-view.is-active{background:var(--tb-ffffff,#fff);border-color:var(--tl-d1d5db,#d1d5db);color:var(--tf-111827,#111827);box-shadow:var(--shadow-sm)}
.ab-project-filter,.ab-list-filters{display:flex;gap:8px;flex-wrap:wrap;margin:0}
.ab-project-filter select,.ab-project-filter .combobox,.ab-project-filter button,.ab-list-filters select,.ab-list-filters .combobox,.ab-list-filters button{height:32px;min-height:32px;font-size:12px;line-height:16px}
.ab-project-filter select,.ab-project-filter .combobox{width:auto;max-width:190px}
.ab-list-filters select,.ab-list-filters .combobox{width:130px}.ab-list-filters select[name=round],.ab-list-filters .combobox:has(select[name=round]){width:150px}
.ab-empty{text-align:center;padding:48px 0;background:var(--tb-ffffff,#fff);border:1px solid var(--tl-e5e5e5,#e5e5e5);border-radius:12px;color:var(--tf-737373,#737373);font-size:14px;line-height:20px}
/* layout: list + 200px sticky sidebar at lg (>=1024px) */
.ab-layout{display:flex;gap:8px;align-items:flex-start}
.ab-main{flex:1 1 0%;min-width:0;display:flex;flex-direction:column;gap:12px}
.ab-side{order:2;display:block;width:200px;flex-shrink:0;position:sticky;top:16px;align-self:flex-start}
.ab-sheet-head,.ab-mobile-bar,.ab-mobile-spacer,.ab-sheet-overlay{display:none}
/* round group card */
.ab-group{background:var(--tb-ffffff,#fff);border-radius:12px;box-shadow:var(--shadow-sm);overflow:hidden;border:1px solid var(--tl-e5e7eb,#e5e7eb);margin:0}
.ab-group>summary{list-style:none;cursor:pointer}.ab-group>summary::-webkit-details-marker{display:none}
.ab-group-head{display:flex;align-items:center;justify-content:space-between;padding:8px 16px;background:var(--tb-f9fafb,#f9fafb);border-bottom:1px solid var(--tl-e5e7eb,#e5e7eb)}
.ab-group:not([open])>.ab-group-head{border-bottom-color:transparent}
.ab-group-left,.ab-group-right{display:flex;align-items:center;gap:12px}
.ab-group-title{display:flex;align-items:center;gap:8px;font-size:12px;line-height:16px;font-weight:700;color:var(--tf-111827,#111827)}
.ab-group-title .ab-i-cal{width:14px;height:14px;color:var(--tf-6b7280,#6b7280)}.ab-group-title.is-undef .ab-i-cal{color:var(--tf-f87171,#f87171)}
.ab-badge{display:inline-flex;align-items:center;border-radius:6px;border:1px solid transparent;padding:2px 10px;font-size:10px;line-height:15px;font-weight:600;background:var(--tb-f5f5f5,#f5f5f5);color:var(--tf-171717,#171717)}
.ab-group-total{font-size:12px;line-height:16px;font-weight:700;color:var(--tf-dc2626,#dc2626);font-variant-numeric:tabular-nums}.ab-group-total .amt-sep{color:var(--tf-9ca3af,#9ca3af)}
.ab-chev-btn{display:inline-flex;padding:6px;border-radius:8px;color:var(--tf-9ca3af,#9ca3af);transition:color .15s,background-color .15s}.ab-chev-btn:hover{background:var(--tb-e5e7eb,#e5e7eb);color:var(--tf-4b5563,#4b5563)}
.ab-i-chev{width:16px;height:16px;transition:transform .15s}.ab-group[open] .ab-group-head .ab-i-chev{transform:rotate(180deg)}
/* checkbox = shadcn Checkbox (16px, radius 2px, 1px primary border, shadow; checked bg primary + white check) */
.ab-tab input.board-select{appearance:none;-webkit-appearance:none;width:16px;height:16px;min-height:16px;margin:0;padding:0;border:1px solid var(--tl-171717,#171717);border-radius:2px;box-shadow:var(--shadow);background:var(--tb-ffffff,#fff) center/14px no-repeat;cursor:pointer;flex-shrink:0}
.ab-tab input.board-select:checked{background-color:var(--tb-171717,#171717);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fafafa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")}
.ab-tab input.board-select:focus-visible{outline:none;box-shadow:0 0 0 1px #0a0a0a}
.ab-check-all{display:inline-flex;align-items:center}
/* ApprovalExpenseCard */
.ab-cards>.ab-card+.ab-card{border-top:1px solid var(--tl-e5e5e5,#e5e5e5)}
.ab-card{background:var(--tb-ffffff,#fff);transition:background-color .15s}.ab-card:hover{background:var(--tb-f9fafb,#f9fafb)}.ab-card:has(input.approval-pick:checked){background:var(--tb-f3f4f6,#f3f4f6)}
.ab-card-row{display:flex;justify-content:space-between;padding:10px 16px}
.ab-left{display:flex;gap:12px;flex:1 1 0%;min-width:0}
.ab-check{padding-top:4px;flex-shrink:0}.ab-check label{display:inline-flex}.ab-check .muted{font-size:12px}
.ab-body{display:flex;flex-direction:column;gap:12px;flex:1 1 0%;min-width:0}
.ab-head{display:flex;flex-direction:column;gap:2px}
.ab-line1{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;min-width:0;white-space:nowrap;font-size:12px;line-height:16px;color:var(--tf-202224,#202224)}
.ab-code{font-weight:700;font-size:12px;line-height:16px;color:var(--tf-0a0a0a,#0a0a0a);text-decoration:none}.ab-card .approval-project-link{font-family:inherit;font-weight:700;font-size:12px;line-height:16px;color:var(--tf-2563eb,#2563eb);cursor:pointer;text-decoration:none}.ab-card .approval-project-link:hover{color:var(--tf-1e40af,#1e40af);text-decoration:underline}
.ab-sep{color:var(--tf-9ca3af,#9ca3af)}.ab-cat{max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Owner 2026-10-22: line 1 never wraps (codes keep their width, the account name ends in …); each code of a many-Project Bill is its own link. */
.ab-line1>a,.ab-line1>.ab-code,.ab-line1>.ab-codes,.ab-sep{flex:none}.ab-line1>.ab-cat{flex:0 1 auto;min-width:0;max-width:300px}.ab-codes{display:inline-flex;align-items:center;gap:0;white-space:nowrap}.ab-comma{margin-right:4px;color:var(--tf-9ca3af,#9ca3af)}.ab-more{margin-left:4px;font-size:12px;color:var(--tf-6b7280,#6b7280)}
@media(max-width:1023px){.ab-line1>.ab-cat{max-width:none}}
.ab-warn{padding:2px 6px;border-radius:4px;font-size:10px;line-height:15px;font-weight:500;background:var(--tb-fef2f2,#fef2f2);color:var(--tf-b91c1c,#b91c1c);border:1px solid var(--tl-fecaca,#fecaca)}
.ab-desc{font-size:11px;line-height:16px;color:var(--tf-9ca3af,#9ca3af);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ab-people{display:flex;flex-direction:column;gap:6px}
.ab-person{display:flex;align-items:center;gap:6px;font-size:11px;line-height:16px;color:var(--tf-202224,#202224);min-width:0}
.ab-i-sm{width:14px;height:14px;flex-shrink:0}.ab-trunc{max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ab-trunc strong{font-weight:700}
.ab-right{display:flex;align-items:stretch;gap:8px;flex-shrink:0}
.ab-money{display:flex;flex-direction:column;gap:2px;min-width:140px}
.ab-mrow{display:flex;justify-content:flex-end;gap:12px}
.ab-mlabel{font-size:12px;line-height:16px;color:var(--tf-6b7280,#6b7280);width:60px;text-align:right}
.ab-mval{font-size:12px;line-height:16px;color:var(--tf-202224,#202224);width:80px;text-align:right}.ab-mval.ab-net{font-weight:700;color:var(--tf-ef4444,#ef4444)}
.ab-actions{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;border-left:1px solid var(--tl-f3f4f6,#f3f4f6);padding-left:4px}
.ab-icon-btn{display:inline-flex;align-items:center;justify-content:center;padding:6px;border-radius:4px;border:0;background:transparent;cursor:pointer;list-style:none;transition:color .15s,background-color .15s;min-height:0;height:auto;box-shadow:none}
.ab-icon-btn::-webkit-details-marker{display:none}
.ab-tab .ab-info{color:var(--tf-3b82f6,#3b82f6)}.ab-tab .ab-info:hover{color:var(--tf-1d4ed8,#1d4ed8);background:var(--tb-eff6ff,#eff6ff)}
.ab-reject{color:var(--tf-fb923c,#fb923c)}.ab-reject:hover{color:var(--tf-ef4444,#ef4444);background:var(--tb-fef2f2,#fef2f2)}
.ab-actions .approval-row-decision{display:block}
.ab-actions .approval-files{font-size:11px;line-height:16px;color:var(--tf-6b7280,#6b7280);padding:2px 0}

/* ApprovalSidebar (Card p-2.5 space-y-1.5) */
.ab-side .approval-cash{margin:0;padding:10px;border-radius:12px;border:1px solid var(--tl-e5e7eb,#e5e7eb);background:var(--tb-ffffff,#fff);box-shadow:var(--shadow-sm);display:flex;flex-direction:column;gap:6px}
.ab-side .approval-side-row{padding:0 0 6px;border-bottom:1px solid var(--tl-f3f4f6,#f3f4f6)}
.ab-side .approval-side-row:has(.approval-side-amount.blue){border-bottom:0;padding-bottom:0}
.ab-side .approval-side-label{display:flex;justify-content:space-between;align-items:center;font-size:12px;line-height:16px;color:var(--tf-6b7280,#6b7280)}
.ab-side .approval-side-label>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ab-side .approval-side-label small,.approval-side-label small{white-space:nowrap;flex:none;margin-left:6px}.ab-side .approval-side-label small{font-size:10px;line-height:15px;color:var(--tf-9ca3af,#9ca3af)}
.ab-side .approval-side-amount{display:flex;justify-content:flex-end;align-items:baseline;gap:4px;margin-top:2px}
.ab-side .approval-side-amount .cur{font-size:12px;line-height:16px}.ab-side .approval-side-amount strong{font-size:14px;line-height:20px;font-weight:700}
.ab-side .approval-cash-balance{display:flex;justify-content:flex-end;align-items:baseline;gap:4px;margin-top:2px}
.ab-side .approval-cash-balance .cur{font-size:12px;line-height:16px;color:var(--tf-9ca3af,#9ca3af)}
.ab-side .approval-cash-balance input{width:96px;height:20px;min-height:0;padding:0;border:0;border-bottom:1px dashed var(--tl-d1d5db,#d1d5db);border-radius:0;font-size:14px;line-height:19px;font-weight:700;color:var(--tf-202224,#202224);text-align:right;background:transparent;box-shadow:none}
.ab-side .approval-cash-balance input:focus{outline:none;border-bottom-color:var(--tl-171717,#171717);box-shadow:none}
.ab-side .approval-cash-balance .button{display:none}
.approval-side-negwarn{margin:2px 0 0;font-size:10px;line-height:15px;color:var(--tf-ef4444,#ef4444)}
.ab-side .ab-side-action{display:flex;flex-direction:column;gap:6px;padding:0;margin:0;border:0;background:none}
.ab-side .ab-side-action .board-bulk-count{display:none}
.ab-side .ab-side-action button[value=approve]{width:100%;height:auto;min-height:0;padding:8px 0;border-radius:8px;font-size:12px;line-height:16px;font-weight:500;display:flex;align-items:center;justify-content:center;gap:6px;background:var(--tb-ffffff,#fff);border:2px solid var(--tl-d1d5db,#d1d5db);color:var(--tf-374151,#374151);box-shadow:none;transition:all .15s}
.ab-side .ab-side-action button[value=approve]:hover:not(:disabled){border-color:var(--tl-9ca3af,#9ca3af);background:var(--tb-f9fafb,#f9fafb);filter:none}
.ab-side .ab-side-action button[value=approve]:disabled{background:var(--tb-f3f4f6,#f3f4f6);color:var(--tf-9ca3af,#9ca3af);border-color:var(--tl-f3f4f6,#f3f4f6);cursor:not-allowed;opacity:1}
.ab-side .approval-side-cal{margin:0;padding-top:12px;border-top:1px solid var(--tl-f3f4f6,#f3f4f6)}
.ab-side .approval-side-cal>summary{display:flex;align-items:center;justify-content:space-between;list-style:none;cursor:pointer;font-size:12px;line-height:16px;font-weight:600;color:var(--tf-374151,#374151)}
.ab-side .approval-side-cal>summary::-webkit-details-marker{display:none}
.approval-cal-chev{width:14px;height:14px;color:var(--tf-9ca3af,#9ca3af)}.approval-side-cal:not([open]) .approval-cal-chev{transform:rotate(180deg)}
.ab-side .approval-cal-nav{display:flex;align-items:center;justify-content:space-between;margin:12px 0 8px}
.ab-side .approval-cal-nav a{width:28px;height:28px;display:grid;place-items:center;border-radius:6px;color:var(--tf-0a0a0a,#0a0a0a);font-size:16px;text-decoration:none}.ab-side .approval-cal-nav a:hover{background:var(--tb-f5f5f5,#f5f5f5)}
.ab-side .approval-cal-nav strong{font-size:12px;line-height:16px;font-weight:700;color:var(--tf-1f2937,#1f2937)}
.ab-side .approval-cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:0}
.ab-side .approval-cal-grid .dow{text-align:center;font-size:9px;line-height:13.5px;color:var(--tf-9ca3af,#9ca3af);font-weight:500;padding:2px 0;margin-bottom:2px}
.ab-side .approval-cal-grid .d{height:24px;min-height:24px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:9px;line-height:13.5px;font-weight:500;color:var(--tf-374151,#374151);border-radius:2px;text-decoration:none;cursor:pointer;transition:background-color .15s}
.ab-side .approval-cal-grid a.d:hover{background:var(--tb-f3f4f6,#f3f4f6)}
.ab-side .approval-cal-grid .d em{font-style:normal;font-size:6px;line-height:1;font-weight:700;color:var(--tf-f59e0b,#f59e0b)}
.ab-side .approval-cal-grid .out{color:var(--tf-d1d5db,#d1d5db);cursor:default}
.ab-side .approval-cal-grid .past{color:var(--tf-d1d5db,#d1d5db);cursor:not-allowed;opacity:.6}
.ab-side .approval-cal-grid .today{background:var(--tb-111827,#111827);color:var(--tf-ffffff,#fff);font-weight:700;cursor:default}
.ab-side .approval-cal-grid .end{background:var(--tb-2563eb,#2563eb);color:var(--tf-ffffff,#fff);font-weight:700}.ab-side .approval-cal-grid a.end:hover{background:var(--tb-2563eb,#2563eb)}
.ab-side .approval-cal-grid .today em,.ab-side .approval-cal-grid .end em{color:var(--tf-fde047,#fde047)}
.ab-side .approval-cal-grid .range{background:var(--tb-eff6ff,#eff6ff)}

/* อนุมัติแล้ว / ไม่อนุมัติ (ApprovedTabContent / RejectedTabContent + RoundGroup) */
.ab-list-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}
.ab-list-sum{display:flex;align-items:center;gap:8px;font-size:14px;line-height:20px;color:var(--tf-737373,#737373)}.ab-list-sum strong{font-weight:700;color:var(--tf-0a0a0a,#0a0a0a)}
.ab-rounds{display:flex;flex-direction:column;gap:12px}
.ab-list-bar{display:flex;align-items:center;gap:12px;padding:12px;border-radius:8px;border:1px solid var(--tl-fed7aa,#fed7aa);background:var(--tb-fff7ed,#fff7ed);font-size:14px;line-height:20px;font-weight:500}
.ab-rounds.is-returned .ab-list-bar{background:var(--tb-fffbeb,#fffbeb);border-color:var(--tl-fde68a,#fde68a)}
.ab-list-bar .approval-bulk-bar{display:flex;align-items:center;gap:8px;padding:0;margin:0;border:0;background:none}.ab-list-bar .board-bulk-count{display:none}
.ab-round-head{display:flex;align-items:center;justify-content:space-between;padding:8px 16px;background:var(--tb-f9fafb,#f9fafb);border-bottom:1px solid var(--tl-e5e5e5,#e5e5e5)}
.ab-round.is-undef .ab-round-head{background:var(--tb-fef2f2,#fef2f2)}
.ab-round-head .ab-i-cal{width:16px;height:16px;color:var(--tf-6b7280,#6b7280)}.ab-round.is-undef .ab-round-head .ab-i-cal{color:var(--tf-f87171,#f87171)}
.ab-round-label{font-weight:700;font-size:14px;line-height:20px}
.ab-round-total{font-size:14px;line-height:20px;font-weight:700;color:var(--tf-dc2626,#dc2626);font-variant-numeric:tabular-nums}
.ab-round-head .ab-i-chev{color:var(--tf-9ca3af,#9ca3af);transform:rotate(-90deg)}.ab-round[open] .ab-round-head .ab-i-chev{transform:none}
.ab-round-scroll{overflow-x:auto;position:relative} /* the cells' .sr-only labels stay inside this scroll box (they widened the phone page to 552px) */
.ab-tab table.ab-round-table{width:100%;font-size:14px;line-height:20px;border-collapse:collapse}
.ab-tab table.ab-round-table thead tr{border-bottom:1px solid var(--tl-e5e5e5,#e5e5e5);background:none}
.ab-tab table.ab-round-table th{font-size:10px;line-height:15px;color:var(--tf-737373,#737373);text-transform:uppercase;letter-spacing:.05em;font-weight:700;padding:6px 8px;height:auto;background:none}
.ab-tab table.ab-round-table .ab-th-check{width:40px}.ab-tab table.ab-round-table .ab-th-view{width:50px;text-align:center;padding:6px 4px}
.ab-tab table.ab-round-table tbody tr{border-bottom:1px solid var(--tl-e5e5e5a30,rgb(229 229 229/.3))}.ab-tab table.ab-round-table tbody tr:nth-child(even){background:var(--tb-f5f5f5a10,rgb(245 245 245/.1))}.ab-tab table.ab-round-table tbody tr:hover{background:var(--tb-f5f5f5a30,rgb(245 245 245/.3))}
.ab-tab table.ab-round-table td.ab-td-check{padding:6px 8px;width:40px}.ab-tab table.ab-round-table .ab-td-view{padding:6px 4px;text-align:center}
.ab-tab table.ab-round-table .expense-list-eye{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:6px;color:var(--tf-2563eb,#2563eb)}.ab-tab table.ab-round-table .expense-list-eye:hover{background:var(--tb-f5f5f5,#f5f5f5)}.ab-tab table.ab-round-table .expense-list-eye svg{width:14px;height:14px}
/* < lg: ApprovalMobileBar + bottom Sheet */
@media(max-width:1023px){
 .ab-side{display:none;position:static;width:auto}
 .ab-side.is-sheet{display:block;position:fixed;left:0;right:0;bottom:0;z-index:50;max-height:85vh;overflow-y:auto;background:var(--tb-f9fafb,#f9fafb);border-top:1px solid var(--tl-e5e7eb,#e5e7eb);border-radius:16px 16px 0 0;padding:0 0 calc(env(safe-area-inset-bottom) + 16px)}
 .ab-side.is-sheet .ab-sheet-head{display:block;position:sticky;top:0;z-index:10;background:var(--tb-f9fafb,#f9fafb);padding:12px 16px;border-bottom:1px solid var(--tl-e5e7eb,#e5e7eb);font-size:14px;line-height:20px;font-weight:700;color:var(--tf-111827,#111827)}
 .ab-side.is-sheet .approval-cash{margin:12px}
 .ab-sheet-overlay{display:block;position:fixed;inset:0;z-index:49;background:var(--tb-000000a80,rgb(0 0 0/.8))}
 .ab-mobile-bar{position:fixed;left:0;right:0;bottom:0;z-index:40;background:var(--tb-ffffff,#fff);border-top:1px solid var(--tl-e5e7eb,#e5e7eb);box-shadow:var(--shadow-bar-up);padding:10px 12px calc(env(safe-area-inset-bottom) + .625rem)}
 .ab-mobile-bar{display:flex;align-items:center;gap:8px}
 .ab-mobile-sum{flex:1 1 0%;display:flex;align-items:center;justify-content:space-between;padding:4px 12px;background:var(--tb-f9fafb,#f9fafb);border-radius:8px;border:1px solid var(--tl-e5e7eb,#e5e7eb);text-align:left;cursor:pointer;height:auto;min-height:0;box-shadow:none;color:inherit}
 .ab-mobile-sum:active{background:var(--tb-f3f4f6,#f3f4f6)}
 .ab-mobile-sum small{display:block;font-size:10px;line-height:1.25;color:var(--tf-6b7280,#6b7280)}.ab-mobile-sum strong{display:block;font-size:14px;line-height:1.25;font-weight:700;color:var(--tf-dc2626,#dc2626)}
 .ab-mobile-sum .ab-i-chev{color:var(--tf-9ca3af,#9ca3af);transform:rotate(180deg)}
 .ab-mobile-approve{display:flex;align-items:center;gap:6px;padding:10px 16px;border-radius:8px;font-size:14px;line-height:20px;font-weight:600;background:var(--tb-111827,#111827);color:var(--tf-ffffff,#fff);border:0;height:auto;min-height:0;cursor:pointer}
 .ab-mobile-approve:active{background:var(--tb-1f2937,#1f2937)}.ab-mobile-approve:disabled{background:var(--tb-f3f4f6,#f3f4f6);color:var(--tf-9ca3af,#9ca3af);cursor:default}
 .ab-mobile-spacer{display:block;height:80px}
}
.ab-side .ab-side-action .approval-bulk-reason{display:none}
.ab-tab input.approval-pick-all:indeterminate{background-color:var(--tb-171717a30,rgb(23 23 23/.3))}
.ab-evidence{display:flex;align-items:center;gap:4px;margin-top:2px}.ab-evidence span{padding:2px 6px;border-radius:4px;font-size:10px;line-height:15px;font-weight:500;background:var(--tb-fffbeb,#fffbeb);color:var(--tf-b45309,#b45309);border:1px solid var(--tl-fde68a,#fde68a);max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ab-person-2{font-size:10px;line-height:15px;color:var(--tf-9ca3af,#9ca3af)}
/* Live check 2026-10-23 (1440 / 768 / 375): a payee and its full name stay one line (… then the tooltip of the Bill window); the pay-round head never wraps. */
.ab-person>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.ab-person>span:first-of-type{flex:0 1 auto}.ab-person>.ab-person-2{flex:0 100 auto}
.ab-group-left,.ab-group-title{min-width:0;white-space:nowrap}.ab-group-title>span{overflow:hidden;text-overflow:ellipsis}.ab-badge{white-space:nowrap;flex:none}.ab-group-right{flex:none}
@media(max-width:640px){.ab-group-head{padding:8px 10px}.ab-group-left,.ab-group-right{gap:6px}.ab-group-title{gap:4px}.ab-badge{padding:2px 6px}.ab-group-left{flex:1 1 auto}}
/* The date and the total never shrink; below 420px the count badge is the number alone (its word is in the group's own rows). */
@media(max-width:640px){.ab-group-title,.ab-group-title>span{flex:none;overflow:visible}}@media(max-width:420px){.ab-badge-unit{display:none}}
.ab-files{gap:2px;color:var(--tf-737373,#737373);text-decoration:none}.ab-files:hover{color:var(--tf-171717,#171717);background:var(--tb-f5f5f5,#f5f5f5)}.ab-files span{font-size:10px;line-height:15px;font-weight:500}
.ab-actions{gap:0;padding-top:0;line-height:1}.ab-actions .ab-icon-btn{padding:4px;line-height:1}.ab-i{width:14px;height:14px}
.ab-files{position:relative}.ab-files.has-thumb>svg{display:none}.ab-files.has-thumb>span{position:absolute;right:0;bottom:0;min-width:14px;padding:0 3px;border-radius:var(--radius-count);background:var(--tb-171717,#171717);color:var(--tf-ffffff,#fff);font-size:9px;line-height:14px;text-align:center}
/* Owner 2026-10-22: the preview is exactly the size of the icon it replaces, so a row never grows when it loads. */
.ab-actions .ab-files{height:22px;box-sizing:border-box}.ab-files.has-thumb{padding:0;width:22px;height:22px;overflow:visible}.ab-thumb-img{display:block;width:22px;height:22px;object-fit:cover;border-radius:var(--radius-thumb);border:1px solid var(--tl-e5e7eb,#e5e7eb);opacity:.8;background:var(--tb-ffffff,#fff)}.ab-files:hover .ab-thumb-img{opacity:1}
@media(pointer:coarse){.ab-actions .ab-icon-btn{min-width:32px;min-height:32px;padding:9px}.ab-actions .ab-files{height:32px}.ab-actions .ab-files.has-thumb{width:32px;height:32px;padding:0}.ab-actions .ab-files.has-thumb .ab-thumb-img{width:32px;height:32px}}
/* Owner 2026-10-22: on a phone the text takes the card's full width (line 1 is one line); the money and the buttons sit under it, buttons in a row. */
@media(max-width:640px){.ab-card-row{flex-wrap:wrap;row-gap:8px}.ab-left{flex:1 1 100%}.ab-right{flex:1 1 100%;justify-content:space-between;align-items:flex-start;padding-left:32px}.ab-money{min-width:0;flex:0 1 220px}.ab-actions{flex-direction:row;align-items:flex-start;border-left:0;padding-left:0;gap:4px}.ab-actions>*{flex:none}.ab-money{flex:1 1 auto;min-width:0}.ab-actions{display:grid;grid-template-columns:repeat(2,auto);gap:2px;flex:none;align-content:start}}
/* Below 768px every button of the page is at least 36px tall (main#content :is(button…)); the file link keeps that same box. */
@media(max-width:767px){.ab-actions .ab-files,.ab-actions .ab-files.has-thumb{height:36px}}
dialog.file-viewer{width:min(var(--modal-w-viewer),calc(100vw - 32px));padding:var(--modal-pad);overflow:hidden;display:none;flex-direction:column}dialog.file-viewer[open]{display:flex}
.file-viewer .modal-inner{display:flex;flex-direction:column;min-height:0;max-height:calc(100dvh - 32px - 2*var(--modal-pad))}
.file-viewer .dlg-head h1{display:flex;align-items:center;gap:8px;flex:1}.file-viewer-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* PJ-07: on a phone the file name has its own line above the pager and wraps to two lines (the whole name in its tip) */
@media(max-width:700px){.file-viewer .dlg-head h1{flex-wrap:wrap;row-gap:4px}.file-viewer-name{flex:1 1 100%;white-space:normal;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}}
.file-viewer-nav{display:flex;align-items:center;gap:4px;font-size:13px;line-height:20px;font-weight:400;color:var(--muted);white-space:nowrap}.file-viewer-nav[hidden]{display:none}
.file-viewer-stage{flex:1;min-height:200px;display:flex;justify-content:center;align-items:center;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--soft)}
.file-viewer-img{display:block;max-width:100%;max-height:min(80vh,calc(100dvh - 220px));width:auto;height:auto;object-fit:contain}
.file-viewer-pdf{align-self:stretch;width:100%;max-height:min(80vh,calc(100dvh - 220px));overflow-y:auto;overflow-x:hidden;box-sizing:border-box}.file-viewer-note{margin:24px;text-align:center}.file-viewer-info{margin:24px;text-align:center}.file-viewer-info .file-viewer-note{margin:8px 0 0}.file-viewer .dlg-head .badge{flex-shrink:0}
.file-viewer .form-actions{margin-top:16px;justify-content:flex-end}
.file-viewer .dlg-head .badge[hidden]{display:none}
/* The one person card (app/View/person-card.php, owner 2026-10-07): Matrix ⓘ, a day's team ⓘ and /OpsTAHub open it. */
.person-card .modal-inner{min-height:0}
.person-card-head{display:flex;gap:12px;align-items:center;padding-bottom:12px;border-bottom:1px solid var(--border)}.person-card-head>div{min-width:0}.person-card-head small{display:block;overflow-wrap:anywhere}
.person-card-avatar{width:64px;height:64px;border-radius:50%;background:var(--soft);display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:600;color:var(--muted);flex-shrink:0}
.person-card-info{margin:0}.person-card-row dt{display:flex;gap:8px;align-items:center;font-size:12px;color:var(--muted);padding-top:10px}.person-card-row dt .icon{width:14px;height:14px}
.person-card-row dd{margin:0;padding:2px 0 10px;border-bottom:1px solid var(--border);overflow-wrap:anywhere}.person-card-notes{white-space:pre-wrap}.person-card .form-actions{margin-top:16px}
.person-card [data-pc-row][hidden]{display:none}
@media(max-width:639px){dialog.file-viewer{width:calc(100vw - 16px);padding:16px}}
.ab-code.is-unit{color:var(--tf-2563eb,#2563eb)}.ab-code.is-unit:hover{color:var(--tf-1e40af,#1e40af);text-decoration:underline}
.ab-evidence.is-slate span{background:var(--tb-f8fafc,#f8fafc);color:var(--tf-475569,#475569);border-color:var(--tl-e2e8f0,#e2e8f0)}
.ab-date{color:var(--tf-eab308,#eab308)}.ab-date:hover{color:var(--tf-ca8a04,#ca8a04);background:var(--tb-fefce8,#fefce8)}
.ab-date-dialog{width:calc(100% - 32px);max-width:448px;padding:0;border:1px solid var(--tl-e5e5e5,#e5e5e5);border-radius:8px;box-shadow:var(--shadow-lg);background:var(--tb-ffffff,#fff)}.ab-date-dialog::backdrop{background:var(--tb-000000a80,rgb(0 0 0/.8))}
.ab-date-inner{display:block;margin:0}.ab-date-inner h2{margin:0;padding:20px 20px 12px;font-size:16px;line-height:24px;font-weight:600}
.ab-date-info{padding:0 20px 12px;border-bottom:1px solid var(--tl-e5e5e5,#e5e5e5)}.ab-date-box{background:var(--tb-f9fafb,#f9fafb);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:8px}
.ab-date-code{font-size:12px;line-height:16px;font-weight:600;color:var(--tf-111827,#111827)}.ab-date-cat{margin:0;font-size:12px;line-height:16px;color:var(--tf-4b5563,#4b5563);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ab-date-facts{border-top:1px solid var(--tl-e5e7eb,#e5e7eb);padding-top:8px;display:flex;flex-direction:column;gap:6px}.ab-date-facts>div{display:flex;align-items:center;justify-content:space-between;font-size:12px;line-height:16px}
.ab-date-facts span{color:var(--tf-6b7280,#6b7280)}.ab-date-facts strong{font-weight:600;color:var(--tf-1f2937,#1f2937)}.ab-date-facts b{font-weight:700;color:var(--tf-ef4444,#ef4444)}.ab-date-facts em{font-style:normal;color:var(--tf-374151,#374151)}
.ab-date-cal{padding:12px 8px}.ab-date-cap{display:flex;align-items:center;justify-content:space-between;padding:0 4px 12px;font-size:14px;line-height:20px;font-weight:500}
.ab-date-cap button{width:28px;height:28px;min-height:28px;padding:0;border:0;background:transparent;border-radius:8px;font-size:16px;cursor:pointer;box-shadow:none}.ab-date-cap button:hover{background:var(--tb-f5f5f5,#f5f5f5)}
.ab-date-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));row-gap:8px}.ab-date-grid .dow{text-align:center;font-size:12px;line-height:16px;font-weight:500;color:var(--tf-737373,#737373)}
.ab-date-grid .d{height:36px;min-height:36px;width:100%;padding:0;border:0;border-radius:8px;background:transparent;font-size:14px;line-height:20px;font-weight:400;color:var(--tf-0a0a0a,#0a0a0a);cursor:pointer;box-shadow:none}.ab-date-grid .d:hover{background:var(--tb-f5f5f5,#f5f5f5)}
.ab-date-grid .d.out{color:var(--tf-737373,#737373);opacity:.5}.ab-date-grid .d.today{background:var(--tb-f5f5f5,#f5f5f5);font-weight:700}.ab-date-grid .d.sel,.ab-date-grid .d.sel:hover{background:var(--tb-171717,#171717);color:var(--tf-fafafa,#fafafa)}
.ab-date-foot{padding:12px 20px 20px;border-top:1px solid var(--tl-e5e5e5,#e5e5e5)}.ab-date-new{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.ab-date-new span{font-size:12px;line-height:16px;color:var(--tf-6b7280,#6b7280)}.ab-date-new strong{font-size:14px;line-height:20px;font-weight:600;color:var(--tf-2563eb,#2563eb)}
.ab-date-actions{display:flex;gap:8px}.ab-date-actions button{flex:1;height:auto;min-height:0;padding:8px 0;border-radius:8px;font-size:14px;line-height:20px;cursor:pointer;box-shadow:none;transition:background-color .15s}
.ab-date-cancel{border:1px solid var(--tl-e5e7eb,#e5e7eb);background:var(--tb-ffffff,#fff);color:var(--tf-4b5563,#4b5563)}.ab-date-cancel:hover{background:var(--tb-f9fafb,#f9fafb)}.ab-date-save{border:0;background:var(--tb-2563eb,#2563eb);color:var(--tf-ffffff,#fff)}.ab-date-save:hover{background:var(--tb-1d4ed8,#1d4ed8)}.ab-date-save:disabled{opacity:.5;cursor:not-allowed}
/* approvals-b44:end */

.ab-card.ab-moved,.ab-card:target{outline:2px solid var(--tl-3b82f6,#3b82f6);outline-offset:-2px;animation:ab-flash 2s ease-out}@keyframes ab-flash{from{background:var(--tb-eff6ff,#eff6ff)}to{background:transparent}}
.alert.is-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:120;box-shadow:var(--shadow-lg);max-width:min(90vw,480px);animation:toast-out 6s forwards}@keyframes toast-out{0%,85%{opacity:1}100%{opacity:0;visibility:hidden}}
/* The copy of the error box shown inside the open window (erpInPlace.lift, owner 2026-11-11): the box's own look; a lifted toast keeps its classes. */
[data-erp-lift="box"]{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:var(--tb-991b1b,#991b1b);color:var(--tf-ffffff,white);padding:14px;z-index:100;border-radius:6px}
/* A copy lifted into a window sits over its buttons (column-reverse on a phone puts confirm at the bottom): taps pass through to the window, its own links stay pressable (ST-15). */
[data-erp-lift]{pointer-events:none}[data-erp-lift] a,[data-erp-lift] button{pointer-events:auto}

/* finance-worklist:start (app/View/finance-worklist.php, owner-approved mockup docs/ui/mockups/finance-worklist-v6.html 2026-10-01) */
.fw{padding-bottom:64px}.fw-bar{display:flex;align-items:center;gap:8px;margin-bottom:10px;flex-wrap:wrap}.fw-search{flex:0 1 280px;margin:0}.fw-search input{width:100%}
.fw-pop{position:relative;flex:0 0 auto}.fw-pop>summary{list-style:none;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.fw-pop>summary::-webkit-details-marker{display:none}.fw-pop>summary .count{min-width:18px;height:18px;padding:0 5px;border-radius:var(--radius-pill);background:var(--soft);font-size:11px;line-height:18px;text-align:center}
.fw-pop-body{position:absolute;z-index:40;top:calc(100% + 4px);left:0;display:grid;gap:10px;min-width:260px;padding:12px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--bg);box-shadow:var(--shadow-lg)}.fw-pop-body label{display:grid;gap:4px;font-size:12px;line-height:16px;color:var(--muted)}.fw-pop-body select{width:100%}
.fw-group-menu{min-width:180px;gap:2px;padding:6px}.fw-group-menu a{padding:6px 10px;border-radius:var(--radius-md);white-space:nowrap}.fw-group-menu a:hover{background:var(--soft)}.fw-group-menu a[aria-current]{background:var(--soft);font-weight:600}
.fw-btn{white-space:nowrap;flex:0 0 auto}.fw-count{margin-left:auto;color:var(--muted);font-size:12px;line-height:16px;white-space:nowrap}.totals-line.fw-count{white-space:normal;max-width:100%;min-width:0}.totals-line.fw-count>span{white-space:nowrap}.fw-count .mono{font-size:12px;color:var(--fg)}
.fw-card{overflow:auto;box-shadow:none;border-radius:var(--radius-lg)}
/* The minimum width is the fixed columns plus 96px for รายละเอียด (the column without a width took what was left: 0px at 1280px,
   expenses-8); every worklist still fits 1440px without a sideways scroll. */
.fw-table{width:100%;min-width:1012px;border-collapse:collapse;table-layout:fixed;font-size:13px;line-height:18px}.fw-table.has-status{min-width:1134px}.fw-table.has-actions{min-width:1144px}
.fw-c-pick{width:32px}.fw-c-code{width:124px}.fw-c-header{width:124px}.fw-c-account{width:150px}.fw-c-payee{width:176px}.fw-c-amount{width:160px}.fw-c-due{width:92px} /* a yyyy-mm-dd date (RULES 5.19) at 13px + 16px padding */.fw-c-status{width:140px}.fw-c-files{width:52px} /* icon + 2-digit count (Bill with 11 files cut, FL28 2026-10-02) */.fw-c-actions{width:150px}
#content .fw-table th{height:28px;padding:4px 8px;font-size:12px;line-height:16px;font-weight:500;color:var(--muted);text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#content .fw-table th.num{text-align:right}
#content .fw-table td{padding:4px 8px;border-bottom:1px solid var(--border);vertical-align:middle;text-align:left;white-space:nowrap;overflow:hidden}#content .fw-table td.num{text-align:right;font-variant-numeric:tabular-nums}
#content .fw-table tr.fw-row td{height:44px}#content .fw-table tr.fw-row{cursor:pointer}#content .fw-table tr.fw-row:hover td,#content .fw-table tr.fw-row.is-picked td{background:var(--soft)}
#content .fw-table tr.fw-group td{height:32px;background:var(--soft);font-weight:600}
.fw-table input[type=checkbox]{margin:0;vertical-align:middle}
.fw-pick-cell{position:relative}.fw-pick-cell .board-select-hit{min-width:0;min-height:0}.fw-pick-cell .expense-list-eye{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.fw-clip{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fw-line{display:flex;align-items:center;gap:4px;min-width:0}.fw-line>.fw-clip{flex:0 1 auto}.fw-line>.badge,.fw-line>details{flex:0 0 auto}
.fw-code{display:block;font-family:ui-monospace,Menlo,monospace;font-size:12px;line-height:16px;color:var(--tf-2563eb,#2563eb);white-space:nowrap}.fw-code.is-plain{color:var(--fg)}a.fw-code:hover{text-decoration:underline}
.fw-k{display:block;font-family:ui-monospace,Menlo,monospace;font-size:11px;line-height:14px;color:var(--muted);white-space:nowrap}
.fw-miss{display:block;color:var(--tf-b91c1c,#b91c1c);font-size:11px;line-height:16px;white-space:nowrap}
.fw-amount{color:var(--fg);font-weight:600}.fw-amount.is-alert{color:var(--tf-dc2626,#dc2626)} /* owner 2026-11-16: plain amounts, red only on a row with a problem (App\View expenses-list amount_alert) */.fw-zero{color:var(--muted);font-weight:600}.fw-s2{display:block;font-size:10px;line-height:13px;color:var(--muted);white-space:nowrap}.fw-note{overflow:hidden;text-overflow:ellipsis;color:var(--tf-b91c1c,#b91c1c)}.fw-nw{white-space:nowrap}
/* A group total in two or more currencies: one currency per line in the money column (as .metric), never cut */.fw-group td.num .amt{display:block}.fw-group td.num .amt-sep{display:none}
.fw-files{display:inline-flex;align-items:center;gap:2px;color:var(--muted);font-size:12px}.fw-files .icon{width:14px;height:14px}.fw-files:hover{color:var(--fg)}
.fw-actions{font-size:12px}.fw-actions .icon{width:14px;height:14px}.fw-actions>*{display:inline-flex;vertical-align:middle;margin-right:4px}.fw-actions .button.small{min-height:28px;padding:2px 8px}.fw-actions .payment-tag-cell{display:inline-flex}.fw-actions .payment-slip-tiles{display:inline-flex;gap:4px;align-items:center}
/* จ่ายแล้ว (owner 2026-10-07): PEAK last, slip upload first in จัดการ; the table fits 1440px without a sideways scroll */.fw-paid .fw-table.has-actions{min-width:1144px}.fw-paid .fw-c-header{width:90px}.fw-paid .fw-c-account{width:124px}.fw-paid .fw-c-payee{width:168px}.fw-paid .fw-c-amount{width:120px}.fw-paid .fw-c-actions{width:130px}.fw-c-peak{width:128px}#content .fw-table td.fw-peak{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fw-peak .button.small{min-height:28px;padding:2px 8px}
.fw-table .badge{font-size:12px;line-height:16px}
.fw-bulk{position:sticky;bottom:12px;z-index:30;display:flex;align-items:center;gap:8px;width:max-content;max-width:calc(100% - 24px);margin:12px auto 0;padding:6px 8px 6px 14px;border-radius:var(--radius-xl);background:var(--tb-111827,#111827);color:var(--tf-ffffff,#fff);box-shadow:var(--shadow-xl);white-space:nowrap}.fw-bulk[hidden]{display:none}
.fw-bulk-count{font-size:13px}.fw-bulk-count .mono{font-size:13px}.fw-bulk .board-bulk-bar{display:flex;align-items:center;gap:6px;margin:0;padding:0;border:0;background:none;flex-wrap:nowrap}.fw-bulk .board-bulk-count{display:none}
.fw-bulk .button{min-height:32px;padding:4px 12px;font-size:13px;background:var(--tb-1f2937,#1f2937);color:var(--tf-ffffff,#fff);border-color:var(--tl-374151,#374151)}.fw-bulk .button.primary{background:var(--tb-ffffff,#fff);color:var(--tf-111827,#111827)}
.alert.is-toast.fw-stay{animation:none}
/* list-feedback:start (erpListFx in app.js + App\Support\ListFeedback; owner 2026-10-07). After an action a row or card that
   left its list fades where it stood as an inert copy (.lf-leave, 250 ms), then what is below slides up by transform (no layout shift), a changed or new one flashes once (.lf-flash), a tab
   count that changed pulses once (.lf-pulse) and the result is the floating toast (.lf-toast: what, which item, where it is
   now, ไปดู; a refusal is the same toast, staying). Reduced motion: the rule near the top of this file zeroes every duration
   and the copy is not made; the toast keeps its 6 s (below). */
.lf-leave{opacity:0;pointer-events:none;transition:opacity .25s ease}
[data-lf-ghost],[data-lf-ghost].fx-new{animation:none}
.lf-flash:not(tr),#content tr.lf-flash>td{animation:ab-flash 1.5s ease-out}
/* The linked day a Project's ปฏิทิน Lark dot opened (#cs-day-<event>, audit PJ-29) flashes once. */
.cs-table tr:target>td{animation:ab-flash 1.5s ease-out}
@keyframes lf-pulse{0%{transform:scale(1)}40%{transform:scale(1.4)}100%{transform:scale(1)}}
.lf-pulse{animation:lf-pulse .6s ease-out}
/* As wide as its sentence, up to 640px (code · payee · what → where · ไปดู on one line on a desktop), 90% of a phone screen. */
.alert.lf-toast{display:block;margin:0;width:max-content;max-width:min(90vw,640px)}
.alert.lf-toast:hover,.alert.lf-toast:focus-within{animation-play-state:paused}
/* One sentence, read and copied as one line. The item, what was done, where it is now and ไปดู are each one piece of it: on
   a narrow screen the toast wraps between them (never inside "อนุมัติแล้ว"); a piece breaks inside only when it is longer than
   the toast (a long code and payee). */
.lf-toast .lf-text{font-weight:500}.lf-toast .lf-item{font-weight:700}
.lf-toast .lf-item,.lf-toast .lf-what,.lf-toast .lf-where,.lf-toast .lf-go{display:inline-block;max-width:100%;overflow-wrap:anywhere}
.lf-toast .lf-go{font-weight:600;text-decoration:underline}.lf-toast .button{margin-left:4px;vertical-align:middle}
.lf-toast .lf-refused{display:block;font-weight:600}
.lf-stack{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:120;display:flex;flex-direction:column;gap:8px;width:max-content;max-width:min(90vw,640px)}
.lf-stack>.alert.is-toast{position:static;transform:none;width:auto;max-width:none}
/* UX triage OP-24: on a phone a toast copied into an open window (data-erp-lift) sat over the window's bottom buttons and took the tap
   (เอารูปออก). There it stands at the top of the screen and lets taps through. */
@media (max-width:640px){dialog [data-erp-lift]{top:16px;bottom:auto;pointer-events:none}}
/* Reduced motion: the toast is still shown for its 6 s and then goes without a fade (the rule near the top of this file would
   end the animation at once, so the result of an action was never seen). */
@media(prefers-reduced-motion:reduce){.alert.is-toast{animation-duration:6s!important;animation-timing-function:step-end!important}}
main:has(.fw-bulk:not([hidden])) .alert.is-toast,main:has(.fw-bulk:not([hidden])) .lf-stack{bottom:76px}
/* The app's error box (#request-error) floats at the same place: while it is shown the toast stands above it, so a part result
   ("จ่ายแล้ว 2 รายการ · ไม่สำเร็จ — ...") is not covered by the toast of the part that went through. */
body:has(#request-error:not([hidden])) .alert.is-toast,body:has(#request-error:not([hidden])) .lf-stack{bottom:96px}
.lf-toast ul{margin:4px 0 0;padding-left:18px;font-size:13px;font-weight:400}
.lf-toast.el-filming-feedback{pointer-events:none}
/* list-feedback:end */
/* Live check 2026-10-23: on a tablet (sidebar open) the bulk bar is wider than the list; it wraps inside it instead of running past the screen. */
@media(min-width:768px) and (max-width:1199px){.fw-bulk{width:auto;max-width:calc(100% - 24px);flex-wrap:wrap;row-gap:6px}.fw-bulk .board-bulk-bar{flex-wrap:wrap;row-gap:6px}}
@media(max-width:767px){.fw-bar{flex-wrap:wrap}.fw-search{flex:1 1 100%}.fw-count{margin-left:0}.fw-bulk{left:0;right:0;width:auto;max-width:calc(100% - 16px);flex-wrap:wrap;row-gap:6px;white-space:normal;overflow:visible}.fw-bulk .fw-peak-opts{display:contents}.fw-bulk [data-fw-peak-date-wrap]{display:flex;align-items:stretch;min-height:32px;flex:1 1 120px;min-width:0}.fw-bulk [data-fw-peak-date-wrap][hidden]{display:none}.fw-bulk [data-fw-peak-date-wrap]>span:first-child{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.fw-bulk [data-fw-peak-date-wrap] input{flex:1 1 auto;min-width:0;width:100%}.fw-bulk .fw-peak-opts select,.fw-bulk .fw-peak-opts .combobox{flex:1 1 120px;width:auto;min-width:0;max-width:none}.fw-bulk [data-fw-peak-date-wrap] .datepicker{flex:1 1 auto;min-width:0}.fw-bulk .fw-paid-date:not(.fw-peak-opts){flex:1 1 100%;flex-wrap:nowrap}.fw-bulk .fw-paid-date:not(.fw-peak-opts) label{flex:none;white-space:nowrap}.fw-bulk .fw-paid-date:not(.fw-peak-opts) input[type=date]{flex:1 1 90px;min-width:0;width:100%}.fw-bulk .fw-paid-date:not(.fw-peak-opts) .button{flex:none}.fw-pop-body{left:auto;right:0}}
/* รายรับ worklist (owner 2026-10-01): green bold amount, mono เลขเอกสาร, inline วันคาดรับ editor, row menu not clipped. */
.fw-income .fw-c-header{width:128px}.fw-income .fw-c-payee{width:150px}.fw-income .fw-c-due{width:104px}.fw-income .fw-c-amount{width:250px}.fw-income .fw-c-status{width:206px} /* 2026-11-04: +22px from Day / Project so the dot, its words, เกินกำหนด and the รอบัญชีลงผัง mark fit (189px needed, the mark was cut to …); the dot, its words and one flag on one line: วางบิลแล้ว + เกินกำหนด need 148px, รับบางส่วน + รอบัญชีลงผัง 167px, + 16px padding (the second chip was cut at 140px, audit 2026-10-07; 160px wrapped it once the dot stood inline, 2026-10-18; the จัดการ column's 56px paid for this and เลขเอกสาร); เลขเอกสาร is 150px: 18 characters of the 12px code (a 16-character document number was cut at 130px once the type scale left 11.5px, FL33); ยอด needs its 250px for the VAT · หัก · รับแล้ว line, FL33. No จัดการ column since 2026-10-18: the row's eye opens the one income window */
#content .fw-income td.fw-nw:has(>.pov-st){white-space:normal}.fw-income td.fw-nw>.pov-st{display:inline-flex;vertical-align:middle;max-width:100%} /* the dot and its words stand beside the row's flag (เกินกำหนด, PEAK รับเงินแล้ว) on one line: a block dot pushed every flag to a second line and the row to 49px (FL33, FL124 D5); a pair wider than the column (รับบางส่วน + รอบัญชีลงผัง) wraps instead of running out of the cell */
.fw-income .fw-amount{color:var(--tf-15803d,#15803d)}.fw-income tr.fw-row td:nth-child(5) .fw-clip{font-family:ui-monospace,Menlo,monospace;font-size:12px}
#content .fw-income td.fw-actions,#content .fw-income tr.fw-group td:last-child{overflow:visible}.fw-income .income-date-form{display:inline-flex;align-items:center;gap:2px}#content .fw-income .income-date{line-height:16px;padding-left:0}#content .fw-income .income-date .icon-button.income-date-edit{width:16px;height:16px;min-height:16px;min-width:16px}#content .fw-income .income-date .icon-button.income-date-edit .icon{width:12px;height:12px}
.fw-group-tools{display:flex;align-items:center;justify-content:flex-end;gap:6px;font-weight:400}.fw-group-tools .button.small{min-height:28px;padding:2px 8px;font-size:12px}
/* finance-worklist:end */

/* Bill Quick view v4 (owner-approved docs/ui/mockups/bill-quickview-v4.html): one 7-slot skeleton for every status, 680px, no nested boxes,
   two text sizes (13/11px), theme tokens only so dark mode follows --bg/--fg/--muted/--border/--soft and the --mx-* pairs. */
dialog.expense-review-dialog.bqv{width:min(var(--modal-w-lg),calc(100vw - 32px));max-width:none;padding:0;font-size:13px;line-height:20px;color:var(--fg);background:var(--bg)}
.bqv-in{display:flex;flex-direction:column;padding:0 24px}
.bqv-hd{display:flex;align-items:center;gap:8px;height:52px;padding-top:16px;min-width:0}.bqv-name{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.bqv-mono{font-family:ui-monospace,Menlo,monospace}.bqv .num{font-variant-numeric:tabular-nums}.bqv-mono{color:var(--muted);white-space:nowrap}
.bqv-st{font-size:11px;font-weight:600;border-radius:var(--radius-full);padding:1px 8px;background:var(--mx-blue-bg);color:var(--mx-blue-fg);white-space:nowrap}.bqv-st.is-w{background:var(--mx-amber-bg);color:var(--mx-amber-fg)}
.bqv-bn{height:32px;display:flex;align-items:center;gap:8px;border-radius:var(--radius-lg);padding:0 12px;margin:0 -12px;white-space:nowrap;overflow:hidden;color:var(--muted)}
.bqv-bn.is-w{background:var(--mx-amber-bg);color:var(--mx-amber-fg)}.bqv-bn.is-r{background:var(--mx-rose-bg);color:var(--mx-rose-fg)}
.bqv-link{border:0;background:none;color:inherit;font:inherit;font-weight:600;text-decoration:underline;cursor:pointer;padding:0}
.bqv-clip{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.bqv-inline{display:flex;align-items:center;gap:6px;flex:1;min-width:0}.bqv-back-to{display:grid;gap:2px;font-size:12px;color:var(--muted);min-width:180px}.bqv-back-to select{height:36px;min-height:36px;font-size:14px}.bqv-inline textarea{flex:1}
.bqv-inline select,.bqv-inline input:not([type=hidden]),.bqv-fld{height:26px;border:1px solid var(--border);border-radius:var(--radius-md);padding:0 6px;font:inherit;font-size:13px;background:var(--bg);color:var(--fg);min-width:0}
.bqv-payf{margin-top:6px;flex:none}.bqv-payf .bqv-num{width:110px}
/* FIN-16: จ่ายจาก is its own line above the pay row (the row keeps its width on a phone) */
.bqv-paid-from{margin-top:6px}.bqv-paid-from select{flex:1 1 auto;min-width:0;max-width:320px}.bqv-file{cursor:pointer;display:inline-flex;align-items:center}.bqv-dups{display:inline-flex;gap:6px;margin-left:8px;flex-wrap:wrap}
.bqv-num{width:96px;text-align:right}
.bqv-sum{display:grid;grid-template-columns:1.3fr 1fr 1fr 1fr;gap:16px;min-height:76px;padding-top:16px}.bqv-e{min-width:0}.bqv-e>div{display:flex;align-items:center;gap:4px;min-width:0}
.bqv-l{display:block;font-size:11px;line-height:16px;color:var(--muted)}.bqv-l.bqv-inl{display:inline}.bqv-l a{color:var(--mx-blue-fg);text-decoration:none}
.bqv-big{font-size:22px;line-height:28px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}.bqv-v{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:inherit;text-decoration:none}
.bqv-mut{color:var(--muted);font-size:11px}.bqv-e>span.bqv-mut{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* A value line (.bqv-e>div) is one flex row: its text is cut with an ellipsis, its label and its pencil never are (a long หัวบิล name hid the pencil). */
.bqv-e>div>:is(.bqv-v,span){min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bqv-e>div>:is(.bqv-l,.bqv-pen){flex:none}
/* Pencils are always on screen, faint; full on hover and keyboard focus (a hidden one was unreachable by Tab and by touch). */
.bqv-pen{opacity:.5;transition:opacity .15s;border:0;background:none;color:var(--muted);padding:0 2px;cursor:pointer;line-height:0}.bqv-pen .icon,.bqv-pen svg{width:12px;height:12px}
.bqv-e:hover .bqv-pen,.bqv-table tr:hover .bqv-pen,.bqv-pen:hover,.bqv-pen:focus-visible{opacity:1}.bqv-e:hover>div:first-of-type{background:var(--soft);border-radius:var(--radius-sm)}
@media (hover:none){.bqv-pen{opacity:1}}
.bqv-ed{display:flex;flex-wrap:wrap;gap:4px;align-items:center}.bqv-chk{display:inline-flex;gap:2px;align-items:center;font-size:11px}
.bqv-tb{padding-top:12px}.bqv-table{width:100%;border-collapse:collapse;table-layout:fixed}
.bqv-table th{font-size:11px;font-weight:500;color:var(--muted);text-align:left;padding:0 8px 6px 0;border-bottom:1px solid var(--border);white-space:nowrap}
.bqv-table td{padding:6px 8px 6px 0;border-bottom:1px solid var(--border);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bqv-table th:nth-child(1){width:26%}.bqv-table th:nth-child(2){width:22%}dialog.bqv .bqv-table th,dialog.bqv .bqv-table td{font-size:13px;line-height:20px;height:auto;letter-spacing:0}dialog.bqv .bqv-table th{font-size:11px;line-height:16px;background:none}dialog.bqv .bqv-table td.num{overflow:visible;text-overflow:clip;padding-left:8px}.bqv-table th.num,.bqv-table td.num{text-align:right;padding:6px 0 6px 12px}.bqv-table th.num{padding-top:0}
.bqv-table tr.bqv-split{cursor:pointer}.bqv-sub td{color:var(--muted);border-bottom:0;padding-top:2px;padding-bottom:2px}.bqv-sub td:first-child{padding-left:14px}.bqv-sub.is-end td{border-bottom:1px solid var(--border);padding-bottom:6px}
.bqv-total td{border-bottom:0;font-weight:600}.bqv-miss{color:var(--mx-rose-fg)}.bqv-acc{margin-top:8px;flex-wrap:wrap}
.bqv-pay{padding-top:12px;min-height:76px}.bqv-pay b{color:var(--fg);font-weight:500}.bqv-l2{display:flex;align-items:center;gap:8px;min-height:32px}
.bqv-bar{width:80px;height:4px;border-radius:2px;background:var(--border);overflow:hidden}.bqv-bar i{display:block;height:100%;background:var(--mx-paid)}.bqv-l2 .button{margin-left:auto}
.bqv-fh{display:grid;grid-template-columns:1fr 1.4fr;gap:24px;padding-top:12px;min-height:116px}
.bqv-thumbs{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}.bqv-th{position:relative;width:48px;height:48px;border:1px solid var(--border);border-radius:var(--radius-md);overflow:hidden;display:flex}
.bqv-th a{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:11px;color:var(--muted);text-decoration:none}.bqv-th img{width:100%;height:100%;object-fit:cover}
.bqv-th form{position:absolute;top:0;right:0}.bqv-rm{border:0;background:var(--bg);color:var(--muted);font-size:11px;line-height:14px;padding:0 3px;cursor:pointer;visibility:hidden}.bqv-th:hover .bqv-rm{visibility:visible}
.bqv-hist div{line-height:22px}.bqv-hist b{font-weight:500}
.bqv-ft{position:relative;display:flex;gap:8px;align-items:center;height:60px;margin:0 -24px;padding:0 24px;border-top:1px solid var(--border)}
.bqv-pri{display:flex}





@media (max-width:700px){.bqv-sum{grid-template-columns:1fr 1fr}.bqv-fh{grid-template-columns:1fr}}
/* Day / Project of the Bill window (owner 2026-10-21): the whole code, never cut; two codes wrap inside the cell. */
/* อาจเบิกซ้ำ in the Bill window (owner 2026-10-21): the whole line naming the other Bill, wrapped on a phone, never cut; the head's Day / Project code is a link. */
.bqv-bn:has(.bqv-twins){height:auto;min-height:32px;white-space:normal;padding:6px 12px}.bqv-twins{margin-left:0}.bqv-hd a.bqv-code-link{color:var(--tf-2563eb,#2563eb);text-decoration:none}.bqv-hd a.bqv-code-link:hover{text-decoration:underline}
/* Owner 2026-10-24 ("linebreak เด้ง row-height … ทุกจุดอย่าให้มี"): the Day / Project cell is one line; a long code ends in … with the whole code in its tooltip. */
.bqv-table td.bqv-code{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bqv-table td.bqv-code>.bqv-pen{display:inline-flex;vertical-align:middle;margin-right:4px}.bqv-table td.bqv-code .mono{font-size:inherit}
.bqv-sum .bqv-e:first-child .bqv-mut{white-space:normal;overflow:visible} /* VAT/หัก breakdown is money: never cut */


/* Worklist rows stay 44px with slips: tiles never wrap or grow the row (FL28); a tile is 28px and its ✕ sits inside it (FL272, 2026-11-11: at -6px the row cut the ✕ off and a press opened the Bill) */
tr.fw-row .payment-slip-tiles{flex-wrap:nowrap;max-height:28px;overflow:hidden}tr.fw-row .payment-slip-tile>a{width:28px;height:28px}tr.fw-row .payment-slip-remove{top:0;right:0;width:14px;height:14px}main#content tr.fw-row .payment-slip-tiles .payment-slip-tile .payment-slip-remove[form][name]{min-height:0}tr.fw-row .payment-slip-remove .icon{width:8px;height:8px}tr.fw-row .payment-slip-tile img,tr.fw-row .payment-slip-tile svg{max-height:24px;width:auto}tr.fw-row td .button.small{min-height:0;height:28px;padding-top:0;padding-bottom:0}

/* Matrix columns (2026-10-02): every day column is the same width (fixed layout; ทีมงาน and รวม/คน fixed), the Matrix scrolls
   sideways inside .mx-scroll only when the days do not fit, and several Bills in one person/day cell stack as chips. */
.mx-table{table-layout:fixed;min-width:0;width:max(100%, calc(200px + 120px + var(--mx-days,1) * 144px))}/* audit PROJ-25: five days fit 1440 without the total covering the last date */
.mx-day .mx-pop:popover-open::backdrop{background:transparent}/* audit PROJ-25: a day's facts are a tip, not a dimmed screen */ /* min-width is ignored on fixed tables: width:max() forces the scroll (live CIH260013, 11 days, 2026-10-02) */
.mx-table th.mx-person,main#content .mx-table th.mx-person{width:200px;min-width:0}.mx-table th.mx-total,main#content .mx-table th.mx-total{width:120px;min-width:0}.mx-table th.mx-day{min-width:0}
.mx-table td.mx-person{overflow:hidden}.mx-pname{overflow:hidden;text-overflow:ellipsis}.mx-names{min-width:0;flex:1}
.mx-cell{height:auto;min-height:44px;flex-direction:column;gap:2px;padding:2px}.mx-cell>*+*{border-left:0}.mx-cell.mx-empty{align-items:stretch;justify-content:center}
.mx-cell>.mx-add{width:auto;min-height:20px}
/* Screen check 2026-10-29: เพิ่มรายจ่ายอีกรายการ was a 12 px wide target on a phone (RULES: 24 px at least). */
@media(max-width:639px){.mx-cell>.mx-add{min-width:24px}}
.mx-item{flex:0 0 auto;width:100%}.mx-item>.mx-chip,.mx-item>a.mx-chip{width:100%;border-radius:4px}
.mx-chip{min-height:36px;padding:2px 4px;gap:2px;line-height:1.2}.mx-cell>.mx-item+.mx-item>.mx-chip,.mx-cell>.mx-item:has(+.mx-item)>.mx-chip{min-height:30px}
.mx-amt{font-size:12px;line-height:14px}.mx-lab{font-size:12px;line-height:14px;opacity:1}.mx-name{-webkit-line-clamp:1;word-break:break-all}
.mx-day-sub,.mx-psub,.mx-foot,.mx-table tfoot td.mx-person{font-size:12px}
@media(max-width:767px){.mx-table{min-width:0;width:max(100%, calc(130px + 96px + var(--mx-days,1) * 112px))}.mx-table th.mx-person,main#content .mx-table th.mx-person{width:130px}.mx-table th.mx-total,main#content .mx-table th.mx-total{width:96px}}
.mx-c-gray{background:var(--mx-slate-bg);color:var(--mx-slate-fg)}

/* Matrix: the per-cell + no longer adds its own line under the chips; it floats top-right and shows on hover/focus (live PRS260020 2026-10-02) */
.mx-td{position:relative}/* owner 2026-10-02: the + sits in a slim column on the RIGHT of the cell (chips stack left), always visible, full cell height */
.mx-td .mx-cell{padding-right:24px}.mx-td .mx-new>.mx-add{position:absolute;top:2px;right:2px;bottom:2px;width:20px;height:auto;z-index:1;border-radius:4px}

/* owner 2026-10-02: one Bill per chip, side by side in ONE row (new ones appear to the right, next to the + column); equal-width day columns kept, chips share the width and truncate names, never wrap */
.mx-td .mx-cell{flex-direction:row;align-items:stretch;min-height:44px;height:44px}.mx-td .mx-cell>.mx-item:not(.mx-new){flex:1 1 0;width:auto;min-width:0}.mx-td .mx-item>.mx-chip,.mx-td .mx-item>a.mx-chip{min-height:0!important;height:100%;overflow:hidden}.mx-td .mx-chip *{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}

/* /Projects one-line toolbar (owner 2026-10-02): the finance-worklist .fw-bar row — search grows, filters stay compact, count right. */
main form.projects-bar{display:flex;flex-wrap:nowrap;align-items:center;gap:8px;margin-bottom:12px}main form.projects-bar>.search{flex:1 1 320px;min-width:120px;max-width:440px;margin:0}
main form.projects-bar>select.projects-bar-select{flex:0 0 150px;width:150px;min-width:0;max-width:180px;height:36px;padding-top:0;padding-bottom:0;line-height:34px}main form.projects-bar>.combobox{flex:0 0 150px;width:150px;min-width:0}main form.projects-bar>.combobox:has([name=sort]){flex-basis:160px;width:160px}
main form.projects-bar>.fw-count{margin-left:auto}
/* The count keeps its width as it changes (1 to 9999 Projects): a filter answer patched in place (RULES 5.8) moves no control of the bar. */
main form.projects-bar>.fw-count{min-width:76px;text-align:right}
/* Projects bar wraps when search + three selects + chip + count do not fit (900-1100px with the sidebar); one line on wide screens. */
@media(max-width:1279px){main form.projects-bar{flex-wrap:wrap}}
@media(max-width:767px){main form.projects-bar>.search{flex:1 1 100%;min-width:0;max-width:none}main form.projects-bar>:is(select.projects-bar-select,.combobox,.combobox:has([name=sort])){flex:1 1 calc(33% - 6px);width:auto;min-width:0;max-width:none}main form.projects-bar>.fw-count{margin-left:0}}
[data-financial-toggle][aria-busy="true"]{opacity:.5;cursor:progress}
/* A press waits for its answer (RULES 5.8; erpInPlace.busy): only the control pressed dims. */
[data-press-busy]{opacity:.65;cursor:progress}

/* Error watch on /SystemHealth (owner 2026-10-06): the "ข้อผิดพลาดล่าสุด" tables under the health checks. */
.error-watch{margin-top:24px}.error-watch>.set-head{margin:16px 0 8px}.error-watch td .muted{font-size:12px;line-height:16px;overflow-wrap:anywhere}


/* NDA / PDPA texts /SignRequests?tab=texts (REQ-027.1; the old sign-request shelf was removed 2026-10-08). */
.sign-text-edit{margin:12px 0}.sign-text-edit .field{margin-top:12px}.sign-copy-body p{margin:0 0 10px;line-height:24px}

/* Bill modal full screen + edit mode (owner order 2026-10-07; app/View/bill-modal-*.php). Same bqv type, sizes and controls. */
dialog.bqv.bqv-fs{position:fixed;max-width:1600px;max-height:none;border:0;border-radius:12px;overflow-x:hidden}
.bqv-fs .bqv-in{max-width:1280px;margin:0 auto;padding:0 32px;min-height:100%}
.bqv-fs .bqv-sum{grid-template-columns:1.3fr 1fr 1fr 1fr}.bqv-fs .bqv-table:not(.bme-table):not(.iwr-lines) th:nth-child(1){width:20%}.bqv-fs .bqv-table:not(.bme-table):not(.iwr-lines) th:nth-child(2){width:18%}.bqv-fs .bqv-table:not(.bme-table):not(.iwr-lines) th:nth-child(3){width:24%}
.bqv-fs .bqv-ft{position:sticky;bottom:0;background:var(--bg);margin:auto -32px 0;padding:0 32px}
.bqv-ftv{display:contents}.bqv-fte{display:flex;gap:8px;align-items:center;margin-left:auto}.bqv-peak{display:flex}

.bqv-hact{display:flex;align-items:center;gap:8px;margin-left:auto;min-width:0}.bqv-hact .icon{width:14px;height:14px}
.bqv-jump{flex:none}.bqv-jump select{width:170px}
.bqv-up{display:flex;gap:8px;flex-wrap:wrap;margin:4px 0}.bqv-up form{display:flex}.bqv-up .icon,.bme-files .icon{width:14px;height:14px}
.bme{flex-direction:column;padding-top:12px}
.bme-head{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.bme-f{display:grid;gap:2px;min-width:0}.bme-f .bqv-fld,.bme-f select{width:100%}
.bme-bank{margin:0}.bme-bank b{color:var(--fg);font-weight:500}.bme-err{margin:0}
/* Bill window on a phone (owner 2026-10-12): the item table keeps its eight columns readable and scrolls sideways inside its own block; before, the heads overlapped at 375px. */
/* FIN-11 (audit 2026-11-20): on a phone the Bill window's item table is three columns, รายการ · Day / Project (its code opens the Project pop-up) · สุทธิ, no sideways scroll; the account and tax are in แก้ไข. */
@media (max-width:700px){.bqv-fs .bqv-tb{overflow-x:auto;-webkit-overflow-scrolling:touch}.bqv-fs .bqv-tb>.bqv-table:not(.bme-table):not(.iwr-lines){min-width:760px}}
@media (max-width:700px){.bqv-fs .bqv-tb>.bqv-table.bqv-table:not(.bme-table):not(.iwr-lines){min-width:0}.bqv-fs .bqv-table:not(.bme-table):not(.iwr-lines) :is(th,td):is(:nth-child(3),:nth-child(4),:nth-child(5),:nth-child(6)){display:none}.bqv-fs .bqv-table:not(.bme-table):not(.iwr-lines) th:nth-child(1){width:auto}.bqv-fs .bqv-table:not(.bme-table):not(.iwr-lines) td[colspan]{display:table-cell}}
.bqv-fs .bme-table th:nth-child(1),.bqv-fs .bme-table th:nth-child(10){padding-right:0}
.bme-table td{overflow:visible}.bme-in,.bme-table select{width:100%;height:28px}.bme-table td small{display:block}
.bme-more{text-decoration:none;color:var(--muted);line-height:28px}.bme-rm{visibility:visible;line-height:28px}
.bme-detail td{text-align:left}.bme-table .bme-detail td small{text-align:left}.bme-cell{display:block}.bme-dgrid{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr)}.bme-wide{grid-column:1/-1}
.bme-split{display:flex;gap:8px;align-items:center;margin:4px 0}.bme-split select{width:320px;height:28px}

.bme-files{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
@media (max-width:768px){.bqv-fs .bqv-in{padding:0 16px}.bqv-fs .bqv-sum{grid-template-columns:1fr 1fr}.bqv-hact{flex-wrap:wrap}.bqv-fs .bqv-ft{margin:auto -16px 0;padding:0 16px;flex-wrap:wrap;height:auto;min-height:60px}.bqv-fs .bqv-fh{grid-template-columns:1fr}}
/* The income window (owner 2026-10-18 items 13 and 14; app/View/income-window-host.php, docs/ui/MODAL.md row 20): the Bill window's
   document in its seven slots, with its classes (.bqv-*) and its full size (dialog.bqv.bqv-fs above); these rules add only what the
   bill's lines, the receipts, the documents and the steps need. Spacing from 4 · 8 · 12 · 16 · 24 only, colours from tokens only,
   no card, box or tint inside the window: the slots are told apart by their order, their spacing and the table. */
dialog.income-review.bqv{font-size:13px;line-height:20px;color:var(--fg);background:var(--bg)}
.iwr-lines th:nth-child(1),.iwr-lines th:nth-child(2){width:auto}.iwr-c-account{width:34%}.iwr-c-amount{width:160px}
.iwr-sum td{color:var(--muted)}.iwr-lines .iwr-sum:first-child td{border-top:1px solid var(--border)}
.income-review .bqv-total td{border-top:1px solid var(--fg)}
.income-review .bqv-hist .bqv-link{display:inline-flex;align-items:center;height:20px;vertical-align:middle}
.iwr-receipt{line-height:22px}.iwr-receipt.is-reversed{color:var(--muted)}
.iwr-docs{display:grid;gap:4px;align-content:start;min-width:0}.iwr-doc{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-height:22px}
.iwr-remark{margin-top:8px;min-width:0}.iwr-remark-text{white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.iwr-step,.iwr-ed{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.iwr-ed{margin-top:4px}.iwr-ed textarea{flex:1 1 100%;min-height:60px;padding:8px 12px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg);color:var(--fg);font:inherit;font-size:14px}
.iwr-step-what{flex:1 1 200px;min-width:0}
.iwr-step>:is(.iwr-in,.datepicker,.combobox,.button){flex:0 0 auto}.iwr-step>.datepicker,.iwr-ed>.datepicker,.iwr-step>input[type=date],.iwr-ed>input[type=date]{width:168px}
/* A step stands alone in the foot from its first frame: the default foot (เพิ่มเติม, the strong button) goes with CSS, not on x-show's
   next frame, and a date field is the picker's width before the picker takes it, so nothing under the pointer moves (it moved 44px). */
.income-review .bqv-ft:has(>.iwr-step)>.bqv-ftv{display:none}.iwr-step>input[name=reference],.iwr-step>input[name=approver],.iwr-step>input[name=external_id]{width:200px}
.income-review .iwr-in{height:36px;min-height:36px;padding:0 12px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg);color:var(--fg);font:inherit;font-size:14px;box-sizing:border-box;min-width:0}
.iwr-num{width:140px;text-align:right;font-variant-numeric:tabular-nums}.iwr-step>.iwr-wide{flex:1 1 240px}
.iwr-inline-form{display:inline}
.iwr-edit{padding-top:12px}.iwr-sk .bme-head{margin-bottom:16px}.iwr-sk-f{height:36px}
/* The income form in the three places it is drawn (the page, the #modal-root window, the income window's edit mode): the Bill
   edit mode's grid (.bme, .bme-head 4 columns, 2 at ≤1100px); a fact spans 2, the remark and the receipt fields the whole row. */
.iwf-span2{grid-column:span 2}.iwf-tail .iwf-span4{grid-column:1/-1}
.iwf .bme-f>.bqv-l{display:block;font-size:12px;line-height:16px;font-weight:400;color:var(--muted)}
.iwf-money .iwf-net{text-align:right}.iwf-money .bqv-big{display:block;text-align:right}.iwf-money .iwf-n+.iwf-n>label{text-align:left}
@media(max-width:700px){.iwr-step>:is(.iwr-in,.datepicker,.iwr-wide){flex:1 1 100%;width:auto}.iwr-c-account{width:120px}.iwr-c-amount{width:104px}.income-review .bqv-table th:nth-child(2),.income-review .bqv-table td:nth-child(2){display:table-cell}.iwf .iwf-span2{grid-column:1/-1}.iwf-money>:nth-child(n+3){grid-column:1/-1}}
/* BillItem instalments panel (app/View/bill-instalments.php, owner 2026-10-07) */
.bill-instalments{display:grid;gap:8px}
.bill-instalments .bi-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.bill-instalments .bi-table{width:100%;border-collapse:collapse}
.bill-instalments .bi-table th,.bill-instalments .bi-table td{padding:4px 6px;text-align:left;vertical-align:middle}
.bill-instalments .bi-table .num{text-align:right}
.bill-instalments .bi-table input,.bill-instalments .bi-table select{min-width:0}
.bill-instalments .bi-amount{display:inline-flex;gap:4px}
.bill-instalments .bi-amount input{width:96px;text-align:right}
.bill-instalments .bi-state{display:flex;flex-wrap:wrap;gap:4px;align-items:center}
.bill-instalments .bi-actions{display:flex;gap:8px;justify-content:flex-end}
.bill-instalments .bi-over{color:var(--tf-b91c1c,#b91c1c)}
.bi-chip{display:inline-block;padding:1px 8px;border-radius:var(--radius-full);font-size:12px;white-space:nowrap;border:1px solid var(--tl-e5e7eb,#e5e7eb)}
.bi-chip.bi-ok{background:var(--tb-f0fdf4,#f0fdf4);color:var(--tf-166534,#166534)}
.bi-chip.bi-info{background:var(--tb-eff6ff,#eff6ff);color:var(--tf-1e40af,#1e40af)}
.bi-chip.bi-warn{background:var(--tb-fffbeb,#fffbeb);color:var(--tf-92400e,#92400e);border-color:var(--tl-fcd34d,#fcd34d)}
.bi-chip.bi-muted{color:var(--tf-6b7280,#6b7280)}
.instalment-chip{margin-right:6px}

/* Bill modal busy button (owner 2026-10-07: every action answers at once) */.bqv button.is-busy{pointer-events:none;opacity:.75;animation:bqv-busy 1s ease-in-out infinite}@keyframes bqv-busy{50%{opacity:.45}}@media (prefers-reduced-motion:reduce){.bqv button.is-busy{animation:none}}
/* Bill modal header (owner 2026-10-07 OCD pass): one 36px control height (the combobox's), the status picker is the design-system combobox showing the
   current status, ยืนยัน appears only after another status is picked, and the actions wrap instead of running past the modal edge. */
.bqv-fs .bqv-hd{height:auto;min-height:52px;flex-wrap:wrap;row-gap:8px}.bqv-fs .bqv-hact{flex-wrap:wrap;justify-content:flex-end}
.bqv-jump{display:flex;align-items:center;gap:8px}.bqv-jump select,.bqv-jump .combobox{width:200px}
/* Bill modal edit (owner 2026-10-07 "รก ใช้ยาก ดูยาก"): one control height (36px) and one field style everywhere; the items table fits
   the modal without a sideways scroll; the item detail is one tidy row; totals sit in a right-hand summary instead of table rows. */
.bme{display:grid;gap:16px}.bme-head{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 16px}.bme-head .bme-wide{grid-column:1/-1}
.bme .bqv-fld,.bme select,.bme input:not([type=hidden]):not([type=file]):not([type=checkbox]),.bme .combobox-trigger{height:36px!important;min-height:36px;font-size:14px;padding:0 12px;border:1px solid var(--border);border-radius:var(--radius-md);background:transparent;color:var(--fg);box-sizing:border-box;width:100%}
.bme .combobox{width:100%;display:block}.bme .combobox-trigger{display:flex;align-items:center;justify-content:space-between;gap:6px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.bme small.bqv-l{font-size:12px;color:var(--muted)}
.bme-scroll{overflow-x:visible}.bme-table{min-width:0;table-layout:fixed;width:100%}
.bqv-fs .bme-table th:nth-child(1),.bqv-fs .bme-table th:nth-child(10){width:28px}.bqv-fs .bme-table th:nth-child(2){width:auto}.bqv-fs .bme-table th:nth-child(3){width:15%}.bqv-fs .bme-table th:nth-child(4){width:11%}.bqv-fs .bme-table th:nth-child(5){width:19%}.bqv-fs .bme-table th:nth-child(6){width:10%}.bqv-fs .bme-table th:nth-child(7),.bqv-fs .bme-table th:nth-child(8){width:8%}.bqv-fs .bme-table th:nth-child(9){width:9%}
.bme-table th{font-size:12px;font-weight:500;color:var(--muted);padding:0 6px 8px}.bme-table td{padding:8px 6px;vertical-align:top}.bme-table td.num,.bme-table td[data-bme-net]{line-height:36px;font-variant-numeric:tabular-nums}
.bme-table td small{font-size:11px;margin-top:2px;text-align:right}.bme-more,.bme-rm{line-height:36px}
.bme-detail td{background:var(--soft);padding:12px 6px}.bme-dgrid{grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:12px 16px;padding:0}
.bme-acts{display:flex;gap:8px;flex-wrap:wrap}.bme-split select,.bme-split .combobox{width:320px}
.bme-sum{justify-self:end;width:min(360px,100%);margin:0;display:grid;gap:6px;font-variant-numeric:tabular-nums}.bme-sum>div{display:flex;justify-content:space-between;gap:16px}.bme-sum dt{color:var(--muted)}.bme-sum dd{margin:0}
.bme-sum-total{border-top:1px solid var(--border);padding-top:8px;margin-top:2px;font-weight:600;font-size:16px}.bme-sum-total dt{color:var(--fg)}
@media (max-width:1100px){.bme-head{grid-template-columns:repeat(2,minmax(0,1fr))}.bme-scroll{overflow-x:auto}.bme-table{min-width:980px}}
/* Bill window on a phone, edit and new (owner 2026-10-13 "แก้โมดอลบนมือถือให้เสร็จ"): one item is a block of labelled boxes, nothing scrolls sideways; before, the รายการ box had no width and the table was 980px wide. */
@media (max-width:700px){.bme-scroll{overflow-x:visible}.bqv-fs .bme-table{display:block;min-width:0;width:100%}.bme-table thead{display:none}.bme-table tbody{display:block;padding:12px 0;border-bottom:1px solid var(--border)}
 .bme-table tbody>tr:first-child{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 12px}dialog.bqv-fs .bme-table tbody>tr:first-child>td{display:block;padding:0;min-width:0;width:auto;border:0;line-height:20px}
 .bme-table td[data-l]::before{content:attr(data-l);display:block;font-size:12px;line-height:16px;color:var(--muted);margin-bottom:2px}
 .bme-table tbody>tr:first-child>td:nth-child(2),.bme-table tbody>tr:first-child>td:nth-child(5){grid-column:1/-1}
 .bme-table tbody>tr:first-child>td:nth-child(1){order:9}.bme-table tbody>tr:first-child>td:nth-child(10){order:10;text-align:right}
 .bme-table td.num,.bme-table td[data-bme-net]{text-align:left;line-height:20px}.bme-table td[data-bme-net]{font-weight:600}.bme-table td small{text-align:left}
 .bme-table tr.bme-detail{display:block}.bme-table tr.bme-detail>td:first-child{display:none}.bme-table tr.bme-detail>td{display:block;padding:12px 8px;margin-top:8px}
 .bme-dgrid{grid-template-columns:minmax(0,1fr)}.bme-split select,.bme-split .combobox{width:100%}.bme-sum{justify-self:stretch;width:100%}
 .bqv-fs .bqv-pay{white-space:normal}.bqv-fs .bqv-pay>*{white-space:normal;overflow:visible}}
/* 2026-10-22: on a phone the pay block's second line grows with what wraps in it (it was fixed at 32px and centred, so the PEAK number form spilled over the line above). */
@media (max-width:700px){.bqv-pay{min-height:0}.bqv-l2{height:auto;min-height:32px;flex-wrap:wrap;row-gap:6px}.bqv-paid-date{flex-wrap:wrap;width:100%}.bqv-paid-date>label{flex:1 1 100%}.bqv-paid-date-edit{flex:1 1 100%;min-width:0}.bqv-paid-date-edit>input{flex:1 1 auto;min-width:0}}
.confirm-dialog [data-confirm-alt][hidden]{display:none}

/* One window head (.dlg-head): the title row. The close button itself is in the "Modal standard" block at the end of this file. */
.dlg-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:16px}.dlg-head h1{margin:0;min-width:0;font-size:var(--modal-head-fs,18px);line-height:var(--modal-head-lh,28px);font-weight:var(--modal-head-fw,600)}.dlg-head p{margin:0}
.dlg-head+.dlg-sub{margin:-12px 0 16px}
/* ข2 merged into เพิ่มรายรับ (owner 2026-10-07): the รับเงินแล้ว option and the fields it reveals. */
.income-received-toggle label.check{display:flex;flex-direction:row;align-items:center;gap:8px}.income-received-fields{display:grid;gap:12px}

/* Owner 2026-10-08: Matrix cell box tidy (one-line round, small remove link, short queue link) */
.mx-cp-round-form{display:flex;align-items:flex-end;gap:6px}.mx-cp-round{flex:1;min-width:0}.mx-cp-round-form .mx-cp-round-save{width:auto;flex:none;padding:0 12px}
.mx-cp-remove>summary.mx-cp-remove-link{list-style:none;cursor:pointer;font-size:12px;color:var(--muted);text-decoration:underline;text-align:center}.mx-cp-remove>summary.mx-cp-remove-link::-webkit-details-marker{display:none}
span.mx-cp-where{flex-basis:auto;margin-left:auto}
.mx-box-body .mx-cp-why{margin:0;font-size:11px;line-height:15px;color:var(--muted)}

/* Telesale (REQ-028; RULES 5.10): the pages are built from the Dashboard's components (.card.padded + .dashboard-card-head, .dashboard-list rows, .grid-2.dashboard-columns, .form-grid, .badge, .button) and keep their spacing. The rules below only add what those lack, on the same scale: space 4 / 8 / 12 / 16 / 24, text 12/16, 14/20, 16/24, 20/28, controls 32 and 36 high. No coloured edge on any box (RULES 5.9). */
.telesale-page>.card,.telesale-page>details.card{margin-bottom:24px}.telesale-page>.tabs{margin:0 0 16px}
.ts-head-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
/* sweep-p5:begin */
/* Telesale lists and SignRequests (design sweep P5; DESIGN-SYSTEM 3.1, 4, 5): one line of strip + dates + totals, the .pov tables, two tables side by side; the .dashboard-* rules above stay for /Telesale (RULES 5.10 model page) */
.ts-sweep>*+*{margin-top:16px}.ts-sweep>.telesale-note,.ts-sweep>.card,.ts-sweep>details.card{margin-bottom:0}
.ts-sweep h2{margin:0 0 8px;font-size:14px;line-height:20px;font-weight:600}.ts-sweep h2 .muted{font-weight:400}
.ts-import-result{margin:0 0 16px;overflow-wrap:anywhere}.ts-import-result p{margin:4px 0}.ts-import-result .button{margin-top:8px}
.ts-sweep .ts-line{margin-bottom:0}.ts-sweep .ts-line>.search{flex:0 1 280px}.ts-sweep .ts-line>.combobox,.ts-sweep .ts-line>select{flex:0 1 240px;width:240px;min-width:0}.ts-sweep .ts-line>.fw-count{margin-left:auto}
.ts-sweep .ts-range-own{margin-left:0}.ts-sweep .ts-range-own input[type=date]{height:36px}
.ts-sweep .ts-two{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}.ts-sweep .ts-two>*+*{margin-top:0}
@media(min-width:900px){.ts-sweep .ts-two{grid-template-columns:repeat(2,minmax(0,1fr))}}
.ts-c-n{width:88px}.ts-c-fig{width:116px}.ts-c-when{width:156px}.ts-c-who{width:136px}.ts-c-range{width:200px}.ts-c-act{width:176px}
.ts-sweep .pov tr.is-on td{background:var(--soft)}.ts-sweep .pov td a{font-weight:600}
main#content .ts-sweep form>.form-actions:last-child,main#content .sign-text-edit form>.form-actions:last-child{position:static;margin:16px 0 0;padding:0;border-top:0;background:none}
.ts-sweep .ts-fold .empty.is-inline{padding:0}
.sign-text-edit>.pov-st{margin:4px 0 0}
/* Audit 2026-11-18 Telesale: settings numbers in one row (TES-47); the from-contacts preview line (TES-11); dates and times never break (TES-36, TES-37, RULES 5.23). */
.ts-grid-nums{grid-template-columns:repeat(4,minmax(0,180px))}@media(max-width:700px){.ts-grid-nums{grid-template-columns:repeat(2,minmax(0,1fr))}}
.ts-preview{margin:12px 0 0}
@media(min-width:701px){.ts-range-own .datepicker{width:160px;flex:0 0 160px}}.ts-range-own .datepicker-trigger span{white-space:nowrap}.telesale-page :is(time,.ts-when,.mono){white-space:nowrap}.telesale-page .dashboard-project .dashboard-stage-value{width:auto;white-space:nowrap}.telesale-page .ts-row-act .dashboard-project-body{min-width:0}.telesale-page .ts-row-act .dashboard-project-body small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* TES-21: on a course the step path is the status control; a step is a press, drawn as the chip it was (no button box). */
.el-step-form{display:contents}.el-steps button.deal-stage-chip{border:0;background:transparent;font:inherit;font-size:12px;line-height:16px;cursor:pointer;margin:0}.el-steps button.deal-stage-chip.passed{color:var(--primary)}.el-steps button.deal-stage-chip:hover{background:var(--soft);color:var(--fg)}
.el-months-title{margin:24px 0 8px;font-size:14px;line-height:20px;font-weight:600}
/* TES-45: profile on a phone. The security boxes use the full width, an upload button keeps its icon on its line, a gap above the text size, and the text size lives in the phone header only. */
.profile-page .profile-security{justify-items:stretch}.profile-page label.button{display:inline-flex;align-items:center;gap:8px;flex-direction:row}.profile-theme .profile-text-size-field{margin-top:12px}@media(max-width:767px){.profile-theme .profile-text-size-field{display:none}.profile-theme .field{max-width:none}}
/* TES-31: the result buttons show their key (1-6, N) in a small corner digit on a wide screen; no words explain it. */
@media(min-width:1024px){.ts-focus button.ts-pick[data-key]{position:relative}.ts-focus button.ts-pick[data-key]::after{content:attr(data-key);position:absolute;top:3px;right:6px;font-size:10px;line-height:12px;color:var(--muted);text-transform:uppercase}}
/* Owner 2026-11-16 phone-table rule, one rule for every table that names its phone columns (.pov-phone, TES-15/17): the table and its header row stay; the other columns (.ph-x) leave; a cell stays one line with … (RULES 5.23). */
@media(max-width:700px){main#content table.pov-phone{display:table;table-layout:fixed;width:100%}main#content table.pov-phone thead{display:table-header-group}main#content table.pov-phone tbody{display:table-row-group}main#content table.pov-phone tr{display:table-row;padding:0}main#content table.pov-phone :is(td,th){display:table-cell;height:36px;padding:0 6px;border-bottom:1px solid var(--border);vertical-align:middle}main#content table.pov-phone :is(td,th):first-child{padding-left:0}main#content table.pov-phone :is(td,th):last-child{padding-right:0}main#content table.pov-phone td[data-l]::before{display:none}main#content table.pov-phone .ph-x{display:none}main#content table.pov-phone :is(tr.ig-detail,tr.ig-new,tr.pov-sum) td{white-space:normal;height:auto;overflow:visible}main#content table.pov-phone tr.ig-detail td{padding:8px 0}main#content #elearning-day table.pov-phone col.ig-c-num{width:76px}main#content #elearning-day table.pov-phone col.ig-c-x{width:36px}main#content #elearning-day table.pov-phone col.pov-c-status{width:96px}main#content #elearning-day table.pov-phone col.ig-c-to{width:auto}main#content table.pov-phone col.ph-x{width:0!important}main#content #elearning-day table.pov-phone{table-layout:auto}main#content #elearning-day table.pov-phone :is(th,td):first-child{width:100%;max-width:0}main#content #elearning-day table.pov-phone tbody tr:not(.ig-detail):not(.ig-new) td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}main#content table.pov-phone :is(td,th){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}main#content table.pov-phone td.num,main#content table.pov-phone th.num{text-align:right}main#content table.pov-phone col.ts-c-n{width:60px}main#content table.pov-phone col:is(.ts-c-when,.ts-c-range){width:104px}main#content table.pov-phone col.pov-c-date{width:96px}main#content table.pov-phone col.pov-c-money{width:104px}main#content table.pov-phone col.ts-c-act{width:128px}}
/* A .pov-phone header with a short phone label (SH-20): the long one on a desktop, the short one under 700px. */
main#content table.pov-phone th .ph-m{display:none}@media(max-width:700px){main#content table.pov-phone th .ph-d{display:none}main#content table.pov-phone th .ph-m{display:inline}}
@media(max-width:700px){.ts-sweep .pov-stack td{white-space:normal;overflow-wrap:anywhere}.ts-sweep .pov-stack td.num{text-align:right}.ts-sweep .pov-stack td.num::before{text-align:left}}
@media(max-width:899px){.ts-sweep .ts-line{align-items:stretch}.ts-sweep .ts-line>.search,.ts-sweep .ts-line>.combobox,.ts-sweep .ts-line>select{flex:1 1 100%;width:auto}.ts-sweep .ts-range-own{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px}.ts-sweep .ts-line>.fw-count{margin-left:0}}
/* sweep-p5:end */
.telesale-note{display:flex;align-items:center;gap:8px;margin:0 0 16px;padding:8px 12px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--soft);font-size:14px;line-height:20px}.telesale-note .icon{width:16px;height:16px;flex-shrink:0}.telesale-note>span{flex:1;min-width:0}

.ts-fine{margin:12px 0 0;font-size:12px;line-height:16px}.ts-gap{margin-top:16px}.ts-inline{display:contents}
.ts-name{margin:4px 0 0;font-size:20px;line-height:28px;font-weight:700;overflow-wrap:anywhere}.ts-person{margin:4px 0 0;font-size:14px;line-height:20px}
.telesale-page.ts-focus a.button.ts-dial,.telesale-page.ts-focus button.button.ts-dial{display:flex;width:100%;height:48px;min-height:48px;margin-top:16px;padding:0 16px;justify-content:center;gap:8px;font-size:16px;line-height:24px;font-weight:600;font-variant-numeric:tabular-nums}.ts-focus .button.ts-dial .icon{width:20px;height:20px}
.ts-foot-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;padding-top:16px;border-top:1px solid var(--border)}
/* The result card: one vertical rhythm (16 between fields, 6 label to control as .field), six buttons that are identical in every measure (40 high, 12 side padding, 14/20 medium, the system border, radius and shadow); the goal differs by fill only, the open one by border colour only. */
.ts-result{display:grid;gap:16px}.ts-result .field,.ts-past{margin:0}.ts-past{margin-top:16px}
.ts-picks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.telesale-page.ts-focus .ts-picks button.button.ts-pick{width:100%;height:40px;min-height:40px;padding:0 12px;justify-content:center;font-size:14px;line-height:20px;font-weight:500;border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-sm);background:var(--tb-ffffff,#fff);color:var(--fg)}
.telesale-page.ts-focus .ts-picks button.button.ts-pick-goal{background:var(--tb-dcfce7,#dcfce7);color:var(--tf-166534,#166534)}
.telesale-page.ts-focus .ts-picks button.button.ts-pick.is-open{border-color:var(--fg)}
.ts-more{display:grid;gap:16px}.ts-more .ts-fine{margin:-8px 0 0}.ts-more-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.ts-copy{display:none;align-items:center;gap:8px;margin:8px 0 0}.ts-copy .ts-fine{margin:0}@media(hover:hover) and (pointer:fine) and (min-width:640px){.ts-copy{display:flex}}.ts-goal{margin:0 0 16px}.telesale-note.ts-undo{justify-content:space-between}.telesale-note.ts-undo span{min-width:0}.telesale-page #ts-overdue{margin-bottom:24px}.ts-due{margin:0 0 8px}.telesale-page.ts-focus .card>.ts-name:first-child{margin-top:0}.ts-goal p{margin:8px 0 0;font-size:14px;line-height:20px}.telesale-page.ts-narrow>.card+.card{margin-top:16px}.ts-month{margin:16px 0 0}.ts-bar{height:8px;border-radius:var(--radius-pill);background:var(--soft);overflow:hidden}.ts-bar>span{display:block;height:100%;border-radius:var(--radius-pill);background:var(--success,var(--tb-16a34a,#16a34a))}.telesale-page .ts-board{list-style:none;margin:0;padding:0}.telesale-page .ts-place{flex:0 0 24px;width:24px;height:24px;border-radius:var(--radius-pill);background:var(--soft);display:inline-flex;align-items:center;justify-content:center;font-size:12px;line-height:16px;font-weight:600}.ts-more-row.ts-when{grid-template-columns:minmax(0,1fr) 112px auto}.telesale-page>.ts-foot-row{border-top:0;padding-top:0}.ts-more-row input{width:100%}

.ts-go{display:inline-flex;flex-shrink:0;color:var(--muted)}.ts-go .icon{width:16px;height:16px}
[x-cloak]{display:none!important}



.ts-fold>summary{display:flex;align-items:center;gap:12px;list-style:none;margin:0}.ts-fold>summary::-webkit-details-marker{display:none}
.ts-fold>summary>span:first-child{flex:1;min-width:0;display:grid}.ts-fold>summary strong{font-size:14px;line-height:20px;font-weight:600}.ts-fold>summary small{font-size:12px;line-height:16px;font-weight:400;color:var(--muted)}

.ts-fold>summary{cursor:pointer}.ts-fold>summary::after{content:"";width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);margin:0 8px 4px 4px;flex-shrink:0}.ts-fold[open]>summary::after{transform:rotate(-135deg);margin-bottom:-4px}.ts-fold[open]>summary{margin-bottom:16px}
.ts-chips{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start}
.telesale-page .ts-chips .button.small{height:32px;min-height:32px}

.ts-blank{display:grid;justify-items:center;gap:8px;padding:48px 24px;text-align:center}.ts-blank h2{margin:8px 0 0;font-size:16px;line-height:24px}.ts-blank p{margin:0;font-size:14px;line-height:20px}.ts-blank form{width:100%;max-width:360px}
.ts-narrow{max-width:720px}
.ts-range-own{display:inline-flex;align-items:center;gap:8px;margin-left:auto}
.telesale-page .dashboard-project-body small,.telesale-page .dashboard-project-body strong{white-space:normal;overflow:visible;text-overflow:clip}.telesale-page .dashboard-project{align-items:flex-start}.telesale-page .dashboard-project>.badge,.telesale-page .dashboard-project>.dashboard-stage-value{margin-top:2px;flex-shrink:0}
.dashboard-project.ts-on{background:var(--soft)}.telesale-page .ts-on .ts-place{background:var(--card,var(--tb-ffffff,#fff))}
.telesale-page textarea.ts-paste{width:100%;height:auto;min-height:176px;padding:8px 12px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.5}.telesale-page .form-grid input,.telesale-page .form-grid select{width:100%}.ts-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
/* The full lists (/TelesaleNames) and the strip on the Deal page. */
.deal-finance-trace.telesale-strip{margin-top:-8px}.telesale-strip-form{display:inline-flex;flex-wrap:wrap;gap:8px;align-items:center;margin-left:auto}.telesale-strip-move{display:inline-flex;flex-wrap:wrap;gap:8px;align-items:center}.telesale-strip-move>.datepicker{width:168px}.telesale-strip-move>.combobox{width:104px}.telesale-strip-move :is(.datepicker-trigger,.combobox-trigger,input,select){height:32px;min-height:32px}

@media(min-width:900px){.telesale-page .grid-2.dashboard-columns{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}}
@media(max-width:899px){.ts-grid-3{grid-template-columns:minmax(0,1fr)}.ts-range-own{margin-left:0;width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px}.ts-range-own input{width:100%;min-width:0}.ts-range-own .button{grid-column:1/-1}}
@media(max-width:639px){.ts-more-row{grid-template-columns:minmax(0,1fr)}.ts-more-row.ts-when{grid-template-columns:minmax(0,1fr) 112px}.ts-more-row.ts-when>.button{grid-column:1/-1}body:has(.ts-focus) .alert.is-toast{bottom:auto;top:72px}.telesale-page .ts-head-actions{flex-direction:column;align-items:stretch}.telesale-page .ts-head-actions .button.primary{order:-1}.telesale-page .ts-head-actions .button{width:100%;justify-content:center}.telesale-page .ts-head-actions .button.primary{height:48px;min-height:48px;font-size:16px;line-height:24px}.telesale-page.ts-focus .ts-picks button.button.ts-pick{height:44px;min-height:44px}.telesale-page .ts-board .dashboard-project:not(.ts-row-act){grid-template-columns:24px minmax(0,1fr) auto}.telesale-page .ts-board .dashboard-project:not(.ts-row-act)>*{grid-column:auto}.telesale-page .ts-chips .button.small{height:36px;min-height:36px}.telesale-page .dashboard-project:not(.ts-row-act){display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;row-gap:4px;align-items:center}.telesale-page .dashboard-project:not(.ts-row-act)>*{grid-column:1;justify-self:start}.telesale-page .dashboard-project:not(.ts-row-act)>.ts-go{grid-column:2;grid-row:1/span 4;justify-self:end}.telesale-page .dashboard-project.ts-row-act>.badge{display:none}.telesale-page .dashboard-project>.badge,.telesale-page .dashboard-project>.dashboard-stage-value{margin:0;text-align:left;min-width:0;white-space:nowrap}.ts-head-actions{justify-content:flex-start;width:100%}.telesale-page .table-wrap{overflow-x:auto}}

/* Journey tab of a Transformation Journey Project (app/View/project-journey-form.php): the phases with their days and work items. The current phase is the tinted box; a late item and an item without an owner use the readiness card's amber text (.project-checklist-due.late). No edge stripe (RULES 5.9). */
.journey-form .journey-phase.current{background:var(--soft)}
/* sweep-p12b:begin */
.journey-table .jny-c-date{width:200px}.journey-table .jny-c-info{width:32%}.journey-table .jny-c-task{width:168px}
.journey-form .journey-phase{padding:0;border:0;border-radius:0}
.journey-table tr.pov-day td{height:32px}
.journey-table .journey-phase-note td{height:auto;padding:4px 8px;white-space:normal;overflow:visible}
.journey-table .journey-phase-note p{margin:0}.journey-table .journey-phase-pass{margin-top:0}
.journey-table .journey-add-row a{font-size:12px;line-height:16px;color:var(--muted)}.journey-table .journey-add-row .icon{width:12px;height:12px;margin-right:4px;vertical-align:-1px}
.journey-table .journey-phase-no{margin-right:8px;vertical-align:middle}.journey-table .journey-phase-now{font-weight:400}
.journey-form small.journey-phase-counts,.journey-form small.journey-phase-sale{display:inline;font-size:12px;line-height:16px}.journey-form small.journey-phase-counts a{text-decoration:underline}
.journey-form small.journey-phase-sale.is-open{color:var(--tf-d97706,#d97706);font-weight:500}
.journey-form .journey-outside,.journey-billing{margin-top:16px}.journey-form .row-between,.journey-billing h2{margin-bottom:8px}
.project-cost-table .pcc-c-who{width:24%}.project-cost-table .pcc-c-due{width:20%}.project-cost-table small,.project-cost-table .matrix-item{display:inline}
.project-phase-table .jny-c-date{width:200px}
/* sweep-p12b:end */
.journey-phase-no{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:var(--radius-full);background:var(--soft);color:var(--muted);font-size:12px;line-height:16px;font-weight:600;flex-shrink:0}
.journey-phase.current .journey-phase-no{background:var(--primary);color:var(--on-primary,#fafafa)}
.journey-phase-pass{margin-top:8px}

.journey-task-list{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.journey-task{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;padding:4px 0;font-size:12px;line-height:16px;min-width:0}
.journey-task-tick{display:contents}
.journey-task-title{flex:1 1 140px;min-width:0;overflow-wrap:anywhere}
.journey-task.done .journey-task-title{color:var(--muted);text-decoration:line-through}
.journey-task-owner,.journey-task-due{color:var(--muted);white-space:nowrap}
.journey-task-flag{color:var(--tf-d97706,#d97706);font-weight:500;white-space:nowrap}
.journey-task-edit>summary,.journey-task-add>summary{list-style:none;cursor:pointer}
.journey-task-edit>summary::-webkit-details-marker,.journey-task-add>summary::-webkit-details-marker{display:none}
.journey-task-edit>summary.button{height:24px;min-height:24px;padding:0 8px}
.journey-task-edit[open]{flex:1 0 100%}
.journey-task-add{margin-top:8px}
.journey-task-add>summary{display:inline-flex;align-items:center;gap:6px;border:1px dashed var(--border);border-radius:6px;padding:6px 9px;color:var(--muted);font-size:12px;line-height:16px}
.journey-task-form{display:grid;gap:8px;margin-top:8px;border:1px solid var(--border);border-radius:6px;padding:10px}
.journey-task-fields{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr);gap:8px}
.journey-task-edit .journey-task-fields{grid-template-columns:repeat(3,minmax(0,1fr))}
.journey-task-fields .field{min-width:0}
.journey-task-fields input,.journey-task-fields select{width:100%;min-width:0;max-width:100%}
@media(max-width:767px){.journey-task-fields,.journey-task-edit .journey-task-fields{grid-template-columns:minmax(0,1fr)}}

/* Journey tab, section ขอบเขตเพิ่ม (app/View/project-scope-additions.php): the work-item list's rows (.journey-task*) for what the client asked beyond the quotation; รอตัดสิน is the readiness card's amber text (.journey-task-flag). The learner line of a phase header is a second quiet line under its dates. No edge stripe (RULES 5.9). */
.journey-scope{margin-top:16px}
.journey-scope h2 small{font-size:12px;line-height:16px;margin-left:6px}
.journey-scope .journey-tasks{margin-top:8px}
.journey-scope .journey-task-title small{margin-left:6px;white-space:normal}
.journey-scope .journey-task .badge{flex-shrink:0}
.journey-scope-note{grid-column:1/-1}
.journey-phase-counts a{color:inherit;text-decoration:underline}

/* The card งานย่อย on ภาพรวม (app/View/project-task-card.php): the Journey tab's work-item list (.journey-task*, one implementation in project-task-list.php) inside an overview card; and the quiet "เพิ่มงานตั้งต้นตามรูปแบบงาน" action. */
.project-task-card>.row-between{align-items:flex-start;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.project-task-card>.row-between h2{margin:0}
.project-task-card h2 small{font-weight:400;color:var(--muted);font-size:12px;line-height:16px}
/* A settings list that turns into stacked rows on a phone (table.table-stack; each cell names its column in data-label): งานตั้งต้นของโปรเจค, เช็คลิสต์โปรเจค and a Contact's ค่า default เมื่อไปหน้างาน. No sideways scroll at 390. */
@media(max-width:767px){
.table-wrap>table.table-stack{min-width:0;width:100%}
.table-stack thead{display:none}
.table-stack,.table-stack tbody,.table-stack tr,.table-stack td{display:block}
main#content .table-stack tr{padding:10px 12px;border-bottom:1px solid var(--border);height:auto}
main#content .table-stack tr:last-child{border-bottom:0}
main#content .table-stack td{padding:2px 0;border:0;height:auto;text-align:left;white-space:normal;font-size:12px;line-height:16px}
main#content .table-stack td[data-label]{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.table-stack td[data-label]::before{content:attr(data-label);color:var(--muted);flex:0 0 auto}
main#content .table-stack td[data-label]>:is(input,select,textarea,.combobox,.datepicker){flex:0 1 60%;min-width:0}
main#content .table-stack td[data-label]:empty{display:none}
}

.fw-paid-date{display:inline-flex;align-items:center;gap:8px}.fw-paid-date label{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:inherit}.fw-paid-date input[type=date]{height:36px;padding:0 8px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg);color:var(--fg);font-size:14px}
/* ส่ง PEAK in the bulk bar (owner 2026-10-22 S25 S26): the document date (only while a ticked Bill has none) and the way to send a many-line Bill sit before the button;
   a reason a Bill could not be sent stands in that Bill's own PEAK cell on one line (the full text in its tip), never over the table (RULES 5.22). */
.fw-peak-opts{gap:6px}.fw-peak-opts [hidden]{display:none}.fw-peak-opts select{height:32px;max-width:200px;padding:0 6px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg);color:var(--fg);font-size:13px}
.fw-bulk .fw-peak-opts input[type=date]{height:32px;font-size:13px}
.payment-peak-mark{display:block;max-width:170px;margin:1px auto 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:13px;color:var(--tf-dc2626,#dc2626)}
.payment-peak-line{display:block;max-width:150px;margin:0 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:16px}

/* Bill modal, payment block: one line per transfer with its day and, for Accounting and executives, its save. */
.bqv-paid-date{display:flex;align-items:center;gap:8px;min-height:36px;margin:0}.bqv-paid-date-edit{display:inline-flex;align-items:center;gap:8px}.bqv-paid-date .button{white-space:nowrap;flex:none}
.bqv-paid-date input[type=date],.bqv-paid-date input:not([type]){height:32px;padding:0 8px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg);color:var(--fg);font-size:13px}

/* Project pop-up on a Project code (/Expenses approvals, /CashFlow detail): app/View/cashflow-project-popup.php.
   Grid (owner 2026-10-12, "OCD"): one 24px frame. Every text starts on the frame's left edge and every amount ends on its right
   edge: the totals box and the table are set 16px wider than the frame on each side and pad their content 16px back, so their
   shade and rules bleed evenly while the words stay in one column. Vertical steps are 8 / 16 / 24 only; every line is 24px high,
   so a day row is 40px (8 + 24 + 8) and never grows (a long place ends in …, its full name is the cell's title); the Bill's own
   line is 40px too (4 + 24 + 12: 12px of air above its words and 12px below), inside the same tint: the day's total
   stays the last word of its row and the Bill reads as a part of it. */
.cashflow-project-popup{width:min(var(--modal-w-xl),calc(100vw - 32px))}
.cashflow-project-popup .modal-inner{display:flex;flex-direction:column}
.cashflow-project-popup-name{display:flex;align-items:baseline;gap:0 16px;flex-wrap:wrap;font-size:14px;line-height:24px}.cashflow-project-popup-name small{color:var(--muted);font-size:13px;line-height:24px}
.cashflow-project-popup-totals{display:flex;flex-direction:column;gap:0;margin:16px -16px 0;padding:8px 16px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--soft)}
.cashflow-project-popup-totals>div{display:flex;align-items:baseline;justify-content:space-between;gap:16px}.cashflow-project-popup-totals dt{color:var(--muted);font-size:13px;line-height:24px}.cashflow-project-popup-totals dd{margin:0;font-size:14px;line-height:24px;font-weight:600;font-variant-numeric:tabular-nums}
.cashflow-project-popup-days-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin:24px 0 0}.cashflow-project-popup-days-head strong{font-size:14px;line-height:24px;font-weight:600}.cashflow-project-popup-days-head span{color:var(--muted);font-size:13px;line-height:24px}.cashflow-project-days-wrap{margin-top:8px}.cashflow-project-days-table th:first-child,.cashflow-project-days-table td:first-child{width:48px;color:var(--muted)}.cashflow-project-days-table th:nth-child(2){width:128px}.cashflow-project-days-table th:nth-child(3){width:120px}.cashflow-project-days-table th:nth-child(5){width:144px}.cashflow-project-days-table th:nth-child(6){width:216px}.cashflow-project-days-table.no-income th:nth-child(5){width:216px}.cashflow-project-days-table td small{color:var(--muted);font-size:12px;font-weight:400}.cashflow-project-days-table tbody.is-focus>tr>td{background:var(--mx-amber-bg)}@media(max-width:700px){.cashflow-project-days-table td[data-l]::before{content:attr(data-l);display:inline-block;width:96px;color:var(--muted);font-weight:400}}





.cashflow-project-missing{color:var(--muted)}



/* The same day table on the Project page's ภาพรวม tab (app/View/project-day-table.php, owner 2026-10-14): a full-width card under the facts, 16px inside so the table bleeds to its edges as in the pop-up. */
.project-detail-panel .project-day-card.card.padded{margin-top:16px;padding:16px}.project-day-card .cashflow-project-popup-days-head{margin:0}
.cashflow-project-popup footer{display:flex;justify-content:flex-end;margin-top:24px}.cashflow-project-popup footer .button{display:inline-flex;align-items:center;gap:8px}
@media(max-width:719px){.cashflow-project-popup-totals{margin:16px 0 0}}
/* One checkbox (owner 2026-10-12, the worklist and pay-queue ticks take the approval cards' checkbox; audit 2026-10-17: every
   checkbox): 16px, radius 2px, 1px primary border; ticked = primary with a white check; part of a group = a dash. A switch
   (role=switch), a visually hidden box (.sr-only) and the locked approval cards (.ab-tab, their own copy) are left alone.
   Disabled dims with filter, so a box a component hides with opacity:0 stays hidden. */
input[type=checkbox]:not([role=switch]):not(.sr-only):not(.ab-tab *){appearance:none;-webkit-appearance:none;width:16px;height:16px;min-height:16px;margin:0;padding:0;border:1px solid var(--tl-171717,#171717);border-radius:2px;box-shadow:var(--shadow);background:var(--tb-ffffff,#fff) center/14px no-repeat;cursor:pointer;flex:0 0 16px;vertical-align:middle}
input[type=checkbox]:not([role=switch]):not(.sr-only):not(.ab-tab *)::after{display:none}
input[type=checkbox]:not([role=switch]):not(.sr-only):not(.ab-tab *):checked{background-color:var(--tb-171717,#171717);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fafafa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")}
input[type=checkbox]:not([role=switch]):not(.sr-only):not(.ab-tab *):indeterminate{background-color:var(--tb-171717,#171717);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fafafa' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E")}
input[type=checkbox]:not([role=switch]):not(.sr-only):not(.ab-tab *):focus-visible{outline:none;box-shadow:0 0 0 1px #0a0a0a}
input[type=checkbox]:not([role=switch]):not(.sr-only):not(.ab-tab *):disabled{filter:opacity(.4);cursor:default}

/* /ProjectOverview (app/View/project-overview.php; owner 2026-10-12, docs/ui/mockups/exec-project-overview-v12.html): the table of every Project, then one grey frame per Project with its รายรับ and รายจ่าย cards. Tints on a whole head only (income green, cost pink), a day row in --soft; no edge stripe (RULES 5.9). Every head is a fixed grid and every text one line with an ellipsis: nothing wraps. 13px/18px rows as the finance worklist (.fw-table), 12px/16px labels. */
.pov{font-size:13px;line-height:18px;container-type:inline-size}
.pov table,.pp-weeks{width:100%;border-collapse:collapse;table-layout:fixed}
.pov th,.pov td,.pp-weeks th,.pp-weeks td{height:28px;padding:0 8px;border-bottom:1px solid var(--border);text-align:left;font-size:13px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:transparent}
.pov th,.pp-weeks th{font-size:12px;line-height:16px;font-weight:500;color:var(--muted)}.pov tbody tr:last-child td,.pp-weeks tbody tr:last-child td{border-bottom:0}
@media(min-width:701px){main#content .pov th,main#content .pov td{padding:4px 8px}}main#content .pp-weeks th,main#content .pp-weeks td{padding:4px 8px}
.pov td.num,.pov th.num,.pp-weeks td.num,.pp-weeks th.num{text-align:right}
.pov .pov-neg,.pov-net b.pov-neg,.pp .pov-neg{color:var(--tf-dc2626,#dc2626)}
/* Seen on live 2026-10-13 in a narrow window: the table of every Project scrolled sideways and the name and the result left the screen. The first and the last column stay in place. */
@media (min-width:701px){.pov-all th:first-child,.pov-all td:first-child{position:sticky;left:0;z-index:1;background:var(--bg)}.pov-all th:last-child,.pov-all td:last-child{position:sticky;right:0;z-index:1;background:var(--bg)}}
.deal-projects-table .deal-pj-code{width:120px}.deal-projects-table .deal-pj-type{width:160px}.deal-projects-table .deal-pj-state{width:140px}@media(max-width:639px){.deal-projects-table .deal-pj-type,.deal-projects-table td:nth-child(3),.deal-projects-table th:nth-child(3){display:none}}.pov-all-wrap{overflow:auto}.pov-all{min-width:980px}.pov-c-money{width:116px}.pov-c-net{width:136px}
.pov-all th.pov-g{text-align:center;color:var(--fg);font-weight:600}.pov-all .pov-sep{border-left:1px solid var(--border)}
.pov-all th.pov-g.is-inc,.pov-card.is-inc .pov-ch{background:var(--tb-dcfce7,#dcfce7)}.pov-all th.pov-g.is-exp,.pov-card.is-exp .pov-ch{background:var(--tb-fce7f3,#fce7f3)}
.pov-all td a{font-weight:600}.pov-all tbody tr:hover td{background:var(--soft)}
.pov-tools{display:flex;gap:8px;align-items:center;margin-top:16px}.pov-tools-gap{flex:1}.pov-tools .button{min-height:32px;height:32px;padding:0 12px;font-size:12px;line-height:16px;white-space:nowrap}
.pov-pj{margin-top:16px;scroll-margin-top:8px;border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden}
.pov-ph{display:grid;grid-template-columns:16px auto minmax(0,1fr) auto;gap:0 12px;align-items:center;width:100%;min-height:40px;padding:8px 12px;border:0;border-radius:0;background:var(--soft);color:var(--fg);font:inherit;text-align:left;white-space:nowrap;cursor:pointer}
.pov-pj:not(.is-shut) .pov-ph{border-bottom:1px solid var(--border)}.pov-ph:focus-visible{outline:2px solid var(--fg);outline-offset:-2px}
.pov-cv{display:inline-flex;transition:transform .15s}.pov-cv .icon{width:16px;height:16px}.pov-pj.is-shut .pov-cv{transform:rotate(-90deg)}
.pov-nm{font-size:14px;line-height:20px;font-weight:600}.pov-nm,.pov-meta{min-width:0;overflow:hidden;text-overflow:ellipsis}.pov-nm{max-width:48vw}
.pov-net{color:var(--muted)}.pov-net b{color:var(--fg);font-weight:600;font-variant-numeric:tabular-nums}
.pov-two{display:grid;grid-template-columns:5fr 7fr;gap:8px;align-items:start;padding:8px}.pov-pj.is-shut .pov-two{display:none}
.pov-card{overflow:hidden;box-shadow:none;min-width:0}
.pov-ch{display:grid;grid-template-columns:56px repeat(3,minmax(0,1fr)) 124px;gap:0 12px;align-items:center;min-height:44px;padding:4px 8px;border-bottom:1px solid var(--border);color:var(--muted);white-space:nowrap}
.pov-ch>span{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:16px}.pov-ch>span b{display:block;overflow:hidden;text-overflow:ellipsis;font-size:13px;line-height:18px;font-weight:600;color:var(--fg);font-variant-numeric:tabular-nums}
.pov-ch>.pov-t{font-size:14px;line-height:20px;font-weight:600;color:var(--fg)}
.pov-ch .pov-add{min-height:28px;height:28px;padding:0 8px;gap:4px;font-size:12px;line-height:16px;white-space:nowrap;overflow:hidden;box-shadow:none;background:var(--bg);color:var(--fg)}.pov-ch .pov-add .icon{width:14px;height:14px;flex:none}
.pov-c-amount{width:112px}.pov-c-status{width:152px}.pov-c-date{width:156px}
.pov-lines tr.pov-day td,.pp-weeks tr.pov-day td{background:var(--soft);font-weight:600}.pov-lines tr.pov-day .muted,.pov-pin{font-weight:400;color:var(--muted)}.pov-pin .icon{display:inline-block;width:12px;height:12px;vertical-align:middle;position:relative;top:-1px;margin:0 2px 0 0}
tr[data-row-href]{cursor:pointer}tr[data-row-href]:hover td{background:var(--soft)}
.pov-elbow{display:inline-block;width:8px;height:8px;border-left:1px solid var(--border);border-bottom:1px solid var(--border);border-bottom-left-radius:3px;margin:0 8px 3px 4px;vertical-align:middle}
.pov-st{display:flex;align-items:center;min-width:0}.pov-st>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.pov-dot{flex:none;width:8px;height:8px;border-radius:50%;border:1px solid var(--fg);margin-right:6px}.pov-dot.is-on{background:var(--fg)}.pov-dot:is(.is-warn,.is-danger,.is-yellow,.is-blue,.is-purple,.is-red,.is-indigo,.is-green,.is-orange,.is-pink,.is-sky,.is-gray){border-color:transparent}.pov-dot:is(.is-warn,.is-yellow){background:var(--tb-d97706,#d97706)}.pov-dot:is(.is-danger,.is-red){background:var(--tb-dc2626,#dc2626)}.pov-dot.is-blue{background:var(--tb-2563eb,#2563eb)}.pov-dot.is-purple{background:var(--tb-7c3aed,#7c3aed)}.pov-dot.is-indigo{background:var(--tb-6366f1,#6366f1)}.pov-dot.is-green{background:var(--tb-16a34a,#16a34a)}.pov-dot.is-orange{background:var(--tb-f97316,#f97316)}.pov-dot.is-pink{background:var(--tb-ec4899,#ec4899)}.pov-dot.is-sky{background:var(--tb-06b6d4,#06b6d4)}.pov-dot.is-gray{background:var(--tb-9ca3af,#9ca3af)}
.pov-none{margin:0;padding:12px 8px;color:var(--muted);font-size:12px;line-height:16px}
@container (max-width:1320px){.pov-two{grid-template-columns:minmax(0,1fr)}}
@media(max-width:700px){
 .pov thead{display:none}.pov table,.pov tbody{display:block}.pov-all{min-width:0}
 .pov tr{display:grid;gap:2px 8px;padding:6px 8px;border-bottom:1px solid var(--border)}.pov tbody tr:last-child{border-bottom:0}
 .pov td{display:block;height:auto;min-width:0;padding:0;border:0}
 .pov-all tr{grid-template-columns:repeat(3,minmax(0,1fr))}.pov-all td:first-child,.pov-all td:last-child{grid-column:1/-1}.pov-all td.num{text-align:left}.pov-all .pov-sep{border:0}
 .pov-all td[data-l]::before,.pp .pov td[data-l]::before{content:attr(data-l);display:block;font-size:11px;line-height:14px;font-weight:400;color:var(--muted)}.pov-all td:last-child::before{display:inline;margin-right:8px}
 .pov-inc tr{grid-template-columns:minmax(0,1fr) auto}.pov-inc td:nth-child(3){grid-column:1}.pov-inc td:nth-child(4){text-align:right;color:var(--muted)}
 .pov-exp tr{grid-template-columns:minmax(0,1fr) auto}.pov-exp td:nth-child(1){grid-area:1/1;font-weight:500}.pov-exp td:nth-child(4){grid-area:1/2}.pov-exp td:nth-child(2){grid-area:2/1}.pov-exp td:nth-child(6){grid-area:2/2;text-align:right;color:var(--muted)}.pov-exp td:nth-child(3){grid-area:3/1;color:var(--muted)}.pov-exp td:nth-child(5){grid-area:3/2;min-width:150px}
 .pov-exp tr.pov-day{background:var(--soft)}.pov-exp tr.pov-day td{grid-area:auto;background:none;color:inherit}.pov-exp tr.pov-day td:nth-child(3){display:none}
 .pov-ch{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px 8px}.pov-ch>.pov-t{grid-column:1/3}.pov-ch>.pov-add,.pov-ch>span:last-child:empty{grid-column:3;grid-row:1;justify-self:end}
 .pov-ph{grid-template-columns:16px minmax(0,1fr) auto}.pov-nm{max-width:none}.pov-ph .pov-meta{grid-column:2/-1;grid-row:2}
 .pov-tools{flex-wrap:nowrap}.pov-tools .button{padding:0 8px;min-width:0;overflow:hidden;text-overflow:ellipsis}
}

/* The one table with its groups as tbodies (owner 2026-10-18 item 6: /ContactDuplicates, /PersonReport): a line after each group,
   the total row of any .pov table, a second tree level, the actions cell of a row (28px buttons, 8px apart, a 32px row), the person
   row that opens its months, the phone stack of a .pov-lines table (.pov-stack: each cell under its column name), and a wide table
   that scrolls sideways inside its card with its first column kept. */
.pov table>tbody:not(:last-child)>tr:last-child>td{border-bottom:1px solid var(--border)}
.pov tr.pov-sum td,.pp-weeks tr.pov-sum td{font-weight:600;border-top:1px solid var(--fg)}.pov tbody tr.pov-sum:hover td,.pp-weeks tbody tr.pov-sum:hover td{background:transparent}
.pov tr.pov-l2 td:first-child .pov-elbow{margin-left:22px}
.pov :is(td,th).pov-act{text-align:right;text-overflow:clip}.pov td.pov-act>*{display:inline-flex;vertical-align:middle}.pov td.pov-act>*+*{margin-left:8px}.pov td.pov-act form{margin-top:0;margin-bottom:0}
.pov td.pov-act .button.small{min-height:28px;height:28px;padding:0 8px}
@media(min-width:701px){main#content .pov td.pov-act{height:32px;padding-top:2px;padding-bottom:2px}}
.prp-c-n{width:96px}
/* /FeedforwardOverview (owner 2026-11-18): the one table of /PersonReport; a group opens its rows (one person on one day) under it. */
.ffo-c-sent{width:72px}.ffo-c-n{width:80px}.ffo-c-ans{width:96px}.ffo-c-score{width:88px}.ffo-c-text{width:120px}.ffo-table{min-width:1100px}.ffo-c-date{width:168px}.ffo-c-level{width:112px}.ffo-c-who{width:128px}.ffo-c-review{width:480px}.ffo .ffo-sub{display:block;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ffo td.ffo-body{white-space:normal}.ffo td.ffo-review{white-space:normal;text-overflow:clip;overflow:visible}.ffo-act{display:inline-flex;flex-wrap:wrap;gap:6px;align-items:center;margin:0 6px 0 0;vertical-align:middle}.ffo-task>.combobox,.ffo-task>select{width:144px}.ffo-task>.datepicker,.ffo-task>input[type=date]{width:144px}.ffo td.ffo-review>.ffo-act{margin:0 4px 0 0}.hb-issue-form{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.hb-issue-form input[type=text]{flex:1 1 100%;min-width:0}.hb-issue-row{display:flex;align-items:center;gap:8px;width:100%}.hb-issue-row>.button{margin-left:auto}.hb-issue-form .hub-chips{margin:0;display:flex;flex-direction:row;flex-wrap:nowrap;gap:8px}.hb-issue-form .hub-chip{min-height:36px;padding:6px 14px}.hb-issue-form .hub-chip input{position:absolute;opacity:0;width:1px;height:1px}.hb-issue-form .hub-chip:has(input:checked){background:var(--soft);border-color:var(--fg);color:var(--fg)}
.ffo-group .pov-cv{display:inline-flex;vertical-align:middle;margin:0 4px 2px 0;color:var(--muted)}.ffo-group:not(.is-open) .pov-cv{transform:rotate(-90deg)}
.ffo tr.ffo-group td:first-child a{font-weight:600}.ffo tr.ffo-group td:first-child>.muted{white-space:nowrap}.ffo-acts{display:inline-flex;flex-wrap:wrap;gap:6px;align-items:center}.ffo-acts>.ffo-act{margin:0}.ffo-urgent{display:none;margin:0 6px 0 0}@media(max-width:700px){.ffo .ffo-urgent{display:inline-block}}.ffo tr.ffo-group.is-open td{background:var(--soft)}.ffo td.ffo-text{color:var(--muted)}
.fw-bar.ffo-bar>.combobox{flex:0 0 200px;width:200px;min-width:0}.fw-bar.ffo-bar>.datepicker{flex:0 0 168px;width:168px;min-width:0}
@media(max-width:767px){.fw-bar.ffo-bar>.combobox{flex:1 1 100%;width:auto}.fw-bar.ffo-bar>.datepicker{flex:1 1 calc(50% - 4px);width:auto}}
.prp-person .pov-cv{display:inline-flex;vertical-align:middle;margin:0 4px 2px 0;color:var(--muted)}.prp-person:not(.is-open) .pov-cv{transform:rotate(-90deg)}
.prp tr.prp-person td:first-child a{font-weight:600}.prp tr.prp-person.is-open td{background:var(--soft)}.prp tr.prp-month td:first-child{font-weight:500}
@media(min-width:701px){
 .contact-dup-table{min-width:1080px}/* SALES-24: a tax id with its branch is read whole */.contact-dup-table .cdup-c-tax{width:184px}/* SALES-24 (still seen 11-21): the name column gets the room so a pair reads apart */.cdup-c-role{width:96px}.cdup-c-email{width:168px}.cdup-c-use{width:120px}.prp-table{min-width:900px}
 .contact-dup-table tr>:first-child,.prp-table tr>:first-child{position:sticky;left:0;z-index:1;background:var(--bg)}
 .contact-dup-table tr.pov-day>:first-child,.prp-table tr.is-open>:first-child,.contact-dup-table tr[data-row-href]:hover>:first-child,.prp-table tr[data-row-href]:hover>:first-child{background:var(--soft)}
}
@media(max-width:700px){
 .pov table>tbody:not(:last-child)>tr:last-child{border-bottom:1px solid var(--border)}.pov table>tbody:not(:last-child)>tr:last-child>td{border-bottom:0}
 .pov tr.pov-sum{border-top:1px solid var(--fg)}.pov tr.pov-sum td{border-top:0}
 .pov-stack tr{grid-template-columns:repeat(3,minmax(0,1fr))}.pov-stack tr.pov-day,.pov-stack tr.is-open{background:var(--soft)}
 .pov-stack td:first-child,.pov-stack td.pov-act,.pov-stack tr.pov-day td{grid-column:1/-1}.pov-stack td:empty{display:none}
 .pov-stack td[data-l]::before{content:attr(data-l);display:block;font-size:11px;line-height:14px;font-weight:400;color:var(--muted)}.pov-stack td:first-child::before{display:none}
 .pov-stack td.num,.pov-stack td.pov-act{text-align:left}
}
/* /CalendarReconciliation (owner 2026-10-18 item 5; app/View/calendar-sync.php): the one table with one group row per date. The columns
   are named widths shared by the three tabs; a row's picker is the combobox made a 28px cell editor (as the Lark routes table); the row's
   actions sit in the last cell. */
.cs-c-pick{width:40px}.cs-c-time{width:96px}.cs-c-why{width:160px}.cs-c-trainer{width:128px}.cs-c-sync{width:200px}.cs-c-invite{width:200px}.cs-c-act{width:208px}.cs-c-act2{width:360px}
/* ต้องเลือก (owner 2026-11-02 "ไม่เข้าใจให้ทำอะไร"): what happened is read in full (it wraps), and why a grey button is grey sits above the table. */
.cs-c-reason{width:280px}.cs .cs-reason{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cs-why-off{margin:0 0 8px}.cs-off-note{display:block;margin-top:4px}
.cs td.fw-pick-cell,.cs th.cs-c-pick{padding-left:8px;padding-right:0}.cs .pov-act .button.small+.kebab,.cs .pov-act .kebab+.button{margin-left:8px}
.cs .kebab summary.button.small{min-height:28px;height:28px;padding:0 8px}.cs form.cs-pull,.cs-pull{display:inline-flex;margin:0}
.cs-pick{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0}.cs-pick>.combobox{flex:1 1 100%;min-width:0}.cs-slot{flex:1 1 100%;min-width:0}.cs-slot:empty{display:none}.cs-slot>.combobox{display:block;width:100%}
main#content .cs td .combobox .combobox-trigger{height:28px;min-height:28px;padding:0 8px;font-size:13px;line-height:18px;border-color:transparent;background:transparent;box-shadow:none}main#content .cs td .combobox .combobox-trigger:hover,main#content .cs td .combobox.is-open .combobox-trigger{border-color:var(--border)}
main#content .cs td:has(.cs-pick){padding-top:0;padding-bottom:0}.cs-bar>.combobox{flex:0 0 176px;width:176px}.cs-bar>.cs-pull{margin-left:0}
.cs .pov-st+.pov-st,.cs span+span>.pov-st{margin-left:8px}
@media(min-width:701px){
 .cs-table{min-width:1080px}
 .cs-table tr>:first-child{position:sticky;left:0;z-index:1;background:var(--bg)}
 .cs-table tr.pov-day>:first-child{background:var(--soft)}
}
/* Project tab panels: ไฟล์ & ลิงก์, ตั้งค่า, Cashflow (owner 2026-10-18 item 9; app/View/project-files-tab.php,
   project-edit-tab.php, project-settings-tab.php, project-cashflow-tab.php). One stack: 16px between sections, 8px from a head to its
   list; every list is a .pov table with named column widths; an add row "+ …" under its list opens as the soft expand look of the
   รายรับ tree (rule 5.1); no card, box or tinted panel inside the panel. ตั้งค่า stops at 880px, the form width. */
.pp{display:grid;gap:16px;min-width:0}.pp-narrow{max-width:880px}.pp [hidden]{display:none!important}
.pp-sec{display:grid;gap:8px;min-width:0}.pp-sec>.row-between{align-items:center;min-height:32px;margin:0}.pp-sec>.row-between h2{margin:0;font-size:14px;line-height:20px;font-weight:600}.pp-sec>.row-between h2 .muted{font-size:14px;line-height:20px;font-weight:400}
.pp-note{display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;min-height:32px;margin:0;padding:4px 8px;border-radius:var(--radius-md);font-size:13px;line-height:18px;color:var(--muted)}.pp-note:not(.is-warn){padding-left:0;padding-right:0}.pp-note.is-warn{background:var(--tb-fffbeb,#fffbeb);color:var(--tf-92400e,#92400e)}.pp-note input{height:32px;min-height:32px;width:160px}
.pp-basis{margin:0 0 8px;font-size:12px;line-height:16px}.pp-totals{margin:0;font-size:13px;line-height:18px;color:var(--muted)}.pp-totals strong{color:var(--fg);font-weight:600;font-variant-numeric:tabular-nums}
.pp-static{display:flex;align-items:center;gap:8px;min-height:36px;margin:0}.pp-toggle-row{display:flex;align-items:center;gap:12px;min-height:36px}
.pp-add>summary{list-style:none}.pp-add>summary::-webkit-details-marker{display:none}.pp .ig-addlink{padding:0 8px}
.pp-add-form{display:grid;gap:12px;margin-top:4px;padding:12px;border-radius:var(--radius-md);background:var(--soft)}.pp-add-form .form-actions{margin-top:0}
.pp-adds{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.pp-adds>.pp-add[open]{flex-basis:100%}.pp-adds form{margin:0}
.pp .mx-tools>.search,.pp-sec>.row-between>.search{flex:0 1 320px;width:auto;margin:0}
.pp .pov td.pp-act{overflow:visible;text-align:right}.pp .pov td.pp-act form{display:inline;margin:0}main#content .pp .pov td:has(.icon-button,.ig-in,.ig-addlink){padding-top:0;padding-bottom:0}
.pp .pov tr.pp-detail>td{height:auto;padding:8px;white-space:normal;overflow:visible;background:var(--soft)}.pp .pov tr.pp-sub .pov-elbow{margin-left:22px}
.pp .pov td a:not(.icon-button){font-weight:500}.pp-link{display:flex;align-items:center;gap:4px;min-width:0}.pp-link>a,.pp-link>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pp-link>.ig-in{flex:1;min-width:0}
.pp-inline-form{display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px}.pp-inline-form>.field{flex:1 1 320px}.pp-inline-form>.form-actions{margin:0}
.pp [data-more]:not(.is-open) .pp-more{display:none}.pp [data-more].is-open [data-more-closed],.pp [data-more]:not(.is-open) [data-more-open]{display:none}
.pp .project-form-type-card{font-size:14px;line-height:20px}.pp .project-form-type-toggle{align-self:flex-start}.pp fieldset.field>legend{padding:0;margin-bottom:6px}
main#content .pp .pov th,main#content .pp .pp-weeks th{height:28px}.pp-c-date{width:112px}.pp-c-when{width:144px}.pp-c-act{width:44px}.pp-c-act2{width:80px}.pp-c-sight{width:232px}.pp-c-num{width:80px}.pp-c-role{width:200px}.pp-c-who{width:200px}.pp-c-kind{width:144px}.pp-c-file{width:200px}.pp-c-account{width:240px}.pp-c-state{width:120px}
/* ไฟล์ & ลิงก์ (owner 2026-11-08, Files tab grill 2+3): the one Hub line (a name, the link with its copy, เปิด), the one ไฟล์ table
   with the three ticks of a row (มีราคา, Hub, Portal: saved on change) and the upload links listed inside their add row. */
.pf-hub{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-height:36px;min-width:0}.pf-hub-name{display:inline-flex;align-items:center;gap:6px;font-size:14px;line-height:20px;font-weight:600}.pf-hub-name .icon{width:16px;height:16px}.pf-hub-url{flex:1 1 280px;max-width:560px}.pf-hub form{margin:0}
.pf-file-tools{display:flex;align-items:center;gap:8px;flex:0 1 auto;min-width:0}.pf-file-tools>.search{flex:0 1 320px;width:auto;margin:0}
.pp .pov td.pf-sight{overflow:visible}.pf-sight{white-space:nowrap}.pf-tick{display:inline-flex;align-items:center;gap:4px;margin-right:12px;font-size:13px;line-height:18px;cursor:pointer}.pf-tick:last-child{margin-right:0}.pf-tick input{width:16px;height:16px;margin:0}.pf-tick:has(input:disabled){color:var(--muted);cursor:default}
.pf-sight-pick{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:4px 16px;border:0;margin:0;padding:0}.pf-sight-pick>legend{width:100%}
.pf-upl{display:grid;gap:4px;margin:0;padding:0;list-style:none}.pf-upl-row{display:flex;align-items:center;gap:8px;min-height:32px;min-width:0}.pf-upl-name{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pf-upl-row>.pp-link{flex:1 1 240px}.pf-upl-row form{margin:0}.pf-upl-new{display:grid;gap:12px}
@media(max-width:700px){.pf-file-tools{flex:1 1 100%}.pf-file-tools>.search{flex:1 1 auto}.pf-upl-row{flex-wrap:wrap}main#content .pp .pf-file-table tr.pf-file-row td:first-child{grid-column:1/-1}main#content .pp .pf-file-table tr.pf-file-row td.pp-act{grid-column:2;grid-row:2}main#content .pp .pf-file-table tr.pf-file-row td.pf-sight{white-space:normal;min-width:0}main#content .pp .pf-file-table td.pf-sight .pf-tick{white-space:nowrap}main#content .pp .pf-file-table tr.pf-file-row td.pf-added{grid-column:1/-1}}
/* Project modules (owner 2026-10-24 item B): ตั้งค่า › ส่วนของโปรเจค switches; บิล & สถานะ tab (project-bills-tab.php). */
.pp-modules .pp-c-act{width:64px}.pp-module-form{display:flex;justify-content:flex-end}
.pb-table .pb-c-step{width:248px}.pb-table .pb-c-who{width:160px}.pb-table .pb-c-round{width:160px}.pb-steps{display:inline-flex;align-items:center;gap:3px;margin-right:8px;vertical-align:middle}.pb-steps .pov-dot{margin-right:0}.pb-row[data-pov-bill]{cursor:pointer}.pb-row.is-ended td,.pb-row.is-ended a{color:var(--muted)}.pb-sum{margin:2px 0 0}
@media(max-width:700px){.pp-modules tr{grid-template-columns:minmax(0,1fr) auto;align-items:center}.pb-table tr{grid-template-columns:minmax(0,1fr) auto;align-items:center}.pb-table td:nth-child(1){grid-column:1/-1}.pb-table td:nth-child(2){grid-column:2;grid-row:2;text-align:right}.pb-table td:nth-child(3){grid-column:1;grid-row:2}.pb-table td:nth-child(4){grid-column:2;grid-row:3;text-align:right;color:var(--muted)}.pb-table td:nth-child(5){grid-column:1;grid-row:3}}
/* The weekly grid is a spreadsheet (rule 13.3): it scrolls sideways inside its box with the account and the total column held. */
.pp-weeks th:first-child,.pp-weeks td:first-child{position:sticky;left:0;z-index:1;background:var(--bg)}.pp-weeks th:last-child,.pp-weeks td:last-child{position:sticky;right:0;z-index:1;background:var(--bg)}.pp-weeks tr.pov-day td:first-child,.pp-weeks tr.pov-day td:last-child{background:var(--soft)}.pp td.pp-zero{color:var(--muted)}
/* Busy (rule 10.2): a save from a panel fades the panel only; #content, the request's source, keeps its look. */
main#content.htmx-request[data-panel-save]{opacity:1}.project-detail-panel[aria-busy="true"]{opacity:.65;transition:opacity .15s}
/* A table stacks inside its own box once the box is narrower than its fixed columns + 200px, so no width scrolls the page sideways. */
@container (max-width:760px){.pp .pp-related thead{display:none}.pp .pp-related,.pp .pp-related>tbody{display:block}.pp .pp-related tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 8px;padding:6px 8px;border-bottom:1px solid var(--border)}.pp .pp-related tbody:last-child tr:last-child{border-bottom:0}main#content .pp .pp-related td{display:block;grid-column:auto;height:auto;min-width:0;padding:0;border:0}main#content .pp .pp-related td.pp-act{grid-column:2;grid-row:1;justify-self:end;align-self:start}main#content .pp .pp-related tr:is(.pov-day,.pov-sum,.pp-sub) td:first-child{grid-column:1/-1}.pp .pp-related tr.pov-day{background:var(--soft)}.pp .pp-related tr.pov-day td{background:none}.pp .pp-related tr.pp-detail{display:block;padding:8px;background:var(--soft)}main#content .pp .pp-related tr.pp-detail>td{padding:0}.pp .pp-related td[data-l]::before{content:attr(data-l);display:block;font-size:11px;line-height:14px;font-weight:400;color:var(--muted)}}
@container (max-width:664px){.pp .pp-items thead{display:none}.pp .pp-items,.pp .pp-items>tbody{display:block}.pp .pp-items tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 8px;padding:6px 8px;border-bottom:1px solid var(--border)}.pp .pp-items tbody:last-child tr:last-child{border-bottom:0}main#content .pp .pp-items td{display:block;grid-column:auto;height:auto;min-width:0;padding:0;border:0}main#content .pp .pp-items td.pp-act{grid-column:2;grid-row:1;justify-self:end;align-self:start}main#content .pp .pp-items tr:is(.pov-day,.pov-sum,.pp-sub) td:first-child{grid-column:1/-1}.pp .pp-items tr.pov-day{background:var(--soft)}.pp .pp-items tr.pov-day td{background:none}.pp .pp-items tr.pp-detail{display:block;padding:8px;background:var(--soft)}main#content .pp .pp-items tr.pp-detail>td{padding:0}.pp .pp-items td[data-l]::before{content:attr(data-l);display:block;font-size:11px;line-height:14px;font-weight:400;color:var(--muted)}main#content .pp .pp-items tr:not(.pov-day):not(.pov-sum) td:nth-child(2){grid-column:1/-1;order:-1}}
@media(max-width:700px){.pp .pov table thead{display:none}.pp .pov table,.pp .pov table>tbody{display:block}.pp .pov table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 8px;padding:6px 8px;border-bottom:1px solid var(--border)}.pp .pov table tbody:last-child tr:last-child{border-bottom:0}main#content .pp .pov table td{display:block;grid-column:auto;height:auto;min-width:0;padding:0;border:0}main#content .pp .pov table td.pp-act{grid-column:2;grid-row:1;justify-self:end;align-self:start}main#content .pp .pov table tr:is(.pov-day,.pov-sum,.pp-sub) td:first-child{grid-column:1/-1}.pp .pov table tr.pov-day{background:var(--soft)}.pp .pov table tr.pov-day td{background:none}.pp .pov table tr.pp-detail{display:block;padding:8px;background:var(--soft)}main#content .pp .pov table tr.pp-detail>td{padding:0}.pp .pov table td[data-l]::before{content:attr(data-l);display:block;font-size:11px;line-height:14px;font-weight:400;color:var(--muted)}main#content .pp .pp-items tr:not(.pov-day):not(.pov-sum) td:nth-child(2){grid-column:1/-1;order:-1}main#content .pp .ps-activity-list td:last-child{grid-column:1/-1}.pp-weeks .pp-c-account{width:160px}.pp-weeks th:last-child,.pp-weeks td:last-child{position:static}}
/* The Project cost table stays a 3-column table on a phone (it fits at 360 px): not the stacked rows above */
@media(max-width:767px){.pp .mx-tools>.search,.pp-sec>.row-between>.search{flex:1 1 100%}}
/* Lark › "2. แจ้งเตือนเข้ากลุ่ม" (app/View/admin-panels/integrations-lark.php; owner item 4, 2026-10-18): the .pov table, one 32px
   row per card. The group picker is a 28px cell editor with no visible border until hover or focus (the .ig .ig-in look), ทดสอบส่ง
   a 28px button; a Project / Lead row opens its text editor in a soft expand row under it. Placed after the .pov block so it wins
   over its cell padding. On a phone a card is a small grid: the name across, the picker and the state under it, ทดสอบส่ง beside. */
main#content .int-lark-routes td{height:32px;padding:0 8px}
main#content .int-lark-routes tbody:not(:last-of-type) tr.int-lark-detail td{border-bottom:1px solid var(--border)}
.int-lark-c-group{width:280px}.int-lark-c-act{width:96px}.int-lark-c-n{width:72px}
@media(max-width:1023px){.int-lark-c-group{width:220px}}
.int-lark-routes td b{font-weight:600}
main#content .int-lark-routes .int-lark-toggle{width:28px;height:28px;min-width:28px;min-height:28px;margin:0 4px 0 -4px;vertical-align:middle}
.int-lark-toggle .icon{width:16px;height:16px;transition:transform .15s}.int-lark-toggle[aria-expanded="false"] .icon{transform:rotate(-90deg)}
main#content .int-lark-routes .int-lark-group .combobox-trigger{height:28px;min-height:28px;padding:0 8px;font-size:13px;line-height:18px;border-color:transparent;background:transparent;box-shadow:none}
main#content .int-lark-routes .int-lark-group .combobox-trigger:hover,main#content .int-lark-routes .int-lark-group .combobox-trigger:focus-visible{border-color:var(--border)}
main#content .int-lark-routes .int-lark-group select{height:28px;min-height:28px;padding:0 8px;font-size:13px;line-height:18px;border-color:transparent;background-color:transparent}
main#content .int-lark-routes .button.small{height:28px;min-height:28px;padding:0 12px;font-size:12px;line-height:16px}
main#content .int-lark-routes tr.int-lark-detail td{height:auto;padding:12px;background:var(--soft);white-space:normal;overflow:visible}
.int-lark-detail h4{margin:0;font-size:14px;line-height:20px;font-weight:600}.int-lark-detail .actions{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;list-style:none}
main#content .int-lark-queue td{white-space:nowrap}main#content .int-lark-queue .button.small{height:28px;min-height:28px;padding:0 12px}.int-lark-queue form{margin:0}
.int-lark-tools{gap:8px}
@media(pointer:coarse){main#content .int-lark-routes :is(.int-lark-group .combobox-trigger,.int-lark-group select,.button.small,.int-lark-toggle),main#content .int-lark-queue .button.small{min-height:44px;height:44px}main#content .int-lark-routes td{height:auto}}
@media(max-width:700px){
 .int-lark-routes tr{grid-template-columns:minmax(0,1fr) auto;align-items:center}
 .int-lark-routes td:nth-child(1){grid-column:1/-1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .int-lark-routes td:nth-child(2){grid-column:1;grid-row:2}
 .int-lark-routes td:nth-child(3){grid-column:1;grid-row:3}
 .int-lark-routes td:nth-child(4){grid-column:2;grid-row:2/4;align-self:center}
 main#content .int-lark-routes td{height:auto;padding:0}main#content .int-lark-routes tr.int-lark-detail{display:block;padding:0}
 .int-lark-queue tr{grid-template-columns:minmax(0,1fr) auto}.int-lark-queue td:nth-child(4){grid-column:1/-1;color:var(--muted)}
}

/* Task menu (owner 2026-10-14, DECISIONS "Company-wide Task"; redone 2026-10-18 item 1, DECISIONS "Task redone"): app/View/tasks.php, task-ui.php, task-views.php,
   project-tasks-tab.php. Every rule builds on a component the design system lists (docs/ui/DESIGN-SYSTEM.md): the .fw-bar toolbar, the .ig editable table, the
   .kanban column, the calendar grid helpers; spacing steps 4 / 8 / 12 / 16 / 24; tints are whole-box fills and even borders, never a stripe on one edge. */
/* toolbar: one line of 36px controls whose widths never follow the value picked (DS 3.1) */
.tk-tools{margin:0}
main#content .tk-tools .search{flex:0 1 192px;width:192px;min-width:0;margin:0}
.tk-tools .tk-fold>select,.tk-tools .tk-fold>.combobox{flex:0 0 112px;width:112px;min-width:0}
/* ux-misc 3: the fold is no box on a desktop (its filters sit in the toolbar line; the group picker is as wide as its words, so the week
   toolbar stays one line at 1440); on a phone it folds behind the ตัวกรอง button (an in-page fold, no pop-up; open without JavaScript). */
main#content .tk-tools.is-week .search{flex-basis:152px;width:152px}.tk-fold{display:contents}.tk-tools .tk-fold>.combobox:has(select[name=group]){flex:0 0 auto;width:auto}.tk-tools .tk-fold>.combobox:has(select[name=status]){flex:0 0 auto;width:auto}.tk-fold-btn{display:none}.tk-tools .combobox-trigger{width:100%}.tk-tools .combobox-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tk-tools>.calendar-nav{flex:0 0 auto;margin:0}.tk-tools .calendar-month-label{display:inline-block;min-width:140px;text-align:center}.tk-tools.is-week .calendar-month-label{min-width:200px}
.tk-tools .check-row{white-space:nowrap}
.tk-tools .fw-count{margin-left:auto}
.tk-tools .tk-ns-go{display:none}
@media (scripting:none){.tk-tools .tk-ns-go{display:inline-flex}}
@media (max-width:639px) and (scripting:enabled){main#content .tk-tools .search{flex:1 1 0}.tk-tools .tk-fold-btn{display:inline-flex;flex:none;height:36px}.tk-tools:not(.is-unfolded) .tk-fold{display:none}
 .tk-tools.is-unfolded .tk-fold{display:flex;flex-wrap:wrap;gap:8px;flex:1 1 100%;order:1}.tk-tools .fw-count{order:2}}
/* the editable table (.ig): rows are 32px, a cell's editor is a 28px box with no border until hover */
main#content .ig.tk-table{min-width:952px}main#content .ig.tk-table.tk-nop{min-width:752px}
.ig .tk-title-wrap{display:contents}
@media(max-width:639px){
 .ig.tk-table col.tk-c-task{width:min(200px,46vw)}
 main#content .ig.tk-table:not(.tk-cardtable) :is(th,td):first-child{position:static;z-index:auto}
 .ig.tk-table .tk-c-task .ig-tree{overflow:hidden}
 .ig.tk-table:not(.tk-cardtable) .tk-title-wrap{display:grid;flex:1;min-width:0;grid-template-columns:auto minmax(0,1fr);justify-items:start;align-items:center}
 .ig.tk-table:not(.tk-cardtable) .tk-title-wrap :is(.tk-title-in,.tk-title-t){grid-column:1/-1;max-width:100%}
 .ig.tk-table:not(.tk-cardtable) .tk-title-wrap .tk-meta{max-width:100%}
 /* ux-misc 2: on a phone the Task name gets the width; the owner is its initials (or a quiet —), the ตั้งต้น pill stays on the desktop. */
 .ig.tk-table:not(.tk-cardtable) .tk-setup-pill{display:none}
 main#content .ig.tk-table:not(.tk-cardtable){min-width:0;width:max-content}
 .ig.tk-table:not(.tk-cardtable) td.tk-c-person .tk-person .tk-avatar{display:grid}.ig.tk-table:not(.tk-cardtable) td.tk-c-person .tk-person-name{display:none}
 .ig.tk-table:not(.tk-cardtable) td.tk-c-person :is(.tk-pick,.ig-t)>.muted{font-size:0}.ig.tk-table:not(.tk-cardtable) td.tk-c-person :is(.tk-pick,.ig-t)>.muted::before{content:"—";font-size:13px}
 .ig.tk-table:not(.tk-cardtable) th.tk-h-person .tk-h-wide{display:none}.ig.tk-table:not(.tk-cardtable) th.tk-h-person .tk-h-short{display:inline}
 /* Audit PJ-02 (owner 2026-11-18, default ก; phone tables stay tables, 2026-11-16): Task · เจ้าของ · กำหนดส่ง fit 390px with no sideways
    scroll; สถานะ · โปรเจค are the task's second muted line, the detail › ends the task cell, the other columns wait on a wider screen. */
 .ig.tk-table:not(.tk-cardtable) :is(col,th,td).tk-c-project,.ig.tk-table:not(.tk-cardtable) col.pov-c-status,.ig.tk-table:not(.tk-cardtable) th.tk-h-status,.ig.tk-table:not(.tk-cardtable) td.tk-c-status,.ig.tk-table:not(.tk-cardtable) :is(col,th,td).tk-c-field,.ig.tk-table:not(.tk-cardtable) :is(col,th,td).tk-c-x{display:none}
 .ig.tk-table:not(.tk-cardtable) col.tk-c-task{width:calc(100cqw - 174px)}.ig.tk-table:not(.tk-cardtable) col.tk-c-person{width:60px}.ig.tk-table:not(.tk-cardtable) col.pov-c-date{width:108px}
 .ig.tk-table:not(.tk-cardtable) .tk-ph-place{display:flex;align-items:center;grid-column:1/-1;max-width:100%;min-width:0;overflow:hidden;white-space:nowrap;font-size:12px;line-height:16px}
 .ig.tk-table:not(.tk-cardtable) .tk-ph-place .pov-st{display:inline-flex;flex:none}.ig.tk-table:not(.tk-cardtable) .tk-ph-proj{min-width:0;overflow:hidden;text-overflow:ellipsis}
 .ig.tk-table:not(.tk-cardtable) tr.tk-row:not(.tk-sub) .pov-elbow{display:none}
 .ig.tk-table:not(.tk-cardtable) .tk-ph-open{display:inline-flex;flex:none}
}
.tk-ph-place,.tk-ph-open{display:none}
.tk-h-person .tk-h-short{display:none}
.ig col.tk-c-person{width:168px}.ig col.tk-c-project{width:200px}.ig col.tk-c-field{width:136px}.ig col.tk-c-x{width:36px}
.ig th.tk-c-x,.ig td.tk-c-x{text-align:right}
.ig .tk-tick{flex:none;width:16px;height:16px;margin:0 8px 0 0;padding:0;box-shadow:none;cursor:pointer}
.ig .tk-tick-hit{display:inline-flex;flex:none;align-items:center;justify-content:center;width:24px;height:24px;margin:0 4px 0 -4px;cursor:pointer}.ig .tk-tick-hit .tk-tick{margin:0}
.ig .tk-title-in{flex:1 1 96px;min-width:0;text-overflow:ellipsis}
.ig .tk-c-task.is-done .tk-title-in,.ig .tk-c-task.is-done .tk-title-t{color:var(--muted);text-decoration:line-through}
.ig .tk-up{flex:0 1 auto;max-width:35%;margin:0 4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:16px}
.ig .tk-meta{flex:0 1 auto;max-width:45%;margin-left:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:16px;color:var(--muted)}
.ig .tk-subs{display:inline-flex;align-items:center;gap:4px}.ig .tk-subs .icon{width:12px;height:12px}
/* Owner 2026-11-08 1ก: the ตั้งต้น pill of a Task the system added, small and quiet beside its title; the link to its settings beside the tab's button. */
.ig .tk-setup-pill{flex:0 0 auto;margin-left:6px;font-size:11px;line-height:16px;padding:0 6px}
.tk-setup-link{display:inline-flex;align-items:center;gap:4px;font-size:12px;line-height:16px}.tk-setup-link .icon{width:14px;height:14px}
.ig .tk-sub .ig-tree .pov-elbow{margin-left:36px}
.ig .tk-pick{display:flex;align-items:center;gap:8px;overflow:hidden;text-align:left;cursor:pointer}
.ig .tk-pick .ig-t{padding:0;flex:1;min-width:0}.ig .tk-pick .pov-st{min-width:0}
.ig .tk-pick:focus-visible{outline:none;border-color:var(--primary);background:var(--bg)}
.ig .combobox{display:block;width:100%}.ig .combobox-trigger{height:28px;min-height:28px;padding:0 6px;border-color:var(--border);font-size:13px}
.ig .tk-pick[aria-busy="true"],.ig [data-tk-field][aria-busy="true"]{opacity:.55}
.tk-avatar{display:grid;place-items:center;flex:none;width:20px;height:20px;border:1px solid var(--border);border-radius:50%;background:var(--soft);font-size:12px;line-height:16px;font-weight:600}
.tk-person{display:inline-flex;align-items:center;gap:8px;min-width:0;max-width:100%}.tk-person-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ig td.tk-c-due{position:relative}
.ig .tk-late-ic{position:absolute;left:8px;top:50%;transform:translateY(-50%);display:inline-flex;color:var(--mx-rose-fg);pointer-events:none}.ig .tk-late-ic .icon{width:14px;height:14px}
main#content .ig td.is-late .ig-date .datepicker-trigger{padding-left:26px;color:var(--mx-rose-fg)}
.tk-late{color:var(--mx-rose-fg);font-weight:400}
.ig tr.tk-group td .tk-person{vertical-align:middle}.ig tr.tk-group a{font-weight:600}
/* add row: only "+ เพิ่ม Task" until pressed (without JavaScript the box is shown) */
.ig tr.tk-addrow .tk-add-in{display:none;flex:1;min-width:0}
.ig tr.tk-addrow.is-open .tk-add-in{display:block}.ig tr.tk-addrow.is-open .ig-addlink{display:none}
@media (scripting:none){.ig tr.tk-addrow .tk-add-in{display:block}.ig tr.tk-addrow .ig-addlink{display:none}}
/* the detail under a row (.ig-detail): the fields that are not columns, saved when left */
main#content .ig tr.tk-detail>td{padding:12px 8px 16px}
.ig .tk-detail .ig-in{border-color:var(--border);background:var(--bg)}
.ig .tk-detail textarea.ig-in{height:auto;min-height:60px;padding:6px;resize:vertical}
.ig .tk-detail .button{height:28px;min-height:28px;padding:0 12px;line-height:20px;font-size:13px}
.ig .tk-detail-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px}.ig .tk-detail-foot form{margin:0}
.ig .tk-subadd{margin:0;flex:1;max-width:320px}.ig .tk-subadd .tk-add-in{display:block}
.ig .tk-ns{display:none;gap:8px;align-items:end;flex-wrap:wrap;grid-column:1/-1}
@media (scripting:none){.ig .tk-ns{display:flex}}
.ig .tk-sk{height:156px;border-radius:var(--radius-md)}
/* Kanban (the Deal board's columns); a card is 108px */
.kanban.tk-kanban{min-height:0}
/* Owner 2026-10-24 (DECISION-PACK 13): four status columns fit a 1440 laptop with the sidebar open, no sideways scroll: the columns share the
   board's width (min 252px, max 320px) instead of a fixed 320px (4 x 320 + gaps = 1328px > the ~1136px board). */
@media(min-width:1024px){.kanban.tk-kanban .kanban-column{flex:1 1 0;width:auto;min-width:252px;max-width:320px}}
.kanban-column .tk-col-body{display:flex;flex-direction:column;gap:8px;padding:8px;min-height:48px}
.tk-card{display:flex;flex-direction:column;gap:4px;padding:12px;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--bg);color:inherit}/* audit PROJ-42: a card is as tall as its content, the cards sit close */
.tk-card:hover{border-color:var(--tl-171717a30,rgb(23 23 23 / .3))}.tk-card.is-dragging{opacity:.5}
.tk-card-title{max-height:40px;overflow:hidden;font-size:14px;line-height:20px;font-weight:500;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.tk-card.is-done .tk-card-title{color:var(--muted);text-decoration:line-through}
.tk-card-sub{height:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:16px;color:var(--muted)}
.tk-card-line{display:flex;align-items:center;justify-content:space-between;gap:8px;height:20px;font-size:12px;line-height:16px}.tk-card-line .tk-due{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}.tk-card-line .tk-due .icon{width:14px;height:14px}
.tk-card-line .is-late{color:var(--mx-rose-fg)}
.tk-card.is-open{height:auto;gap:8px;padding:8px}.tk-card-x{align-self:flex-end}
/* the open card: the row's editors and the detail stacked in one column of the card */
main#content .ig.tk-cardtable{min-width:0}.tk-cardtable colgroup{display:none}.tk-cardtable tbody,.tk-cardtable tr,.tk-cardtable td{display:block;width:auto;height:auto}
.tk-cardtable tr.tk-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px 8px}.tk-cardtable td.tk-c-task{grid-column:1/-1}.tk-cardtable td.tk-c-x,.tk-cardtable td.tk-c-project{display:none}
.tk-cardtable tr.tk-row td{background:transparent;border:0}
main#content .ig .tk-cardtable .ig-detail-grid,.tk-cardtable .ig-detail-grid{position:static;grid-template-columns:minmax(0,1fr);max-width:none}.tk-cardtable .ig-detail-grid .ig-f-wide{grid-column:1/-1}
main#content .ig tr.tk-detail>td{white-space:normal}
.kanban-column.is-over{outline:2px dashed var(--primary);outline-offset:-3px}
.tk-kanban .kanban-column-foot{padding:0 8px 8px}.tk-kanban .kanban-column-foot .ig-tree{display:flex;align-items:center;min-height:28px}
.tk-kanban .pov-elbow{display:none}
.tk-kanban .ig-in{display:block;width:100%;height:28px;padding:0 6px;border:1px solid transparent;border-radius:var(--radius-sm);background:transparent;font:inherit;color:inherit}
.tk-kanban .ig-in:hover{border-color:var(--border)}.tk-kanban .ig-in:focus{outline:none;border-color:var(--primary);background:var(--bg)}
.tk-kanban .tk-add-in{display:none}.tk-kanban .is-open .tk-add-in{display:block}.tk-kanban .is-open .ig-addlink{display:none}
.tk-kanban .ig-addlink{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 6px;border:0;background:transparent;color:var(--muted);font:inherit;font-size:12px;line-height:16px;font-weight:500;cursor:pointer;border-radius:var(--radius-sm)}
.tk-kanban .ig-addlink:hover{color:var(--fg)}
@media (scripting:none){.tk-kanban .tk-add-in{display:block}.tk-kanban .ig-addlink{display:none}}
/* Timeline: a week as a table (the Matrix model): the person column 200px, seven equal days */
.tk-tl-scroll{overflow-x:auto}
table.tk-tl{width:100%;min-width:984px;border-collapse:collapse;table-layout:fixed;font-size:13px;line-height:18px}
.tk-tl col.tk-tl-c-who{width:200px}
.tk-tl th,.tk-tl td{padding:0;border-bottom:1px solid var(--border);text-align:left;font-weight:400;vertical-align:middle}
.tk-tl thead th{height:32px;padding:0 8px;font-size:12px;line-height:16px;font-weight:500;color:var(--muted);background:var(--bg);white-space:nowrap}
.tk-tl thead th.tk-tl-day{text-align:left}.tk-tl thead th.is-weekend{color:var(--muted);background:var(--soft)}
.tk-tl .tk-tl-n{display:inline-grid;place-items:center;min-width:20px;height:20px;margin-left:4px;border-radius:50%;font-weight:600;color:var(--fg)}
.tk-tl th.is-today .tk-tl-n{background:var(--primary);color:var(--on-primary,#fff)}
.tk-tl tbody tr{height:36px}
.tk-tl .tk-tl-who{position:sticky;left:0;z-index:2;padding:0 8px;background:var(--bg);border-right:1px solid var(--border);overflow:hidden}
.tk-tl .tk-tl-who-in{display:flex;align-items:center;gap:8px;min-width:0}.tk-tl .tk-tl-who-in strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.tk-tl .tk-tl-who-in a{margin-left:auto;flex:none;font-size:12px;line-height:16px;color:var(--muted);text-decoration:underline;white-space:nowrap}
.tk-tl .tk-tl-who-in a+a{margin-left:0}.tk-tl .tk-tl-who-in a.tk-tl-late{color:var(--mx-rose-fg)}
.tk-tl .tk-tl-who.is-muted strong{font-weight:400;color:var(--muted)}
.tk-tl td{border-left:1px solid var(--border);overflow:hidden}
.tk-tl td.is-weekend{background:var(--soft)}.tk-tl td.is-today{background:color-mix(in srgb,var(--primary) 6%,transparent)}
.tk-tl td.tk-cell{position:relative;cursor:pointer}.tk-tl td.tk-cell:hover::after{content:"+";position:absolute;inset:0;display:grid;place-items:center;color:var(--muted);font-size:16px}
.tk-tl td.tk-cell-add{position:relative;overflow:visible}
.tk-tl td.tk-tl-bar{padding:4px}
.tk-tl tbody.tk-tl-marks th,.tk-tl tbody.tk-tl-marks td{background:var(--soft)}
.tk-bar{position:relative;display:flex;align-items:center;gap:4px;min-width:0;height:28px;padding:0 8px;border:1px solid var(--tk-line,var(--border));border-radius:var(--radius-md);background:var(--tk-bg,var(--soft));color:var(--tk-fg,var(--fg));font-size:12px;line-height:16px;font-weight:500;overflow:hidden;white-space:nowrap;cursor:pointer}
.tk-bar .icon{width:14px;height:14px;flex:none}.tk-bar .tk-avatar{width:20px;height:20px;background:var(--bg);color:var(--fg)}
.tk-bar-title{min-width:0;overflow:hidden;text-overflow:ellipsis}
.tk-bar[aria-busy="true"],.tk-card[aria-busy="true"]{opacity:.55}
.tk-grip{position:absolute;top:0;bottom:0;width:8px;cursor:ew-resize}.tk-grip-l{left:0}.tk-grip-r{right:0}.tk-bar.is-dragging{z-index:3;box-shadow:var(--shadow);opacity:.9}
.tk-bar.is-point{border-color:transparent;background:transparent;color:var(--fg);padding:0 4px}
.tk-point-dot{width:8px;height:8px;flex:none;border-radius:50%;background:var(--tk-fg,var(--muted))}
.tk-bar.is-late{--tk-bg:var(--mx-rose-bg);--tk-fg:var(--mx-rose-fg);--tk-line:var(--mx-rose-fg)}.tk-bar.is-point.is-late{background:transparent;color:var(--mx-rose-fg)}
.tk-bar.is-done{opacity:.55}.tk-bar.is-done .tk-bar-title{text-decoration:line-through}
.tk-bar.cut-left{border-top-left-radius:0;border-bottom-left-radius:0}.tk-bar.cut-right{border-top-right-radius:0;border-bottom-right-radius:0}
.tk-marker{display:flex;align-items:center;gap:8px;min-width:0;height:28px;padding:0 4px;font-size:12px;line-height:16px;color:var(--tk-fg,var(--mx-amber-fg));white-space:nowrap;overflow:hidden}
.tk-diamond{width:10px;height:10px;flex:none;transform:rotate(45deg);background:var(--tk-fg,var(--mx-amber-fg))}
.tk-cell-form{position:absolute;left:4px;top:4px;z-index:5;display:flex;align-items:center;gap:8px;min-width:240px;height:28px;margin:0}
.tk-cell-form input{height:28px;width:240px;border:1px solid var(--primary);border-radius:var(--radius-md);background:var(--bg);padding:0 8px;font:inherit;box-shadow:var(--shadow)}
.tk-band:not(:empty){margin-top:8px}.tk-band-row{padding:8px;border-radius:var(--radius-lg);background:var(--soft)}.tk-band-close{float:right}
/* project tints, one per Project */
.tk-c0{--tk-bg:var(--mx-blue-bg);--tk-fg:var(--mx-blue-fg);--tk-line:var(--mx-blue-fg)}.tk-c1{--tk-bg:var(--mx-emerald-bg);--tk-fg:var(--mx-emerald-fg);--tk-line:var(--mx-emerald-fg)}
.tk-c2{--tk-bg:var(--mx-purple-bg);--tk-fg:var(--mx-purple-fg);--tk-line:var(--mx-purple-fg)}.tk-c3{--tk-bg:var(--mx-orange-bg);--tk-fg:var(--mx-orange-fg);--tk-line:var(--mx-orange-fg)}
.tk-c4{--tk-bg:var(--mx-teal-bg);--tk-fg:var(--mx-teal-fg);--tk-line:var(--mx-teal-fg)}.tk-c5{--tk-bg:var(--mx-pink-bg);--tk-fg:var(--mx-pink-fg);--tk-line:var(--mx-pink-fg)}
.tk-c6{--tk-bg:var(--mx-indigo-bg);--tk-fg:var(--mx-indigo-fg);--tk-line:var(--mx-indigo-fg)}.tk-c7{--tk-bg:var(--mx-amber-bg);--tk-fg:var(--mx-amber-fg);--tk-line:var(--mx-amber-fg)}
.tk-c-none{--tk-bg:var(--mx-slate-bg);--tk-fg:var(--mx-slate-fg);--tk-line:var(--border)}
.tk-bar[class*=" tk-c"],.tk-bar.tk-c-none{border-color:color-mix(in srgb,var(--tk-line) 30%,transparent)}
/* Calendar: the /UnifiedCalendar grid; a task is a chip of its tone */
.calendar-tone-task{--calendar-solid:var(--mx-blue-fg);--calendar-strong:var(--mx-blue-fg);--calendar-bg:var(--mx-blue-bg);--calendar-border:var(--mx-blue-bg);--calendar-fg:var(--mx-blue-fg)}
.calendar-tone-task-late{--calendar-solid:var(--mx-rose-fg);--calendar-strong:var(--mx-rose-fg);--calendar-bg:var(--mx-rose-bg);--calendar-border:var(--mx-rose-bg);--calendar-fg:var(--mx-rose-fg)}
.journey-phase-tasks a{text-decoration:underline;color:var(--muted)}
.tk-setup{display:inline;margin:0}
@media(max-width:767px){
 .tk-tools .tk-fold>select,.tk-tools .tk-fold>.combobox,.tk-tools .tk-fold>.combobox:has(select[name=group]),.tk-tools .tk-fold>.combobox:has(select[name=status]){flex:1 1 calc(50% - 8px);width:auto}.tk-tools .search{flex:1 1 100%}
 .tk-tools>.calendar-nav{flex:1 1 100%}.tk-tools .calendar-month-label,.tk-tools.is-week .calendar-month-label{min-width:0;flex:1;white-space:normal}.tk-tools>.calendar-nav>.icon-button{flex:none}
 table.tk-tl{min-width:728px}.tk-tl col.tk-tl-c-who{width:130px}
 .kanban.tk-kanban .kanban-column{width:85%;min-width:240px}
}


/* Quotation editor of a Journey Deal (app/View/quotation-editor.php): the strip of the five phases above the lines and the line's เฟส select beside ประเภทรายการ. A phase is a plain bordered box like the editor's other boxes; its state is words: มีราคาแล้ว green, ไม่รวม muted, ยังไม่ได้คิดราคา in the readiness card's amber text (.project-checklist-due.late). No edge stripe (RULES 5.9). The Deal header's quiet line and the Journey tab's sale note use the same amber. */
.qe-phases{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:12px}
.qe-phase{display:grid;gap:2px;align-content:start;min-width:0;border:1px solid var(--border);border-radius:var(--radius-lg);padding:8px 12px;font-size:12px;line-height:16px}
.qe-phase-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:2px 8px}.qe-phase-head strong{font-size:14px;line-height:20px;font-weight:600}
.qe-phase-state{font-weight:500;color:var(--muted)}.qe-phase-state.is-priced{color:var(--tf-047857,#047857)}.qe-phase-state.is-open,.page-header .page-header-copy p.deal-phase-gap{color:var(--tf-d97706,#d97706);font-weight:500}
.qe-phase-pass{color:var(--muted);overflow-wrap:anywhere}
.qe-phase-actions{display:flex;flex-wrap:wrap;gap:2px 12px;margin-top:2px}.qe .qe-phase-actions .link-button{font-size:12px;line-height:16px;min-height:0;height:auto;padding:0;border:0;background:none;color:inherit;font-family:inherit;text-decoration:underline;text-underline-offset:2px;cursor:pointer}.qe .qe-phase-actions .link-button:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.qe-type-row{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}.qe-type-row .qe-type{margin-bottom:0}.qe .qe-phase-pick select,.qe .qe-phase-pick .combobox{width:192px;max-width:100%;display:block}
.page-header .page-header-copy p.deal-phase-gap{margin:4px 0 0;font-size:12px;line-height:16px}.deal-phase-gap:empty{display:none}
.journey-phase-sale{color:var(--muted)}
@media(max-width:1023px){.qe-phases{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:639px){.qe-phases{grid-template-columns:minmax(0,1fr)}.qe-type-row .qe-type,.qe .qe-phase-pick select,.qe .qe-phase-pick .combobox{width:100%}}


/* System tooltip (owner 2026-10-12; docs/ui/BEHAVIOUR.md "Tooltips"): the one #erp-tip box app.js places for every [data-tip].
   Size, padding and radius come from the --tip-* tokens through the [class*=tooltip] rule above; this block adds the rest. */
.tooltip#erp-tip{position:fixed;inset:auto;left:0;top:0;z-index:2147483000;margin:0;width:max-content;max-width:min(280px,calc(100vw - 16px));height:auto;overflow:visible;border:0;background:var(--tip-bg);color:var(--tip-fg);font-weight:400;line-height:16px;text-align:left;white-space:pre-line;overflow-wrap:anywhere;box-shadow:var(--shadow-lg);pointer-events:none;opacity:0;transition:opacity .12s ease}
.tooltip#erp-tip.is-on{opacity:1}
.tooltip#erp-tip[hidden]{display:none}
/* The box is a manual popover (top layer, above windows and popovers): it never dims the page. */
.tooltip#erp-tip::backdrop{display:none}
/* The three check columns of the Bills list were sized by th[title]; their hint is data-tip now. */
.expense-list-group-card .expense-list-table th[data-tip]{width:44px;padding:6px 4px;text-align:center}.expense-list-group-card .expense-list-table th[data-tip]:nth-of-type(11){width:52px}
@media (prefers-reduced-motion:reduce){.tooltip#erp-tip{transition:none}}
@media print{.tooltip#erp-tip{display:none}}

/* The income form's own window (#modal-root, /IncomeForm?modal=1 from every page but the รายรับ list; size xl of docs/ui/MODAL.md)
   and the page form's void step. The รายรับ list's window is dialog.income-review (app/View/income-window-host.php, owner 2026-10-18
   item 14), laid out by the Bill window's rules. Its box, close and foot buttons are the modal standard's; these rules lay out what
   is inside. No box carries a stripe on one edge: a step is told apart by a light tint on the whole box. */
dialog.income-window{width:min(var(--modal-w-xl),calc(100vw - 32px))}
.iw-top{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px}
.iw-code{font-family:ui-monospace,Menlo,monospace;font-size:12px;line-height:16px;color:var(--muted);white-space:nowrap}
.iw-step{margin-top:24px;padding:16px;border-radius:var(--radius-lg);background:var(--soft)}
.iw-step>h2{margin:0 0 8px;font-size:14px;line-height:20px;font-weight:600}
.iw-foot{margin-top:24px}
/* The income form as a window (owner 2026-10-14; app/View/income-form-window.php + income-form-window-body.php): the income window's
   box, head and four facts, now as fields; the figures row in the window's one-line order; the rest in one or two compact lines.
   Groups are told apart by spacing only. */
dialog.income-add-modal.income-window{width:min(var(--modal-w-xl),calc(100vw - 32px))}
.iwf .iwf-in{display:block;width:100%;height:36px;min-height:36px;font:inherit;font-size:14px;color:var(--fg);min-width:0;box-sizing:border-box}
.iwf-n .iwf-in{text-align:right;font-variant-numeric:tabular-nums}.iwf-n>label{text-align:right}
.iwf-text{min-height:36px;line-height:20px;padding:8px 0;font-size:14px;overflow-wrap:anywhere}
.iwf .income-received-toggle label.check{font-size:13px}
/* make-it-james-ux 2026-10-14: one 8-column grid for the facts and the rest, so every edge lines up; one 16px gap */
.iwf-peak-row{display:flex;gap:8px;align-items:center}.iwf-peak-row .iwf-in{flex:1;min-width:0}
@media(max-width:767px){.iwf-n>label{text-align:left}}

/* === Modal standard (RULES 5.13; the measures and the list of every modal: docs/ui/MODAL.md) ===================================
   The ONE block for the box, the head, the foot and the close of every window. A view adds no rule of its own for these.
   Box: <dialog class="modal"> does not scroll and does not pad; its one .modal-inner pads and scrolls, so the close can sit outside.
   Close: .dlg-x (closeX() / erpCloseX()), a plain white ✕ in a 32px target (no circle, owner 2026-10-17), 8px above the box, flush with its right edge, at every width. The box keeps
   48px to the top of the screen for it (--modal-room), on a phone too. Windows that opt into data-fit-text-scale fit inside the zoomed viewport.
   Foot: .form-actions (modalFoot()): buttons of one height (--modal-btn), 8px apart, wrapping, never touching. */
:root{--modal-x:32px;--modal-x-gap:8px;--modal-room:48px;--modal-btn:36px}
@media(max-width:639px){:root{--modal-pad:16px}}
@media(pointer:coarse){:root{--modal-btn:44px}}
dialog.modal,main#content:not(.public-main)>dialog.modal{padding:0;margin:auto;overflow:visible;max-height:none;background:var(--bg);color:var(--fg)}
dialog.modal{white-space:normal;text-align:start;font-size:14px;line-height:20px;font-weight:400;letter-spacing:normal}
dialog.modal>.modal-inner{position:static;padding:var(--modal-pad);max-height:calc(100dvh - 2*var(--modal-room));overflow:auto;overscroll-behavior:contain;border-radius:inherit}
dialog.modal[data-fit-text-scale]>.modal-inner{max-height:calc(100dvh / var(--text-scale,1) - 2*var(--modal-room))}
@media(max-width:639px){dialog.modal{width:calc(100vw - 32px)}}
.dlg-x{display:inline-flex;align-items:center;justify-content:center;flex:none;width:var(--modal-x);height:var(--modal-x);min-width:0!important;min-height:0!important;padding:0;margin:0;border:0;border-radius:6px;background:transparent;color:var(--tf-ffffff,#fff);cursor:pointer;box-shadow:none;line-height:0;opacity:.85}
.dlg-x:hover{background:transparent;opacity:1}.dlg-x .icon{stroke-width:2}.confirm-dialog [data-confirm-cancel]{display:none!important}.dlg-x:focus-visible{outline:2px solid var(--tl-2563eb,#2563eb);outline-offset:2px}.dlg-x .icon{width:20px;height:20px}
dialog .dlg-x,[popover] .dlg-x{position:absolute;top:auto;left:auto;right:0;bottom:calc(100% + var(--modal-x-gap));z-index:5}
dialog.modal :is(.dlg-head,.bqv-hd,.bqv-in,.row-between,.modal-inner){position:static}
dialog.modal :is(.form-actions,.confirm-dialog-actions){display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px}
dialog.modal :is(.form-actions,.confirm-dialog-actions) .button{height:var(--modal-btn);min-height:var(--modal-btn);margin:0;flex:0 0 auto;white-space:nowrap}
@media(max-width:639px){dialog.modal :is(.form-actions,.confirm-dialog-actions) .button{flex:1 1 auto;justify-content:center}}
/* No bordered box inside the box (RULES 5.13c): inside a window a group is told apart by its heading, its spacing or a light tint
   on the whole group, never by a border of its own. */
dialog.modal .modal-inner :is(.card,.alert,.conversion-source,.conversion-lines-overview,.deal-create-requirement,.quotation-contact-extra,.file-viewer-stage,.bank-export-blocked,.cashflow-project-popup-totals,.qe-prev){border:0;box-shadow:none}
dialog.modal .modal-inner :is(.card,.conversion-lines-overview,.quotation-contact-extra,.qe-prev){padding-inline:0!important;background:transparent}
/* A question asked from inside a window is a step of that window, never a second window (RULES 5.13c; appConfirm in app.js):
   the window shows only the question and takes its size until the answer. */
dialog.modal.is-step{width:min(var(--modal-w-sm),calc(100vw - 32px))!important;height:fit-content!important;inset:0!important;margin:auto!important;max-width:none!important}
dialog.modal.is-step.is-wide{width:min(var(--modal-w-lg),calc(100vw - 32px))!important}
dialog.modal.is-step>:not(.modal-step):not(.dlg-x){display:none!important}
.confirm-dialog>.modal-step>.dlg-head{margin-bottom:0}
/* Own shapes on the same box and the same close (docs/ui/MODAL.md "Own shapes"): the Bill window is a full-screen record that
   scrolls in .bqv-in and keeps the room for the close above it. */
dialog.bqv>.bqv-in{max-height:calc(100dvh - 2*var(--modal-room));overflow:auto;overflow-x:hidden;border-radius:inherit}
dialog.bqv.bqv-fs{inset:var(--modal-room) 0 16px;width:calc(100vw - 48px);height:auto;margin:0 auto;overflow:visible}
dialog.bqv.bqv-fs>.bqv-in{height:100%;max-height:none;max-width:none;margin:0;padding-inline:max(var(--bqv-gut,32px),calc(50% - 608px))}
@media(max-width:767px){dialog.bqv.bqv-fs{width:calc(100vw - 16px);--bqv-gut:16px}}
/* The Bill window's foot (docs/ui/MODAL.md section 5): right-aligned, the quiet เพิ่มเติม menu, then the one strong button; one
   button height, wrapping, never touching. The reason a step cannot be pressed yet reads at the left. The menu opens upward. */
dialog.bqv .bqv-ft{position:sticky;bottom:0;height:auto;min-height:60px;flex-wrap:wrap;justify-content:flex-end;gap:8px;padding-block:12px;background:var(--bg)}
dialog.bqv .bqv-ft :is(.bqv-fte,.bqv-inline){flex-wrap:wrap;gap:8px;min-width:0}
dialog.bqv .bqv-ft .bqv-main{display:contents}
dialog.bqv .bqv-ft .bqv-main>.bqv-mut{margin-right:auto;order:0}
dialog.bqv .bqv-ft .bqv-more{order:1}
dialog.bqv .bqv-ft :is(.bqv-pri,.bqv-main>.button){order:2}
dialog.bqv .bqv-ft .bqv-pri{display:flex;margin:0}
dialog.bqv .bqv-ft .bqv-step{flex:1 1 100%;justify-content:flex-end}
dialog.bqv .bqv-ft .bqv-step textarea{flex:1 1 220px}
dialog.bqv .bqv-ft .button{height:var(--modal-btn);min-height:var(--modal-btn);padding:0 12px;margin:0;flex:0 0 auto;white-space:nowrap;gap:6px}
dialog.bqv .bqv-ft .button .icon{width:14px;height:14px}
dialog.bqv .bqv-ft :is(select,input:not([type=hidden])){height:var(--modal-btn);min-height:var(--modal-btn)}
dialog.bqv .bqv-ft .bqv-more{position:static}
.bqv-more>.kebab-menu{top:auto;bottom:calc(100% - 8px);right:16px;min-width:220px;max-width:calc(100% - 32px)}
.bqv-more>.kebab-menu .kebab-menu-item{cursor:pointer;font:inherit;font-size:13px;line-height:20px}
/* The approval bottom sheet (below 1024 px): the same close, outside the sheet, above its top right corner. */
.ab-layout>.dlg-x{position:fixed;right:8px;z-index:51}
/* The day team window is short and its person picker opens below the box: its inner does not clip (as before the standard). */
/* The contact pickers (.cp-dialog: Matrix, quotation customer) are a search box over a list: the box has a fixed height, the list
   scrolls, the head and the pager row keep the box's padding. */
dialog.modal.cp-dialog>.modal-inner{padding:var(--modal-pad) var(--modal-pad) 16px;overflow:hidden;height:100%;max-height:none}
dialog.modal.cp-dialog{max-height:calc(100dvh - 2*var(--modal-room))}
.cp-dialog .cp-foot{padding:12px 0 0}.cp-dialog .cp-foot .button{height:32px;min-height:32px}
/* Edge-attached kinds (docs/ui/MODAL.md "Own shapes"). The account pop-up of ผู้ใช้และสิทธิ์ and the Matrix cell box are popovers with a
   dimmed page: the same close, outside, above the top right corner. The calendar settings drawer fills the right edge of the
   screen, so its close sits outside on the page side of its top corner. */
.users-manage,.mx-cellpop{overflow:visible}
.users-manage-body{max-height:calc(100dvh - 2*var(--modal-room) - 64px);overflow:auto}
.users-manage[data-manage-popover]{max-width:calc((100dvw - 32px) / var(--text-scale,1))}
.users-manage[data-manage-popover] .users-manage-body{max-height:calc(100dvh / var(--text-scale,1) - 2*var(--modal-room) - 80px)}
.calendar-settings-panel .dlg-x{position:fixed;top:8px;right:calc(min(310px,100vw) + 8px);z-index:62}
/* === end of the modal standard === */

/* One birth form of a Project (owner 2026-10-14, "2ก"): app/View/project-birth-fields.php on /CreateProject (window lg or page) and
   on each Project of /DealProjectConversion. Two columns from 640px (name · customer, ผู้ดูแล · มูลค่า); the type cards and the days
   take the row. A label keeps its required mark on its own line. The picked days are a short tinted list, no border. */
.project-birth-modal{width:min(var(--modal-w-lg),calc(100vw - 32px))}
.project-birth-form{max-width:880px}main#content form.card.project-birth-form.card-popover-host{overflow:visible}
.pbf{display:grid;gap:16px;grid-template-columns:minmax(0,1fr)}
.pbf-field{display:grid;gap:6px;min-width:0;align-content:start}
.pbf-field.project-form-types,.pbf-days,.pbf-modules{grid-column:1/-1}
.pbf .project-form-type-toggle{height:36px;min-height:36px}
.pbf .pbf-label{display:flex;align-items:center;gap:2px;flex-wrap:nowrap;white-space:nowrap}
.pbf-static{margin:0;min-height:20px}
.pbf-days>input[type=date]{max-width:240px}
.pbf-day-list{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.pbf-day{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:6px 8px;border-radius:6px;background:var(--soft)}
.pbf-day-label{flex:1 1 160px;min-width:0}
.pbf-day-time{width:auto}
.pbf-day-custom{display:inline-flex;align-items:center;gap:6px}
.pbf-day-x{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:0;border-radius:9999px;background:transparent;color:var(--muted);cursor:pointer}
.pbf-day-x:hover{background:var(--bg);color:var(--fg)}.pbf-day-x .icon{width:14px;height:14px}
/* ระบุทีม (owner 2026-11-08 item 8): a small tick on the day row, off by default; ticked, the day's วิทยากร and TA pickers on their own line under it */
.pbf-day .pbf-team-tick{order:1;display:inline-flex;align-items:center;gap:6px;min-height:28px;font-size:12px;font-weight:400;line-height:16px;color:var(--muted);white-space:nowrap;cursor:pointer}
.pbf-day .pbf-team-tick input{width:auto;height:auto;margin:0}
.pbf-day .pbf-day-x{order:2}
.pbf-team{order:3;flex:1 1 100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding-top:2px}
.pbf-team-role{display:grid;gap:4px;min-width:0;align-content:start}
.pbf-team-label{font-size:12px;line-height:16px;color:var(--muted)}
.pbf-team .qe-chips:not(:has(.qe-chip)){display:none}
@media(max-width:639px){.pbf-team{grid-template-columns:minmax(0,1fr)}}
@media(min-width:640px){.pbf{grid-template-columns:repeat(2,minmax(0,1fr))}}

.combobox-group{padding:8px 8px 4px;font-size:12px;font-weight:600;color:var(--muted);list-style:none}

/* ตั้งค่า > การเชื่อมต่อ > จับคู่รายรับกับ PEAK (owner 2026-10-16): one 8px gap, rows 28px, numbers right-aligned. */
.peak-income{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}.peak-income-bar{display:grid;grid-template-columns:minmax(0,1fr) 160px 160px;gap:8px;align-items:center}.peak-income-bar h2{margin:0}
.peak-income-bar select,.peak-income-bar .button{height:32px;width:100%}.peak-income-lead{margin:0}.peak-income-sum{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.peak-income-cell{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"l n" "s s";gap:0 8px;align-items:baseline;padding:8px 12px;border:1px solid var(--border);border-radius:6px;background:var(--bg);color:var(--fg);text-align:left;cursor:pointer;min-height:56px}
.peak-income-cell span{grid-area:l;font-size:12px;line-height:16px;color:var(--muted)}.peak-income-cell b{grid-area:n;font-size:20px;line-height:24px}.peak-income-cell small{grid-area:s;font-size:12px;line-height:16px;color:var(--muted)}
.peak-income-cell:hover{border-color:var(--muted)}.peak-income-cell.is-on{border-color:var(--primary);outline:1px solid var(--primary);outline-offset:-2px}.peak-income-cell:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.set-body .peak-income-bar{display:flex;flex-wrap:wrap;justify-content:flex-start}.set-body .peak-income-bar .button{width:auto;min-width:160px}.peak-history{margin-top:24px}.peak-history .peak-income-bar{grid-template-columns:minmax(0,1fr) 160px}.peak-history-sum{grid-template-columns:repeat(4,minmax(0,1fr))}.peak-history-sum .peak-income-cell{min-height:40px}.peak-income-table td small.peak-nowrap{white-space:nowrap;display:inline-block;margin-left:8px}.peak-history-form{margin:0}.st-existing,.st-done{color:var(--tf-166534,#166534)}.st-create{color:var(--tf-1e40af,#1e40af)}.st-review{color:var(--tf-92400e,#92400e)}
.peak-income-acts{display:flex;gap:8px;align-items:center;justify-content:flex-end}.peak-income-acts:empty{display:none}.peak-income-acts form{display:flex;gap:8px;align-items:center;margin:0}
.peak-income-table th:not(:first-child),.peak-income-table td:not(:first-child),.peak-income-table th,.peak-income-table td{text-align:left;padding:4px 8px;font-size:12px;line-height:16px;height:28px;vertical-align:middle;white-space:nowrap}.peak-income-table th.num:not(:first-child),.peak-income-table td.num:not(:first-child){text-align:right;font-variant-numeric:tabular-nums}
.peak-income-table td small{white-space:normal}.st-ambiguous,.st-none{color:var(--tf-92400e,#92400e)}.st-missing{color:var(--tf-b91c1c,#b91c1c)}.st-linked,.st-matched{color:var(--tf-166534,#166534)}
@media(max-width:1023px){.peak-income-sum{grid-template-columns:repeat(2,minmax(0,1fr))}.peak-income-bar{grid-template-columns:minmax(0,1fr) 120px 140px}}
@media(max-width:639px){.peak-income-bar{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.peak-income-bar h2{grid-column:1/-1}.peak-income-acts{justify-content:stretch}.peak-income-acts form,.peak-income-acts .button{width:100%}.peak-income-table thead{display:none}.peak-income-table,.peak-income-table tbody{display:block;min-width:0;width:100%}.peak-income-table tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 8px;padding:8px;margin-bottom:8px;border:1px solid var(--border);border-radius:6px}.peak-income-table td{display:block;height:auto;padding:4px 0;white-space:normal;text-align:left!important;border:0}.peak-income-table td::before{content:attr(data-l);display:block;color:var(--muted);font-size:12px;line-height:16px}.peak-income-table td.mono{grid-column:1/-1}}

.contact-login-row{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.contact-login-state{display:flex;align-items:center;gap:8px 16px;flex-wrap:wrap;min-width:0}.contact-login-state .muted{overflow-wrap:anywhere}@media(max-width:767px){.contact-login-row .button{width:100%}}

.form-actions:has(>.statement-save-missing){flex-wrap:wrap}.statement-save-missing{display:block;flex:1 1 100%;order:-1;max-width:100%;height:auto;white-space:normal!important;text-align:left;line-height:1.4;padding:8px 12px}

/* รวมผู้ติดต่อ /ContactMerge (owner 2026-10-18 item 7; app/View/contact-merge.php): the .pov table look; one column per Contact, the
   label column sticky when the table is wider than the page; a note is the Bill window's slot 2 (one 32px line, amber or rose); a
   pick greys the other values by CSS only; while the page answers only the table bodies fade (#contact-merge[aria-busy]). */
.cmg,.cmg-form{display:grid;gap:16px;min-width:0}
.cmg-part,.cmg-notes{display:grid;gap:8px;min-width:0}
.cmg h2{margin:0;font-size:14px;line-height:20px;font-weight:600}
.cmg .fw-bar{margin:0}.cmg-tools>select,.cmg-tools>.combobox{flex:0 1 320px;min-width:0}
.cmg-note{display:flex;align-items:center;min-height:32px;margin:0;padding:0 12px;border-radius:var(--radius-lg);font-size:13px;line-height:18px;background:var(--mx-amber-bg);color:var(--mx-amber-fg)}
.cmg-note.is-r{background:var(--mx-rose-bg);color:var(--mx-rose-fg)}
.cmg-wrap{overflow-x:auto;min-width:0}
main#content .cmg-cmp{width:max(100%,calc(200px + var(--n,2) * 160px))}
.cmg-c-label{width:200px}
.cmg-cmp tbody th{position:sticky;left:0;z-index:1;background:var(--bg);text-align:left}.cmg-cmp tbody tr:last-child th{border-bottom:0}
.cmg-cmp tr.pov-day td{position:sticky;left:0}
.cmg-pick{display:flex;align-items:center;gap:8px;min-width:0;margin:0;cursor:pointer}
.cmg-pick input{flex:none;width:16px;height:16px;min-height:0;margin:0}
.cmg-v{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cmg-cmp td:has(input[type=radio]:not(:checked)) .cmg-v,.cmg-cmp .is-blank,.cmg-cmp .is-other{color:var(--muted)}
.cmg-cmp td:has(.cmg-pick):hover{background:var(--soft)}
.cmg-cmp .button.small{height:28px;min-height:28px;padding:0 8px}
.cmg-keep{display:flex;align-items:center;gap:8px;min-width:0}.cmg-keep .icon-button{margin-left:auto}
#contact-merge[aria-busy=true] tbody{opacity:.45;transition:opacity .12s}
@media(max-width:700px){main#content .cmg-cmp{width:100%}.cmg-cmp tbody th{position:static;height:auto;padding:0;border:0;background:none;color:var(--fg);font-size:13px;line-height:18px;font-weight:600}.cmg .pov td[data-l]::before{content:attr(data-l);display:block;font-size:11px;line-height:16px;color:var(--muted)}}
@media(pointer:coarse){.cmg-pick{min-height:44px}}


.peak-assign{display:inline-flex;gap:8px;margin:0 0 0 8px;vertical-align:middle}.peak-assign .combobox{flex:0 1 200px;min-width:0}


.pov-chip{display:inline-block;padding:0 6px;border:1px solid var(--border);border-radius:9999px;font-size:11px;line-height:16px;font-weight:400;color:var(--muted);background:transparent;vertical-align:middle;white-space:nowrap}

.iw-foot .iw-void{margin-right:auto}.iw-foot .form-actions{align-items:center}
dialog.sk-modal{overflow:hidden}

.peak-contacts-sum{grid-template-columns:repeat(5,minmax(0,1fr))}.st-auto,.st-linked{color:var(--tf-166534,#166534)}.st-name,.st-ambiguous{color:var(--tf-92400e,#92400e)}.st-new{color:var(--tf-1e40af,#1e40af)}
@media(max-width:1023px){.peak-contacts-sum{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Income window = the Bill window's size (owner 2026-10-16: "Modal รายรับไม่เต็มจอแบบรายจ่าย"): same box as dialog.bqv-fs, content centred at 1216px, the foot pinned to the bottom. */
dialog.modal.income-window,dialog.income-add-modal.income-window{position:fixed;inset:var(--modal-room) 0 16px;width:calc(100vw - 48px);max-width:none;height:auto;margin:0 auto;overflow:visible}
dialog.modal.income-window>.modal-inner{display:flex;flex-direction:column;height:100%;max-height:none;box-sizing:border-box;padding-inline:max(32px,calc(50% - 608px))}
dialog.modal.income-window>.modal-inner>.iw-foot{margin-top:auto;padding-top:24px}
@media(max-width:767px){dialog.modal.income-window,dialog.income-add-modal.income-window{width:calc(100vw - 16px)}dialog.modal.income-window>.modal-inner{padding-inline:16px}}

dialog.modal.income-window>.modal-inner>form.iwf{display:flex;flex:1 1 auto;flex-direction:column;min-height:0}dialog.modal.income-window>.modal-inner>form.iwf>.iw-foot{margin-top:auto;padding-top:24px}

/* Income window (view + form), owner 2026-10-17: three boxes of the same shape on one 3-column grid (meta strip, cards), every box = title, one big
   figure, rows. Boxes are a light tint on the whole box (MODAL.md: no bordered box inside the box). */

dialog.modal.income-window>.modal-inner>form.iwf>.iw-foot{position:sticky;bottom:0;background:var(--bg);padding-bottom:16px;z-index:2}

/* A− / A+ (owner 2026-10-16 "ย่อให้เล็กลง กินที่มาก"): a compact pair, never the 44px touch box. */

/* Collapsed sidebar (owner 2026-10-16 "ย่อแล้วกดดูเมนูย่อยไม่ได้"): pressing a group's icon opens its pages as a pop-out beside the bar. */
.collapsed .nav-group[data-fly] .nav-sub{display:block!important;position:fixed;left:68px;z-index:60;min-width:200px;padding:6px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg)}
.collapsed .nav-group[data-fly] .nav-sub .nav-sub-link{display:flex;align-items:center;gap:8px;justify-content:flex-start;padding:6px 10px;border-radius:var(--radius-md);white-space:nowrap}
.collapsed .nav-group[data-fly] .nav-sub span{display:inline!important}
main#content .ig tr.ig-new:not(.is-active):not(:focus-within) td+td>*{visibility:hidden}main#content .ig tr.ig-new-contract form{margin:0}
@media(max-width:1023px){main#content table.ig td :is(select,input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=range])).ig-in.ig-in{min-height:28px;height:28px}}
@media(max-width:1023px){main#content table.ig tbody tr.ig-row td :is(button,.button,input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=range])):not(.badge){min-height:28px;height:28px}}
main#content .ig tr.ig-new:hover td,main#content .ig tr.ig-new-contract:hover td{background:var(--soft)}.ig .ig-addlink:hover,.pp .ig-addlink:hover{background:transparent;color:var(--fg)}
main#content .ig tbody .ig-in.ig-req{background:color-mix(in srgb,var(--tb-2563eb,#2563eb) 7%,transparent);border-color:color-mix(in srgb,var(--tl-2563eb,#2563eb) 40%,transparent)}main#content .ig tbody .ig-in.ig-req::placeholder{color:var(--fg);opacity:.55}
.ig .ig-tree{position:relative}.ig .ig-tree .pov-elbow{margin-left:18px}.ig .ig-grip{position:absolute;left:1px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:16px;height:28px;color:var(--muted);cursor:grab;opacity:0}.ig tr:hover .ig-grip,.ig .ig-grip:focus-visible{opacity:1}.ig .ig-grip svg,.ig .ig-grip .icon{width:14px;height:14px}
main#content .ig tr.is-dragging td{opacity:.4}
/* The drop place of a dragged row: a 2px line across the row on the side it lands. A line, not a shadow (the shadows are the legacy
   elevation scale, scripts/ui_parity_check.py); the sticky first cell keeps its own position and holds the line as well. */
main#content .ig tr:is(.is-drop-before,.is-drop-after) td:not(:first-child){position:relative}
main#content .ig tr:is(.is-drop-before,.is-drop-after) td::after{content:"";position:absolute;left:0;right:0;height:2px;background:var(--primary);pointer-events:none}
main#content .ig tr.is-drop-before td::after{top:0}main#content .ig tr.is-drop-after td::after{bottom:0}
@media(hover:none){.ig .ig-grip{display:none}}
a[data-financial-toggle][hidden]{display:none}

/* The one year picker (owner 2026-10-17 answer 18): the /Projects muted select, the first control at the left of the page's toolbar (yearPicker(), yearBar()); the same look on every page and width (min-height: the settings pages' 44px fields do not stretch it; a touch screen keeps the 44px target, as on /Projects). */
main#content select.year-pick{flex:0 0 88px;width:88px;min-width:0;max-width:none;min-height:36px;height:36px;padding:0 32px 0 12px;line-height:34px;font-size:12px;color:var(--muted);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:none;appearance:none;-webkit-appearance:none;background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;background-size:16px 16px}
main#content select.year-pick:hover,main#content select.year-pick:focus-visible{color:var(--fg)}
@media(pointer:coarse){main#content select.year-pick{min-height:44px}}
.pov>.year-bar{margin:0 0 12px}

/* /UpcomingWorkload (owner 2026-10-18 item 10): the coming วันงาน as the one table. Column widths (DESIGN-SYSTEM 1.5, the 7 fixed sum to 880);
   its first column and ความพร้อม stay when it scrolls inside its card; on a phone a row is its วันงาน and readiness on one line, then six
   facts under their column names (.pov-stack) that wrap (no tooltip exists there). A strip and a totals line in a toolbar keep the bar's 36px. */
.pov-c-time{width:104px}.pov-c-place{width:144px}.pov-c-person{width:120px}.pov-c-team{width:176px}.pov-c-ready{width:104px}
.fw-bar>.tabs{margin:0}.fw-bar>.totals-line{margin-top:0;margin-bottom:0}
/* sweep-k:begin (shared kit: facts row, launcher list) */
.facts{display:grid;grid-template-columns:1.3fr 1fr 1fr 1fr;gap:16px;margin:0}.facts .fact{min-width:0}.facts dt{font-size:11px;line-height:16px;color:var(--muted)}.facts dd{margin:0;font-size:14px;line-height:20px;font-weight:600;font-variant-numeric:tabular-nums}.facts .is-big dd{font-size:22px;line-height:28px;font-weight:700}.facts small{display:block;font-size:12px;line-height:16px;color:var(--muted)}
@media(max-width:700px){.facts{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.facts dt{white-space:normal;overflow-wrap:anywhere}}
.link-table .lt-c-name{width:280px}.link-table td:first-child a{font-weight:600}
/* sweep-k:end */
.uw-table td:first-child>a{font-weight:600}
/* OP-26: what a day still lacks is its own line on a narrow screen only; the computer keeps the dot and its tooltip (Look 4). */
.uw-table .uw-gaps{display:none}@media(max-width:700px){.uw-table .uw-gaps{display:block;font-size:12px;line-height:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
.uw-place{display:flex;min-width:0;max-width:100%}.uw-place-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uw-place-link{flex:none;white-space:nowrap}
@media(min-width:701px){.uw-table{min-width:1088px}.uw-table tr>:first-child{position:sticky;left:0;z-index:1;background:var(--bg)}.uw-table tr>.uw-ready{position:sticky;right:0;z-index:1;background:var(--bg)}.uw-table tr.pov-day>:first-child,.uw-table tr[data-row-href]:hover>:is(:first-child,.uw-ready){background:var(--soft)}}
@media(max-width:700px){.uw-table td{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}.uw-table tr[data-row-href]>td:first-child{grid-column:1/3}.uw-table tr[data-row-href]>td.uw-ready{grid-column:3;grid-row:1}.uw-table td.uw-ready .pov-st{justify-content:flex-end}}

/* settings:begin — the Settings screen: bands, blocks, rows (docs/ui/DESIGN-SYSTEM.md section 15, app/Support/SettingsUi.php). Spacing steps 4 · 8 · 12 · 16 · 24. */
.set-bands>.pov-pj:first-child{margin-top:0}.set-tools{margin-top:0}
.set-band .pov-ph{grid-template-columns:16px auto minmax(0,1fr) auto}.set-state{justify-self:end;min-width:0}
#set-codes .pov-meta{white-space:normal;overflow:visible;overflow-wrap:anywhere}
@media(max-width:700px){
 #set-codes .pov-ph,#set-pipeline .pov-ph{grid-template-columns:16px minmax(0,1fr) auto}
 main#content #set-pipeline .set-list tr.pov-day>td{white-space:normal;overflow:visible;overflow-wrap:anywhere}
}
.set-body{padding:16px}.set-body.is-flush{padding:0}.pov-pj.is-shut .set-body{display:none}
.set-hint{margin:0 0 12px;font-size:12px;line-height:18px;max-width:880px}.set-part+.set-part{margin-top:24px}.set-part>h3{margin:0 0 8px;font-size:14px;line-height:20px;font-weight:600}
.set-form{max-width:880px}.set-form+.set-form{margin-top:24px}main[data-route="/AdminSettings"] .set-body .field{max-width:none}
/* SET20-25 (audit 2026-11-20): a list section takes the content width like ประเภทงาน, so a long Task or checklist name is not cut beside empty room. */
:is(#set-project-checklists,#set-project-task-templates,#set-task-statuses,#set-task-fields) .set-form{max-width:none}
.set-form .field.full{grid-column:1/-1}
.set-form .set-compact-value{width:100%;max-width:15rem}
.set-form[data-set-tag-scope] summary{cursor:pointer;min-height:36px;align-content:center}
.set-form[data-set-tag-scope] details fieldset+fieldset{margin-top:12px}
@media(pointer:coarse){.set-form[data-set-tag-scope] :is(summary,.check-row){min-height:44px}}
.set-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:16px}main#content .set-form>.set-actions{margin-top:16px}
.set-toggle-line{display:flex;align-items:center;gap:12px}
.set-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:12px}.set-toolbar .search{flex:0 1 320px}.set-count{margin-left:auto;font-size:12px;line-height:16px}
.set-c-color{width:56px}.set-c-prob{width:136px;text-align:right}.set-c-xs{width:72px}.set-c-sm{width:96px}.set-c-md{width:120px}.set-c-lg{width:190px}.set-c-xl{width:220px}.set-c-order{width:72px}.set-c-code{width:120px;font-family:var(--mono,ui-monospace,monospace)}.set-c-count{width:88px;text-align:right}.set-c-pick{width:200px}
.set-body .pov table{table-layout:fixed}.set-body .pov td,.set-body .pov th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.set-body [data-q][hidden]{display:none}
.set-body p.empty.is-inline{padding:8px 0;text-align:left}
.tabs .count{display:inline-block;min-width:20px;height:16px;margin-left:6px;padding:0 6px;border-radius:var(--radius-pill);background:var(--soft);color:var(--fg);font-size:12px;line-height:16px;text-align:center;font-variant-numeric:tabular-nums;vertical-align:middle}
@media(max-width:640px){.set-body{padding:12px}.set-toolbar{flex-wrap:wrap}.set-toolbar .search{flex:1 1 100%}}
/* ผังบัญชี (owner 2026-11-16): one tick column per page; the name keeps its room and the list scrolls sideways instead. */
/* a code (ผังบัญชี DEMO-410101) never breaks inside itself: one line, … at worst (RULES 5.23) */
main#content .set-list tr.set-row>td:first-child:has(>strong.mono){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.set-list:has(#fin-coa-rows) col.set-c-code{width:136px}
.set-list col.set-c-use{width:128px}@media(min-width:701px){.set-list:has(#fin-coa-rows)>table{min-width:1100px}}
/* SET20-29: the phone's count of pages and the page switches inside the account's detail. */
.coa-use-n,.coa-uses-phone{display:none}@media(max-width:700px){.coa-use-n{display:inline}.coa-uses-phone{display:grid;gap:4px;margin-top:16px}.coa-use-line{display:flex;align-items:center;gap:8px;min-height:44px;margin:0}}
.set-list.ig{min-width:0;overflow-x:auto}.set-list table{table-layout:fixed;width:100%}.set-row{cursor:pointer}.set-row:hover td{background:var(--soft)}.set-row:focus-visible{outline:2px solid var(--fg);outline-offset:-2px}
.set-row[aria-expanded=true] td{background:var(--soft)}main#content .set-list tr.pov-day>td,main#content .set-list tr.pov-day>td:first-child{background:var(--soft);font-weight:600}main#content .set-list tr.set-row:hover>td:first-child,main#content .set-list tr.set-row[aria-expanded=true]>td:first-child{background:var(--soft)}.set-list tr.pov-day>td .muted{font-weight:400}.set-list tr.pov-day:hover>td{background:var(--soft)}
.set-detail{padding:12px 12px 16px;min-width:0}.set-detail .set-form{max-width:880px}
.set-kebab{margin-right:auto}.set-kebab summary{cursor:pointer}
.set-swatch{display:inline-flex;width:12px;height:12px;vertical-align:middle}.set-swatch svg{width:12px;height:12px}
.check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px}@media(max-width:640px){.check-grid{grid-template-columns:minmax(0,1fr)}}
.secret-field[data-edit="1"] [data-secret-view],.secret-field[data-edit="0"] [data-secret-edit]{display:none}
.secret-field [data-secret-clearing]{display:none}.secret-field[data-clear="1"] [data-secret-clearing]{display:inline}.secret-field[data-clear="1"] [data-secret-ok]{display:none}
.secret-field[data-clear="1"] .secret-value{opacity:.6;text-decoration:line-through}
/* A Settings list on a phone stays a table with its header (owner 2026-11-16: 2–4 key columns, never cards): the columns that are not key
   are hidden (table.set-h<n>, SettingsUi::listOpen), every cell one line with … (RULES 5.23), the row opens its expand row as on a desktop. */
@media(max-width:700px){
main#content .pov.set-list table{display:table;table-layout:auto;width:100%;min-width:0}
main#content .pov.set-list thead{display:table-header-group}main#content .pov.set-list tbody{display:table-row-group}
main#content .pov.set-list tr{display:table-row;padding:0;border-bottom:0;gap:0}
main#content .pov.set-list :is(td,th){display:table-cell;width:auto;max-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 8px;border-bottom:1px solid var(--border)}
main#content .pov.set-list tr.ig-add>td,main#content .pov.set-list tr.ig-detail>td{white-space:normal;overflow:visible;padding:8px 12px}
main#content .pov.set-list td[data-l]::before{display:none}
main#content .pov.set-list colgroup{display:none}main#content .pov.set-list thead th:first-child{width:46%}
main#content .set-list table.set-h1 :is(th,td):nth-child(1):not([colspan]),main#content .set-list table.set-h2 :is(th,td):nth-child(2):not([colspan]),main#content .set-list table.set-h3 :is(th,td):nth-child(3):not([colspan]),main#content .set-list table.set-h4 :is(th,td):nth-child(4):not([colspan]),main#content .set-list table.set-h5 :is(th,td):nth-child(5):not([colspan]),main#content .set-list table.set-h6 :is(th,td):nth-child(6):not([colspan]),main#content .set-list table.set-h7 :is(th,td):nth-child(7):not([colspan]),main#content .set-list table.set-h8 :is(th,td):nth-child(8):not([colspan]),main#content .set-list table.set-h9 :is(th,td):nth-child(9):not([colspan]),main#content .set-list table.set-h10 :is(th,td):nth-child(10):not([colspan]),main#content .set-list table.set-h11 :is(th,td):nth-child(11):not([colspan]),main#content .set-list table.set-h12 :is(th,td):nth-child(12):not([colspan]){display:none}
main#content .set-list tr.ig-detail[hidden]{display:none}
}
.set-body .card:not(.perm-save-bar):not(.empty){padding:0;border:0;border-radius:0;box-shadow:none;background:none}.set-body .card:not(.perm-save-bar):not(.empty):not(.table-wrap){overflow:visible}
.set-body>.card:not(.empty)+.card:not(.empty){padding-top:16px;border-top:1px solid var(--border)}.set-body .card.empty{padding:24px 0;border:0;box-shadow:none;background:none;text-align:center}.set-body .card.empty p{margin:0}
.set-body .int-head h2,.set-body .import-head{display:none}.set-body>.int-card>.int-head:not(:has(p)){display:none}.set-body .int-head .badge{margin-left:auto}.set-toggle-line{margin:16px 0}.set-form>.set-toggle-line:first-child,.set-form>.set-toggle-line:first-of-type{margin-top:0}.set-body .peak-history{margin-top:0}
@media(max-width:767px){.navset-item{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.navset-item>.navset-name{flex:1 1 calc(100% - 32px)}.navset-item>:is(.switch,.navset-lock){margin-left:28px}.navset-item>.combobox{flex:1 1 0;min-width:0;width:auto}.navset-item .navset-group-select{width:100%}.navset-item.navset-quiet>.navset-name{flex:1 1 0}.navset-item.navset-quiet>:is(.switch){margin-left:0}}
.navset-colhead{display:grid;grid-template-columns:24px minmax(0,1fr) auto 160px 76px;gap:12px;padding:8px 16px 0;font-size:12px;line-height:16px;color:var(--muted)}@media(max-width:767px){.navset-colhead{display:none}}
.navset{container-type:inline-size}
@container (max-width:900px){
 .navset-layout{grid-template-columns:minmax(0,1fr)}
 .navset-preview{position:static;max-width:360px}
}
/* a menu's note (ระบบลางานปิดอยู่ …) stands beside its name box on the same line, muted, cut with … and whole in the tip: the row keeps its siblings' height (RULES 5.23) */
#set-navigation .navset-name{display:flex;align-items:center;gap:8px}
#set-navigation .navset-name small{display:block;flex:1 1 0;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:767px){
 #set-navigation .navset-item:not(.navset-quiet){display:grid;grid-template-columns:20px minmax(0,1fr) auto auto}
 #set-navigation .navset-item:not(.navset-quiet)>.navset-name{grid-column:2/-1}
 #set-navigation .navset-item:not(.navset-quiet)>:is(.combobox,.navset-group-select){grid-column:2/-1;grid-row:2;width:100%;min-width:0}
 #set-navigation .navset-item:not(.navset-quiet)>:is(.switch,.navset-lock){grid-column:2;grid-row:3;justify-self:start;margin-left:0}
 #set-navigation .navset-item:not(.navset-quiet)>.navset-move{grid-column:3/-1;grid-row:3;justify-self:end}
}
#set-alerts .set-toggle-line{align-items:flex-start}
#set-sign-in fieldset+fieldset{margin-top:20px;padding-top:16px;border-top:1px solid var(--border)}
#set-sign-in fieldset legend{float:left;width:100%;margin-bottom:8px;font-size:14px;line-height:20px}
#set-sign-in .form-grid{clear:both;align-items:start}
#set-sign-in .set-toggle-line{align-items:center;margin:0}
#set-alerts .combobox-trigger{height:auto}
#set-alerts .combobox-value{white-space:normal;overflow-wrap:anywhere}
#set-ai .table-wrap{container-type:inline-size}
#set-ai .set-ai-tasks .ai-gate-cell{max-width:none}
/* เข้าสู่ระบบด้วย ERP (2026-11-19): a long return address wraps inside its cell instead of widening the table on a phone. */
#set-erp-sign-in .project-table td{overflow-wrap:anywhere;word-break:break-word;white-space:normal}
/* FL196 1440px (2026-11-19): the one-line description fills its cell and is cut with … ; it never sets the table's width (was 1745px). */
#set-ai .set-ai-tasks .ai-gate-cell>.muted{width:0;min-width:100%}
/* แอปของบริษัท (live look 2026-11-19): on a phone each offered tool stays one line, tick · name · อ่าน/บันทึก · งาน, not a tall card. */
@media(max-width:639px){#set-apps .app-tools tr{display:flex;align-items:center;gap:8px;padding:8px 0}#set-apps .app-tools td{display:block;padding:0}#set-apps .app-tools td:nth-child(4){flex:1;min-width:0;color:var(--muted);text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
/* SETORG-08 (owner 2026-11-16 phone tables): on a phone the AI jobs stay a table with its head, งาน (name and risk) · ตั้งค่า, one line a row; the long
   description is the row's tip. */
@container (max-width:600px){
 main#content #set-ai .set-ai-tasks .project-table{display:table;table-layout:fixed;width:100%;min-width:0}
 main#content #set-ai .set-ai-tasks thead{display:table-header-group}main#content #set-ai .set-ai-tasks tbody{display:table-row-group}
 main#content #set-ai .set-ai-tasks tr{display:table-row;height:auto}main#content #set-ai .set-ai-tasks th:last-child{width:136px}
 main#content #set-ai .set-ai-tasks :is(td,th){display:table-cell;width:auto;min-width:0;height:auto;padding:6px 8px 6px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 main#content #set-ai .set-ai-tasks td.ai-gate-cell>.muted{display:none}
 #set-ai .set-ai-tasks :is(.combobox,select){width:100%;min-width:0}
}
/* The use log on a phone: เวลา · ใคร · ทำอะไร, one line a row; the other facts on a wider screen. */
@container (max-width:780px){
 main#content #set-ai #ai-log-title~.table-wrap>.project-table{display:table;width:100%;table-layout:fixed}
 main#content #set-ai #ai-log-title~.table-wrap :is(thead,tbody){display:table-row-group}main#content #set-ai #ai-log-title~.table-wrap thead{display:table-header-group}
 main#content #set-ai #ai-log-title~.table-wrap tr{display:table-row;padding:0;height:auto}
 main#content #set-ai #ai-log-title~.table-wrap :is(td,th){display:table-cell;padding:4px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:16px}
 main#content #set-ai #ai-log-title~.table-wrap :is(td,th):is(:nth-child(3),:nth-child(5),:nth-child(6),:nth-child(7),:nth-child(8)){display:none}
 main#content #set-ai #ai-log-title~.table-wrap td>.muted{display:none}
 main#content #set-ai #ai-log-title~.table-wrap td[data-label]::before{content:none}
}
@container (max-width:780px){
 #set-ai #ai-keys-title~.table-wrap>.project-table{display:block;min-width:0}
 #set-ai #ai-keys-title~.table-wrap :is(tbody,tr){display:block}
 #set-ai #ai-keys-title~.table-wrap thead{display:none}
 main#content #set-ai #ai-keys-title~.table-wrap tr{height:auto;padding:8px;border-bottom:1px solid var(--border)}
 main#content #set-ai #ai-keys-title~.table-wrap td{display:block;height:auto;padding:2px 0;border:0;white-space:normal;overflow-wrap:anywhere}
 #set-ai #ai-keys-title~.table-wrap td[data-label]::before{content:attr(data-label);display:block;color:var(--muted);font-size:12px;line-height:16px}
}
/* SET20-26 (audit 2026-11-20): the template form keeps one field height (36px) and the question list starts one grid step below the switch. */
#set-requirements .set-form :is(select,input:not([type=checkbox]):not([type=hidden])){height:36px}#set-requirements .set-questions{margin-top:24px}#set-requirements .set-questions>h3{margin:0 0 8px}
.set-question{margin:0;padding:12px 0;border:0;border-top:1px solid var(--border);min-inline-size:0}
.set-question-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(144px,184px) auto;gap:8px 12px;align-items:end}
.set-question-options{grid-column:1/-1;max-width:520px}
.set-question-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.set-question .set-adv{margin-top:8px}
.set-question .set-adv>.form-grid{padding-top:8px}
@media(max-width:700px){
 .set-question-grid{grid-template-columns:minmax(0,1fr)}
 .set-question-actions{justify-content:space-between}
}
.set-record-filters{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.set-record-filters>.search{flex:1 1 240px;max-width:320px}
.set-record-filters>:is(select,.combobox){width:auto;flex:0 1 184px;min-width:0}
.set-record-filters .check-row{margin:0}
@media(max-width:700px){.set-record-filters>.search{flex-basis:100%;max-width:none}}
.set-history{container-type:inline-size}
.set-history .set-list col:is(:first-child,:nth-child(2),:nth-child(3)){width:22%}
.set-history .set-list col:nth-child(4){width:16%}
.set-history .set-list col:nth-child(5){width:18%}
main#content .set-history .set-list tr[data-q]>td{height:auto;padding-block:6px;vertical-align:top;white-space:normal;overflow:visible;overflow-wrap:anywhere}
.set-record-table{container-type:inline-size}
@container (max-width:560px){
 .set-record-table>table.table-stack{min-width:0;width:100%}
 .set-record-table .table-stack thead{display:none}
 .set-record-table :is(.table-stack,tbody,tr,td){display:block}
 main#content .set-body .set-record-table tr{padding:10px 12px;border-bottom:1px solid var(--border);height:auto}
 main#content .set-body .set-record-table td{padding:2px 0;border:0;height:auto;text-align:left;white-space:normal;overflow-wrap:anywhere}
 main#content .set-body .set-record-table td[data-label]{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
 .set-record-table .table-stack td[data-label]::before{content:attr(data-label);color:var(--muted);flex:0 0 auto}
 .set-record-table td[data-label]>:is(div,details){min-width:0}
}
@container (max-width:780px){main#content .set-history .set-list tr[data-q]>td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
@media(max-width:700px){main#content .set-history .pov.set-list thead th:nth-child(5){width:120px}main#content .set-history .pov.set-list thead th:first-child{width:38%}}
/* Owner 2026-11-18 (LIVE-10, LIVE-01, LIVE-17): a group page is its sections printed open, one after another, under a sticky one-line
   index (SettingsUi::index, app.js "Settings section index"); no band, no chevron, no ซ่อน/เปิดทุกหัวข้อ. The head of a section is its name
   (16/24 600) with one muted fact and the state at the right, its hint under it. Spacing steps only. */
.set-page{--set-index-h:41px}
.set-index{position:sticky;top:0;z-index:20;display:flex;gap:4px;align-items:center;margin:0 0 16px;padding:4px 0;background:var(--bg);border-bottom:1px solid var(--border);overflow-x:auto;scrollbar-width:none;white-space:nowrap}
.set-index::-webkit-scrollbar{display:none}
/* SETORG-01: the find box closes the index line; what it does not match steps aside (.set-find-off); other groups' matches under the line. */
.set-find{position:sticky;right:0;flex:0 0 200px;margin-left:auto;padding-left:8px;background:var(--bg)}.set-find .search{width:100%}.set-find input{height:32px;min-height:32px;font-size:13px}
main#content .set-find-off,main#content .set-band .set-list tr.set-row.set-find-off,main#content .set-index a.set-find-off{display:none}
.set-find-other{margin:-8px 0 16px;font-size:13px;line-height:20px;color:var(--muted)}.set-find-other a{color:var(--fg);text-decoration:underline}
/* SET20-16: the other groups' hits are a list to press, one a line, the hint cut to one line. */
.set-find-other>span{display:block}.set-find-list{margin:4px 0 0;padding:0;list-style:none;display:grid;gap:2px}.set-find-list li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:24px}.set-find-list .muted{text-decoration:none}
@media(max-width:767px){.set-find{order:-1;position:sticky;left:0;right:auto;flex:0 0 140px;margin-left:0;padding-left:0;padding-right:8px}}
.set-index a{flex:none;padding:4px 8px;border-radius:var(--radius-md);font-size:13px;line-height:24px;color:var(--muted)}
.set-index a:hover{background:var(--soft);color:var(--fg)}.set-index a[aria-current]{background:var(--soft);color:var(--fg);font-weight:600}
main[data-route="/AdminSettings"] .set-band{scroll-margin-top:calc(var(--set-index-h) + 8px);margin:0;padding:0;border:0;background:none}
main[data-route="/AdminSettings"] .set-band+.set-band{margin-top:32px}
.set-head{display:flex;align-items:baseline;gap:8px;margin:0 0 4px;min-width:0}.set-head h2{margin:0;font-size:16px;line-height:24px;font-weight:600;white-space:nowrap}
.set-head .set-facts{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.set-head .set-state{margin-left:auto;flex:none}
main[data-route="/AdminSettings"] .set-bands .set-body{padding:0}
main[data-route="/AdminSettings"] .set-bands .set-hint{margin:0 0 12px}
#perm-rls{scroll-margin-top:calc(var(--set-index-h) + 8px)}
/* The group strip on a phone scrolls sideways; a fade at the edge says there is more (LIVE-17). */
@media(max-width:767px){#admin-groups{display:flex;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 32px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 32px),transparent)}
 #admin-groups.is-end{-webkit-mask-image:none;mask-image:none}
 .set-index{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 32px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 32px),transparent);margin-left:-12px;margin-right:-12px;padding-left:12px;padding-right:12px}
 .set-head{flex-wrap:wrap;row-gap:0}.set-head h2{font-size:15px}}
.set-form.set-form-wide{max-width:1160px}.set-cols{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}.set-cols>.set-part+.set-part{margin-top:0}
@media(max-width:900px){.set-cols{grid-template-columns:minmax(0,1fr)}.set-cols>.set-part+.set-part{margin-top:8px}}
/* LIVE-12/13: one board at a time on บอร์ดและ Stage. (Lists take the content width since 2026-11-21: "One right edge" below.) */
main#content .set-list tr.pipe-off,main#content .set-band .set-list tr.set-row.pipe-off{display:none}.pipe-pick{display:flex;align-items:center;gap:8px;margin:0 0 8px}.pipe-pick select,.pipe-pick .combobox{width:240px;max-width:100%}
main#content .set-list tr.coa-off,main#content .set-band .set-list tr.set-row.coa-off{display:none}#set-categories .set-toolbar>.search{flex:0 1 320px}#set-categories .set-toolbar>:is(.set-coa-show,.combobox){flex:0 0 200px;width:200px}#set-categories .set-count{white-space:nowrap;margin-left:auto}@media(max-width:640px){#set-categories .set-toolbar>:is(.set-coa-show,.combobox){flex:1 1 100%;width:100%}#set-categories .set-count{white-space:normal;margin-left:0}}
.int-health-lines{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px 16px;margin:0;align-items:center}.int-health-lines dt{display:flex;align-items:center;gap:6px;font-size:13px;line-height:20px;color:var(--muted)}.int-health-lines dt .icon{width:14px;height:14px}.int-health-lines dd{margin:0;min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:4px}.int-health-lines .set-value{overflow-wrap:anywhere}
.int-guide>summary{cursor:pointer;font-size:13px;line-height:20px;color:var(--muted)}.int-guide[open]>summary{margin-bottom:8px}
@media(max-width:640px){.int-health-lines{grid-template-columns:minmax(0,1fr)}.int-health-lines dd{margin-bottom:8px}}
#set-navigation .navset-layout{grid-template-columns:minmax(0,1fr);max-width:880px}#set-navigation .navset:not(.is-arrange) .navset-layout{max-width:600px}
#set-navigation .navset:not(.is-arrange) .navset-item>:is(.navset-group-select,.combobox,.navset-move),#set-navigation .navset:not(.is-arrange) .navset-group-head>.navset-move,#set-navigation .navset:not(.is-arrange) .navset-colhead>span:nth-child(n+4){display:none}
#set-navigation .navset:not(.is-arrange) :is(.navset-item:not(.navset-quiet),.navset-colhead){display:grid;grid-template-columns:24px minmax(0,1fr) auto;gap:8px 12px;min-height:40px}
#set-navigation .navset:not(.is-arrange) .navset-item:not(.navset-quiet)>.navset-name{grid-column:2}#set-navigation .navset:not(.is-arrange) .navset-item:not(.navset-quiet)>:is(.switch,.navset-lock){grid-column:3;grid-row:1;margin-left:0;justify-self:end}
#set-navigation .navset:not(.is-arrange) .navset-group-head{grid-template-columns:24px minmax(0,1fr) auto;min-height:40px}
main#content #set-navigation .navset-head{display:flex;align-items:center;justify-content:space-between;flex-direction:row;text-align:left}[data-navset-arrange][aria-pressed=true]{background:var(--soft);border-color:var(--muted)}
/* One right edge (owner 2026-11-21 "design ไม่เรียบร้อย", audit-2026-11-21/settings.md X1): every section of a Settings group, its form, list,
   connection step and บันทึก ends on the content edge; the 720 / 880 / 1000 / 1160 caps of earlier rounds made five right edges in one tab.
   The expand row under a list row stays one column of at most 520px (DESIGN-SYSTEM 5.9). */
main#content[data-route="/AdminSettings"] .set-bands :is(.set-form,.set-form-wide,.set-list table,.int-section>*,.int-section.int-part>*,.int-card .form-stack,.int-card .int-steps,.field,form.row-between,.navset-layout,.set-hint):not(.set-detail *):not(.set-detail){max-width:none}
#set-navigation .navset:not(.is-arrange) .navset-layout{max-width:none}
/* One form look (2026-11-21, settings.md target 2): a typed block in Settings is the 2-column .form-grid of the company form; a
   connection's stacked form takes the same two columns, and what is not a field (a guide line, a note, the บันทึก row) spans both. */
@media(min-width:701px){main#content[data-route="/AdminSettings"] .set-bands form.form-stack:not(.set-detail *){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
 main#content[data-route="/AdminSettings"] .set-bands form.form-stack:not(.set-detail *)>:not(.field):not(label){grid-column:1/-1}}
/* One fold look (2026-11-21, settings.md X2 / target 5): every fold of Settings and /ConnectAI is a plain line with a small chevron before it,
   never a bordered box inside a section (.int-advanced was one), never the browser's triangle (.int-guide), never an arrow after the words. */
main#content:is([data-route="/AdminSettings"],[data-route="/ConnectAI"]) :is(.set-fold,.int-advanced,.int-guide)>summary{display:flex;align-items:center;gap:10px;min-height:40px;padding:0;list-style:none;cursor:pointer;font-size:14px;line-height:20px;font-weight:600;color:var(--fg)}
main#content:is([data-route="/AdminSettings"],[data-route="/ConnectAI"]) :is(.set-fold,.int-advanced,.int-guide)>summary::-webkit-details-marker{display:none}
main#content:is([data-route="/AdminSettings"],[data-route="/ConnectAI"]) :is(.set-fold,.int-advanced,.int-guide)>summary::before{content:'';flex:none;width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);transition:transform .15s}
main#content:is([data-route="/AdminSettings"],[data-route="/ConnectAI"]) :is(.set-fold,.int-advanced,.int-guide)[open]>summary::before{transform:rotate(45deg)}
main#content:is([data-route="/AdminSettings"],[data-route="/ConnectAI"]) :is(.set-fold,.int-advanced,.int-guide)>summary>.icon{display:none}
main#content:is([data-route="/AdminSettings"],[data-route="/ConnectAI"]) .int-guide>summary{font-weight:400;color:var(--muted)}
main#content[data-route="/AdminSettings"] .int-advanced{border:0;border-radius:0}main#content[data-route="/AdminSettings"] .int-advanced-body{padding:0 0 0 17px}
/* An app key's tools: one line each, the box, the job's words, then อ่าน / บันทึก muted (the stacked form-stack label broke it into three lines). */
main#content .form-stack label.app-tool{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:400;line-height:20px;grid-column:auto}
/* /ConnectAI (2026-11-21): the Settings section look (.set-band head, 32px between sections), key ของฉัน first. The new-key line is one
   row on a computer (name · what AI may do · สร้าง key, bottoms aligned) and stacks on a phone; steps are numbered lines, the copy box under
   the words of its step. */
main#content[data-route="/ConnectAI"] .set-band{margin:0;padding:0;border:0}
main#content[data-route="/ConnectAI"] .set-band+.set-band{margin-top:32px}
main#content[data-route="/ConnectAI"] .set-body{padding:0;display:flex;flex-direction:column;gap:12px}
.ai-key-new{display:grid;grid-template-columns:minmax(200px,320px) auto auto;justify-content:start;gap:8px 24px;align-items:end}
main#content .ai-key-new fieldset.field{margin:0;padding:0;border:0;min-width:0;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:0 16px;min-height:36px}
.ai-key-new fieldset legend{padding:0;margin:0 0 6px;font-size:12px;font-weight:600;line-height:16px}
main#content .ai-key-new fieldset .check-row{width:auto;flex:none;align-items:center;gap:6px;min-height:36px;margin-right:16px;white-space:nowrap;font-size:14px;line-height:20px}
.ai-key-new .check-row .muted{display:none}
@media(max-width:700px){.ai-key-new{grid-template-columns:minmax(0,1fr)}.ai-key-new .button{justify-self:start}}
.ai-guide-steps{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:12px;font-size:14px;line-height:20px}.ai-guide-steps li>.users-manage-copy{margin-top:8px;max-width:720px}
.ai-guide-list{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:4px;font-size:14px;line-height:20px}
#ai-tool-strip{align-self:flex-start;max-width:100%}
/* ระบบ › เมนู (2026-11-21): the section's own head names it, so the editor has no second head or line; จัดลำดับและกลุ่ม is its one tool at the right. */
main#content #set-navigation .navset-head{padding:0 0 8px;border-bottom:0;justify-content:flex-end}
/* The strong button next to its fields (lead 2026-11-21: "a primary button far from its fields"): in a Settings section the บันทึก row starts
   under the fields, at the left where the eye already is, the quiet เพิ่มเติม before it; the sticky save bars of the rights and the menu keep
   their own place. */
main#content[data-route="/AdminSettings"] .set-bands :is(.set-actions,.form-actions):not(.navset-save){justify-content:flex-start}
main#content[data-route="/AdminSettings"] .set-bands .set-kebab{margin-right:0}
/* The section strip names every section on one line at 1440 (เชื่อมต่อภายนอก has nine): the find box closing it is 160px. */
@media(min-width:768px){.set-find{flex-basis:160px}}
/* A section's state line and its one action (PEAK ซิงก์ตอนนี้) read together: the button follows the words, not the far edge. */
main#content[data-route="/AdminSettings"] .set-bands .int-section>.row-between{justify-content:flex-start;gap:16px}
/* settings:end */

/* ==== day-table (owner 2026-10-20, DESIGN-SYSTEM 5.7; app/View/project-schedule-card.php): the Project's days as ONE flat editable table. It is the .ig
   editable table (5.1) with a column for each team-cost account. HARD RULE (owner 2026-10-20 "ห้ามเพิ่ม row height"): a day row is the standard 32px
   row of every .ig table, ONE line: no cell wraps or stacks, a long text ends in an ellipsis, a role cell shows its first person and "+N" (the rest in a
   small list), so adding a person or typing a long name never moves a row. Cells look like plain text until hovered or focused; the left edge of each
   column's first content is the left edge of its header (9px: 2px cell + 7px). Tokens only, no stripe, no new colour. ==== */
/* Owner 2026-11-02: no detail row; every fact is a column, the reader hides columns with "คอลัมน์" (a hidden one is .dt-off). The width is the shown
   columns' sum (--dt-w, kept by the script); วันที่ + ชื่องาน stay on the left and แก้ / ลบ on the right while the table scrolls, a shade on the edge
   that has more, and the bar above says the table scrolls. */
main#content .ig.dt-table{min-width:0;width:max(100%,var(--dt-w,1446px))}
.ig.dt-table col.dt-c-act{width:124px}
main#content .ig.dt-table .dt-off,main#content .ig.dt-table col.dt-off{display:none}
.dt-bar{display:flex;align-items:center;justify-content:flex-end;gap:12px;min-height:32px;margin-bottom:8px}
.dt-bar .dt-scroll-hint{display:inline-flex;align-items:center;gap:6px;margin-right:auto;font-size:12px;line-height:16px}.dt-bar .dt-scroll-hint .icon{width:14px;height:14px}
.dt-cols>summary{display:inline-flex;align-items:center;gap:6px}.dt-cols>summary .icon{width:14px;height:14px}
.dt-cols .kebab-menu{min-width:240px;max-height:min(60vh,420px);overflow-y:auto}
.dt-cols .dt-col-pick{cursor:pointer}
/* owner 2026-11-03: a column is dragged by its grip at the row's end; the row being dragged keeps the hover tint */
.dt-cols .dt-col-pick>span:not(.dt-col-grip){flex:1;min-width:0}.dt-col-grip{display:inline-flex;margin-left:auto;padding:2px;border:0;border-radius:4px;background:none;color:var(--muted);cursor:grab;touch-action:none}.dt-col-grip:focus-visible{outline:2px solid var(--primary);outline-offset:1px}.dt-cols .dt-cols-scope{margin:0;padding:6px 12px 4px;font-size:12px;line-height:16px}.dt-col-grip .icon{width:16px;height:16px}.dt-col-pick.is-dragging{cursor:grabbing;background:var(--soft)}.dt-cols .dt-col-pick input{flex:none;width:16px;height:16px;margin:0}
main#content .ig.dt-table .dt-stick{position:sticky;z-index:2;background:var(--bg);overflow:hidden} /* a pinned cell never lays its text over the cells scrolling under it */
main#content .ig.dt-table thead .dt-stick{z-index:3}
/* an open picker or date pop of a cell sits above the pinned cells of every row (they are z 2-3 and paint later in the table) */
main#content .ig.dt-table tr:has(.combobox-pop:not([hidden]),.datepicker-pop:not([hidden])){position:relative;z-index:6}main#content .ig.dt-table td:has(.combobox-pop:not([hidden]),.datepicker-pop:not([hidden])){position:relative;z-index:6}main#content .ig.dt-table td.dt-stick:has(.combobox-pop:not([hidden]),.datepicker-pop:not([hidden])){position:sticky}
main#content .ig.dt-table .dt-stick-id{left:0}main#content .ig.dt-table .dt-stick-date{left:148px}main#content .ig.dt-table .dt-stick-name{left:284px}main#content .ig.dt-table .dt-stick-act{right:0}
main#content .ig.dt-table tr.dt-day:hover>.dt-stick{background:var(--soft)}main#content .ig.dt-table tr.dt-day:has(+tr.dt-day2:hover)>td,main#content .ig.dt-table tr.dt-day:hover+tr.dt-day2>td{background:var(--soft)}
.dt-scroll.is-more-left .dt-stick-name{box-shadow:8px 0 8px -6px rgb(0 0 0 / .22)}
.dt-scroll.is-more-right .dt-stick-act{box-shadow:-8px 0 8px -6px rgb(0 0 0 / .22)}
.dt-table th.dt-stick-act{text-align:right;padding-right:10px}
.dt-table td.dt-act{text-align:right}
.dt-table .dt-del-off{display:inline-flex;vertical-align:middle}.dt-table .dt-del-off .icon-button[disabled]{opacity:.4;cursor:not-allowed}
.dt-table .dt-sel .combobox-trigger{border-color:var(--border-soft,var(--border));background:transparent}
.dt-table .dt-linkbox{display:flex;align-items:center;gap:2px;min-width:0}.dt-table .dt-linkbox .ig-in,.dt-table .dt-linkbox a{flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dt-table .dt-linkbox>.icon-button{flex:none}
main#content .ig.dt-table td.dt-notes textarea.ig-in{display:block;width:100%;height:auto;min-height:28px;max-height:28px;padding:4px 7px;resize:none;overflow:hidden;white-space:nowrap;line-height:18px}
main#content .ig.dt-table td.dt-notes textarea.ig-in:focus{position:relative;z-index:4;min-height:96px;max-height:none;overflow:auto;white-space:pre-wrap;resize:vertical}
.dt-table .dt-batch .ig-in{text-overflow:ellipsis}
main#content .ig.dt-table tr.dt-day>td{height:32px;padding:0 2px;vertical-align:middle;white-space:nowrap}
/* Owner 2026-11-09, approved 2026-11-13 ("เพิ่มเป็นสองแถวให้เท่ากัน", "สถานที่ต้องยาวขนาดนั้นเลยรึ"): every day is two lines of 32px, no line
   between them; the second holds the place (420px, ~60 letters, the rest in its tip), the map and Online links (180px each) and what the place
   lacks (200px, kept empty when nothing is), from the table's left edge and kept in sight while the table scrolls. */
main#content .ig.dt-table tr.dt-day>td{border-bottom:0}
main#content .ig.dt-table tr.dt-day2>td{position:static;height:32px;padding:0 2px;vertical-align:middle;white-space:nowrap;overflow:visible;background:var(--bg)}
.dt-table .dt-line2{position:sticky;left:2px;display:flex;align-items:center;gap:8px;width:max-content;max-width:calc(100vw - 48px);height:30px}
.dt-table .dt-line2 .dt-pin{flex:none;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px}.dt-table .dt-line2 .dt-pin .icon{width:16px;height:16px}
/* the venue-gap press (PROJ20-12) is one height with the line's 28px fields: a bare <button> was 24px */
.dt-table .dt-line2 .dt-gap-go{display:inline-flex;align-items:center;height:28px;min-height:28px;margin:0;padding:0 4px;border:0;border-radius:var(--radius-sm);background:transparent;color:inherit;font:inherit;cursor:pointer}.dt-table .dt-line2 .dt-gap-go:hover{background:var(--soft)}
.dt-table .dt-l2{flex:none;display:flex;align-items:center;min-width:0;overflow:hidden}.dt-table .dt-l2-place{width:420px}.dt-table .dt-l2-link{width:180px}.dt-table .dt-l2-gap{width:200px;font-size:13px}
.dt-table .dt-l2-place .ig-in,.dt-table .dt-l2-place .ig-t{flex:1 1 0;min-width:0;text-overflow:ellipsis;white-space:nowrap}
.dt-table .dt-l2-gap .pov-st{min-width:0;overflow:hidden;white-space:nowrap}.dt-table .dt-l2-gap .pov-st>span{overflow:hidden;text-overflow:ellipsis}
.dt-table .dt-idbox{display:flex;align-items:center;min-width:0}.dt-table .dt-idbox .dt-code{flex:1 1 0;min-width:0;margin:0 0 0 7px;overflow:hidden;text-overflow:ellipsis;font-size:12px}.dt-table .dt-idbox>.icon-button{flex:none;width:28px;height:28px}
main#content .ig.dt-table th{vertical-align:middle}
.dt-table .ig-t{padding:0 7px}
/* controls show their field edge at rest so a reader sees what can be typed (owner 2026-11-02 "แก้ยังไง"), a stronger border on hover, the primary border and a field on focus */
main#content .ig.dt-table :is(tr.dt-day,tr.dt-day2) .ig-in,main#content .ig.dt-table tr.dt-day .ig-date .datepicker-trigger{border-color:var(--border-soft,var(--border));background:transparent}
main#content .ig.dt-table :is(tr.dt-day,tr.dt-day2) .ig-in:hover,main#content .ig.dt-table tr.dt-day .ig-date .datepicker-trigger:hover{border-color:var(--muted)}
main#content .ig.dt-table :is(tr.dt-day,tr.dt-day2) .ig-in:focus,main#content .ig.dt-table tr.dt-day .ig-date .datepicker-trigger:focus-visible{border-color:var(--primary);background:var(--bg)}
.dt-table .dt-datebox{display:flex;align-items:center}.dt-table .dt-wd{flex:none;width:32px;padding-left:7px;font-size:13px;line-height:28px;white-space:nowrap}
.dt-table .dt-datebox .ig-date{flex:1;min-width:0}
.dt-table .dt-timebox{display:flex;align-items:center}.dt-table .dt-timebox .ig-in{flex:none;width:52px;padding:0 6px;text-align:left;font-variant-numeric:tabular-nums}.dt-table .dt-dash{flex:none;width:12px;text-align:center;color:var(--muted)}
.dt-table .dt-namebox{display:flex;align-items:center;min-width:0}.dt-table .dt-namebox .ig-in,.dt-table .dt-namebox .ig-t{flex:1 1 0;min-width:0;text-overflow:ellipsis;white-space:nowrap}
.dt-table .dt-code{flex:none;margin:0 2px 0 6px;font-size:11px;line-height:16px;color:var(--muted);white-space:nowrap}.dt-table .dt-namebox>.icon-button{flex:none;width:28px;height:28px}
.dt-table .dt-state{flex:none;max-width:72px;margin:0 6px 0 2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:16px;color:var(--muted)}
.dt-table .dt-placebox{display:flex;align-items:center;min-width:0}.dt-table .dt-placebox .ig-in,.dt-table .dt-placebox .ig-t{flex:1 1 0;min-width:0;text-overflow:ellipsis;white-space:nowrap}.dt-table .dt-placebox .dt-map{flex:none}
/* the count: two number fields side by side on the one line (On-site | Online), no box and no popover; the total is in their tip (owner 2026-10-20) */
.dt-table .dt-countbox{display:flex;align-items:center;gap:4px}
.dt-table .dt-countbox .ig-in{flex:none;width:60px;padding:0 6px;text-align:left;font-variant-numeric:tabular-nums}
/* a role cell: the first person (name opens the person card, ✕ on hover), "+N" for the others, the "+" last; the cell never grows */
main#content .ig.dt-table td.dt-role{overflow:visible}
.dt-table .dt-cellbox{position:relative;display:flex;align-items:center;min-width:0;height:30px}
.dt-table .dt-chip{display:flex;align-items:center;flex:0 1 auto;min-width:0;max-width:100%;height:28px;padding:0 0 0 7px;border-radius:var(--radius-sm);font-size:13px;line-height:18px}
.dt-table .dt-chip:hover{box-shadow:inset 0 0 0 1px var(--border)}
.dt-table .dt-chip.is-every{color:var(--muted)}
.dt-table .dt-chip-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dt-table .dt-chip-open{display:flex;flex:0 1 auto;min-width:0;margin:0;padding:0;border:0;background:transparent;font:inherit;color:inherit;text-align:left;cursor:pointer}.dt-table .dt-chip-open:hover .dt-chip-name{text-decoration:underline}
.dt-table .dt-chip .day-clash{display:block;flex:1 1 0;min-width:20px;margin-left:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:16px;overflow-wrap:normal}
.dt-table .dt-chip .dt-chip-x{flex:none;width:20px;min-width:20px;height:20px;min-height:20px;margin:0 2px;padding:0;border-color:transparent;background:transparent;opacity:0}.dt-table .dt-chip .icon{width:12px;height:12px}
.dt-table .dt-chip:hover .dt-chip-x,.dt-table .dt-chip:focus-within .dt-chip-x,.dt-table .dt-more-list .dt-chip-x{opacity:1}
.dt-table .dt-chip[aria-busy="true"],.dt-table .dt-add[aria-busy="true"],.dt-table [data-dt-field][aria-busy="true"],.dt-table .dt-newday[aria-busy="true"]{opacity:.55}
.dt-table .dt-add{flex:none;width:24px;min-width:24px;height:24px;min-height:24px;margin-left:2px;padding:0;border-color:transparent;background:transparent;color:var(--muted)}.dt-table .dt-add:hover{color:var(--fg)}.dt-table .dt-add .icon{width:14px;height:14px}.dt-table .dt-cellbox>.dt-add:first-child{margin-left:0}
.dt-table .dt-more{position:relative;flex:none}
.dt-table .dt-more-n{height:20px;min-width:24px;margin:0 0 0 2px;padding:0 6px;border:1px solid var(--border);border-radius:var(--radius-sm);background:transparent;font:inherit;font-size:12px;line-height:18px;color:var(--muted);cursor:pointer}.dt-table .dt-more-n:hover,.dt-table .dt-more.is-open .dt-more-n{color:var(--fg)}
.dt-table .dt-more-list{display:none;position:fixed;z-index:60;left:0;top:0;min-width:176px;max-width:280px;padding:4px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:0 4px 6px -1px rgb(0 0 0 / .1),0 2px 4px -2px rgb(0 0 0 / .1)}
.dt-table .dt-more.is-open .dt-more-list{display:block}.dt-table .dt-more-list .dt-chip{max-width:none}
.dt-table .combobox{display:block;width:100%}.dt-table .dt-cellbox .combobox{flex:1 1 auto;min-width:0}.dt-table .combobox-trigger{height:28px;min-height:28px;padding:0 6px;border-color:var(--border);font-size:13px}
.dt-table .combobox-create{margin:0;padding:8px 12px;border-top:1px solid var(--border);font-size:12px;line-height:16px}
.dt-table :is(tr.dt-day,tr.dt-day2).is-cancelled td{color:var(--muted)}.dt-table :is(tr.dt-day,tr.dt-day2).is-cancelled .ig-in{color:var(--muted)}
/* the foot row: "+ เพิ่มวัน" as plain muted text like every add row, never a chip */
main#content .ig.dt-table tr.dt-new>td,main#content .ig.dt-table tr.dt-new:hover>td{height:32px;padding:0 2px;vertical-align:middle;background:transparent}
.dt-table .dt-newday{display:inline-block;position:sticky;left:8px}main#content .ig.dt-table tr.dt-new>td{overflow:visible} /* stays in sight while the table scrolls (owner 2026-11-02) */
main#content .ig .dt-newday .datepicker{display:inline-block;width:auto}
main#content .ig tbody .dt-newday .datepicker-trigger{display:inline-flex;align-items:center;width:auto;height:28px;min-height:28px;padding:0 7px;border:0;background:transparent;color:var(--muted);font-size:12px;line-height:16px;font-weight:500;cursor:pointer}
main#content .ig tbody .dt-newday .datepicker-trigger:hover{color:var(--fg)}
/* ux-misc 7: a Project with no day yet is one empty state; its date picker is the one button that adds the first day. */
.dt-empty{padding:32px 16px;display:grid;justify-items:center;gap:16px}.dt-empty .dt-newday .datepicker{display:inline-block;width:auto}
.dt-empty .dt-newday .datepicker-trigger{width:auto;height:36px;min-height:36px;padding:0 16px;justify-content:center;font-weight:500;color:var(--fg)}
main#content .ig.dt-table td.dt-act{overflow:visible;padding-right:6px;white-space:nowrap}.dt-table td.dt-act form{display:inline-block;margin:0;vertical-align:middle}
@media(hover:none){.dt-table .dt-chip .dt-chip-x{opacity:1}}
/* a phone: each day is a block, its date and name above, every column name (12/16 muted) above its value, every person of a role and the "+" 44px tall (the one-line rule is the table's, from 701px) */
@media(max-width:700px){
 main#content .ig.dt-table{min-width:0}
 .dt-table colgroup,.dt-table thead{display:none}
 .dt-table tbody{display:block}
 .dt-table tr.dt-day{display:grid;grid-template-columns:repeat(auto-fill,minmax(max(150px,calc((100% - 12px) / 2)),1fr));gap:8px 12px;padding:12px 0 8px}
 .dt-table tr.dt-day2{display:block;padding:0 0 12px;border-bottom:1px solid var(--border)}main#content .ig.dt-table tr.dt-day2>td{display:block;height:auto;padding:0;border:0;background:transparent}
 .dt-table .dt-line2{position:static;display:grid;grid-template-columns:28px minmax(0,1fr);gap:8px;width:auto;max-width:none;height:auto}
 .dt-table .dt-l2{width:auto;min-height:44px;flex-wrap:wrap}.dt-table .dt-l2[data-l]::before{content:attr(data-l);flex:0 0 100%;margin-bottom:2px;font-size:12px;line-height:16px;color:var(--muted)}.dt-table .dt-l2 .ig-in{min-height:44px}.dt-table .dt-l2-link,.dt-table .dt-l2-gap{grid-column:2}.dt-table .dt-l2-gap:empty{display:none}.dt-table .dt-l2-gap{min-height:20px}
 .dt-table .dt-line2 .dt-pin{width:28px;height:44px;align-self:end}
 main#content .ig.dt-table tr.dt-day>td{display:block;height:auto;padding:0;border:0;white-space:normal;overflow:visible;position:static;background:transparent}
 .dt-table tr.dt-day>td[data-l]::before{content:attr(data-l);display:block;margin-bottom:2px;font-size:12px;line-height:16px;color:var(--muted)}
 .dt-table tr.dt-day>td.dt-name-c,.dt-table tr.dt-day>td.dt-role,.dt-table tr.dt-day>td.dt-act{grid-column:1/-1}
 .dt-table .dt-countbox .ig-in{flex:1 1 0;width:auto;min-width:0}
 .dt-table tr.dt-day>td:empty{display:none}
 .dt-table .dt-timebox .ig-in{flex:1 1 0;width:auto;min-width:0}
 .dt-table .ig-in,.dt-table .combobox-trigger{font-size:16px}
 .dt-table .dt-cellbox{height:auto;flex-wrap:wrap;gap:4px}
 .dt-table .dt-more,.dt-table .dt-more-list{display:contents}.dt-table .dt-more-n{display:none}
 .dt-table .dt-chip{min-height:44px;font-size:14px;border:1px solid var(--border)}.dt-table .dt-chip .dt-chip-x{width:44px;height:44px;opacity:1}.dt-table .dt-chip-open{min-height:44px;align-items:center}
 .dt-table .dt-add{width:44px;height:44px}
 main#content .ig.dt-table{width:100%}
 main#content .ig.dt-table .dt-stick{position:static;box-shadow:none;background:transparent}
 .dt-bar .dt-scroll-hint{display:none}
 main#content .ig.dt-table tr.dt-day>td.dt-off{display:none}
 .dt-table tr.dt-day>td.dt-notes{grid-column:1/-1}
 main#content .ig.dt-table td.dt-notes textarea.ig-in{height:auto;min-height:44px;max-height:none;white-space:pre-wrap;overflow:auto}
 main#content .ig.dt-table tr.dt-new{display:block}main#content .ig.dt-table tr.dt-new>td{display:block}
 .dt-table td.dt-act{display:flex;justify-content:flex-end;gap:8px}
}
/* PJ-01 (owner 2026-11-16: a phone list stays a table, header kept, 2-4 columns; 2026-11-18 default ก): on a phone each day is one
   row วันที่ · ชื่องาน · ยกเลิก / ลบ under the header; a tap on the row opens that day's fields in place (one day open at a time). */
@media(max-width:700px){
 main#content .ig.dt-table thead{display:block}
 main#content .ig.dt-table thead tr,main#content .ig.dt-table tr.dt-day:not(.is-open){display:grid;grid-template-columns:136px minmax(0,1fr) auto;align-items:center;gap:0 8px;padding:0}
 main#content .ig.dt-table thead th{display:none}
 main#content .ig.dt-table thead th:is(.dt-stick-date,.dt-stick-name,.dt-stick-act){display:block;position:static;height:auto;padding:0 0 4px;border:0;background:transparent;box-shadow:none}
 main#content .ig.dt-table thead tr{border-bottom:1px solid var(--border)}
 main#content .ig.dt-table tr.dt-day:not(.is-open){min-height:44px;border-bottom:1px solid var(--border);cursor:pointer}
 main#content .ig.dt-table tr.dt-day:not(.is-open)>td{display:none}
 main#content .ig.dt-table tr.dt-day:not(.is-open)>td:is(.dt-stick-date,.dt-stick-name,.dt-act){display:flex;grid-column:auto;align-items:center;min-width:0;overflow:hidden}
 main#content .ig.dt-table tr.dt-day:not(.is-open)>td[data-l]::before{display:none}
 main#content .ig.dt-table tr.dt-day:not(.is-open)>td:not(.dt-act) *{pointer-events:none}
 main#content .ig.dt-table tr.dt-day:not(.is-open) .ig-in{min-height:0;height:28px;padding-left:0;border-color:transparent;background:transparent;text-overflow:ellipsis}
 main#content .ig.dt-table tr.dt-day:not(.is-open)+tr.dt-day2{display:none}
 main#content .ig.dt-table tr.dt-day.is-open{background:var(--soft)}
}
/* ==== no nested table (RULES 5.21, owner 2026-10-20; DESIGN-SYSTEM 5.9): what a row has more to say opens under it as ONE column of fields (each with its
   label above it), never as a second grid of columns inside the table. The line list of a bill (.bill-lines) inside a table is a stack of line forms. ==== */
main#content .ig .ig-detail-grid,main#content .ig tr.ig-detail .form-grid,main#content tr.leave-edit-row .leave-edit-grid,main#content .bme-detail .bme-dgrid{grid-template-columns:minmax(0,520px);max-width:520px}
main#content .ig .ig-detail-grid>.ig-f-wide,main#content .ig tr.ig-detail .form-grid>*,main#content .bme-detail .bme-dgrid>*{grid-column:1}
/* The day table's detail row (owner 2026-10-20: "จัดหน้าอะไรของมึง" - a tall column of label-over-field blocks left the card mostly empty). RULES 5.21 keeps it ONE column of fields (never labelled fields side by side), so each field is a row: its label on the left (160px), the control on the right (up to 460px). About 40% shorter, nothing beside anything else. A phone keeps label over field. */
@media screen and (min-width:900px){main#content .ig.dt-table tr.dt-detail .ig-detail-grid{max-width:680px;gap:6px}main#content .ig.dt-table tr.dt-detail .ig-detail-grid>.ig-f{grid-template-columns:160px minmax(0,460px);align-items:center;gap:12px}main#content .ig.dt-table tr.dt-detail .ig-detail-grid>.ig-f:has(textarea){align-items:start}}
/* The Task detail row (audit-4 2026-10-20, same defect as the day table above): label-over-field blocks in one 520px column made a 260px-tall box, half of it empty. A field is a row, its label left. */
@media screen and (min-width:900px){main#content .ig tr.tk-detail .ig-detail-grid{max-width:680px;gap:6px}main#content .ig tr.tk-detail .ig-detail-grid>.ig-f:not(.tk-detail-foot){grid-template-columns:160px minmax(0,460px);align-items:center;gap:12px}main#content .ig tr.tk-detail .ig-detail-grid>.ig-f:not(.tk-detail-foot):has(textarea){align-items:start}}
@media screen and (min-width:900px){.ig tr.tk-detail .tk-note-conflict{grid-column:2}}
@media(max-width:639px){
 .tk-wrap{container-type:inline-size}
 main#content .tk-wrap .ig.tk-table tr.tk-detail .ig-detail-grid{width:calc(100cqw - 18px)}
 main#content .ig .tk-note-conflict .button{height:auto;min-height:44px;white-space:normal}
 .ig .tk-detail-foot{flex-wrap:wrap}
 .ig .tk-detail-foot>span{flex-basis:100%}
 .ig .tk-subadd{min-width:0}
}
main#content .ig td .bill-lines .bl-head{display:none}main#content .ig td .bill-lines .bl-table{max-width:520px}
main#content .ig td .bill-lines .bl-row{grid-template-columns:minmax(0,1fr) 28px}main#content .ig td .bill-lines .bl-row>:not(.bl-del){grid-column:1}main#content .ig td .bill-lines .bl-row .bl-del{grid-column:2;grid-row:1}
/* ==== end day-table ==== */

/* Vendor billing (owner 2026-10-22 5ก/6ข). The vendor's Bills and the steps each is at on their link page (.vb-*): a flat list, a small circle + words per step (RULES 5.15, 5.18),
   no pay date. The staff side: the pay queue's forecast list of Bills still being checked (.vf-*), one line per Bill, and the approval card's small muted line (.ab-eta). */
.vb-list{display:grid;gap:4px}
.vb-list h2{margin:0;font-size:14px;line-height:20px;font-weight:600}
.vb-rows{list-style:none;margin:0;padding:0;display:grid}
.vb-row{display:grid;gap:4px;padding:10px 0;border-top:1px solid var(--border)}
.vb-row:first-child{border-top:0}
.vb-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;min-width:0}
.vb-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.vb-sent{flex:none;color:var(--muted);font-size:12px;line-height:16px;font-variant-numeric:tabular-nums}
.vb-amount{flex:none;margin-left:auto;font-variant-numeric:tabular-nums}
.vb-steps{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px 14px;font-size:12px;line-height:16px;color:var(--muted)}
.vb-step{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.vb-step::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;border:1px solid currentColor}
.vb-step.is-done{color:var(--fg)}.vb-step.is-done::before{background:currentColor}
.vb-step.is-current{color:var(--fg);font-weight:600}.vb-step.is-current::before{background:var(--tb-2563eb,#2563eb);border-color:transparent}
.vb-step.is-warn{color:var(--tf-b91c1c,#b91c1c);font-weight:600}.vb-step.is-warn::before{background:var(--tb-dc2626,#dc2626);border-color:transparent}
.vb-step.is-ended::before{display:none}
.vf-list{display:grid;gap:4px;margin:0 0 16px}
.vf-title{margin:0;font-size:14px;line-height:20px;font-weight:600}
.vf-rows{list-style:none;margin:0;padding:0;display:grid}
.vf-row{display:flex;align-items:center;gap:12px;min-height:32px;border-top:1px solid var(--border);font-size:12px;line-height:16px;min-width:0}
.vf-row:first-child{border-top:0}
.vf-name{flex:1 1 0%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.vf-meta,.vf-eta{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}
.vf-money{flex:none;font-variant-numeric:tabular-nums}
.vf-row .expense-list-eye{flex:none}
@media(max-width:640px){.vf-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:0 12px;padding:6px 0}.vf-name{grid-column:1 / 3;grid-row:1}.vf-row .expense-list-eye{grid-column:3;grid-row:1}.vf-meta{grid-column:1;grid-row:2}.vf-money{grid-column:2 / 4;grid-row:2;text-align:right}.vf-eta{grid-column:1 / 4;grid-row:3}}
.ab-eta{font-size:11px;line-height:16px;color:var(--tf-9ca3af,#9ca3af);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bqv-e>span.bqv-eta{margin-top:2px;font-size:11px;line-height:16px;white-space:normal;overflow:visible;text-overflow:clip}
/* PEAK queue (owner 2026-10-23: the ส่งซ้ำ button was off the screen and the reason one letter wide): the name wraps at 320px, the reason keeps 240px, the resend form stays on one line, so a row fits a 1240px laptop. */
.int-peak-queue-table td:first-child{min-width:180px;max-width:320px;overflow-wrap:anywhere}.int-peak-queue-table td:nth-child(5){min-width:240px}.int-peak-queue-table td:last-child form{flex-wrap:nowrap}.int-peak-queue-table td:last-child input{width:170px}

/* Live check 2026-10-23: /Assets filters sit on one row from a tablet up (search grows, the three pickers keep a set width). */
@media(min-width:768px){form.fw-bar[action="/Assets"]>.combobox,form.fw-bar[action="/Assets"]>select{flex:0 1 170px;width:auto;min-width:0}form.fw-bar[action="/Assets"]>.search{flex:1 1 220px;min-width:0}}

/* /ContactForm ค่า default เมื่อไปหน้างาน (owner 2026-10-24): one flat .pov table (RULES 5.18), one-line 32px rows with 28px cell editors, no box around it,
   nothing opens inside it (5.21, 5.22); first and last column flush with the section's edges. On a phone .pov-stack: the line's name, the การเบิก
   select full width, then ครึ่งวัน and เต็มวัน side by side, each under its column name. */
.contact-fees .cfee-c-mode{width:30%}.contact-fees .cfee-c-amount{width:22%}
.contact-fees .cfee-name{font-weight:600;color:var(--fg)}
.contact-fees-form{gap:16px}.contact-fees-form>.form-actions{margin:0}
@media(max-width:767px){main#content form.contact-fees-form>.form-actions:last-child{position:static;margin:0;padding:0;border-top:0;background:none}}
@media(min-width:701px){
 main#content .contact-fees :is(th,td){height:32px;padding:0 8px}
 main#content .contact-fees :is(th,td):first-child{padding-left:0}main#content .contact-fees :is(th,td):last-child{padding-right:0}
 main#content .contact-fees td select,main#content .contact-fees td input:not([type=hidden]){display:block;width:100%;height:28px;min-height:28px;padding-top:0;padding-bottom:0;font-size:13px;line-height:18px}
 main#content .contact-fees td input:not([type=hidden]){padding-left:8px;padding-right:8px}
 main#content .contact-fees td .combobox .combobox-trigger{height:28px;min-height:28px;padding:0 8px;font-size:13px;line-height:18px}
 main#content .contact-fees td.num input{text-align:right}
}
@media(max-width:700px){
 main#content .contact-fees .pov-stack tr{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 8px;padding:10px 0}
 main#content .contact-fees .pov-stack td:nth-child(2){grid-column:1/-1}
 main#content .contact-fees .pov-stack td:first-child{font-size:14px;line-height:20px}
 main#content .contact-fees .pov-stack td[data-l]::before{margin-bottom:2px}
 main#content .contact-fees td :is(select,input):not([type=hidden]){display:block;width:100%}
}

/* The one file picker (app/Support/view.php filePick(), the "file-pick" block of app.js; owner 2026-10-24: the browser's English "Choose File / No file chosen"
   is never shown). The real input is kept (focusable, reached by keyboard and screen readers, still the thing a form posts and upload.js reads) but
   drawn by the browser nowhere: opacity 0 over the picker, which takes no pointer so the browser's own tooltip never shows; a press on the picker opens it. */
.file-pick{position:relative;display:flex;align-items:center;gap:8px;box-sizing:border-box;width:100%;min-width:0;height:36px;padding:3px;border:1px solid var(--border);border-radius:var(--radius-md);background:transparent;color:var(--muted);font-size:12px;line-height:16px;font-weight:400;cursor:pointer}
input.file-pick-input[type=file]{position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;opacity:0;pointer-events:none}
.file-pick-btn{flex:none;display:inline-flex;align-items:center;height:28px;padding:0 12px;border:1px solid var(--border);border-radius:6px;background:var(--tb-ffffff,#fff);color:var(--fg);font-weight:500;white-space:nowrap}
.file-pick:hover .file-pick-btn{background:var(--soft)}
.file-pick-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-pick.has-file .file-pick-name{color:var(--fg)}
.file-pick:has(.file-pick-input:focus-visible){outline:2px solid var(--fg);outline-offset:1px}
.file-pick:has(.file-pick-input:disabled){opacity:.5;cursor:default}

/* no-wrap-rows:start (owner 2026-10-24: "linebreak เด้ง row-height ... เช็คทั้งระบบ ... ทุกจุดอย่าให้มี"; RULES 5.23, DESIGN-SYSTEM 5.11).
   No row of any table grows because a cell's text wraps: a cell is ONE line, a long value ends in "…" and app.js erpCutTip puts the whole value in the hover
   tip (a view's own data-tip wins). One block, one rule per table family, found by scripts/wrap_probe.js and held by tests/backend/test_no_wrapped_rows_browser.py. */
/* Bill window: the Day / Project cell is one line (several codes are cut with … and read whole in the tip, each split line's codes are the rows under it). */
.bqv-table td.bqv-code{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
/* ProjectPnlReport: the Project cell (name, code, the state dot and its words) is one line. */
.pnl-table td:first-child{white-space:nowrap;height:28px}.pnl-table td:first-child a{display:inline-block;max-width:calc(100% - 96px);overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.pnl-table td:first-child .pov-st{display:inline-flex;vertical-align:middle;margin-top:0;max-width:100%}
/* Finance worklist (every /Expenses tab, /Income): the lines of a cell (code, bank, missing word, sub-line) end in …; the codes of a many-Project Bill stay on one line. */
.fw-table :is(.fw-code,.fw-k,.fw-miss,.fw-s2,.fw-clip){max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fw-table .fw-codes{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fw-table .fw-codes .fw-code{display:inline;max-width:none;overflow:visible}
#content .fw-table td{text-overflow:ellipsis}#content .fw-table tr.fw-group td{height:32px;padding-top:0;padding-bottom:0}
/* a group total in two currencies stays on one line while it fits (฿… · … USD) and wraps between currencies when the column is short, never cut with … (owner 2026-11-16) */
#content .fw-table tr.fw-group td.num{overflow:visible;text-overflow:clip;white-space:normal;line-height:16px;padding-top:4px;padding-bottom:4px}#content .fw-table tr.fw-group td.num :is(.amt,.amt-sep){display:inline}#content .fw-table tr.fw-group td.num .amt{white-space:nowrap}
/* Plain tables (Settings: PEAK mapping, ผังบัญชี, overhead, project models; Contact form lists): a cell is one line, cut with … */
.table-wrap>table:not([class*=pov]) :is(td,th){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.table-wrap>table:not([class*=pov]) td form.actions{flex-wrap:nowrap;min-width:0}.table-wrap>table:not([class*=pov]) td form.actions>select{min-width:0;flex:1 1 auto}
.table-wrap>table:not([class*=pov]) tbody td{height:44px;padding-top:0;padding-bottom:0}.table-wrap>table:not([class*=pov]) tbody td :is(select,input:not([type=checkbox]):not([type=radio]),.button.small){height:28px;min-height:28px}
/* A link that is the block of its cell (a.record-link is display:block) draws its own … : a cell's name is one line everywhere (Contacts, Projects, Assets, the worklists). */
:is(td,th)>:is(.record-link,small,div.muted,p.muted){max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
td .record-link>:is(strong,small){display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* A cell that may carry a muted second line holds it in EVERY row (the two-line cell is the same height in all rows of its table). */
@media(min-width:701px){.projects-table tbody td,.credit-term-table tbody td,.tx-all tbody td{height:46px}}
@media(min-width:701px){.expense-dq-table tbody td{height:37px}}.expense-dq-table td.dq-pick input{margin:0;vertical-align:middle;width:16px;height:16px;min-height:0}.cashflow-project-days-table td small{display:inline}
/* The older list table (approved / returned rounds, petty-cash ledger): headers and cells are one line; the block lines of a cell (code, small, description) end in …
   (the description was a 2-line clamp: a row of 1 or 2 lines). */
.expense-list-table :is(td,th){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.expense-list-table :is(td small,.expense-list-project a,.expense-list-project span,.expense-list-desc>span,.expense-list-desc small){display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-line-clamp:unset;line-clamp:unset}
.expense-list-table .expense-list-desc>span{-webkit-box-orient:horizontal}.expense-list-round-table .expense-list-project span.muted{white-space:nowrap}
.navset-name{display:flex;align-items:center;gap:8px}.navset-name input{flex:0 1 320px}.navset-name small{display:block;flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cost-center-picker td:nth-child(3){white-space:nowrap}
/* Document archive on a phone: the folder rows were squeezed to 7px cells and cut the year in half (found by the probe: cut-vertical). */
@media(max-width:700px){.doc-tree tbody tr.doc-tree-row{height:auto;min-height:36px;align-content:center}.doc-tree tbody td:empty{display:none}
  /* PT-07 / PT-06 (390px): a shallower indent so the document no and its eye stay on the first line; a folder keeps its name and count on one line */
  #content .pov .doc-tree tbody tr[data-level="1"] td.doc-tree-name{padding-left:16px}#content .pov .doc-tree tbody tr[data-level="2"] td.doc-tree-name{padding-left:24px}#content .pov .doc-tree tbody tr[data-level="3"] td.doc-tree-name{padding-left:32px}
  .doc-tree tbody tr.is-doc td.doc-tree-name{white-space:normal}.doc-tree-file{display:block;max-width:none;margin-left:58px}
  /* PT-07 (audit 2026-11-15): the desktop row height (tr.is-doc 48px) outranked height:auto above and squeezed the stacked cells to 7px.
     A document row is its own two-column grid: thumbnail + document no + file name, the eye beside them on the first line, date / Contact / Project under. */
  #content .pov .doc-tree tbody tr.doc-tree-row.is-doc{height:auto;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;column-gap:8px;padding:6px 0}
  #content .pov .doc-tree tbody tr.is-doc>td{grid-column:1;height:auto;min-height:0}
  #content .pov .doc-tree tbody tr.is-doc>td.doc-tree-name{grid-row:1}#content .pov .doc-tree tbody tr.is-doc>td.doc-tree-name>span.muted:not(.doc-tree-file){display:block;margin-left:58px;font-size:12px}
  #content .pov .doc-tree tbody tr.is-doc>td.doc-tree-count{grid-column:2;grid-row:1;align-self:start;padding:0}
  #content .pov .doc-tree tbody tr.is-doc>td:not(.doc-tree-name):not(.doc-tree-count){padding-left:90px;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .doc-tree tbody tr.is-group{display:flex;align-items:center;flex-wrap:nowrap}.doc-tree tbody tr.is-group td.doc-tree-name{flex:1 1 auto;min-width:0}.doc-tree tbody tr.is-group td.doc-tree-count{flex:none;margin-left:auto}
  .fw-bar .doc-archive-export{margin-left:0}}
/* Settings lists that stack on a phone (table.table-stack): the row title (a chart-of-accounts name) is one line. */
/* Settings lists and the user table, stacked on a phone: a value under its column name is one line too. */
@media(max-width:700px){main#content .set-list tr.set-row>td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.uw-table td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}}
/* a group row of the worklist is the same height whether or not it carries the date pencil and the receive-all button: 28px controls with a mouse, 44px rows for everyone on touch */
@media(pointer:fine){#content .fw-table tr.fw-group :is(.button.small,.icon-button.income-date-edit){height:28px;min-height:28px;min-width:0}#content .fw-table tr.fw-group .icon-button.income-date-edit{width:16px;height:16px;min-height:16px}#content .fw-table tr.fw-group .income-date-form{height:16px}}
@media(max-width:767px){#content .fw-table tr.fw-group td{height:37px}}@media(pointer:coarse){#content .fw-table tr.fw-group td{height:44px}}
/* Products tables: the action column holds two buttons side by side (it got an equal fifth of the table and cut them). */
@media(min-width:701px){.products-table th.products-c-grip{width:36px}.products-table th.products-c-status{width:120px}.products-table th.products-c-actions{width:250px}}
/* Cashflow rows: the bill's name ends in … and the Project chip after it stays on screen (it was pushed out of the cell). */
/* no-wrap-rows:end */

/* Projects & Task lists stack relative to the available panel width. */
.set-band:is(#set-project-types,#set-project-checklists,#set-project-task-templates,#set-task-statuses,#set-task-fields,#set-codes,#set-pipeline,#set-deal-tags,#set-requirements,#set-categories){container:settings-list/inline-size}
@container settings-list (min-width:781px){
 #set-project-types .set-list col:nth-child(3){width:212px}
}
@container settings-list (max-width:780px){
 main#content #set-pipeline .set-list tr.set-row:not(.pov-day)>td:last-child{display:none}
 main#content #set-pipeline .set-list tr.set-row:not(.pov-day)>td:nth-child(3){display:block!important;grid-column:2;grid-row:1;justify-self:end;font-size:inherit;color:inherit}
 .set-list :is(thead,colgroup){display:none}
 .set-list :is(table,tbody){display:block}
 /* ST-06 (owner 2026-11-18 default ก): a phone row is its name and its state on one line, one muted fact under the name; a press opens it. */
 .set-list tr.set-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 12px;height:auto;padding:8px 12px;border-bottom:1px solid var(--border);align-items:center}
 main#content .set-band .set-list tr.set-row>td{display:none;min-width:0;height:auto;padding:0;border:0;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 main#content .set-band .set-list tr.set-row>td:first-child{display:block;grid-column:1;grid-row:1;white-space:normal;overflow-wrap:anywhere}
 main#content .set-band .set-list tr.set-row>td:last-child{display:block;grid-column:2;grid-row:1;justify-self:end}
 main#content .set-band .set-list tr.set-row>td:nth-child(2):not(:last-child):not(:empty):not(.is-none){display:block;grid-column:1/-1;grid-row:2;font-size:12px;line-height:16px;color:var(--muted)}
 .set-list tr.set-row>td[data-l]::before{display:none}
 main#content #set-pipeline .set-list tr.set-row>td:nth-child(2){display:none!important}
 main#content #set-pipeline .set-list tr.set-row.pov-day{background:var(--soft)}main#content #set-pipeline .set-list tr.set-row.pov-day>td{background:none}
 .set-list tr:is(.ig-add,.ig-detail:not([hidden])){display:block}
 .set-list tr:is(.ig-add,.ig-detail)>td{display:block;height:auto}
 #set-pipeline .set-list tr.pov-day .set-board-facts{display:block}
 /* (owner 2026-11-16: a phone table keeps its head) the head names the same two places as the row: the name, the state at the right */
 main#content .set-band .pov.set-list :is(table,tbody){display:block}main#content .set-band .pov.set-list tr.set-row{display:grid;padding:8px 12px;border-bottom:1px solid var(--border)}
 main#content .set-band .pov.set-list tr:is(.ig-add,.ig-detail)>td{border-bottom:0}
 main#content .set-band .pov.set-list :is(td,th){max-width:none}
 main#content .set-band .pov.set-list tr:is(.ig-add,.ig-detail:not([hidden])){display:block}
 main#content .set-band .pov.set-list thead{display:block}
 main#content .set-band .pov.set-list thead tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 12px;height:auto;padding:0 12px 4px;border-bottom:1px solid var(--border)}
 main#content .set-band .pov.set-list thead th{display:none;height:auto;padding:0;border:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 main#content .set-band .pov.set-list thead th:first-child{display:block}main#content .set-band .pov.set-list thead th:last-child{display:block;justify-self:end}
 main#content #set-pipeline .pov.set-list thead th:last-child{display:none}main#content #set-pipeline .pov.set-list thead th:nth-child(3){display:block;justify-self:end}
 main#content #set-categories .pov.set-list thead tr{grid-template-columns:64px minmax(0,1fr) auto}main#content #set-categories .pov.set-list thead th:nth-child(2){display:block}
 /* SETORG-08: ผังบัญชี on a phone is a table of รหัส · ชื่อ · ใน PEAK, one line a row (it was 11,500px of label/value cards); the page
    ticks stay on a wider screen. */
 main#content #set-categories .set-list tr.set-row{grid-template-columns:64px minmax(0,1fr) auto;padding:6px 12px}
 main#content #set-categories .set-list tr.set-row>td:nth-child(2):not(:last-child){grid-column:2;grid-row:1;font-size:inherit;line-height:inherit;color:var(--fg);white-space:nowrap}
 main#content #set-categories .set-list tr.set-row>td:last-child{grid-column:3}
}
/* ตั้งค่า › Partner: fixed account rows at full width, labelled rows when the panel cannot fit its controls. */
.partner-panel{gap:12px}
.partner-panel>.set-toolbar,.partner-link-form{margin:0}
.partner-table-wrap{container-type:inline-size}
.partner-accounts{table-layout:fixed}
.partner-accounts th:nth-child(3){width:124px}
.partner-accounts th:nth-child(4){width:80px}
.partner-accounts th:last-child{width:228px}
main#content .partner-accounts td{height:48px;vertical-align:middle}
.partner-account-id>:is(strong,.muted){display:block;overflow:hidden;text-overflow:ellipsis}
.partner-row-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.partner-accounts td>.record-link{width:fit-content}
.partner-link-form .field{min-width:0}
@container (max-width:680px){
 .partner-accounts thead{display:none}
 .partner-accounts,.partner-accounts tbody{display:block}
 .partner-accounts tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;padding:8px 0;border-bottom:1px solid var(--border)}
 main#content .partner-accounts td{display:block;min-width:0;height:auto;padding:0;border:0}
 .partner-accounts td[data-l]::before{content:attr(data-l);display:block;font-size:11px;line-height:16px;color:var(--muted)}
 .partner-accounts td:is(:first-child,:nth-child(2),:last-child){grid-column:1/-1}
 .partner-accounts td:is(:first-child,:nth-child(2)),.partner-account-id>:is(strong,.muted){white-space:normal;overflow-wrap:anywhere}
 main#content .partner-accounts td:last-child{overflow:visible}
 .partner-row-actions{justify-content:flex-start}
}
.cr{display:grid;gap:16px}
.cr-answer{display:grid;gap:4px;padding:20px 24px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--bg)}
.cr-answer.is-short{background:var(--tb-fef2f2,#fef2f2);border-color:var(--tl-fecaca,#fecaca)}
.cr-q{margin:0;font-size:14px;line-height:20px;font-weight:600;color:var(--muted)}
.cr-big{margin:0;font-size:36px;line-height:44px;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:-.01em}.cr-big .pov-neg{color:var(--tf-dc2626,#dc2626)}.cr-big.is-none{font-size:24px;line-height:32px;color:var(--muted)}
.cr-sub{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:14px;line-height:20px}.cr-from{margin:4px 0 0;font-size:12px;line-height:16px}
.cr-bar{margin:0;flex-wrap:wrap;gap:8px}.cr-bar .cr-pending{margin-left:auto}.cr-bar .cr-pending.is-on{border-color:var(--primary)}
.cr-basis{margin:-8px 0 0;font-size:12px;line-height:16px}
.cr-table .cr-row{cursor:pointer}.cr-table .cr-row.is-open td{background:var(--soft)}.cr-table .cr-row.is-lowest .cr-bal{font-weight:700}.cr-table .cr-mark{margin-left:8px}
.cr .pov-neg{color:var(--tf-dc2626,#dc2626)}
.cr-detail,.cr-accounts{display:grid;gap:8px}.cr-detail h2,.cr-accounts h2{margin:0;font-size:16px;line-height:24px;font-weight:600}.cr-detail>.totals-line{margin:0}
.cr-form{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) minmax(0,2fr) auto;gap:12px;align-items:end}.cr-form .field{margin:0}
@media(max-width:767px){.cr-answer{padding:16px}.cr-big{font-size:28px;line-height:36px}.cr-form{grid-template-columns:minmax(0,1fr)}.cr-bar .cr-pending{margin-left:0}}
.cr-rows .cf-c-detail{width:240px}
.cr-mark .pov-st,.cr-sub .pov-st{display:inline-flex;vertical-align:middle}
/* บิล & สถานะ: the cost basis follows the total after a dot; on a phone it is its own line, without the dot (owner 2026-10-24, look at 390) */
.pb-sum .pov-basis::before{content:"· "}@media(max-width:700px){.pb-sum .pov-basis{display:block}.pb-sum .pov-basis::before{content:none}}
/* Owner D5 2026-10-29: a row's amount is before VAT; the cash to transfer sits under it, small */
.pb-table .pb-cash{display:block;font-size:12px;line-height:16px}
/* P&L รายการต้นทาง: each source line stacks its name over its figures and the figures wrap, so they never overlap or run past the row (audit look 2026-10-29) */
.finance-drill-row .finance-line{flex-direction:column;align-items:stretch;gap:4px}.finance-drill-row .finance-line>div:last-child{text-align:left;white-space:normal;overflow-wrap:anywhere}
.cr-bar .cr-late{margin-left:0}
.cr-toggle{display:inline-flex;align-items:center;gap:8px;min-height:36px;font-size:14px;line-height:20px;color:var(--fg);text-decoration:none;white-space:nowrap}.cr-toggle .count{color:var(--muted)}
.cr-box{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg)}.cr-box svg{width:12px;height:12px}
.cr-toggle[aria-checked=true] .cr-box{background:var(--primary);border-color:var(--primary);color:var(--bg)}
.cr-bar .cr-pending{margin-left:auto}
.cr-accounts{border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--bg)}.cr-acc-sum{display:flex;align-items:center;gap:8px;padding:10px 16px;cursor:pointer;list-style:none;font-size:14px;line-height:20px}.cr-acc-sum::-webkit-details-marker{display:none}.cr-acc-sum .cr-acc-h{font-weight:600}.cr-acc-sum>svg{margin-left:auto;width:16px;height:16px;transition:transform .15s}.cr-accounts[open]>.cr-acc-sum>svg{transform:rotate(180deg)}
.cr-acc-body{display:grid;gap:12px;padding:0 16px 16px}
.cr-answer.is-plain{padding:0;border:0;background:none}.cr-answer.is-plain.is-short{background:none}
.cr-rows td>a{display:inline-block;max-width:calc(100% - 96px);overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;white-space:nowrap}
@media(max-width:700px){main#content .cr .pov-stack td.num{text-align:right}main#content .cr .pov-stack td.num::before{text-align:left}}
/* Owner 2026-10-28 3ก: the Project form on ตั้งค่า reads in groups (ข้อมูลหลัก, เงิน, ลิงก์และบันทึก), each a heading over a line; ยกเลิกโปรเจค is its own row at the foot */
.ps-form .ps-group{grid-column:1/-1;margin:8px 0 0;padding-bottom:8px;border-bottom:1px solid var(--border);font-size:14px;line-height:20px;font-weight:600}.ps-form .ps-group:first-child{margin-top:0}.ps-cancel-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
/* Owner 2026-10-28 2ก: ภาพรวม is two columns at 1024px and wider: what to do (wide) and what to look up (320px); one column below, the to-do first */
.po-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}.po-main,.po-side{display:flex;flex-direction:column;gap:16px;min-width:0}.po-side>.project-hub-row,.po-side>.source-deal-card{margin-bottom:0}.po-side>.project-hub-row{padding:0;border:0;background:none;border-radius:0}.po-side>.po-sec{padding:0}@media(min-width:1024px){.po-layout{grid-template-columns:minmax(0,1fr) 320px}}.po-people{display:grid;gap:4px;margin:8px 0 0}.po-people>div{display:flex;gap:8px;font-size:13px;line-height:18px}.po-people dt{color:var(--muted);min-width:96px}.po-people dd{margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Owner 2026-10-28 4ก: the รายรับ tab opens on its money and its two actions; the new-contract box shows only once that row is opened */
.ig-head{display:flex;align-items:center;justify-content:space-between;gap:12px 24px;flex-wrap:wrap;margin-bottom:12px}.ig-sum{display:flex;flex-wrap:wrap;gap:8px 24px;margin:0}.ig-sum>div{display:flex;flex-direction:column;min-width:0}.ig-sum dt{color:var(--muted);font-size:12px;line-height:16px}.ig-sum dd{margin:0;font-size:16px;line-height:24px;font-weight:600;font-variant-numeric:tabular-nums}.ig-head-actions{display:flex;gap:8px;flex-wrap:wrap}.ig-empty{margin:0 0 12px}main#content .ig tr.ig-new-contract:not(.is-active):not(:focus-within) td+td>*{visibility:hidden}
/* the ภาพรวม day table carries ยังขาด after สถานที่ (owner 2026-10-28 2ก): the money columns keep their widths one place later */
.cashflow-project-days-table.has-needs th:nth-child(5){width:auto}.cashflow-project-days-table.has-needs th:nth-child(6){width:144px}.cashflow-project-days-table.has-needs th:nth-child(7){width:216px}.cashflow-project-days-table.has-needs.no-income th:nth-child(6){width:216px}
.po-layout+.project-day-card{margin-top:16px}
.po-side .project-overview-notes{display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden}
@media(max-width:639px){.ig-sum{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}}
/* Owner 2026-10-28 3ก ("ตั้งค่ายังดูยาก"): ตั้งค่า reads as a settings page at 1024px and wider: each section's title on the left, its content on the right, one line between sections */
@media(min-width:1024px){#project-settings.pp-narrow{max-width:none}#project-settings>.pp-sec{display:grid;grid-template-columns:200px minmax(0,1fr);column-gap:32px;align-items:start;padding-top:24px;margin-top:24px;border-top:1px solid var(--border)}#project-settings>.pp-sec:first-of-type{border-top:0;margin-top:0;padding-top:0}#project-settings>.pp-sec>*{grid-column:2;min-width:0}#project-settings>.pp-sec>.row-between:first-child{display:contents}#project-settings>.pp-sec>.row-between:first-child>h2{grid-column:1;grid-row:1;margin:0;line-height:32px}#project-settings>.pp-sec>.row-between:first-child>.actions{grid-column:2;grid-row:1;justify-self:end;align-self:center;display:flex;align-items:center;gap:8px}#project-settings>.pp-sec>.row-between:first-child>.actions .project-access-mode{display:inline-flex;align-items:center;gap:4px}}
/* Owner 2026-10-28 ("ใส่ visualize ... ลบ metadata"): ภาพรวม opens on three tiles: the next วันงาน, readiness (bar + what is missing), Task (bar + late) */
.po-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.po-tile{display:flex;flex-direction:column;gap:6px;min-width:0;padding:12px 14px;border:0;border-radius:var(--radius-lg);background:var(--soft);color:inherit}.po-tile b{font-size:20px;line-height:28px;font-variant-numeric:tabular-nums}.po-tile-k{font-size:12px;line-height:16px;color:var(--muted)}.po-tile-s{font-size:12px;line-height:16px;color:var(--muted)}.po-tile-s.is-late{color:var(--tf-b91c1c,#b91c1c)}.po-tile.is-warn{background:var(--tb-fffbeb,#fffbeb)}.po-tile.is-bad{background:var(--tb-fef2f2,#fef2f2)}
.po-bar{display:block;height:6px;border-radius:999px;background:var(--border);overflow:hidden}.po-bar>span{display:block;height:100%;border-radius:inherit;background:var(--fg)}
.po-chips{display:flex;flex-wrap:wrap;gap:4px}.po-chip{font-size:12px;line-height:16px;padding:2px 8px;border-radius:999px;background:var(--bg)}.po-chip.is-late{color:var(--tf-b91c1c,#b91c1c)}
@media(max-width:639px){.po-tiles{grid-template-columns:minmax(0,1fr)}}
/* ตั้งค่า › ส่วนของโปรเจค: the eight switches as a grid of small boxes, no header row */
#project-modules .pov{border:0;background:none}#project-modules table.pp-modules{display:block}#project-modules .pp-modules colgroup{display:none}#project-modules .pp-modules tbody{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}#project-modules .pp-modules tr{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 10px;border:0;border-radius:var(--radius-md);background:var(--soft)}#project-modules .pp-modules td{border:0;padding:0;min-width:0}@media(max-width:767px){#project-modules .pp-modules tbody{grid-template-columns:repeat(2,minmax(0,1fr))}}
.ps-cancel-row{justify-content:flex-start}.ps-cancel-go{color:var(--tf-b91c1c,#b91c1c)}
/* the tiles and the Task card share one row of three (the Task card is the third tile) */
.po-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px 24px;padding:14px 16px;border-radius:var(--radius-lg);background:var(--soft)}.po-stats>.po-tiles{display:contents}.po-stats .po-tile{padding:0;background:none}.po-stats .po-tile.is-warn,.po-stats .po-tile.is-bad{background:none}.po-stats>.project-task-card{display:flex;flex-direction:column;gap:6px;padding:0;border:0;background:none}.po-stats>.project-task-card>h2{margin:0;font-size:12px;line-height:16px;font-weight:400;color:var(--muted)}.po-stats>.project-task-card p{margin:0}.po-stats>.project-task-card strong{font-size:16px;line-height:24px}@media(max-width:639px){.po-stats{grid-template-columns:minmax(0,1fr);gap:12px}}
.po-miss.is-late{color:var(--tf-b91c1c,#b91c1c)}a.po-tile{color:inherit;text-decoration:none}a.po-tile:hover b{text-decoration:underline}
/* Owner 2026-10-28 Task tab: the count sits by its title; one way to add; no tree elbow on a flat list; the date's ✕ and no initials circle */
.tk-head-l{display:flex;align-items:baseline;gap:12px;min-width:0}.tk-head-l h2{margin:0}
.tk-table:not(:has(.tk-group,.pov-day)) .tk-c-task .pov-elbow{display:none}
.tk-person .tk-avatar{display:none}

/* Owner 2026-10-28 ตารางวันงาน: the day code's copy shows on the row the pointer is on; every + sits at the right of its cell; the name has more room */
/* บริหารโปรเจค: the add dot shows on the cell the pointer is on (an empty cell reads empty) */
.mx-legend-fold{margin:4px 0 8px}.mx-legend-fold>summary{list-style:none}.mx-legend-fold[open]>summary{margin-bottom:4px}
.mx-dot{opacity:0}td:hover>.mx-dot,td:focus-within>.mx-dot,.mx-dot:focus-visible{opacity:1}
.cr-figs{margin-top:8px}
/* Owner 2026-10-28 ไฟล์ & ลิงก์: no counts by the titles; Online, Re-Learn and FFW share the width equally; copy shows on the row the pointer is on; FFW in plain weight */
.pp-days col.pp-c-link{width:auto}.pp-days{table-layout:fixed}
.pp-days tr:not(:hover):not(:focus-within) .pp-link .icon-button{visibility:hidden}
.pp-days .pf-ffw-link,.pp-days .pf-ffw-link b,.pp-days .pf-ffw-link strong{font-weight:400}
main#content .pp-days a.pf-ffw-link{font-weight:400}
.tk-table:not(:has(.tk-group,.pov-day)) .pov-elbow{display:none}
.tk-setup .ig-addlink,.mx-legend-fold>summary{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 6px;border:0;background:transparent;color:var(--muted);font:inherit;font-size:12px;line-height:16px;font-weight:500;cursor:pointer;box-shadow:none}.tk-setup .ig-addlink:hover,.mx-legend-fold>summary:hover{color:var(--fg)}.tk-setup .ig-addlink svg{width:14px;height:14px}
/* Owner 2026-10-28 (the reverted items, done so nothing is covered): the Task date's ✕ and the day code's copy fade in on the row the pointer is on (opacity, so they still take presses and are never "covered"); a + leads its cell on every row; the name takes room from the date and time, the table keeps its width */
.tk-table tr:not(:hover):not(:focus-within) .datepicker .combobox-clear{opacity:0}
.dt-table tr:not(:hover):not(:focus-within) :is(.dt-namebox,.dt-idbox)>.icon-button{opacity:0}
.dt-table .dt-cellbox>.dt-add{order:-1;margin-left:0}
.ig.dt-table col.dt-c-id{width:148px}.ig.dt-table col.dt-c-date{width:136px}.ig.dt-table col.dt-c-name{width:220px} /* Day ID 0 (fits a 15-letter code), the date at 148px, the name at 284px (owner 2026-11-09 "Dayid มาก่อนเลย") */

/* The date picker opened in a .pov table (the E-Learning day's add-cost row, 2026-10-29): its month is a <table> of its own, and the table rules of .pov / .ig (fixed layout at 100%, 28-32px cells with padding and a line, the phone card rows, thead hidden) reached it, so the month drew 1190px wide at 1440 and one day per line at 390. Its own look comes back inside any .pov. */
main#content .pov .datepicker-pop table{display:table;width:auto;min-width:0;table-layout:auto}main#content .pov .datepicker-pop thead{display:table-header-group}main#content .pov .datepicker-pop tbody{display:table-row-group}main#content .pov .datepicker-pop tr{display:table-row;padding:0;border:0;background:none}main#content .pov .datepicker-pop th{display:table-cell;position:static;width:32px;height:auto;padding:0;border:0;background:none;text-align:center;white-space:nowrap;overflow:visible}main#content .pov .datepicker-pop td{display:table-cell;position:static;width:auto;height:auto;min-height:0;padding:8px 0 0;border:0;background:none;text-align:center;font-size:14px;line-height:20px;white-space:nowrap;overflow:visible}main#content .pov .datepicker-pop td::before{content:none}
/* E-learning course ภาพรวม: chapters box and the publish list sit a section apart (owner 2026-11-03) */
/* ElearningWorkspace (RULES 5.23): the empty line of a day is a row of the table's height (a Thai line is taller than 18px and was clipped at 390);
   the แบ่งให้คอร์ส column of ต้นทุน holds its button on one line. */
@media(max-width:700px){main#content #elearning-day table.pov-phone>tbody>tr>td[colspan]{height:36px;line-height:20px}}
.el-c-split{width:128px}.pov td.ctr .button{white-space:nowrap}
.el-life{margin-top:24px}.el-cost-search{gap:8px;margin-bottom:12px}.el-cost-search .search{flex:1;min-width:0}.el-split-courses{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:4px 16px;margin-bottom:8px}.el-split-form .form-actions{justify-content:flex-end}.el-steps{flex-direction:row;flex-wrap:wrap;align-items:center;gap:6px 14px}.el-step-toggle{display:none}/* EL-02: the step path is the status picker */.el-step-form{display:contents}.el-steps button.deal-stage-chip{border:0;box-shadow:none;font-family:inherit;cursor:pointer}.el-steps button.deal-stage-chip.upcoming{background:transparent}.el-steps button.deal-stage-chip:hover{text-decoration:underline}@media(max-width:767px){.el-steps .deal-stage-path{cursor:default}.el-step-toggle{display:inline-flex}.el-step-toggle[aria-expanded=true] .icon{transform:rotate(180deg)}}.el-todo{font-size:13px;line-height:18px}.el-todo a{white-space:nowrap;display:inline-block}.el-channels-wrap{container-type:inline-size}
@container (max-width:720px){
 .el-channels-wrap .ig{min-width:0}
 .el-channels-wrap :is(colgroup,thead){display:none}
 .el-channels-wrap tbody{display:grid;gap:0}
 .el-channels-wrap tr{display:grid;gap:8px;padding:10px 0}
 .el-channels-wrap tr+tr{border-top:1px solid var(--border)}
 main#content .el-channels-wrap .ig tr>td{position:static;display:grid;gap:4px;height:auto;min-width:0;padding:0;border:0;overflow:visible;white-space:normal}
 .el-channels-wrap .ig td[data-l]::before{content:attr(data-l);color:var(--muted)}
 .el-channels-wrap .ig td.ctr{justify-content:end}
 main#content .el-channels-wrap .ig td.ctr:empty{display:none}
 .el-channels-wrap :is(.combobox,.datepicker,.ig-in){width:100%;min-width:0}
}
.el-chapters textarea{width:100%}.el-gap{margin-bottom:24px}

/* ProjectHub (owner 2026-11-04 C082): the Requirement block above the tabs; Feedforward person first, then day chips as radios inside the form */
.hub-req>summary{display:flex;align-items:center;gap:8px;min-height:24px;font-size:16px;font-weight:600;line-height:24px;cursor:pointer}.hub-req>summary small{font-size:12px;font-weight:400;line-height:16px;color:var(--muted)}.hub-req[open]>summary{margin-bottom:14px}
.hub-chip[hidden],.hub-ffw-after[hidden],.hub-team[hidden],.hub-team-day[hidden],.hub-delete[hidden]{display:none!important}
.hub-ffw-after{display:flex;flex-direction:column;gap:16px}.public-shell fieldset.hub-day-chips{display:flex;flex-wrap:wrap;gap:8px}
.form-stack .hub-day-chips .hub-chip{display:inline-flex;flex-direction:column;gap:0;font-size:14px;font-weight:400;line-height:20px;position:relative}.hub-day-chips .hub-chip input{position:absolute;opacity:0;width:1px;height:1px}.hub-chip:has(input:focus-visible){outline:2px solid var(--primary);outline-offset:2px}
.hub-save-line{margin:0;font-size:14px;line-height:20px;overflow-wrap:anywhere}
/* owner C037 (2026-11-04): the อาจารย์ form; a score is six chips 1–6 in one row (fits 375px), the two end words under it */
.public-shell fieldset.hub-ffw-kind{display:flex;flex-direction:column;gap:16px;margin:0;min-width:0}.hub-ffw-kind[hidden]{display:none!important}
.hub-score{display:grid;gap:6px;min-width:0}.hub-score-label{font-size:12px;font-weight:400;line-height:16px}.hub-score-title{display:block;font-size:14px;font-weight:600;line-height:20px}
.hub-score-row{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
.form-stack .hub-score-row .hub-chip{display:flex;flex-direction:row;min-width:0;min-height:40px;padding:0;gap:0;font-size:14px;font-weight:500;line-height:20px;position:relative}
.hub-score-row .hub-chip input{position:absolute;opacity:0;width:1px;height:1px}
.hub-score-ends{display:flex;justify-content:space-between;font-size:11px;line-height:14px;color:var(--muted)}
.hub-form .hub-delete{align-self:center;min-height:32px;height:auto;padding:0 8px;border:0;background:none;box-shadow:none;color:var(--muted)}.hub-form .hub-delete[data-armed="1"]{color:var(--tf-b91c1c,#b91c1c)}
.hub-team-day{display:grid;gap:0}

/* Project Hub upgrade (owner 2026-11-08 item 9): the Report / Re-Learn QR beside its link, the day note, a face beside each name, the files tab. No stripe on an edge (RULES 5.9). */
.hub-reports{display:grid;gap:8px;margin:0 0 4px}
.hub-qr{display:grid;grid-template-columns:96px minmax(0,1fr);align-items:center;gap:12px;padding:8px;border:1px solid var(--border);border-radius:var(--radius-lg);color:inherit;text-decoration:none}
.hub-day .hub-qr{grid-template-columns:80px minmax(0,1fr)}
.hub-qr-code{display:block;width:100%;height:auto;border-radius:var(--radius-sm)}
.hub-qr-text{display:grid;gap:2px;min-width:0}.hub-qr-text strong{font-size:14px;line-height:20px}.hub-qr-text small{font-size:12px;line-height:16px;color:var(--muted)}
.hub-qr-open{display:inline-flex;align-items:center;gap:6px;margin-top:4px;font-size:14px;line-height:20px;color:var(--tf-2563eb,#2563eb)}.hub-qr-open svg{width:14px;height:14px}
.hub-ffw-report{justify-self:start;gap:8px}.hub-ffw-report svg{width:16px;height:16px}
.hub-day-note{margin:0;padding:8px 12px;border-radius:var(--radius-lg);background:var(--soft);font-size:14px;line-height:20px;overflow-wrap:anywhere}
.hub-faces li{display:inline-flex;align-items:center;gap:6px;padding:2px 12px 2px 2px;font-size:14px;line-height:20px}
.hub-face{display:inline-grid;place-items:center;width:28px;height:28px;flex-shrink:0;border-radius:50%;object-fit:cover;background:var(--bg);color:var(--muted);font-size:12px;font-weight:600;line-height:16px}
.hub-files{list-style:none;margin:0;padding:0}
.hub-files li+li{border-top:1px solid var(--border)}
.hub-files a{display:flex;align-items:center;gap:12px;min-height:48px;padding:8px 0;color:inherit;text-decoration:none}.hub-files a>svg{width:20px;height:20px;flex-shrink:0;color:var(--muted)}
.hub-files a>span{display:grid;min-width:0}.hub-files strong{font-size:14px;font-weight:500;line-height:20px;overflow-wrap:anywhere}.hub-files small{font-size:12px;line-height:16px;color:var(--muted)}
/* FFW Expert v2 (owner 2026-11-08): the group heading above its scores, the two texts (title + what to write) and the stars: one row per
   team person, face + name + a star that turns amber when ticked; a whole-row press target of 44px. No stripe on an edge (RULES 5.9). */
.hub-score-group{margin:4px 0 0;padding:0;font-size:14px;font-weight:600;line-height:20px}
.public-shell .hub-text,.form-stack label.hub-text{display:grid;gap:2px}.hub-text-title{font-size:14px;font-weight:600;line-height:20px}.hub-text-hint{font-size:12px;font-weight:400;line-height:16px;color:var(--muted)}.hub-text textarea{margin-top:4px}
.public-shell fieldset.hub-stars{display:grid;gap:2px;margin:0;padding:0;border:0;min-width:0}.hub-stars[hidden],.hub-star-list li[hidden]{display:none!important}
.hub-star-list{list-style:none;display:grid;gap:6px;margin:6px 0 0;padding:0}
.hub-star,.form-stack label.hub-star{position:relative;display:flex;flex-direction:row;align-items:center;gap:10px;min-height:44px;padding:6px 12px 6px 8px;border:0;border-radius:var(--radius-lg);font-size:14px;font-weight:400;line-height:20px;cursor:pointer}
.hub-star input{position:absolute;opacity:0;width:1px;height:1px}.hub-star:has(input:focus-visible){outline:2px solid var(--primary);outline-offset:2px}
.hub-star-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hub-star-tick{display:inline-flex;color:var(--tf-cbd5e1,#cbd5e1)}.hub-star-tick .icon{width:20px;height:20px}.hub-star:has(input:checked) .hub-star-tick .icon{fill:currentColor}
.hub-star:has(input:checked){background:var(--tb-fffbeb,#fffbeb)}.hub-star:has(input:checked) .hub-star-tick{color:var(--tf-d97706,#d97706)}
/* the Matrix box of a team person: who starred them that day */
.mx-cp-stars{list-style:none;display:grid;gap:4px;margin:0;padding:0}.mx-cp-stars li{display:flex;align-items:center;gap:6px;font-size:12px;line-height:16px;min-width:0}
.mx-cp-stars .mx-cp-star-face{width:20px;height:20px;font-size:10px;line-height:14px;background:var(--soft)}.mx-cp-star{display:inline-flex;color:var(--tf-d97706,#d97706)}.mx-cp-star .icon{width:12px;height:12px;fill:currentColor}

/* Project Hub (owner 2026-11-09, mock round 9b; app/View/project-hub.php). One scrolling page. Labels and data only. The name gate
   alone until a person is picked; the Requirement is its own light-blue zone (a tint on the whole box); the day's box is one light-grey
   box with a full even border joined to the selected day (a strip on a phone, a list on the left from 900 px), its parts split by thin
   lines, FFW ของคุณ in a column on its right from 900 px. No stripe on an edge (RULES 5.9), no box inside a box but the QR. */
.public-shell:has(.hb){background:var(--bg)}
body.public-shell main#content.public-projecthub:has(.hb){max-width:none;margin:0;padding:0}
.hb{max-width:1200px;margin:0 auto;padding:20px 16px 40px;font-size:14px;line-height:22px;color:var(--fg)}
.hb .hb-i{width:16px;height:16px;flex:none}
.hb-muted{color:var(--muted)}.hb-grow{flex:1;min-width:0}
.hb-flash{display:flex;align-items:center;gap:8px;margin:0 0 12px;padding:8px 12px;border-radius:var(--radius-lg);background:var(--tb-f0fdf4,#f0fdf4);color:var(--tf-15803d,#15803d)}
.hb-code{font-size:12px;line-height:16px;color:var(--muted)}.hb-title{margin:2px 0 12px;font-size:20px;line-height:28px;font-weight:600}
.hb-h{margin:0 0 8px;font-size:13px;line-height:20px;font-weight:600}
.hb .hb-face{width:40px;height:40px;flex:none;font-size:14px;line-height:20px;background:var(--soft);color:var(--fg)}
.hb-gate{max-width:560px}.hb-lead{margin:0 0 16px;font-size:16px;line-height:24px;font-weight:600}
.hb-pick{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin:0 0 20px}
.hb-pick-btn{display:flex;align-items:center;gap:10px;height:56px;padding:0 12px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--bg);color:inherit;text-decoration:none;min-width:0}
.hb-pick-btn:hover{background:var(--soft)}.hb-pick-btn span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hb .hb-pick-btn .hb-face{width:36px;height:36px}
.hb-me{display:flex;align-items:center;gap:8px;margin:0 0 16px}.hb .hb-me .hb-face{width:28px;height:28px;font-size:12px}.hb-me a{font-size:13px;color:var(--muted);text-decoration:underline}
.hb-hub{display:flex;flex-direction:column}.hb-me{order:0}.hb-req{order:1}.hb-days{order:2}.hb-more{order:3}
.hb-req{margin:0 0 24px;border:1px solid var(--tl-dbeafe,#dbeafe);border-radius:var(--radius-lg);background:var(--tb-eff6ff,#eff6ff)}
.hb-req summary{display:flex;align-items:center;gap:8px;padding:12px 16px;list-style:none;cursor:pointer;color:var(--tf-1d4ed8,#1d4ed8);font-weight:600}.hb-req summary::-webkit-details-marker{display:none}
.hb-req .hb-chev{margin-left:auto;transition:transform .15s}.hb-req[open] .hb-chev{transform:rotate(180deg)}
.hb-req-list{margin:0;padding:0 16px 16px;max-width:760px}.hb-req-list div+div{margin-top:12px}.hb-req-list dt{font-size:12px;line-height:16px;color:var(--muted)}.hb-req-list dd{margin:2px 0 0;overflow-wrap:anywhere}.hb-req-none{margin:0;padding:0}
.hb-strip{position:relative;z-index:1;display:flex;align-items:flex-end;gap:4px;margin-bottom:-1px;overflow-x:auto;scrollbar-width:none}.hb-strip::-webkit-scrollbar{display:none}
.hb-d{position:relative;flex:none;width:64px;margin-bottom:1px;padding:6px 0;border:1px solid var(--border);border-bottom:0;border-radius:var(--radius-lg) var(--radius-lg) 0 0;background:var(--bg);color:var(--muted);text-align:center;text-decoration:none}
.hb-d span{display:block;font-size:12px;line-height:16px}.hb-d b{display:block;color:var(--fg)}.hb-d.past b{color:var(--muted);font-weight:500}
.hb-d.on{margin-bottom:0;padding-bottom:7px;background:var(--tb-fafafa,#fafafa);color:var(--fg)}.hb-d.on b{color:var(--fg);font-weight:600}
.hb-dot{width:6px;height:6px;border-radius:50%;flex:none}.hb-d .hb-dot{position:absolute;top:6px;right:6px}.hb-dot.todo{background:var(--tb-f59e0b,#f59e0b)}.hb-dot.done{width:14px;height:14px;border-radius:0;background:none;color:var(--tf-22c55e,#22c55e);display:inline-flex}.hb-dot.done .icon{width:14px;height:14px;stroke-width:2}
.hb-box{padding:16px;border:1px solid var(--border);border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg);background:var(--tb-fafafa,#fafafa)}.hb-box[hidden]{display:none}
.hb-when{font-size:16px;line-height:24px;font-weight:600}
.hb-line{display:flex;align-items:center;gap:8px;margin-top:6px;min-width:0}.hb-issue-line{min-height:32px}.hb-issue-withdraw{margin:0;flex:none}
.hb-lnk{display:inline-flex;align-items:center;gap:4px;margin-left:auto;color:inherit;font-weight:500;text-decoration:none;white-space:nowrap}.hb-lnk:hover{text-decoration:underline}
.hb-sec{margin-top:16px;padding-top:16px;border-top:1px solid var(--border)}.hb-note{margin:0;overflow-wrap:anywhere}
.hb-team{margin:0;padding:0;list-style:none}.hb-team li{display:flex;align-items:center;gap:10px;padding:4px 0;min-width:0}
/* owner 2026-11-09: one line per person (name · role · plate · food), the labels in the tooltip, the plate behind the truck icon */
.hb-plate{display:inline-flex;align-items:center;gap:4px}.hb-plate .icon{width:14px;height:14px}
.hb-you{margin-left:6px;font-size:13px;color:var(--muted)}.hb-role{font-size:13px;color:var(--muted)}
.hb-meta{display:block;font-size:12px;line-height:18px;color:var(--muted)}.hb-meta i{font-style:normal;color:var(--tf-a3a3a3,#a3a3a3)}
.hb-rl{display:flex;align-items:center;gap:16px}.hb-qr{flex:none;display:block;line-height:0}.hb-qr-code{width:132px;height:auto;border-radius:var(--radius-md);outline:1px solid var(--border)}.hb-rl-text{min-width:0}.hb-rl-link{margin-top:8px;display:flex;flex-wrap:wrap;gap:4px 16px}.hb-rl-link .hb-lnk{margin-left:0;white-space:normal}
.hb-ffw{margin-top:16px;padding-top:16px;border-top:1px solid var(--border)}
.hb .hub-score-label{font-size:14px;line-height:22px}.hb .hub-score-row{max-width:420px}.hb .hub-score-ends{max-width:420px;font-size:12px}
.hb .hub-star-list{display:flex;flex-wrap:wrap;gap:8px}.hb .form-stack label.hub-star{min-height:40px;padding:4px 12px 4px 4px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg)}
.hb .hub-star .hub-face{width:32px;height:32px;font-size:12px;background:var(--soft);color:var(--fg)}.hb .hub-star-name{flex:none}.hb .form-stack label.hub-star:has(input:checked){background:var(--bg);border-color:var(--tl-f59e0b,#f59e0b)}
.hb .hub-submit{min-height:44px;height:44px}.hb .hub-team{margin-top:24px;padding-top:16px;border-top:1px solid var(--border)}
.hb-more{margin-top:24px}.hb-row{display:flex;align-items:center;gap:10px;min-width:0;padding:8px 0;border-top:1px solid var(--border)}.hb-row .hb-lnk{margin-left:0}
.hb-side{display:none}
.hub-form.hb-known .hb-steps{display:none}
@media(min-width:900px){
 .hb-hub{display:grid;grid-template-columns:minmax(0,1fr) 340px;column-gap:24px;align-items:start}
 .hb-me{grid-column:1/-1}.hb-req{grid-column:1;grid-row:2}.hb-more{grid-column:2;grid-row:2;margin:0}.hb-more .hb-h{margin-top:12px}.hb-days{grid-column:1/-1;grid-row:3}
 .hb-days{display:grid;grid-template-columns:210px minmax(0,1fr);align-items:start}
 .hb-strip{display:none}.hb-side{position:relative;z-index:1;display:block;max-height:640px;margin-right:-1px;padding:0;overflow:auto}
 .hb-s{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 12px;border:1px solid transparent;border-right:0;border-radius:var(--radius-lg) 0 0 var(--radius-lg);color:var(--muted);text-decoration:none}
 .hb-s b{color:var(--fg)}.hb-s.past b{color:var(--muted);font-weight:500}
 .hb-s.on{background:var(--tb-fafafa,#fafafa);border-color:var(--border);color:var(--fg);font-weight:600}.hb-s.on b{color:var(--fg);font-weight:600}
 .hb-box.hb-two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,400px);column-gap:32px;align-items:start}.hb-box.hb-two[hidden]{display:none}
 .hb-ffwcol>.hb-ffw{margin-top:0;padding-top:0;border-top:0}
 /* owner 2026-11-09: a plain 1px line between the day's facts and FFW ของคุณ, the full height of the box */
 .hb-box.hb-two{column-gap:0}.hb-box.hb-two>.hb-ffwcol{align-self:stretch;margin-left:24px;padding-left:24px;border-left:1px solid var(--border)}
}
dialog.modal.hb-sheet{width:min(var(--modal-w-md),calc(100vw - 32px))}
.hb-sheet fieldset.hub-people-chips>legend{float:left;width:100%;margin:0 0 8px;padding:0}.hb-sheet .hub-claim-line{border:0;padding:0;background:transparent}
@media(max-width:767px){dialog.modal.hb-sheet{width:100vw;max-width:100vw;margin:auto 0 0;border-radius:var(--radius-lg) var(--radius-lg) 0 0}dialog.modal.hb-sheet>.modal-inner{max-height:calc(92dvh - var(--modal-room))}}

/* Owner 2026-11-12 AI access: the switch table of ตั้งค่า › ระบบ › AI shows its "what AI may do" line under the name: every row has
   it, so it is the table's second muted line, one line cut with … and whole in the cell's tip (RULES 5.23). */
.ai-gate-cell{white-space:nowrap;min-width:260px;width:62%;max-width:640px;overflow:hidden;text-overflow:ellipsis}
.ai-gate-cell .muted{margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:none}
.ai-gate-select{min-width:180px}
.int-health code.mono{overflow-wrap:anywhere}.perm-users{grid-template-columns:minmax(0,1fr)}.perm-users>*{min-width:0;max-width:100%}.perm-user-search{grid-template-columns:minmax(0,1fr)}.perm-user-search>*{min-width:0}.perm-user-search-row .combobox{flex:1;min-width:0}
/* a phone stacks the row: the task words keep their full height (the 44px one-line cell hid them under the select) */
@media(max-width:767px){.table-wrap>table.project-table tbody td.ai-gate-cell{height:auto;max-height:none;overflow:visible;width:auto;min-width:0}}
.ai-guide dd{overflow-wrap:anywhere;min-width:0}

.el-new{max-width:768px}
/* The create-course form: the radio group is named like every field label (final check 2026-11-13: it read 16px regular) */.el-new .field>.field-label{font-size:12px;font-weight:600;line-height:16px}

/* Telesale date range: each date keeps 150px; the second goes under the first when they do not fit (390 at 130%: 2026-|11-01 broke in two, final check 2026-11-13) */form.ts-range-own,.ts-sweep form.ts-range-own{display:flex;flex-wrap:wrap;align-items:center;gap:8px}form.ts-range-own>.datepicker,form.ts-range-own>input{flex:1 1 150px;min-width:0}form.ts-range-own>.muted{flex:0 0 auto}form.ts-range-own>.ts-range-pair{flex:1 1 170px;min-width:0;display:flex;align-items:center;gap:8px;white-space:nowrap}.ts-range-pair>input{flex:1 1 150px;min-width:0}.ts-sweep .pov-st{white-space:nowrap}form.ts-range-own .button{flex:1 1 100%}

/* EL-08: the two tax fields of the in-place ผังบัญชี step carry their names */.bqv-acc .bqv-tax{display:inline-flex;align-items:center;gap:4px;min-width:0}
/* Finance worklist, owner 2026-11-16 (app/View/finance-worklist.php). A name (หัวบิล / บริษัทลูกค้า) keeps its distinguishing end: up to
   two lines, then … (fw-clip2). The status strip above a list wraps on a desktop instead of cutting its last tab. The toolbar's create
   buttons stay together at its right end (fw-add) and the search gives up width first. */
.fw-table .fw-clip.fw-clip2{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;overflow-wrap:anywhere;line-height:16px}
@media(min-width:768px){.status-tabs-row>.status-tabs,nav.status-tabs.income-status-tabs{flex-wrap:wrap;overflow:visible}.fw>.fw-bar>.fw-search{min-width:180px}}
@media(min-width:1280px){.fw>.fw-bar{flex-wrap:nowrap}}
.fw-add{display:flex;align-items:center;gap:8px;flex:0 0 auto}
/* On a phone the list stays a table of the key columns (the /Projects rule): code · name (two lines) · amount with the status under it;
   every other cell (fw-x) is hidden, the table never scrolls sideways. Each row is a grid of the visible cells. */
@media(max-width:700px){
 main#content .fw-card{overflow:visible}
 main#content .fw-table.fw-phone{display:block;min-width:0;width:100%}main#content .fw-table.fw-phone colgroup{display:none}main#content .fw-table.fw-phone :is(thead,tbody){display:block}
 main#content .fw-table.fw-phone tr{display:grid;grid-template-columns:20px 96px minmax(0,1fr) 112px;gap:0 6px;align-items:start;padding:6px 8px;border-bottom:1px solid var(--border)}
 main#content .fw-table.fw-phone :is(th,td){display:block;height:auto;min-height:0;padding:0;border:0;white-space:nowrap;overflow:hidden}
 main#content .fw-table.fw-phone .fw-x{display:none}
 main#content .fw-table.fw-phone tr.fw-row{min-height:44px}main#content .fw-table.fw-phone tr.fw-row td{height:auto}
 main#content .fw-table.fw-phone tr.fw-row>td.num{grid-column:4;grid-row:1}main#content .fw-table.fw-phone tr.fw-row>td.fw-stc,main#content .fw-table.fw-phone thead th.fw-stc{grid-column:4;grid-row:2;text-align:right;white-space:nowrap;font-size:12px;line-height:16px}
 /* the status and its flags stay on one line: the words give up width first and end in … (the whole in the tip, erpCutTip), a flag keeps its size (RULES 5.23) */
 main#content .fw-table.fw-phone tr.fw-row>td.fw-stc{display:flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0}main#content .fw-table.fw-phone tr.fw-row>td.fw-stc>.pov-st{display:flex;flex:0 1 auto;min-width:0;max-width:100%}main#content .fw-table.fw-phone tr.fw-row>td.fw-stc>.badge{flex:none}
 main#content .fw-table.fw-phone thead th.fw-stc{display:none}
 main#content .fw-table.fw-phone tr.fw-row>td:nth-child(2){grid-column:2;grid-row:1/3;font-size:12px}main#content .fw-table.fw-phone tr.fw-row>td:first-child{grid-column:1;grid-row:1/3}
 main#content .fw-table.fw-phone tr.fw-row>td:not(.fw-x):not(.num):not(.fw-stc):not(:first-child):not(:nth-child(2)):not(.fw-actions):not(.fw-peak){grid-column:3;grid-row:1/3;white-space:normal}
 main#content .fw-table.fw-phone tr.fw-row .fw-clip{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;overflow-wrap:anywhere}
 main#content .fw-table.fw-phone tr.fw-row .fw-name~.fw-k{display:none}main#content .fw-table.fw-phone tr.fw-row>td:nth-child(2){text-overflow:ellipsis}main#content .fw-table.fw-phone tr.fw-row .fw-code{white-space:nowrap}
 main#content .fw-table.fw-phone tr.fw-row>:is(td.fw-actions,td.fw-peak){grid-column:1/-1;white-space:normal}main#content .fw-table.fw-phone tr.fw-row>:is(td.fw-actions,td.fw-peak):empty{display:none}
 /* the PEAK line of จ่ายแล้ว is one height whether it holds the ส่ง PEAK button or a state line (รอส่ง PEAK, ไม่แน่ชัด): rows of one height (RULES 5.18) */
 main#content .fw-table.fw-phone tr.fw-row>td.fw-peak:not(:empty){display:flex;align-items:center;min-width:0;min-height:36px}@media(pointer:coarse){main#content .fw-table.fw-phone tr.fw-row>td.fw-peak:not(:empty){min-height:44px}}
 main#content .fw-table.fw-phone tr.fw-row .fw-stc :is(.pov-st,.status-dot-label,.badge){white-space:nowrap}
 main#content .fw-table.fw-phone tr.fw-group{grid-template-columns:20px minmax(0,1fr) auto;padding:6px 8px;background:var(--soft)}main#content .fw-table.fw-phone tr.fw-group td{height:auto;white-space:normal;background:transparent}main#content .fw-table.fw-phone tr.fw-group>td:nth-child(2){white-space:nowrap;text-overflow:ellipsis;min-width:0}main#content .fw-table.fw-phone tr.fw-group>td:last-child:not(.num){grid-column:1/-1}main#content .fw-table.fw-phone tr.fw-group>td:empty:not(:first-child){display:none}
 main#content .fw-table.fw-phone tr.fw-group td.num{padding:0;text-align:right}
}
/* /FinanceHub and every link list (linkTable()): on a phone a door's description wraps under its name instead of cutting (owner 2026-11-16). */
@media(max-width:700px){main#content .link-table td{grid-column:1/-1;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:break-word}}
/* ProjectDetail รายรับ & การวางบิล at 1440 (owner 2026-11-16): the bill grid fits its card, ยอดสุทธิ in view: narrower input columns; a
   narrower window keeps the sideways scroll inside the card. */
@media(min-width:1200px){#project-income .ig{min-width:1080px}#project-income .ig .ig-c-qt{width:84px}#project-income .ig .ig-c-date{width:96px}#project-income .ig .ig-c-to{width:112px}#project-income .ig .ig-c-due{width:116px}#project-income .ig .ig-c-num{width:104px}#project-income .ig .ig-c-vat{width:92px}#project-income .ig .ig-c-wht{width:88px}#project-income .ig .ig-c-doc{width:64px}#project-income .ig .ig-c-x{width:52px}}

/* Audit 2026-11-18 PP-32 / TES-38: the phone drawer has no collapse (it is a drawer); the press did nothing there. */
@media(max-width:767px){.sidebar footer .nav-collapse{display:none}}
/* PP-33: the two presses after a sent Bill never touch. */
.external-expense-done-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:16px}
/* PP-07: a bank account sent and not yet checked, in the bank group of the Partner profile. */
.partner-portal-pending{grid-column:1/-1;display:flex;align-items:center;gap:8px;margin:0;font-size:14px;line-height:20px;color:var(--muted)}
/* PP-15: บิลของฉัน, one table on every width. */
.partner-bills .pb-c-day{width:104px}.partner-bills .pb-c-amt{width:120px}.partner-bills .pb-c-st{width:148px}
/* a phone keeps the table and its header row (owner 2026-11-16 phone tables), the four columns on one grid; a long Project ends in … */
@media(max-width:700px){main#content .partner-bills thead{display:block}main#content .partner-bills :is(thead,tbody) tr{grid-template-columns:84px minmax(0,1fr) 80px 80px;align-items:center;gap:0}main#content .partner-bills :is(th,td):last-child{padding-right:0}main#content .partner-bills :is(th,td){padding-left:0;padding-right:8px}main#content .partner-bills th{display:block;padding-bottom:4px;height:auto}main#content .partner-bills .pb-name{display:none}main#content .partner-bills td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}main#content .partner-bills .number{text-align:right}main#content .partner-bills td.number:first-child,main#content .partner-bills th:first-child{text-align:left}}
/* PP-14: a Partner's one-step bill form shows the file and the item together; they never touch. */
.external-expense-body>section+section{margin-top:16px}
/* Journey day row: the Phase of a day is chosen in its row (audit PROJ-07, 2026-11-18); one row height (RULES 5.22). */
main#content .journey-table select.jf-phase-pick{width:100%;height:28px;min-height:28px;padding:0 24px 0 8px;font-size:13px;line-height:16px}
/* A type a won Deal cannot become, shown switched off with its reason in the tip (audit PROJ-19, 2026-11-18). */
.project-form-type-card.is-off{opacity:.5;cursor:not-allowed}
/* /ProjectOverview on a phone (audit PROJ-32, owner 2026-11-16 phone tables stay tables): the head row stays, three columns โปรเจค ·
   ยังไม่รับ · ยังไม่จ่าย, the other money columns leave, a Project whose figures are all zero leaves the phone table. */
@media(max-width:700px){
 main#content .pov .pov-all thead{display:block}main#content .pov-all thead tr:first-child{display:none}
 main#content .pov-all :is(thead,tbody) tr{display:grid;grid-template-columns:minmax(0,1fr) 96px 96px;gap:0 8px;padding:6px 8px}
 main#content .pov-all :is(th,td):is(:nth-child(2),:nth-child(3),:nth-child(5),:nth-child(6),:nth-child(8)){display:none}
 main#content .pov-all :is(td,th){grid-column:auto;display:block;height:auto;padding:0;border:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 main#content .pov-all :is(td,th).num{text-align:right}main#content .pov-all td[data-l]::before{display:none}
 main#content .pov-all tr.pov-zero{display:none}
}
/* FIN-23 (audit 2026-11-20): /ProjectPnlReport's table is a .pov-all too, so the /ProjectOverview phone rule above took its only head row away
   and left six figures a row. On a phone it keeps its head and three columns, รหัส · Project · Forecast Profit · Actual Profit (owner 2026-11-16). */
@media(max-width:700px){
 main#content .pov-all.pnl-table thead tr:first-child{display:grid}
 main#content .pov-all.pnl-table :is(th,td):is(:nth-child(4),:nth-child(9),:nth-child(11)){display:none}
 main#content .pov-all.pnl-table :is(thead,tbody) tr{grid-template-columns:minmax(0,1fr) 132px 104px}
 main#content .pov-all.pnl-table tr.finance-drill-row{display:block}main#content .pov-all.pnl-table tr.finance-drill-row td{display:block;white-space:normal}main#content .pov-all.pnl-table tr.finance-drill-row:has(.finance-drill-link){display:none}
 main#content .pov-all.pnl-table td:first-child>a.record-link{display:none}main#content .pov-all.pnl-table td:first-child>.muted{color:var(--fg)}
}
/* /UpcomingWorkload on a phone (audit PROJ-33, owner 2026-11-16 phone tables stay tables): the head row stays, three columns
   วันงาน · เวลา · ความพร้อม; the date group row spans them. */
@media(max-width:700px){
 main#content table.uw-table thead{display:block}
 main#content .uw-table :is(thead,tbody) tr{display:grid;grid-template-columns:minmax(0,1fr) 92px 72px;gap:0 8px;padding:6px 8px}
 main#content .uw-table :is(th,td):is(:nth-child(3),:nth-child(4),:nth-child(5),:nth-child(6),:nth-child(7)){display:none}
 main#content .uw-table :is(td,th){display:block;grid-column:auto;grid-row:auto;height:auto;padding:0;border:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 main#content .uw-table td[data-l]::before{display:none}main#content .uw-table tr.pov-day td{grid-column:1/-1}
 main#content .uw-table tr.pov-day td:nth-child(n){display:block}
}
/* ตั้งค่า › ส่วนของโปรเจค (audit PROJ-38, 2026-11-18): each switch keeps its full name; the grid takes as many columns as fit a name. */
#project-modules .pp-modules tbody{grid-template-columns:repeat(auto-fill,minmax(224px,1fr))}#project-modules .pp-modules td:first-child{min-width:0;flex:1 1 auto}
/* Audit OPS-06 / 01 (2026-11-18): the OpsTAHub days are one list in one card (owner 2026-11-16 phone-table rule): a day is a soft one-line head, a person a 36px row; the add row "+ เพิ่ม TA" under its people; the TA picker floats (erpFloat) so the card never cuts it */
.ops-ta-days{padding:0}.ops-ta-day+.ops-ta-day{border-top:1px solid var(--border)}
.ops-ta-day>.ops-ta-day-head{padding:6px 16px;min-height:40px;background:var(--soft);border-bottom:0;flex-wrap:nowrap;align-items:center}
.ops-ta-day-head>div:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ops-ta-day-head>.actions{flex-wrap:nowrap;flex-shrink:0;gap:12px;font-size:12px;line-height:16px}
.ops-ta-day .ops-ta-members{margin:0;gap:0}.ops-ta-day .ops-ta-member{padding:0 16px;min-height:36px;display:flex;flex-direction:column;justify-content:center;border-top:1px solid var(--border)}
.ops-ta-day .ops-ta-member>.row-between{align-items:center}.ops-ta-day .ops-ta-member>.row-between>span:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ops-ta-day .ops-ta-empty-day{margin:0;padding:8px 16px;text-align:left;border-top:1px solid var(--border)}
.ops-ta-day>.ops-ta-day-actions{padding:4px 16px 8px;border-top:0}.ops-ta-day .ops-ta-add>summary{border:0;background:none;box-shadow:none;padding-left:0;color:var(--muted)}
@media(max-width:767px){.ops-ta-day-head>div:first-child>span.muted:last-child{display:none}.ops-ta-day-head>.actions>span:not(:first-child){display:none}.ops-ta-btn-label{display:none}.ops-ta-day>.ops-ta-day-head,.ops-ta-day .ops-ta-member,.ops-ta-day .ops-ta-empty-day,.ops-ta-day>.ops-ta-day-actions{padding-left:12px;padding-right:12px}}
.ops-ta-overview-table{overflow-x:auto}.ops-ta-overview-table td{white-space:nowrap;max-width:220px;overflow:hidden;text-overflow:ellipsis}
.ops-ta-day>.ops-ta-day-actions:not(:has(*)){display:none}
.ops-ta-scope .sales-report-custom :is(input[type=date]:not(.picker-native):not([aria-hidden="true"]),.datepicker){min-width:136px}.ops-ta-scope .sales-report-popover{min-width:340px}
/* audit OPS-25: the photo mark sits before the name on one line (RULES 5.23) */.asset-list td:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.asset-list td:first-child>.record-link{display:inline}.asset-list .asset-thumb{width:20px;height:20px;line-height:20px;margin-right:6px}
/* SETORG-08 (owner 2026-11-16 phone tables): อัตราหัก ณ ที่จ่าย on a phone is the Settings list table with its head, ชื่อแสดง · อัตรา · ใช้งาน
   (key columns in finance-wht_rates.php, SettingsUi::listOpen); order, type, default and remove stay on a wider screen. */
/* SA-46 (owner 2026-11-16 phone tables): สุขภาพระบบ on a phone keeps its tables, head kept, the key columns only, one line a row:
   checks รายการ · สถานะ · เหตุผล (· ส่งใหม่); errors and refused saves หน้า · ข้อความ · ครั้ง; alerts เวลา · เรื่อง. */
@media(max-width:767px){
 main#content .system-health-table{display:table;table-layout:fixed;width:100%;min-width:0}
 main#content .system-health-table thead{display:table-header-group}main#content .system-health-table tbody{display:table-row-group}
 main#content .system-health-table tr{display:table-row;padding:0;height:auto}
 main#content .system-health-table :is(th,td){display:table-cell;border-bottom:1px solid var(--border)}
 main#content .system-health-table .pov-elbow{display:none}
 main#content .system-health-table colgroup{display:none}
 main#content .system-health-table :is(th,td){padding:4px 6px;font-size:12px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:auto}
 main#content .system-health-table td>div.muted{display:none}
 main#content .system-health-table td[data-l]::before{content:none;display:none}
 main#content .system-health-table:not(.error-watch-errors):not(.error-watch-refused):not(.error-watch-alerts) :is(th,td):nth-child(1){width:38%}
 main#content .system-health-table:not(.error-watch-errors):not(.error-watch-refused):not(.error-watch-alerts) :is(th,td):nth-child(2){width:84px}
 main#content .system-health-table:not(.error-watch-errors):not(.error-watch-refused):not(.error-watch-alerts) :is(th,td):nth-child(4){width:64px}
 main#content .error-watch-errors :is(th,td):is(:nth-child(1),:nth-child(5),:nth-child(6)),main#content .error-watch-refused :is(th,td):is(:nth-child(4),:nth-child(5)),main#content .error-watch-alerts :is(th,td):is(:nth-child(2),:nth-child(4)){display:none}
 main#content :is(.error-watch-errors,.error-watch-refused) :is(th,td):nth-child(1),main#content .error-watch-errors :is(th,td):nth-child(2){width:34%}
 main#content :is(.error-watch-errors,.error-watch-refused) :is(th,td).num{width:52px}
 main#content .system-health-table tr.pov-day td{white-space:nowrap}
}
/* Settings round 3 shared (owner 2026-11-18): one active switch (SETORG-24), one colour picker (SETORG-17), one order method (SETORG-25). */
.set-active{display:flex;align-items:center;gap:8px;flex-direction:row}.set-active .set-active-words{font-weight:400;margin:0}
.set-colors{display:flex;flex-wrap:wrap;gap:8px 16px}.set-color{display:inline-flex;align-items:center;gap:6px;height:28px;font-size:14px;line-height:20px;cursor:pointer}
.set-color input{margin:0}.set-swatch.is-none svg circle{fill:transparent}
.set-move{display:inline-flex;gap:2px;white-space:nowrap}.set-move .icon-button.small[disabled]{opacity:.3;cursor:default}
/* Settings round 3 parts: each part adds its block below its own marker. */
/* colorField dots named by a theme token (a var() cannot sit in an SVG fill attribute, and no inline style). */
.set-swatch circle.tok-mx-teal-fg{fill:var(--mx-teal-fg)}.set-swatch circle.tok-mx-cyan-fg{fill:var(--mx-cyan-fg)}.set-swatch circle.tok-mx-emerald-fg{fill:var(--mx-emerald-fg)}.set-swatch circle.tok-mx-orange-fg{fill:var(--mx-orange-fg)}.set-swatch circle.tok-mx-purple-fg{fill:var(--mx-purple-fg)}.set-swatch circle.tok-mx-blue-fg{fill:var(--mx-blue-fg)}.set-swatch circle.tok-mx-pink-fg{fill:var(--mx-pink-fg)}.set-swatch circle.tok-mx-amber-fg{fill:var(--mx-amber-fg)}.set-swatch circle.tok-mx-rose-fg{fill:var(--mx-rose-fg)}.set-swatch circle.tok-mx-indigo-fg{fill:var(--mx-indigo-fg)}.set-swatch circle.tok-mx-slate-fg{fill:var(--mx-slate-fg)}
/* r3:sales */
.rq-options{display:flex;flex-direction:column;gap:8px;max-width:520px}.rq-options .ig-addlink{align-self:flex-start;background:none;border:0;padding:0;cursor:pointer}
/* SETORG-22: every control of a question is one height (36px). */
.set-question-grid :is(input:not([type=checkbox]):not([type=hidden]),select,.combobox-trigger){height:36px}
/* SETORG-16: on a phone a Stage row ends in its result (ยังเปิด / Won / Lost), a board row in ใช้งาน; the order arrows stay on a wider screen. */
/* r3:projects */
/* Phone (owner 2026-11-16 phone-table rule; owner 2026-11-18 "compact"): every list of โปรเจค & Task stays a table at 390, head kept,
   one 32px line a row with its key columns only (name · the fact · สถานะ · ลำดับ); the rest is in the row's expand row. The hint is one
   line (the whole in the line's own width, cut with …); ค่า default เมื่อไปหน้างาน is a three-column table of number boxes. */
@media(max-width:700px){
 main#content [data-set-group="projects"] .set-list table{display:table;table-layout:fixed;width:100%;min-width:0}
 main#content [data-set-group="projects"] .set-list thead{display:table-header-group}main#content [data-set-group="projects"] .set-list tbody{display:table-row-group}
 main#content [data-set-group="projects"] .set-list colgroup{display:none}
 main#content [data-set-group="projects"] .set-list tr.set-row,main#content [data-set-group="projects"] .set-list tr.ig-add,main#content [data-set-group="projects"] .set-list tr.set-closed-head,main#content [data-set-group="projects"] .set-list tr.ig-detail:not([hidden]){display:table-row;padding:0;height:auto}
 main#content [data-set-group="projects"] .set-list tr[hidden]{display:none}
 main#content [data-set-group="projects"] .set-list tr.set-row>td,main#content [data-set-group="projects"] .set-list th{display:table-cell;padding:6px 4px;height:32px;border-bottom:1px solid var(--border);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px;line-height:20px;vertical-align:middle}
 main#content [data-set-group="projects"] .set-list th{font-size:12px;line-height:16px;height:auto}
 main#content [data-set-group="projects"] .set-list tr.set-row>td:first-child{grid-column:auto;font-size:13px}
 main#content [data-set-group="projects"] .set-list tr.set-row>td.is-none,main#content [data-set-group="projects"] .set-list tr.set-row>td:empty{display:table-cell}
 main#content [data-set-group="projects"] .set-list tr.set-row>td[data-l]::before{content:none;display:none}
 main#content [data-set-group="projects"] .set-list tr.ig-add>td,main#content [data-set-group="projects"] .set-list tr.ig-detail>td,main#content [data-set-group="projects"] .set-list tr.set-closed-head>td{display:table-cell;padding:6px 4px;height:auto}
 main#content [data-set-group="projects"] .set-list .project-type-icon{display:none}
 main#content [data-set-group="projects"] .set-list .set-move .icon-button.small{width:26px;min-width:26px;height:26px;min-height:26px;padding:4px}
 /* the last two columns everywhere: สถานะ 68px, ลำดับ 56px */
 main#content [data-set-group="projects"] .set-list :is(th,td):nth-last-child(1){width:56px;text-align:right}main#content [data-set-group="projects"] .set-list :is(th,td):nth-last-child(2){width:68px}
 main#content [data-set-group="projects"] .set-list tr:is(.ig-add,.ig-detail,.set-closed-head)>td{width:auto;text-align:left}
 /* ประเภทงาน: ชื่อ · คำนำหน้ารหัส · สถานะ · ลำดับ */
 main#content #set-project-types .set-list :is(th,td):is(:nth-child(2),:nth-child(3),:nth-child(5),:nth-child(6)){display:none}
 main#content #set-project-types .set-list :is(th,td):nth-child(4){width:64px}
 /* เช็คลิสต์: ชื่อ · สถานะ · ลำดับ */
 main#content #set-project-checklists .set-list :is(th,td):is(:nth-child(2),:nth-child(3),:nth-child(4)){display:none}
 /* Task ตั้งต้น: Task · รูปแบบงาน · สถานะ · ลำดับ */
 main#content #set-project-task-templates .set-list :is(th,td):is(:nth-child(3),:nth-child(4),:nth-child(5)){display:none}
 main#content #set-project-task-templates .set-list :is(th,td):nth-child(2){width:84px}
 /* สถานะ Task: ชื่อ · ความหมาย · สถานะ · ลำดับ */
 main#content #set-task-statuses .set-list :is(th,td):nth-child(3){display:none}
 main#content #set-task-statuses .set-list :is(th,td):nth-child(2){width:84px}
 /* ฟิลด์ Task: ชื่อ · ชนิด · สถานะ · ลำดับ */
 main#content #set-task-fields .set-list :is(th,td):is(:nth-child(3),:nth-child(4)){display:none}
 main#content #set-task-fields .set-list :is(th,td):nth-child(2){width:72px}
 main#content [data-set-group="projects"] .set-list tr:is(.ig-add,.ig-detail,.set-closed-head)>td:nth-child(1){display:table-cell}
 /* the hint: one line */
 main#content [data-set-group="projects"] .set-hint{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:8px}
 /* ค่า default เมื่อไปหน้างาน: a table of three columns */
 main#content #set-day-time .contact-fees table{display:table;table-layout:fixed;width:100%}
 main#content #set-day-time .contact-fees thead{display:table-header-group}main#content #set-day-time .contact-fees tbody{display:table-row-group}
 main#content #set-day-time .contact-fees tr{display:table-row;padding:0;height:auto}
 main#content #set-day-time .contact-fees :is(th,td){display:table-cell;padding:4px;border-bottom:1px solid var(--border);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px;line-height:20px}
 main#content #set-day-time .contact-fees td[data-l]::before{content:none;display:none}
 main#content #set-day-time .contact-fees :is(th,td):not(:first-child){width:96px}main#content #set-day-time .contact-fees input{width:100%;height:32px;text-align:right}
 main#content #set-day-time .contact-fees colgroup{display:none}
 main#content #set-day-time .int-sub-head p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}
/* SETORG-29: every control of a project form is 36px (DESIGN-SYSTEM 6), the pickers included. */
main#content [data-set-group="projects"] .set-detail :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,.combobox-trigger){height:36px;min-height:36px}
main#content [data-set-group="projects"] .set-detail textarea{min-height:60px}
.set-leave-days{margin-top:16px}.set-leave-days input{width:120px;text-align:left}
html body main#content .set-move .icon-button.small{width:28px;min-width:28px;height:28px;min-height:28px;padding:4px}
/* r3:projects phone, made to win over the round-2 phone list rows (grid name + fact) and the sticky first cell. */
@media(max-width:700px){
 html body main#content [data-set-group="projects"] .set-band .set-list thead tr,html body main#content [data-set-group="projects"] .set-band .set-list tr.set-row{display:table-row;height:auto;padding:0}
 html body main#content [data-set-group="projects"] .set-band .set-list thead th,html body main#content [data-set-group="projects"] .set-band .set-list tr.set-row>td{display:table-cell;position:static;padding:6px 4px;height:32px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;border-bottom:1px solid var(--border)}
 html body main#content [data-set-group="projects"] .set-band .set-list table{table-layout:auto}
 html body main#content [data-set-group="projects"] .set-band .pov.set-list table{display:table}html body main#content [data-set-group="projects"] .set-band .pov.set-list tbody{display:table-row-group}html body main#content [data-set-group="projects"] .set-band .pov.set-list thead{display:table-header-group}html body main#content [data-set-group="projects"] .set-band .pov.set-list thead th{display:table-cell}
 html body main#content [data-set-group="projects"] .set-band .set-list :is(th,td):first-child{width:100%;max-width:0;white-space:nowrap;overflow-wrap:normal}
 html body main#content [data-set-group="projects"] .set-band .set-list tr.set-row>td:not(:first-child){display:table-cell}
 html body main#content [data-set-group="projects"] .set-band .set-list tr.set-row>td>:is(div,small,p,span.muted){display:inline}
 html body main#content [data-set-group="projects"] .set-band .set-list tr.set-row>td br{display:none}
 html body main#content [data-set-group="projects"] .set-band .set-list .set-move .icon-button.small{width:24px;min-width:24px;height:24px;min-height:24px;padding:2px}
 html body main#content [data-set-group="projects"] .set-band .set-list :is(th,td){padding:4px}
 html body main#content [data-set-group="projects"] .set-band .set-list tr.set-row>td:first-child strong{font-weight:500}
 html body main#content #set-project-types .set-list :is(th,td):is(:nth-child(2),:nth-child(3),:nth-child(5),:nth-child(6)),
 html body main#content #set-project-checklists .set-list :is(th,td):is(:nth-child(2),:nth-child(3),:nth-child(4)),
 html body main#content #set-project-task-templates .set-list :is(th,td):is(:nth-child(3),:nth-child(4),:nth-child(5)),
 html body main#content #set-task-statuses .set-list :is(th,td):nth-child(3),
 html body main#content #set-task-fields .set-list :is(th,td):is(:nth-child(3),:nth-child(4)){display:none}
}
@media(max-width:700px){html body main#content [data-set-group] .set-band .set-list tr.set-row.set-capped,html body main#content [data-set-group] .set-band .set-list tr[data-q].set-capped,html body main#content [data-set-group] .set-band .set-list tr.set-row.set-capped+tr.ig-detail{display:none}html body main#content .set-list tr.set-cap-more>td{display:table-cell;padding:6px 4px;border-bottom:1px solid var(--border)}html body main#content .set-list tr.set-cap-more{display:table-row}}
/* r3 phone: the section hint is left out at 390 (the section name and its one fact stay); วันงาน times side by side, fee rows 32px. */
@media(max-width:700px){
 html body main#content .set-band .set-hint{display:none}
 html body main#content #set-day-time .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 html body main#content #set-day-time .contact-fees :is(th,td){padding:2px 4px;height:32px}
 html body main#content #set-day-time .contact-fees input{height:28px;min-height:28px}
}
/* r3:finance */
/* SETORG-38: ลิงก์เบิกจ่าย. The Project list is one flat list under its find box (no bordered box), a name one line; the link field is as wide as the form. */
main#content .finw-projects{display:block;max-height:none;overflow:visible;border:0;padding:0}main#content .finw-projects>.search{margin:4px 0 8px;max-width:360px}
main#content .finw-project-list{max-height:240px;overflow:auto}main#content .finw-project-list .check-row{min-width:0;white-space:nowrap}main#content .finw-project-list .check-row>span{overflow:hidden;text-overflow:ellipsis;min-width:0}
main#content .set-detail .filters>input.mono[readonly]{flex:1 1 auto;min-width:0;width:100%}
/* SETORG-39: PEAK tables that save with one บันทึก: their cells are the editable-table field (28px, edge on hover), one line a row. */
main#content #int-peak :is(.int-peak-units-table,.int-peak-wht-table) td{white-space:nowrap}
main#content #int-peak .int-advanced+.int-advanced{margin-top:8px}
/* r3:integrations */
/* Round 3 (owner 2026-11-18 "step ถูกตามเป้า"): a connection's numbered steps fold (IntCard::partOpen); the head is one 40px line,
   the step's name and its state dot; open only while it is the step to do now. ไม่มีกรอบซ้อน: a line above, no box. */
main[data-route="/AdminSettings"] .int-section.int-part{display:block;padding:0;border-top:1px solid var(--border)}
main[data-route="/AdminSettings"] .int-section.int-part>*{max-width:720px}
main[data-route="/AdminSettings"] .int-section.int-part>*+*{margin-top:16px}
main[data-route="/AdminSettings"] .int-section.int-part.wide>*:not(form):not(.field):not(.set-list){max-width:none}
.int-part>summary.int-part-head{display:flex;align-items:center;gap:12px;min-height:40px;cursor:pointer;list-style:none;max-width:none}
.int-part>summary.int-part-head::-webkit-details-marker{display:none}
.int-part>summary.int-part-head::before{content:"";width:8px;height:8px;border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);transform:rotate(-45deg);flex:none;margin-right:2px}
.int-part[open]>summary.int-part-head::before{transform:rotate(45deg)}
.int-part>summary.int-part-head h3{margin:0;font-size:14px;line-height:20px;font-weight:600}
.int-part>summary.int-part-head>.pov-st{margin-left:auto;font-size:12px;line-height:16px;font-weight:400}
.int-part[open]{padding-bottom:16px}
.int-part-note{margin:0;font-size:12px;line-height:18px}
/* SETORG-44: a read-only value inside a connection is words, not a grey box that looks typable. */
main[data-route="/AdminSettings"] .int-card .set-value{background:none;border:0;padding:0;min-height:0;box-shadow:none}
.int-drive-type{display:flex;align-items:center;gap:12px}.int-drive-type .field-label{margin:0;white-space:nowrap}.int-drive-type select{max-width:280px}
@media(max-width:767px){
 /* Phone: the Lark notification table stays a table, one line a row: การแจ้งเตือน · กลุ่ม Lark · สถานะ (dot); ทดสอบส่ง on a wider screen. */
 main#content .int-lark-routes table{display:table;table-layout:fixed;width:100%}
 main#content .int-lark-routes thead{display:table-header-group}main#content .int-lark-routes tbody{display:table-row-group}
 main#content .int-lark-routes tr{display:table-row;height:auto}
 main#content .int-lark-routes :is(th,td){display:table-cell;padding:4px 6px;font-size:12px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-bottom:1px solid var(--border)}
 main#content .int-lark-routes td[data-l]::before{content:none;display:none}
 main#content .int-lark-routes colgroup{display:none}
 main#content .int-lark-routes :is(th,td):nth-child(1){width:42%}main#content .int-lark-routes :is(th,td):nth-child(3){width:30px}
 main#content .int-lark-routes :is(th,td):nth-child(4){display:none}
 main#content .int-lark-routes td:nth-child(3) .pov-st>span{display:none}
 main#content .int-lark-routes tr.int-lark-detail td{display:table-cell;white-space:normal}
 main#content .int-lark-queue :is(th,td):is(:nth-child(3),:nth-child(5)){display:none}
 .int-drive-type select{max-width:none;flex:1}
}
/* r3:system */
/* Round 3 phone (owner 2026-11-16 phone tables, 2026-11-18 "compact"): ระบบ keeps its tables, head kept, one line a row. */
.set-fold>summary{display:flex;align-items:center;min-height:40px;cursor:pointer}.set-fold>summary h3{margin:0;font-size:14px;line-height:20px}
/* SET20-08: an app key's tools, grouped by job, two to a row. */
.app-tool-group{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 16px;margin:0 0 12px;padding:0;border:0}.app-tool-group legend{margin-bottom:4px;font-size:14px;line-height:20px}.app-tool{display:flex;align-items:center;gap:8px;min-height:32px;font-size:14px;line-height:20px}.app-tool input{width:auto;height:auto}@media(max-width:639px){.app-tool-group{grid-template-columns:minmax(0,1fr)}}
/* SET20-22: a fold head shows it opens (the arrow), like every other fold. */
.set-fold>summary{list-style:none;gap:6px}.set-fold>summary::-webkit-details-marker{display:none}.set-fold>summary>.icon{width:16px;height:16px;color:var(--muted);transition:transform .15s}.set-fold[open]>summary>.icon{transform:rotate(180deg)}
.set-fold>summary{display:flex;align-items:center;min-height:40px;cursor:pointer}
/* SH-09: a fold of /ConnectAI (one tool's steps, the revoked keys) shows it opens: a small chevron before its line. */
.ai-guide .set-fold>summary,.ai-keys-revoked>summary{gap:10px;list-style:none}.ai-guide .set-fold>summary::-webkit-details-marker,.ai-keys-revoked>summary::-webkit-details-marker{display:none}.ai-guide .set-fold>summary::before,.ai-keys-revoked>summary::before{content:'';flex:none;width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);transition:transform .15s}.ai-guide .set-fold[open]>summary::before,.ai-keys-revoked[open]>summary::before{transform:rotate(45deg)}.set-fold>summary h3{margin:0;font-size:14px;line-height:20px}
@media(max-width:767px){
 /* ประวัติการตั้งค่า: รายการ · ค่าใหม่ · เวลา (ค่าเดิม and ผู้แก้ไข in the row's words on a wider screen). */
 main#content .set-history .set-list table{display:table;table-layout:fixed;width:100%;min-width:0}
 main#content .set-history .set-list thead{display:table-header-group}main#content .set-history .set-list tbody{display:table-row-group}
 main#content .set-history .set-list tr{display:table-row;height:auto;padding:0}
 main#content .set-history .set-list :is(th,td){display:table-cell;padding:4px 6px;font-size:12px;line-height:16px;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis;border-bottom:1px solid var(--border);height:auto;vertical-align:middle}
 main#content .set-history .set-list td[data-l]::before{content:none;display:none}
 main#content .set-history .set-list colgroup{display:none}
 main#content .set-history .set-list :is(th,td):is(:nth-child(2),:nth-child(4)){display:none}
 main#content .set-history .set-list :is(th,td):nth-child(1){width:40%}main#content .set-history .set-list :is(th,td):nth-child(5){width:104px}
 main#content .set-history .set-history-full{display:none}
 /* เมนู: a menu is one 36px line, its name field 32px. */
 main#content #set-navigation .navset:not(.is-arrange) :is(.navset-item:not(.navset-quiet),.navset-group-head){min-height:36px;gap:4px 8px}
 main#content #set-navigation .navset-name input{height:32px;min-height:32px}
 /* The webhook log and the Base44 archive: เวลา/รหัส · รายการ · ผลลัพธ์, one line. */
 main#content .int-log-table>table.table-stack{display:table;table-layout:fixed;width:100%;min-width:0}
 main#content .int-log-table>table.table-stack thead{display:table-header-group}main#content .int-log-table>table.table-stack tbody{display:table-row-group}
 main#content .int-log-table>table.table-stack tr{display:table-row}
 main#content .int-log-table>table.table-stack :is(th,td){display:table-cell;padding:4px 6px;font-size:12px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 main#content .int-log-table>table.table-stack td[data-label]::before{content:none;display:none}
 main#content .int-log-table>table.table-stack :is(th,td):is(:nth-child(2),:nth-child(4),:nth-child(6)){display:none}
 main#content .int-log-table>table.table-stack tr.int-log-detail-row td{display:table-cell;white-space:normal}
 main#content #set-legacy-archive .int-log-table>table.table-stack :is(th,td):nth-child(2){display:table-cell}main#content #set-legacy-archive .int-log-table>table.table-stack :is(th,td):is(:nth-child(3),:nth-child(5)){display:none}
}
/* r3:system phone, made to win over the round-2 rules: history rows are table rows; a menu line is 32px; number fields two a row. */
@media(max-width:700px){
 html body main#content [data-set-group] .set-band .set-history .set-list tbody tr[data-q]{display:table-row;padding:0}
 html body main#content [data-set-group] .set-band .set-history .set-list tbody tr[data-q]>td{display:table-cell;padding:4px 6px;height:28px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;border-bottom:1px solid var(--border)}
 html body main#content [data-set-group] .set-band .set-history .set-list tbody tr[data-q]>td>*{display:inline}
 html body main#content [data-set-group] .set-band .set-history .set-list :is(th,td):is(:nth-child(2),:nth-child(4)),html body main#content [data-set-group] .set-band .set-history .set-list tbody tr[data-q]>td:is(:nth-child(2),:nth-child(4)){display:none}
 html body main#content #set-navigation .navset:not(.is-arrange) :is(.navset-item:not(.navset-quiet),.navset-group-head,.navset-colhead){min-height:32px;padding:0 4px}
 html body main#content #set-navigation .navset .navset-icon svg{width:16px;height:16px}
 html body main#content #set-navigation .navset .navset-name input{height:28px;min-height:28px;padding:0 6px}
 html body main#content #set-navigation .navset .switch{transform:scale(.85);transform-origin:right center}
 html body main#content :is(#set-sign-in,#set-alerts) .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 html body main#content :is(#set-sign-in,#set-alerts) .form-grid>.field.full{grid-column:1/-1}
 html body main#content :is(#set-sign-in,#set-alerts) .field small{display:none}
}
@media(max-width:700px){html body main#content #set-navigation :is(.navset-item,.navset-group-head).set-capped{display:none}html body main#content #set-navigation .set-cap-nav{display:block;margin:4px 8px 8px}}
html body main#content .set-list td:has(>.set-move){text-overflow:clip;overflow:visible}
@media(max-width:700px){
 html body main#content [data-set-group] .set-band .set-history .set-list tbody tr[data-q]>td::before{content:none;display:none}
 html body main#content [data-set-group="projects"] .set-band .set-list td[colspan]{max-width:none;width:auto;white-space:normal}
}
@media(max-width:700px){html body main#content [data-set-group] .set-band .set-history .set-list tbody tr[data-q].set-capped{display:none}}
@media(max-width:700px){html body main#content #set-ai .table-wrap tr.set-capped{display:none}html body main#content #set-ai .table-wrap tr.set-cap-more>td{padding:6px 4px}}
@media(max-width:700px){html body main#content #set-ai .table-wrap tbody tr>td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-block:2px}html body main#content #set-ai .table-wrap tbody tr>td :is(div,small,br){display:none}html body main#content #set-ai .table-wrap tbody tr{padding-block:4px}}
@media(max-width:700px){html body main#content #set-ai section.stack>.table-wrap>table{table-layout:fixed;width:100%;min-width:0}html body main#content #set-ai section.stack>.table-wrap>table :is(th,td){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:4px 6px;height:auto}html body main#content #set-ai section.stack>.table-wrap>table td :is(div,small,p,ul){display:inline}}
/* AI keys on a phone: a table of ชื่อ · ป้าย · สถานะ, one line a row (owner 2026-11-16 phone tables). */
@media(max-width:700px){
 html body main#content #set-ai #ai-keys-title~.table-wrap>table{display:table;table-layout:fixed;width:100%;min-width:0}html body main#content #set-ai #ai-keys-title~.table-wrap thead{display:table-header-group}html body main#content #set-ai #ai-keys-title~.table-wrap tbody{display:table-row-group}
 html body main#content #set-ai #ai-keys-title~.table-wrap tr{display:table-row;height:auto;padding:0}
 html body main#content #set-ai #ai-keys-title~.table-wrap :is(th,td){display:table-cell;padding:4px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-bottom:1px solid var(--border);height:auto}
 html body main#content #set-ai #ai-keys-title~.table-wrap td::before{content:none;display:none}
 html body main#content #set-ai #ai-keys-title~.table-wrap :is(th,td):is(:nth-child(3),:nth-child(5),:nth-child(6),:nth-child(7)){display:none}
 html body main#content #set-ai #ai-keys-title~.table-wrap :is(th,td):nth-child(4){width:96px}
}
/* r3:users */
/* SA-20: a toast stands above the rights save bar, never on its reason field. */
main:has(.perm-save-bar) .alert.is-toast,main:has(.perm-save-bar) .lf-stack{bottom:84px}
@media(max-width:700px){main:has(.perm-save-bar) .alert.is-toast,main:has(.perm-save-bar) .lf-stack{bottom:150px}}
/* SA-15: the level picker takes its whole column, so a level word is not cut. SA-12: where a row outside the menu is used. */
main#content .perm-table .perm-ctl{display:block}main#content .perm-table .perm-ctl :is(select,.combobox-trigger){width:100%;max-width:100%}
.perm-where{font-size:12px;line-height:16px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:700px){.perm-where{display:none}}
/* SA-07/08: the invite link sits on the invited person's card head, a full-width line under the name. */
.perm-user-head:has(.perm-invite-head:not([hidden])){flex-wrap:wrap}
.perm-invite-head{flex:1 0 100%;order:3;display:flex;flex-direction:column;gap:4px;max-width:720px}
.perm-invite-head .perm-invite-done{margin:0}
/* fix-ui1119 settings */
/* LIVE-03: the one-Project note is a line of the ต้องใช้คู่กับ column, so every rights row keeps one height. */
main#content .pov .perm-table td.perm-needs .perm-note{display:inline;margin:0 0 0 8px;font-size:12px;line-height:16px;color:var(--muted)}

/* One search box of the system (audit TES-22, layout.php nav-search): the one searchBox() field at the menu's width; its list is the combobox list look */
.nav-search{padding:8px 8px 0}.nav-search .search{margin:0}.collapsed .nav-search{display:none}
.nav-search-list{z-index:70;margin:0;padding:4px;list-style:none;max-height:360px;overflow-y:auto;background:var(--tb-ffffff,#fff);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:0 4px 6px -1px rgb(0 0 0 / .1),0 2px 4px -2px rgb(0 0 0 / .1);min-width:240px}.nav-search-list .nav-search-head{padding:6px 8px 2px;font-size:12px;line-height:16px;font-weight:600;color:var(--muted)}.nav-search-list [role=option] a{display:flex;flex-direction:column;min-width:0;width:100%;color:inherit}.nav-search-list [role=option] a>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-search-list .nav-search-note{padding:8px;font-size:12px;line-height:16px;color:var(--muted)}
@media (max-width:767px){.collapsed .nav-search{display:block}}

/* dayfee-copy (2026-11-19): ค่า default เมื่อไปหน้างาน sits 24px under the time fields (8px grid); ประเภทงาน names stand whole,
   the columns after them are narrower (each keeps its tip). */
main#content #set-day-time .set-form>.form-grid+.int-sub-head{margin-top:24px}main#content #set-day-time .int-sub-head+.contact-fees{margin-top:8px}
@media(max-width:700px){main#content #set-day-time .contact-fees input{padding:0 6px}main#content #set-project-types .set-list :is(th,td):nth-child(4){display:none}}
@media(min-width:701px){
 main#content #set-project-types .set-list col:nth-child(2){width:120px}main#content #set-project-types .set-list col:nth-child(3){width:142px}
 main#content #set-project-types .set-list col:nth-child(4){width:88px}main#content #set-project-types .set-list col:nth-child(5){width:96px}
 main#content #set-project-types .set-list col:nth-child(6){width:64px}main#content #set-project-types .set-list col:nth-child(7){width:72px}
 main#content #set-project-types .set-list col:nth-child(8){width:64px}
 main#content #set-project-types .set-list tr.set-row>td:not(:first-child){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 main#content #set-project-types .set-list tr.set-row>td:first-child strong{white-space:nowrap}
}
/* fix-ui1119 projects */
/* PJ-01 / PROJ-36 ก: a closed phone day reads วันที่ · ชื่องาน and, under the name, the muted เวลา · สถานที่ · ขาด (every row, one line each). */
.dt-ph-sub{display:none}
@media(max-width:700px){
 main#content .ig.dt-table tr.dt-day:not(.is-open){min-height:52px}
 main#content .ig.dt-table tr.dt-day:not(.is-open)>td.dt-stick-name{flex-direction:column;align-items:stretch;justify-content:center}
 main#content .ig.dt-table tr.dt-day:not(.is-open) .dt-ph-sub{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:16px}
 main#content .ig.dt-table tr.dt-day:not(.is-open) .dt-namebox .ig-in{height:24px}
}

/* fix-ui1119 ops */
/* Audit OPS-30: on a phone the /PersonReport role tabs scroll sideways (no scrollbar is drawn); a soft shadow stands at the edge that still has tabs past it. The covers ride with the scroll (local), the shadows stay at the edges (scroll), so a shadow shows only where there is more to see. */
@media(max-width:767px){main[data-route="/PersonReport"] .tabs{background:linear-gradient(90deg,var(--soft) 40%,transparent) left center/24px 100% no-repeat local,linear-gradient(270deg,var(--soft) 40%,transparent) right center/24px 100% no-repeat local,radial-gradient(farthest-side at 0 50%,color-mix(in srgb,var(--fg) 22%,transparent),transparent) left center/10px 100% no-repeat scroll,radial-gradient(farthest-side at 100% 50%,color-mix(in srgb,var(--fg) 22%,transparent),transparent) right center/10px 100% no-repeat scroll,var(--soft)}}

/* fix-ui1119 sales */
/* SALES-13: the Stages that hold a Deal in one line above the board, each a jump to its column (one line, scrolls sideways when long) */
.kanban-jump{display:flex;align-items:center;gap:4px;margin:0 0 8px;overflow-x:auto;scrollbar-width:none;white-space:nowrap}.kanban-jump::-webkit-scrollbar{display:none}
.kanban-jump a{display:inline-flex;align-items:center;gap:6px;flex:none;height:28px;padding:0 10px;border:1px solid var(--border);border-radius:9999px;font-size:12px;line-height:16px;color:var(--fg);background:var(--tb-ffffff,white)}.kanban-jump a:hover{background:var(--soft)}.kanban-jump strong{font-weight:600}
.kanban-column{scroll-margin-top:72px}
/* TES-34: the rows handed back from an import, each with why (one line a row) */
.ts-repair-why{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:4px;font-size:14px;line-height:20px}.ts-repair-why li{display:flex;align-items:center;gap:8px;min-width:0;white-space:nowrap}.ts-repair-why li>span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis}
/* are-you-sure 2026-11-19 18:55 (live look): ประเภทงาน cut รูปแบบงาน, Project Model and คำนำหน้ารหัส ("Consulting & I…",
   "Company-owned Pr…") in an 880px table beside empty page; where the band is wide enough the table takes 1080px and every value stands whole. */
@container settings-list (min-width:1080px){
 main#content #set-project-types .set-list col:nth-child(2){width:200px}main#content #set-project-types .set-list col:nth-child(3){width:216px}
 main#content #set-project-types .set-list col:nth-child(4){width:112px}
}

/* ค่า default เมื่อไปหน้างาน on a phone: the account name stays one line with … and the whole name in the tooltip (RULES 5.23; the
   2026-11-19 wrap made the row 125 px, test_no_wrapped_rows_browser) */

/* screenshot sweep 2026-11-19 (530 shots, 1440 + 375): what a reader could not see */
/* the Matrix without visible people says why at its left edge, not in the middle of a table wider than the screen */
main#content .mx-table td.mx-none{text-align:left}
/* a reader who cannot edit the days gets no empty แก้ / ลบ column on ตารางวันงาน (TA) */
.dt-table.dt-readonly .dt-stick-act{display:none}
/* ภาพรวม Feedforward: a Project, person or week name takes two lines instead of being cut while the figures keep their columns */
@media(min-width:701px){main#content .ffo-table tbody td:first-child{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}main#content .ffo-table tbody td:first-child *{white-space:normal}}
/* แบ่งงวดจ่าย on a phone: the grid item no longer grows to the table's width (the page scrolled sideways, บันทึกงวด off screen) */
.bill-instalments>*{min-width:0}
/* the Bill window's warning line wraps on a phone instead of cutting what to do */
@media(max-width:600px){.bqv-note{white-space:normal;overflow:visible;text-overflow:clip;display:block}}
/* live look 2026-11-19: a filter popover at the right edge opens leftwards (app.js toggle); a search result shows the whole name on up to two lines */
.fw-pop-body.fw-pop-end{left:auto;right:0}
.nav-search-list [role=option] a>span:first-child{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* harness check 2026-11-19 22:54: แบ่งงวดจ่าย's table scrolls inside its own box on a phone; the Matrix's why wraps within the screen */
@media(max-width:700px){.bill-instalments .bi-table{display:block;max-width:100%;overflow-x:auto}}
main#content .mx-table td.mx-none .mx-none-text{display:block;position:sticky;left:0;max-width:min(560px,calc(100vw - 72px));white-space:normal;overflow-wrap:anywhere}
/* FIN-11 (audit 2026-11-20): on a phone the Bill window's parts never shrink into each other (the scrolling body was a flex column whose
   parts shrank: the pay row ran over ไฟล์แนบ, the buttons over the evidence line); the body scrolls instead. */
@media (max-width:700px){dialog.bqv .bqv-in>*{flex-shrink:0}.bqv-payf .bqv-num{flex:0 0 104px}}

/* SET20-10: the รออนุมัติ count on the Settings menu entry and its one line on the Dashboard. */
.nav-link .nav-count,.nav-sub-link .nav-count{margin-left:auto;min-width:20px;height:16px;padding:0 6px;border-radius:var(--radius-pill);background:var(--tb-fee2e2,#fee2e2);color:var(--tf-991b1b,#991b1b);font-size:12px;line-height:16px;font-weight:600;text-align:center}.nav-link.active .nav-count{background:var(--tb-ffffff,#fff)}.dash-pending{display:flex;align-items:center;gap:8px;margin:0 0 16px;font-size:14px;line-height:20px}
/* SH-21 (audit 2026-11-20): the add row of ช่องทางที่เผยแพร่ is one kind of field across: the channel picker, the date and the link are
   the same height, border, corner and white ground (the link was a borderless grey cell, the date taller than the picker). */
main#content .el-channels-wrap .ig td .combobox-trigger,main#content .el-channels-wrap .ig td .datepicker-trigger,main#content .el-channels-wrap .ig td input.ig-in{height:32px;min-height:32px;box-sizing:border-box;border:1px solid var(--border);border-radius:6px;background:var(--bg)}
main#content .el-channels-wrap .ig td input.ig-in{padding:0 10px;width:100%}

/* SH-05: the board line of the Dashboard's Sales Pipeline opens its Stages: a plain line with a chevron that turns, no button look. */
.dash-pipe-fold{display:inline-flex;align-items:center;gap:6px;height:24px;min-height:24px;padding:0;border:0;background:none;font:inherit;font-weight:600;color:inherit;cursor:pointer}
.dash-pipe-fold .nav-chevron{width:14px;height:14px;transition:transform .15s}.dash-pipe-fold[aria-expanded=true] .nav-chevron{transform:rotate(90deg)}
main#content table.dash-pipe tr[hidden]{display:none!important}main#content table.dash-pipe tr.pov-day>td{vertical-align:middle}
@media(max-width:700px){main#content table.dash-pipe tr.pov-day>td.num{line-height:36px}}

/* Audit PROJ20-22: the header status badge lands on สถานะโปรเจค with room above it and a short tint. */
#ps-status-field{scroll-margin-top:96px;border-radius:var(--radius)}#ps-status-field:target{animation:ab-flash 2s ease-out}

/* Audit PROJ20-19: ส่วนของโปรเจค at birth is the switch list of ตั้งค่า: the name, then its switch. */
.pbf-module-grid .pbf-module-row,.pbf-module-row{display:flex;flex-direction:row-reverse;align-items:center;justify-content:flex-end;gap:8px;min-height:36px;font-size:14px;font-weight:400;cursor:pointer}.pbf-module-row>.switch{margin-left:0}.pbf-module-row>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.datepicker-foot{display:flex;justify-content:flex-end;padding:8px 0 0}

/* Audit 2026-11-21 finance: FIN21-10 the petty cash toolbar is the one-row fw-bar of the other รายจ่าย tabs; the status bar of รายจ่าย fits one row at 1440 with every tab (เงินสดย่อย fell to a second row) */
.fw-bar.petty-cash-filters{margin-bottom:12px}.fw-bar.petty-cash-filters>.search{flex:0 1 280px;margin:0}.fw-bar.petty-cash-filters>:is(select,.combobox){flex:0 0 190px;width:190px;min-width:0}
@media(max-width:767px){.fw-bar.petty-cash-filters>:is(.search,select,.combobox){flex:1 1 100%;width:auto}}
@media(min-width:768px){.status-tabs-row>.status-tabs{gap:0}.status-tabs-row>.status-tabs>a{padding:4px 10px}}
/* FIN21-09: ยังไม่มีรอบจ่าย on a draft is a fact, not a problem: muted */
.fw-miss.is-quiet{color:var(--muted)}
/* FIN21-11: a cancelled income line is in no total: grey and struck through, never the green of money in */
.fw-income .fw-amount.is-void,.fw-amount.is-void{color:var(--muted);text-decoration:line-through}
/* FIN21-12: on a phone the เกินกำหนด pill of a รายรับ row is its red dot (words on hover / to a reader), so the status beside it reads whole */
@media(max-width:767px){main#content .fw-table.fw-phone tr.fw-row>td.fw-stc>.badge.overdue{font-size:0;line-height:0;width:8px;height:8px;min-width:8px;padding:0;border:0;border-radius:50%;background:var(--tb-ef4444,#ef4444)}}
/* FIN21-15: the TaxReport section heads sit on the content edge (they were indented 16/24px); on a phone a month row has no grey block behind each cell */
main#content .tax-report-title{padding:12px 0}
@media(max-width:767px){main#content .tax-report-table tr.tax-report-month:not(.tax-report-selected)>td{background:transparent}}
/* FIN21-18: the amount box of เอกสาร is wide enough for what it asks */
.doc-amount input{width:216px}
/* FIN21-13: the balance form inside the Cashflow answer box */
.cr-answer>.cr-form{margin-top:16px}
/* FIN21-01: a switched-off Cost Center reads muted; the no-Cost-Center row of the report */
.cost-center-picker tr.is-off td{color:var(--muted)}

.project-tab-off{margin:0 0 12px;font-size:14px;line-height:20px}

/* Audit PROJ21-06: a page's own month carries one "ดูในปฏิทินรวม" link at the right of its month switch (calendarUnifiedLink); the month stays centred. */
.calendar-nav.has-unified{display:grid;grid-template-columns:1fr auto auto auto 1fr;gap:16px}.calendar-nav.has-unified>:first-child{grid-column:2}.calendar-nav.has-unified>.calendar-unified-link{justify-self:end;white-space:nowrap}
@media(max-width:639px){.calendar-nav.has-unified{grid-template-columns:auto 1fr auto;gap:8px 12px}.calendar-nav.has-unified>:first-child{grid-column:1}.calendar-nav.has-unified .calendar-month-label{text-align:center}.calendar-nav.has-unified>.calendar-unified-link{grid-column:1/-1;justify-self:stretch;justify-content:center}}
/* Audit PROJ21-17: the one period control (rangeBar) on ภาพรวม Feedforward carries the filters' form at its right. */
.range-bar>form.ts-range-own{margin-left:0}.range-bar>form.ffo-bar{display:flex;align-items:center;gap:8px;margin-left:auto}@media(max-width:767px){.range-bar>form.ffo-bar{margin-left:0;width:100%}}
/* Audit PROJ21-18: with Custom E-learning picked, the new-Project form keeps only ลูกค้า and ประเภทงาน and gives one link to E-Learning › สร้างคอร์สใหม่. */
.pbf-to-elearning .pbf>:not([data-birth-field="customer"]):not([data-birth-field="project_type"]),.pbf-to-elearning [data-birth-no-revenue],.pbf-to-elearning [data-birth-modules],.pbf-to-elearning .pbf-signature,.pbf-to-elearning .form-actions{display:none}.pbf-elearning-go{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.pbf-elearning-go p{margin:0}

/* theme-tokens:start (generated by scripts/theme_tokens.py) */
@media screen and (prefers-color-scheme:dark){:root:not([data-theme="light"]){color-scheme:dark;--bg:#0a0a0a;--fg:#fafafa;--muted:#a3a3a3;--border:#2e2e2e;--soft:#1c1c1c;--primary:#fafafa;--on-primary:#171717;--sk-base:#262626;--sk-hi:#454545;--mx-teal-bg:#042f2e;--mx-teal-fg:#5eead4;--mx-cyan-bg:#083344;--mx-cyan-fg:#67e8f9;--mx-emerald-bg:#022c22;--mx-emerald-fg:#6ee7b7;--mx-orange-bg:#431407;--mx-orange-fg:#fdba74;--mx-purple-bg:#3b0764;--mx-purple-fg:#d8b4fe;--mx-blue-bg:#172554;--mx-blue-fg:#93c5fd;--mx-slate-bg:#1e293b;--mx-slate-fg:#cbd5e1;--mx-paid:#34d399;--mx-awaiting:#fbbf24;--mx-cream-head:#2a2414;--mx-cream-cell:#221e12;--mx-cream-row:#262010;--mx-head-bg:#171717;--mx-total:#fb923c;--mx-line:#262626;--mx-bg:#0a0a0a;--mx-muted:#a3a3a3;--mx-hover:#262626;--mx-pink-bg:#500724;--mx-pink-fg:#f9a8d4;--mx-amber-bg:#451a03;--mx-amber-fg:#fcd34d;--mx-rose-bg:#4c0519;--mx-rose-fg:#fda4af;--mx-indigo-bg:#1e1b4b;--mx-indigo-fg:#a5b4fc;--switch-off:#404040;--switch-knob:#d4d4d4;--switch-knob-on:#171717;--tb-000000a40:rgb(0 0 0 / 0.4);--tb-000000a45:rgb(0 0 0 / 0.45);--tb-000000a80:rgb(0 0 0 / 0.8);--tb-06b6d4:#06b6d4;--tb-10b981:#10b981;--tb-111827:#111827;--tb-15803d:#15803d;--tb-16a34a:#16a34a;--tb-171717:#2b2b2b;--tb-171717a04:rgb(23 23 23 / 0.04);--tb-171717a05:rgb(23 23 23 / 0.05);--tb-171717a08:rgb(23 23 23 / 0.08);--tb-171717a10:rgb(23 23 23 / 0.1);--tb-171717a15:rgb(23 23 23 / 0.15);--tb-171717a30:rgb(23 23 23 / 0.3);--tb-171717a40:rgb(23 23 23 / 0.4);--tb-171717a80:rgb(23 23 23 / 0.8);--tb-171717a90:rgb(23 23 23 / 0.9);--tb-1d4ed8:#1d4ed8;--tb-1f2937:#1f2937;--tb-22c55e:#22c55e;--tb-22c55ea14:rgb(34 197 94 / 0.14);--tb-2563eb:#2563eb;--tb-262626:#2b2b2b;--tb-2d9f4a:#2d9f4a;--tb-333333:#333333;--tb-374151:#374151;--tb-3b82f6:#3b82f6;--tb-4361ee:#4361ee;--tb-60a5fa:#1c3b61;--tb-6366f1:#1d1e63;--tb-7c3aed:#7c3aed;--tb-7f1d1d:#7f1d1d;--tb-8b5cf6:#321d64;--tb-991b1b:#991b1b;--tb-9ca3af:#25282e;--tb-b91c1c:#b91c1c;--tb-bfdbfea60:rgb(18 38 62 / 0.6);--tb-c026d3:#c026d3;--tb-ccfbf1:#113b32;--tb-d1fae5:#113924;--tb-d97706:#d97706;--tb-dbeafe:#0f1f34;--tb-dbeafea70:rgb(15 31 52 / 0.7);--tb-dc2626:#dc2626;--tb-dcfce7:#0f351c;--tb-e0e7ff:#0f1732;--tb-e0f2fe:#0f2433;--tb-e5e5e5:#131313;--tb-e5e5e5a50:rgb(19 19 19 / 0.5);--tb-e5e7eb:#1f2229;--tb-e8eef8:#0f1c31;--tb-e8f0ff:#0e1a30;--tb-ec4899:#6e2046;--tb-ecfdf5:#0e2f1f;--tb-ecfeff:#0d2c2e;--tb-eef2ff:#0d152d;--tb-ef4444:#6e2020;--tb-ef4444a14:rgb(110 32 32 / 0.14);--tb-eff6ff:#0d1b2d;--tb-eff6ffa30:rgb(13 27 45 / 0.3);--tb-eff6ffa40:rgb(13 27 45 / 0.4);--tb-eff6ffa50:rgb(13 27 45 / 0.5);--tb-eff6ffa60:rgb(13 27 45 / 0.6);--tb-f0eaff:#170e2f;--tb-f0fdf4:#0d2d17;--tb-f0fdfa:#0d2d26;--tb-f1f5f9:#121e2a;--tb-f1f5f9a50:rgb(18 30 42 / 0.5);--tb-f2b51c:#f2b51c;--tb-f3e8ff:#1e0e30;--tb-f3f4f6:#1a1d23;--tb-f3f4f6a50:rgb(26 29 35 / 0.5);--tb-f59e0b:#f59e0b;--tb-f5f3ff:#120d2c;--tb-f5f3ffa50:rgb(18 13 44 / 0.5);--tb-f5f5f5:#0e0e0e;--tb-f5f5f5a10:rgb(14 14 14 / 0.1);--tb-f5f5f5a20:rgb(14 14 14 / 0.2);--tb-f5f5f5a30:rgb(14 14 14 / 0.3);--tb-f5f5f5a40:rgb(14 14 14 / 0.4);--tb-f5f5f5a50:rgb(14 14 14 / 0.5);--tb-f5f5f5a60:rgb(14 14 14 / 0.6);--tb-f5f5f5a80:rgb(14 14 14 / 0.8);--tb-f7fee7:#26300e;--tb-f8fafc:#111c27;--tb-f8fafca30:rgb(17 28 39 / 0.3);--tb-f8fafca60:rgb(17 28 39 / 0.6);--tb-f8fafca70:rgb(17 28 39 / 0.7);--tb-f8fff9:#0c2a10;--tb-f97316:#f97316;--tb-f9f9f9:#0c0c0c;--tb-f9fafb:#161c21;--tb-f9fafba60:rgb(22 28 33 / 0.6);--tb-faf5ff:#1c0c2b;--tb-fafaf9:#0d0d0b;--tb-fafafa:#0c0c0c;--tb-fce7f3:#310e22;--tb-fde68a:#514618;--tb-fdf4ff:#260d2b;--tb-fee2e2:#320f0f;--tb-fef2f2:#2c0d0d;--tb-fef3c7:#3b3311;--tb-fef9c3:#3d3912;--tb-fefce8:#302d0e;--tb-ffedd5:#362610;--tb-ffedd5a50:rgb(54 38 16 / 0.5);--tb-fff5f5:#2b0c0c;--tb-fff6d6:#362d10;--tb-fff7ed:#2e1f0d;--tb-fff7eda30:rgb(46 31 13 / 0.3);--tb-fff7eda50:rgb(46 31 13 / 0.5);--tb-fff8e1:#322a0f;--tb-fffbeb:#2f280e;--tb-fffbeba60:rgb(47 40 14 / 0.6);--tb-ffffff:#0a0a0a;--tb-ffffffa50:rgb(10 10 10 / 0.5);--tb-ffffffa95:rgb(10 10 10 / 0.95);--tf-047857:#a3f8e0;--tf-059669:#8cf6d5;--tf-065f46:#b4f9e6;--tf-06b6d4:#7be3f4;--tf-075985:#97d5f7;--tf-0891b2:#7bddf4;--tf-0a0a0a:#f7f7f7;--tf-0a0a0aa80:rgb(247 247 247 / 0.85);--tf-0d9488:#89f5eb;--tf-0e7490:#8cddf4;--tf-0f172a:#dde4f3;--tf-0f766e:#a1f3ed;--tf-10b981:#7cf4cc;--tf-111827:#e0e5f1;--tf-115e59:#b4f1ed;--tf-14532d:#bdefd1;--tf-14b8a6:#7ef1e4;--tf-155e75:#a1dcee;--tf-15803d:#99eeb9;--tf-166534:#aeedc6;--tf-16a34a:#81eea9;--tf-171717:#ededed;--tf-1a1a1a:#eaeaea;--tf-1d4ed8:#819eee;--tf-1d4ed8a70:rgb(129 158 238 / 0.85);--tf-1e293b:#d0d9e7;--tf-1e3a8a:#91a7e7;--tf-1e40af:#859dea;--tf-1f1f1f:#e6e6e6;--tf-1f2937:#d3dbe6;--tf-1f3b73:#a3b9e6;--tf-202224:#e2e4e5;--tf-22c55e:#85eaaa;--tf-2457a3:#8aafe5;--tf-2563eb:#7ca1f3;--tf-2563eba70:rgb(124 161 243 / 0.85);--tf-334155:#bbc6d6;--tf-3730a3:#9591df;--tf-374151:#bec6d3;--tf-3b82f6:#7ba9f4;--tf-3f6212:#d5f1b1;--tf-4338ca:#948ee1;--tf-44403c:#cfccc9;--tf-475569:#abb6c6;--tf-4b5563:#b0b8c3;--tf-555555:#bbbbbb;--tf-581c87:#c393e9;--tf-5b21b6:#ad86e9;--tf-60a5fa:#60a5fa;--tf-6366f1:#6366f1;--tf-64748b:#acb6c3;--tf-6b21a8:#bc88e8;--tf-6b6b6b:#a9a9a9;--tf-6b7280:#999ea9;--tf-6d28d9:#ad86ea;--tf-737373:#a3a3a3;--tf-737373a30:rgb(163 163 163 / 0.85);--tf-737373a50:rgb(163 163 163 / 0.85);--tf-737373a55:rgb(163 163 163 / 0.85);--tf-737373a60:rgb(163 163 163 / 0.85);--tf-737373a70:rgb(163 163 163 / 0.85);--tf-7540a0:#bb99d6;--tf-78350f:#f3bd9f;--tf-7c3aed:#a87cf3;--tf-7e22ce:#bb84eb;--tf-7f1d1d:#e89999;--tf-854d0e:#f4c795;--tf-8b5cf6:#8b5cf6;--tf-92400e:#f4b28a;--tf-9333ea:#ba7ef2;--tf-94a3b8:#94a3b8;--tf-991b1b:#ea8686;--tf-9a3412:#f19f84;--tf-9a6b00:#f6d68d;--tf-9ca3af:#9ca3af;--tf-9d174d:#ed82ad;--tf-a16207:#f5c683;--tf-a21caf:#e284eb;--tf-a3a3a3:#a3a3a3;--tf-a3a3a3a40:rgb(163 163 163 / 0.4);--tf-a855f7:#a855f7;--tf-aaaaaa:#aaaaaa;--tf-b42318:#ee8981;--tf-b45309:#f4af7b;--tf-b91c1c:#ec8383;--tf-c2410c:#f49e7b;--tf-ca8a04:#f4cd7b;--tf-cbd5e1:#cbd5e1;--tf-d1d5db:#d1d5db;--tf-d97706:#f4bc7b;--tf-dc2626:#eb8484;--tf-ea580c:#f4a47b;--tf-ea580ca80:rgb(244 164 123 / 0.85);--tf-eab308:#f4d77b;--tf-ec4899:#ec4899;--tf-ef4444:#ef4444;--tf-f59e0b:#f4c77b;--tf-f87171:#f87171;--tf-f97316:#f4ad7b;--tf-f9fafb:#f9fafb;--tf-facc15:#f4dc7b;--tf-fafafa:#fafafa;--tf-fb923c:#fb923c;--tf-fde047:#fde047;--tf-ffffff:#ffffff;--tl-15803d:#15803d;--tl-16a34a:#16a34a;--tl-171717:#ededed;--tl-171717a30:rgb(237 237 237 / 0.3);--tl-171717a90:rgb(237 237 237 / 0.9);--tl-1f2937:#d3dbe6;--tl-2563eb:#2563eb;--tl-374151:#374151;--tl-3b82f6:#3b82f6;--tl-737373:#737373;--tl-737373a30:rgb(115 115 115 / 0.3);--tl-737373a40:rgb(115 115 115 / 0.4);--tl-86efac:#1f5c35;--tl-8a8a8a:#8a8a8a;--tl-93c5fd:#1f3b5c;--tl-99f6e4:#1f5c50;--tl-9ca3af:#9ca3af;--tl-a3a3a3a40:rgb(163 163 163 / 0.4);--tl-a5f3fc:#1f555c;--tl-a7f3d0:#1f5c40;--tl-bbf7d0:#1f5c34;--tl-bfdbfe:#1f3a5c;--tl-c7d2fe:#1f2b5c;--tl-c9d3e6:#273654;--tl-cbd5e1:#2d3c4e;--tl-ccfbf1:#1f5c4f;--tl-cffafe:#1f575c;--tl-d1d5db:#363c45;--tl-d8b4fe:#3c1f5c;--tl-d9f99d:#475c1f;--tl-dbeafe:#1f395c;--tl-dc2626:#dc2626;--tl-ddd6fe:#291f5c;--tl-e2e8f0:#2a3a51;--tl-e5e5e5:#2e2e2e;--tl-e5e5e5a30:rgb(46 46 46 / 0.3);--tl-e5e5e5a50:rgb(46 46 46 / 0.5);--tl-e5e7eb:#353b45;--tl-e7e5e4:#312d2b;--tl-e9d5ff:#3c1f5c;--tl-ede9fe:#2a1f5c;--tl-f1f5f9a80:rgb(37 61 86 / 0.8);--tl-f2b51c:#f2b51c;--tl-f2d27a:#f2d27a;--tl-f3f4f6:#343a46;--tl-f59e0b:#f59e0b;--tl-f5d0fe:#501f5c;--tl-fbcfe8:#5c1f41;--tl-fca5a5:#5c1f1f;--tl-fcd34d:#fcd34d;--tl-fdba74:#5c3e1f;--tl-fde68a:#5c501f;--tl-fde68aa50:rgb(92 80 31 / 0.5);--tl-fecaca:#5c1f1f;--tl-fed7aa:#5c3f1f;--tl-fef08a:#5c541f;--tl-ffffff:#2e2e2e}}
@media screen{:root[data-theme="dark"]{color-scheme:dark;--bg:#0a0a0a;--fg:#fafafa;--muted:#a3a3a3;--border:#2e2e2e;--soft:#1c1c1c;--primary:#fafafa;--on-primary:#171717;--sk-base:#262626;--sk-hi:#454545;--mx-teal-bg:#042f2e;--mx-teal-fg:#5eead4;--mx-cyan-bg:#083344;--mx-cyan-fg:#67e8f9;--mx-emerald-bg:#022c22;--mx-emerald-fg:#6ee7b7;--mx-orange-bg:#431407;--mx-orange-fg:#fdba74;--mx-purple-bg:#3b0764;--mx-purple-fg:#d8b4fe;--mx-blue-bg:#172554;--mx-blue-fg:#93c5fd;--mx-slate-bg:#1e293b;--mx-slate-fg:#cbd5e1;--mx-paid:#34d399;--mx-awaiting:#fbbf24;--mx-cream-head:#2a2414;--mx-cream-cell:#221e12;--mx-cream-row:#262010;--mx-head-bg:#171717;--mx-total:#fb923c;--mx-line:#262626;--mx-bg:#0a0a0a;--mx-muted:#a3a3a3;--mx-hover:#262626;--mx-pink-bg:#500724;--mx-pink-fg:#f9a8d4;--mx-amber-bg:#451a03;--mx-amber-fg:#fcd34d;--mx-rose-bg:#4c0519;--mx-rose-fg:#fda4af;--mx-indigo-bg:#1e1b4b;--mx-indigo-fg:#a5b4fc;--switch-off:#404040;--switch-knob:#d4d4d4;--switch-knob-on:#171717;--tb-000000a40:rgb(0 0 0 / 0.4);--tb-000000a45:rgb(0 0 0 / 0.45);--tb-000000a80:rgb(0 0 0 / 0.8);--tb-06b6d4:#06b6d4;--tb-10b981:#10b981;--tb-111827:#111827;--tb-15803d:#15803d;--tb-16a34a:#16a34a;--tb-171717:#2b2b2b;--tb-171717a04:rgb(23 23 23 / 0.04);--tb-171717a05:rgb(23 23 23 / 0.05);--tb-171717a08:rgb(23 23 23 / 0.08);--tb-171717a10:rgb(23 23 23 / 0.1);--tb-171717a15:rgb(23 23 23 / 0.15);--tb-171717a30:rgb(23 23 23 / 0.3);--tb-171717a40:rgb(23 23 23 / 0.4);--tb-171717a80:rgb(23 23 23 / 0.8);--tb-171717a90:rgb(23 23 23 / 0.9);--tb-1d4ed8:#1d4ed8;--tb-1f2937:#1f2937;--tb-22c55e:#22c55e;--tb-22c55ea14:rgb(34 197 94 / 0.14);--tb-2563eb:#2563eb;--tb-262626:#2b2b2b;--tb-2d9f4a:#2d9f4a;--tb-333333:#333333;--tb-374151:#374151;--tb-3b82f6:#3b82f6;--tb-4361ee:#4361ee;--tb-60a5fa:#1c3b61;--tb-6366f1:#1d1e63;--tb-7c3aed:#7c3aed;--tb-7f1d1d:#7f1d1d;--tb-8b5cf6:#321d64;--tb-991b1b:#991b1b;--tb-9ca3af:#25282e;--tb-b91c1c:#b91c1c;--tb-bfdbfea60:rgb(18 38 62 / 0.6);--tb-c026d3:#c026d3;--tb-ccfbf1:#113b32;--tb-d1fae5:#113924;--tb-d97706:#d97706;--tb-dbeafe:#0f1f34;--tb-dbeafea70:rgb(15 31 52 / 0.7);--tb-dc2626:#dc2626;--tb-dcfce7:#0f351c;--tb-e0e7ff:#0f1732;--tb-e0f2fe:#0f2433;--tb-e5e5e5:#131313;--tb-e5e5e5a50:rgb(19 19 19 / 0.5);--tb-e5e7eb:#1f2229;--tb-e8eef8:#0f1c31;--tb-e8f0ff:#0e1a30;--tb-ec4899:#6e2046;--tb-ecfdf5:#0e2f1f;--tb-ecfeff:#0d2c2e;--tb-eef2ff:#0d152d;--tb-ef4444:#6e2020;--tb-ef4444a14:rgb(110 32 32 / 0.14);--tb-eff6ff:#0d1b2d;--tb-eff6ffa30:rgb(13 27 45 / 0.3);--tb-eff6ffa40:rgb(13 27 45 / 0.4);--tb-eff6ffa50:rgb(13 27 45 / 0.5);--tb-eff6ffa60:rgb(13 27 45 / 0.6);--tb-f0eaff:#170e2f;--tb-f0fdf4:#0d2d17;--tb-f0fdfa:#0d2d26;--tb-f1f5f9:#121e2a;--tb-f1f5f9a50:rgb(18 30 42 / 0.5);--tb-f2b51c:#f2b51c;--tb-f3e8ff:#1e0e30;--tb-f3f4f6:#1a1d23;--tb-f3f4f6a50:rgb(26 29 35 / 0.5);--tb-f59e0b:#f59e0b;--tb-f5f3ff:#120d2c;--tb-f5f3ffa50:rgb(18 13 44 / 0.5);--tb-f5f5f5:#0e0e0e;--tb-f5f5f5a10:rgb(14 14 14 / 0.1);--tb-f5f5f5a20:rgb(14 14 14 / 0.2);--tb-f5f5f5a30:rgb(14 14 14 / 0.3);--tb-f5f5f5a40:rgb(14 14 14 / 0.4);--tb-f5f5f5a50:rgb(14 14 14 / 0.5);--tb-f5f5f5a60:rgb(14 14 14 / 0.6);--tb-f5f5f5a80:rgb(14 14 14 / 0.8);--tb-f7fee7:#26300e;--tb-f8fafc:#111c27;--tb-f8fafca30:rgb(17 28 39 / 0.3);--tb-f8fafca60:rgb(17 28 39 / 0.6);--tb-f8fafca70:rgb(17 28 39 / 0.7);--tb-f8fff9:#0c2a10;--tb-f97316:#f97316;--tb-f9f9f9:#0c0c0c;--tb-f9fafb:#161c21;--tb-f9fafba60:rgb(22 28 33 / 0.6);--tb-faf5ff:#1c0c2b;--tb-fafaf9:#0d0d0b;--tb-fafafa:#0c0c0c;--tb-fce7f3:#310e22;--tb-fde68a:#514618;--tb-fdf4ff:#260d2b;--tb-fee2e2:#320f0f;--tb-fef2f2:#2c0d0d;--tb-fef3c7:#3b3311;--tb-fef9c3:#3d3912;--tb-fefce8:#302d0e;--tb-ffedd5:#362610;--tb-ffedd5a50:rgb(54 38 16 / 0.5);--tb-fff5f5:#2b0c0c;--tb-fff6d6:#362d10;--tb-fff7ed:#2e1f0d;--tb-fff7eda30:rgb(46 31 13 / 0.3);--tb-fff7eda50:rgb(46 31 13 / 0.5);--tb-fff8e1:#322a0f;--tb-fffbeb:#2f280e;--tb-fffbeba60:rgb(47 40 14 / 0.6);--tb-ffffff:#0a0a0a;--tb-ffffffa50:rgb(10 10 10 / 0.5);--tb-ffffffa95:rgb(10 10 10 / 0.95);--tf-047857:#a3f8e0;--tf-059669:#8cf6d5;--tf-065f46:#b4f9e6;--tf-06b6d4:#7be3f4;--tf-075985:#97d5f7;--tf-0891b2:#7bddf4;--tf-0a0a0a:#f7f7f7;--tf-0a0a0aa80:rgb(247 247 247 / 0.85);--tf-0d9488:#89f5eb;--tf-0e7490:#8cddf4;--tf-0f172a:#dde4f3;--tf-0f766e:#a1f3ed;--tf-10b981:#7cf4cc;--tf-111827:#e0e5f1;--tf-115e59:#b4f1ed;--tf-14532d:#bdefd1;--tf-14b8a6:#7ef1e4;--tf-155e75:#a1dcee;--tf-15803d:#99eeb9;--tf-166534:#aeedc6;--tf-16a34a:#81eea9;--tf-171717:#ededed;--tf-1a1a1a:#eaeaea;--tf-1d4ed8:#819eee;--tf-1d4ed8a70:rgb(129 158 238 / 0.85);--tf-1e293b:#d0d9e7;--tf-1e3a8a:#91a7e7;--tf-1e40af:#859dea;--tf-1f1f1f:#e6e6e6;--tf-1f2937:#d3dbe6;--tf-1f3b73:#a3b9e6;--tf-202224:#e2e4e5;--tf-22c55e:#85eaaa;--tf-2457a3:#8aafe5;--tf-2563eb:#7ca1f3;--tf-2563eba70:rgb(124 161 243 / 0.85);--tf-334155:#bbc6d6;--tf-3730a3:#9591df;--tf-374151:#bec6d3;--tf-3b82f6:#7ba9f4;--tf-3f6212:#d5f1b1;--tf-4338ca:#948ee1;--tf-44403c:#cfccc9;--tf-475569:#abb6c6;--tf-4b5563:#b0b8c3;--tf-555555:#bbbbbb;--tf-581c87:#c393e9;--tf-5b21b6:#ad86e9;--tf-60a5fa:#60a5fa;--tf-6366f1:#6366f1;--tf-64748b:#acb6c3;--tf-6b21a8:#bc88e8;--tf-6b6b6b:#a9a9a9;--tf-6b7280:#999ea9;--tf-6d28d9:#ad86ea;--tf-737373:#a3a3a3;--tf-737373a30:rgb(163 163 163 / 0.85);--tf-737373a50:rgb(163 163 163 / 0.85);--tf-737373a55:rgb(163 163 163 / 0.85);--tf-737373a60:rgb(163 163 163 / 0.85);--tf-737373a70:rgb(163 163 163 / 0.85);--tf-7540a0:#bb99d6;--tf-78350f:#f3bd9f;--tf-7c3aed:#a87cf3;--tf-7e22ce:#bb84eb;--tf-7f1d1d:#e89999;--tf-854d0e:#f4c795;--tf-8b5cf6:#8b5cf6;--tf-92400e:#f4b28a;--tf-9333ea:#ba7ef2;--tf-94a3b8:#94a3b8;--tf-991b1b:#ea8686;--tf-9a3412:#f19f84;--tf-9a6b00:#f6d68d;--tf-9ca3af:#9ca3af;--tf-9d174d:#ed82ad;--tf-a16207:#f5c683;--tf-a21caf:#e284eb;--tf-a3a3a3:#a3a3a3;--tf-a3a3a3a40:rgb(163 163 163 / 0.4);--tf-a855f7:#a855f7;--tf-aaaaaa:#aaaaaa;--tf-b42318:#ee8981;--tf-b45309:#f4af7b;--tf-b91c1c:#ec8383;--tf-c2410c:#f49e7b;--tf-ca8a04:#f4cd7b;--tf-cbd5e1:#cbd5e1;--tf-d1d5db:#d1d5db;--tf-d97706:#f4bc7b;--tf-dc2626:#eb8484;--tf-ea580c:#f4a47b;--tf-ea580ca80:rgb(244 164 123 / 0.85);--tf-eab308:#f4d77b;--tf-ec4899:#ec4899;--tf-ef4444:#ef4444;--tf-f59e0b:#f4c77b;--tf-f87171:#f87171;--tf-f97316:#f4ad7b;--tf-f9fafb:#f9fafb;--tf-facc15:#f4dc7b;--tf-fafafa:#fafafa;--tf-fb923c:#fb923c;--tf-fde047:#fde047;--tf-ffffff:#ffffff;--tl-15803d:#15803d;--tl-16a34a:#16a34a;--tl-171717:#ededed;--tl-171717a30:rgb(237 237 237 / 0.3);--tl-171717a90:rgb(237 237 237 / 0.9);--tl-1f2937:#d3dbe6;--tl-2563eb:#2563eb;--tl-374151:#374151;--tl-3b82f6:#3b82f6;--tl-737373:#737373;--tl-737373a30:rgb(115 115 115 / 0.3);--tl-737373a40:rgb(115 115 115 / 0.4);--tl-86efac:#1f5c35;--tl-8a8a8a:#8a8a8a;--tl-93c5fd:#1f3b5c;--tl-99f6e4:#1f5c50;--tl-9ca3af:#9ca3af;--tl-a3a3a3a40:rgb(163 163 163 / 0.4);--tl-a5f3fc:#1f555c;--tl-a7f3d0:#1f5c40;--tl-bbf7d0:#1f5c34;--tl-bfdbfe:#1f3a5c;--tl-c7d2fe:#1f2b5c;--tl-c9d3e6:#273654;--tl-cbd5e1:#2d3c4e;--tl-ccfbf1:#1f5c4f;--tl-cffafe:#1f575c;--tl-d1d5db:#363c45;--tl-d8b4fe:#3c1f5c;--tl-d9f99d:#475c1f;--tl-dbeafe:#1f395c;--tl-dc2626:#dc2626;--tl-ddd6fe:#291f5c;--tl-e2e8f0:#2a3a51;--tl-e5e5e5:#2e2e2e;--tl-e5e5e5a30:rgb(46 46 46 / 0.3);--tl-e5e5e5a50:rgb(46 46 46 / 0.5);--tl-e5e7eb:#353b45;--tl-e7e5e4:#312d2b;--tl-e9d5ff:#3c1f5c;--tl-ede9fe:#2a1f5c;--tl-f1f5f9a80:rgb(37 61 86 / 0.8);--tl-f2b51c:#f2b51c;--tl-f2d27a:#f2d27a;--tl-f3f4f6:#343a46;--tl-f59e0b:#f59e0b;--tl-f5d0fe:#501f5c;--tl-fbcfe8:#5c1f41;--tl-fca5a5:#5c1f1f;--tl-fcd34d:#fcd34d;--tl-fdba74:#5c3e1f;--tl-fde68a:#5c501f;--tl-fde68aa50:rgb(92 80 31 / 0.5);--tl-fecaca:#5c1f1f;--tl-fed7aa:#5c3f1f;--tl-fef08a:#5c541f;--tl-ffffff:#2e2e2e}}
@media screen and (prefers-color-scheme:dark){:root:not([data-theme="light"]) .button.primary:hover{background:rgb(250 250 250 / .85)}}
@media screen{:root[data-theme="dark"] .button.primary:hover{background:rgb(250 250 250 / .85)}}
/* theme-tokens:end */
