*{box-sizing:border-box}body{margin:0;font-family:Tahoma,Arial,sans-serif;background:#f4f6fb;color:#1f2937}.sidebar{position:fixed;left:0;top:0;bottom:0;width:245px;background:#24318b;color:#fff;padding:18px}.brand{font-size:24px;font-weight:700;margin-bottom:24px}.sidebar a{display:block;color:#fff;text-decoration:none;padding:10px 12px;border-radius:8px;margin:4px 0}.sidebar a:hover{background:rgba(255,255,255,.15)}.main{margin-left:245px}.topbar{height:58px;background:#fff;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;justify-content:space-between;padding:0 24px}.content{padding:24px}.page-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}h1{margin:0 0 18px}h2{margin-top:26px}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;margin-bottom:24px}.card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:16px;box-shadow:0 1px 2px rgba(0,0,0,.04)}.card strong{display:block;font-size:28px;margin-top:8px;color:#24318b}.btn,button{background:#2f47d7;color:#fff;border:0;border-radius:8px;padding:10px 14px;text-decoration:none;display:inline-block;cursor:pointer}.secondary{background:#6b7280}input,select,textarea{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:9px;background:#fff}textarea{min-height:70px}.toolbar{display:flex;gap:10px;align-items:end;background:#fff;padding:12px;border:1px solid #e5e7eb;border-radius:12px;margin-bottom:16px}.wrap{flex-wrap:wrap}.toolbar input,.toolbar select{width:auto;min-width:180px}table{width:100%;border-collapse:collapse;background:#fff;border-radius:12px;overflow:hidden;border:1px solid #e5e7eb}th,td{padding:11px;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top}th{background:#eef2ff}.badge{display:inline-block;background:#e0e7ff;color:#24318b;border-radius:999px;padding:4px 9px;font-size:12px}.form-grid fieldset{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;background:#fff;border:1px solid #d8dcff;border-radius:12px;padding:16px;margin-bottom:18px}.form-grid legend{background:#24318b;color:#fff;border-radius:5px;padding:5px 10px}.form-grid label{font-size:13px}.wide{grid-column:span 4}.form-actions{padding-bottom:40px}.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center}.login-card{background:#fff;width:360px;padding:28px;border-radius:16px;box-shadow:0 8px 30px rgba(0,0,0,.12)}.login-card label{display:block;margin-top:12px}.alert{background:#fee2e2;color:#991b1b;padding:10px;border-radius:8px}.muted{color:#6b7280}.opd-visit{border:1px solid #ddd;border-radius:10px;padding:12px;margin:12px 0}@media(max-width:900px){.sidebar{position:relative;width:auto}.main{margin-left:0}.form-grid fieldset{grid-template-columns:1fr}.wide{grid-column:span 1}.toolbar{display:block}.toolbar>*{margin:6px 0}.toolbar input,.toolbar select{width:100%}}
.success{background:#05a85a!important}.notice{background:#dcfce7;color:#166534;padding:10px;border-radius:8px;margin-bottom:12px}.appointment-toolbar{gap:28px}.appointment-table-wrap{overflow-x:auto;background:#ddd;padding-bottom:4px}.appointment-table{min-width:1450px;border-radius:0}.appointment-table th{background:#6b6b6b;color:#fff;white-space:nowrap}.appointment-table td{background:#fff}.appointment-table .row-active td,.appointment-table .row-done td{background:#f5b9b4}.appointment-table .row-done td:first-child,.appointment-table .row-active td:first-child{background:#ffe083}.patient-name-cell{white-space:nowrap}.avatar{display:inline-block;width:28px;height:28px;border-radius:50%;background:#d7d7d7;margin-right:8px;vertical-align:middle;position:relative}.avatar:after{content:'';position:absolute;left:8px;top:7px;width:12px;height:12px;border-radius:50%;background:#bbb;box-shadow:0 10px 0 4px #bbb}.status-pill{display:inline-block;border-radius:999px;padding:4px 9px;background:#e5e7eb;font-size:12px}.status-arrived,.status-in_treatment{background:#dcfce7;color:#166534}.status-completed,.status-paid{background:#fee2e2;color:#991b1b}.line-btn{border-radius:999px;background:#36b44a;color:#fff;font-weight:700;font-size:10px;width:32px;height:32px;padding:0}.btn-small{display:inline-block;border:0;border-radius:5px;background:#2f47d7;color:#fff;padding:7px 10px;text-decoration:none;cursor:pointer;font-size:12px}.btn-small.light{background:#f3f4f6;color:#111827}.btn-small.success{background:#05a85a;color:#fff}.inline{display:inline}.time-chip{display:inline-block;background:#fff;border-radius:4px;padding:5px 10px;min-width:64px;text-align:center}.note-cell{min-width:210px}.note-display{max-width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.actions-cell{min-width:170px}.mini-form{display:grid;grid-template-columns:1fr 1fr;gap:6px;background:#fff;border:1px solid #ddd;padding:8px;margin:6px 0;min-width:260px}.patient-picker{background:#f8fafc;border:1px solid #dbe4ff;border-radius:10px;padding:12px}.patient-search-row{display:flex;gap:8px}.patient-search-row input{flex:1}.patient-results{background:#fff;border:1px solid #d1d5db;border-radius:8px;margin-top:6px;max-height:210px;overflow:auto}.patient-result{display:block;width:100%;text-align:left;background:#fff;color:#111827;border:0;border-bottom:1px solid #eee;border-radius:0;padding:8px 10px}.patient-result:hover{background:#eef2ff}.selected-patient{margin-top:8px}.quick-patient-box{margin-top:10px;background:#fff;border:1px dashed #9ca3af;border-radius:8px;padding:12px}.quick-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-bottom:8px}@media(max-width:900px){.patient-search-row{display:block}.quick-grid{grid-template-columns:1fr}.appointment-table{min-width:1100px}}
/* v2.2 admin management */
.form-grid.card{display:grid;grid-template-columns:repeat(2,minmax(240px,1fr));gap:14px}.form-grid.card label{display:block;font-size:13px}.span2{grid-column:span 2}.section-title{font-weight:700;color:#24318b;border-bottom:1px solid #e5e7eb;padding-bottom:6px}.check{display:flex!important;align-items:center;gap:8px}.check input{width:auto}.danger{background:#dc2626!important}.muted-row{opacity:.55}.actions{white-space:nowrap}.checkbox-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:8px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:10px;padding:10px}small{color:#6b7280}@media(max-width:900px){.form-grid.card{grid-template-columns:1fr}.span2{grid-column:span 1}}
/* v2.3 mobile menu + modal overflow */
.menu-toggle{display:none;background:#24318b;color:#fff;padding:8px 12px;border-radius:8px}.modal{display:none;position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:9999;align-items:flex-start;justify-content:center;padding:28px 12px;overflow:auto}.modal.is-open{display:flex}.modal-card{position:relative;background:#fff;border-radius:14px;width:min(720px,96vw);padding:20px;box-shadow:0 20px 60px rgba(0,0,0,.25)}.small-modal{width:min(480px,96vw)}.modal-close{position:absolute;right:12px;top:10px;background:#f3f4f6!important;color:#111827!important;border-radius:999px;width:34px;height:34px;padding:0;font-size:22px}.modal-form{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:12px}.modal-form .span2{grid-column:span 2}.action-buttons{display:flex;gap:6px;flex-wrap:wrap;min-width:360px}.action-buttons .btn-small{white-space:nowrap}.check input{width:auto!important}
@media(max-width:900px){body.sidebar-open .sidebar{display:block}.sidebar{display:none;position:fixed;z-index:8000;width:260px;box-shadow:0 10px 40px rgba(0,0,0,.25)}.main{margin-left:0}.menu-toggle{display:inline-block}.topbar{gap:10px;padding:0 12px}.topbar b{display:none}.content{padding:12px}.modal-form{grid-template-columns:1fr}.modal-form .span2{grid-column:span 1}.action-buttons{min-width:260px}.appointment-table{min-width:1250px}}
/* v2.4 dashboard appointments + payment flow */
.appointment-table .row-done td{background:#e5e7eb!important;color:#4b5563}.appointment-table .row-done td:first-child{background:#d1d5db!important}.appointment-table .row-active td{background:#f7c7c1}.appointment-edit-modal{border-top:6px solid #5b55a5}.modal-subtitle{margin-top:-10px;color:#6b7280}.pretty-form label{font-weight:600;color:#374151}.wide-modal{width:min(1140px,98vw)}.treatment-toolbar{display:flex;gap:12px;align-items:center;border-bottom:2px solid #5b55a5;padding:8px 0 10px;margin-bottom:8px}.treatment-table{border-radius:0;border:0}.treatment-table th{background:#fff;color:#333;border-bottom:1px solid #111}.treatment-table td{background:#d9f8df}.treatment-table select,.treatment-table input{border-radius:0}.treatment-summary{display:flex;justify-content:flex-end;background:#f3f4f6;padding:14px;margin-top:90px}.modal-footer{display:flex;justify-content:flex-end;padding-top:16px}.payment-layout{display:grid;grid-template-columns:1fr 360px;gap:24px}.payment-left,.payment-side{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:18px}.payment-side{align-self:start}.pay-row{display:flex;justify-content:space-between;border-bottom:1px solid #e5e7eb;padding:8px 0}.pay-row.total{background:#eef2ff;margin:12px -8px;padding:12px 8px;font-size:18px}.payment-side label{display:block;margin:10px 0}.promptpay-box{text-align:center;background:#f8fafc;border:1px dashed #93c5fd;border-radius:10px;padding:10px;margin:10px 0}.promptpay-box img{display:block;width:180px;height:180px;margin:8px auto}.full-width{width:100%;text-align:center}.receipt-actions{margin-bottom:12px}.receipt-print{background:#fff;border:1px solid #ddd;border-radius:12px;padding:28px;max-width:800px;margin:auto}.receipt-print h1{text-align:center}.receipt-head{display:flex;justify-content:space-between;gap:20px;border-bottom:1px solid #ddd;padding-bottom:12px}.receipt-total{text-align:right;font-size:20px;margin:14px 0}.signature-line{text-align:right;margin-top:50px}.line-btn{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}@media(max-width:900px){.payment-layout{grid-template-columns:1fr}.treatment-toolbar{flex-wrap:wrap}.wide-modal{width:98vw}.receipt-head{display:block}}@media print{.sidebar,.topbar,.receipt-actions{display:none!important}.main{margin:0}.content{padding:0}.receipt-print{border:0;box-shadow:none;max-width:none}}
/* v2.4.1 appointment add modal + Thai BE birth date */
.appointment-add-row{display:flex;justify-content:flex-end;margin:-6px 0 12px}.quick-patient-box{margin-top:10px;background:#f8fafc;border:1px dashed #93c5fd;border-radius:10px;padding:12px}.quick-patient-box h3{margin:0 0 8px}.quick-grid{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:8px;margin-bottom:8px}.patient-results{position:relative;background:#fff;border:1px solid #e5e7eb;border-radius:10px;margin-top:6px;max-height:220px;overflow:auto}.patient-result{display:block;width:100%;text-align:left;background:#fff!important;color:#111827!important;border-radius:0;border-bottom:1px solid #f1f5f9}.patient-result:hover{background:#eef2ff!important}.selected-patient{margin:8px 0;padding:8px 10px;background:#eef2ff;border-radius:8px}.selected-patient.muted{background:#f3f4f6;color:#6b7280}.form-grid small{display:block;margin-top:4px;color:#6b7280}
@media(max-width:900px){.quick-grid{grid-template-columns:1fr}.appointment-add-row{justify-content:stretch}.appointment-add-row .btn{width:100%;text-align:center}}
/* v2.4.5 patient profile + printable certificates */
.profile-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.patient-summary-layout{display:grid;grid-template-columns:260px 1fr;gap:18px;margin-bottom:18px}.patient-photo-card,.patient-info-card,.white-card{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:18px}.patient-photo-card{text-align:center}.patient-big-avatar{width:150px;height:150px;border-radius:50%;background:#d9dbe1;margin:0 auto 14px;position:relative}.patient-big-avatar:before{content:'';position:absolute;left:53px;top:28px;width:45px;height:55px;border-radius:50%;background:#bfc2c8}.patient-big-avatar:after{content:'';position:absolute;left:37px;top:88px;width:76px;height:42px;border-radius:50% 50% 10px 10px;background:#bfc2c8}.info-grid{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:12px}.info-grid div{background:#f8fafc;border:1px solid #eef2ff;border-radius:10px;padding:10px}.info-grid b{display:block;color:#5b55a5;margin-bottom:4px}.info-grid span{display:block;min-height:22px}.patient-money-cards .card{color:#fff;border:0}.patient-money-cards .card strong{color:#fff}.green-card{background:#05a85a}.cyan-card{background:#06b6d4}.orange-card{background:#f59e0b}.profile-section{margin:22px 0}.profile-section h2{color:#5b55a5;border-bottom:2px solid #5b55a5;padding-bottom:8px}.history-table th{background:#6b6b6b;color:#fff}.paid-badge{background:#05a85a!important;color:#fff!important}.print-actions{margin-bottom:12px}.certificate-print{background:#fff;max-width:820px;margin:auto;padding:42px;border:1px solid #e5e7eb;border-radius:12px;line-height:1.8;font-size:16px}.cert-head{text-align:center;border-bottom:2px solid #111;margin-bottom:18px}.cert-head h1{font-size:30px}.cert-no{text-align:right;margin:12px 0}.cert-box{border:1px solid #d1d5db;border-radius:8px;padding:12px;margin:12px 0;min-height:70px}.cert-sign{text-align:center;margin-top:70px;margin-left:auto;width:360px}@media(max-width:900px){.patient-summary-layout{grid-template-columns:1fr}.info-grid{grid-template-columns:1fr}.profile-actions{justify-content:flex-start}.patient-profile-head{align-items:flex-start;flex-direction:column}}@media print{.print-actions,.sidebar,.topbar{display:none!important}.main{margin:0}.content{padding:0}.certificate-print{border:0;border-radius:0;max-width:none;padding:24px}}
/* v2.4.6 clinic settings + branded print documents */
.mt-16{margin-top:16px}.settings-logo-preview{max-width:220px;max-height:120px;border:1px solid #e5e7eb;border-radius:10px;background:#fff;padding:8px}.current-logo-box{background:#f8fafc;border:1px solid #e5e7eb;border-radius:10px;padding:12px}.doc-logo{max-width:110px;max-height:90px;object-fit:contain;margin:0 auto 8px;display:block}.receipt-logo{max-width:90px;max-height:70px;object-fit:contain;margin:0 0 8px;display:block}.license-text{font-size:12px;color:#4b5563}.branded-doc-head .license-text{margin-top:4px}.alert{padding:10px 12px;border-radius:8px;margin:8px 0 14px}.alert.success{background:#dcfce7;color:#166534}.alert.danger-text{background:#fee2e2;color:#991b1b}
@media print{.doc-logo,.receipt-logo{filter:none}.license-text{font-size:11px}}
/* v2.4.8 logo sizing + duplicate payment/course protection UI */
.app-brand{display:flex;align-items:center;gap:10px;justify-content:flex-start;min-height:56px;line-height:1.2}.app-logo{width:42px;height:42px;max-width:42px;max-height:42px;object-fit:contain;border-radius:8px;background:#fff;padding:3px;box-sizing:border-box;flex:0 0 auto}.branded-receipt-head{align-items:flex-start}.branded-receipt-head .receipt-logo{float:left;margin:0 12px 8px 0;width:76px;height:56px;max-width:76px;max-height:56px;object-fit:contain}.branded-doc-head{position:relative;text-align:center;min-height:110px;padding-left:120px;padding-right:24px}.branded-doc-head .doc-logo{position:absolute;left:0;top:0;width:96px;height:80px;max-width:96px;max-height:80px;object-fit:contain;margin:0;background:#fff}.used-course-badge{display:inline-block;background:#7c3aed;color:#fff;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:700}.btn-small.danger,.danger{background:#dc2626!important;color:#fff!important}.actions-cell form.inline{display:inline-block;margin:0}.alert.danger-text{border:1px solid #fecaca}.sidebar .brand img{display:block}
@media(max-width:900px){.app-logo{width:34px;height:34px}.branded-doc-head{padding-left:0;padding-top:88px}.branded-doc-head .doc-logo{left:50%;transform:translateX(-50%)}}
@media print{.app-logo{display:none}.branded-doc-head .doc-logo{width:86px;height:72px}.branded-receipt-head .receipt-logo{width:68px;height:50px}}
/* v2.4.9 receipt print layout + nowrap appointment actions */
.no-print{display:block}.receipt-actions.no-print{display:flex;gap:8px;justify-content:center;margin-bottom:14px}.receipt-print{background:#fff;border:1px solid #ddd;border-radius:12px;padding:18mm;max-width:210mm;margin:auto;color:#111827}.receipt-print.receipt-a5{max-width:148mm;padding:10mm;font-size:12px}.receipt-header-block{display:grid;grid-template-columns:86px 1fr 170px;gap:14px;align-items:start;border-bottom:1px solid #d1d5db;padding-bottom:10px;margin-bottom:12px}.receipt-logo-col .receipt-logo{float:none!important;width:76px!important;height:56px!important;max-width:76px!important;max-height:56px!important;object-fit:contain;margin:0!important}.receipt-clinic-col h1{font-size:22px;text-align:left;margin:0 0 4px}.receipt-clinic-col h2{font-size:18px;margin:0 0 6px}.receipt-meta-col{font-size:12px;text-align:right;line-height:1.8}.receipt-customer-box{border:1px solid #e5e7eb;border-radius:8px;padding:8px 10px;margin:10px 0 12px;line-height:1.55}.receipt-items-table{border-radius:0;border:1px solid #d1d5db}.receipt-items-table th{background:#f3f4f6;color:#111827}.receipt-items-table th,.receipt-items-table td{padding:7px;border-bottom:1px solid #e5e7eb}.receipt-items-table .col-no{width:32px}.receipt-items-table .num{text-align:right;white-space:nowrap}.receipt-bottom-section{display:grid;grid-template-columns:1fr 260px;gap:16px;margin-top:12px;align-items:start}.receipt-payment-methods{line-height:1.7}.receipt-total-box{border:1px solid #d1d5db;background:#f9fafb;border-radius:8px;padding:10px}.receipt-total-box div{display:flex;justify-content:space-between;gap:12px;font-size:18px}.receipt-print.receipt-a5 .receipt-header-block{grid-template-columns:62px 1fr 110px;gap:8px}.receipt-print.receipt-a5 .receipt-logo-col .receipt-logo{width:56px!important;height:42px!important;max-width:56px!important;max-height:42px!important}.receipt-print.receipt-a5 .receipt-clinic-col h1{font-size:18px}.receipt-print.receipt-a5 .receipt-clinic-col h2{font-size:15px}.receipt-print.receipt-a5 .receipt-meta-col{font-size:10px}.receipt-print.receipt-a5 .receipt-items-table th,.receipt-print.receipt-a5 .receipt-items-table td{padding:5px}.receipt-print.receipt-a5 .receipt-bottom-section{grid-template-columns:1fr 170px}.receipt-print.receipt-a5 .receipt-total-box div{font-size:14px}.actions-cell.action-buttons,.action-buttons{display:flex!important;flex-wrap:nowrap!important;gap:6px;align-items:center;min-width:max-content!important;white-space:nowrap}.actions-cell.action-buttons>*{flex:0 0 auto}.actions-cell form.inline{display:inline-flex!important}.appointment-table th:last-child,.appointment-table td:last-child{white-space:nowrap;min-width:520px}.appointment-table-wrap{overflow-x:auto}
@media print{.no-print,.receipt-actions,.sidebar,.topbar{display:none!important}.main{margin:0!important}.content{padding:0!important;background:#fff}.receipt-print{border:0!important;border-radius:0!important;box-shadow:none!important;margin:0 auto!important;max-width:none!important;width:190mm;padding:10mm!important;font-size:12px}.receipt-print.receipt-a5,body.receipt-print-a5 .receipt-print{width:138mm!important;padding:7mm!important;font-size:10.5px}.receipt-header-block{break-inside:avoid;page-break-inside:avoid}.receipt-customer-box{break-inside:avoid;page-break-inside:avoid}.receipt-items-table{page-break-inside:auto;border-collapse:collapse}.receipt-items-table thead{display:table-header-group}.receipt-items-table tfoot{display:table-footer-group}.receipt-items-table tr{break-inside:avoid;page-break-inside:avoid}.receipt-bottom-section,.signature-line{break-inside:avoid;page-break-inside:avoid}.receipt-logo{print-color-adjust:exact;-webkit-print-color-adjust:exact}@page{size:A4;margin:8mm}}
@media(max-width:900px){.receipt-print{padding:14px}.receipt-header-block{grid-template-columns:1fr}.receipt-meta-col{text-align:left}.receipt-bottom-section{grid-template-columns:1fr}.appointment-table th:last-child,.appointment-table td:last-child{min-width:520px}.action-buttons{min-width:max-content!important}}

/* v2.4.11 search/filter, shared course, report bars, footer, payment quick fill */
.admin-filter-bar input{min-width:240px}.report-grid{display:grid;grid-template-columns:repeat(2,minmax(280px,1fr));gap:16px;margin:16px 0}.report-chart-card h2{margin-top:0}.bar-row{margin:12px 0}.bar-label{display:flex;justify-content:space-between;gap:8px;font-weight:700}.bar-label small{font-weight:400;color:#6b7280}.bar-track{height:12px;background:#e5e7eb;border-radius:999px;overflow:hidden}.bar-fill{height:100%;background:#5b55a5;border-radius:999px}.bar-fill.alt{background:#059669}.payment-method-buttons{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 14px}.share-course-form{display:flex!important;gap:6px;align-items:center;flex-wrap:nowrap}.share-course-form select{min-width:190px}.small-note{font-size:13px}.app-footer{padding:12px 22px;color:#6b7280;font-size:12px;border-top:1px solid #e5e7eb;background:#fff;display:flex;justify-content:space-between;gap:12px}.form-grid select{width:100%;padding:9px;border:1px solid #d1d5db;border-radius:8px;background:#fff}.quick-grid select{padding:9px;border:1px solid #d1d5db;border-radius:8px;background:#fff}
@media(max-width:900px){.report-grid{grid-template-columns:1fr}.app-footer{flex-direction:column}.share-course-form{flex-wrap:wrap!important}}

/* v2.4.12 dashboard/report/payment/print refinements */
.btn-small.warning{background:#f59e0b!important;color:#fff!important}.pie-chart-wrap{display:grid;grid-template-columns:180px 1fr;gap:18px;align-items:center}.pie-chart{width:170px;height:170px;border-radius:50%;box-shadow:inset 0 0 0 1px #e5e7eb}.pie-legend{display:flex;flex-direction:column;gap:8px}.pie-legend-row{display:grid;grid-template-columns:14px 1fr auto;gap:8px;align-items:center}.pie-dot{width:12px;height:12px;border-radius:50%;display:inline-block}.pay-method-label{font-weight:700}.payment-method-buttons .btn-small{font-weight:700}.app-footer{justify-content:center!important;text-align:center;align-items:center}.app-footer span{margin-left:8px}.share-patient-picker{position:relative;min-width:250px}.share-patient-search{width:100%;min-width:250px}.share-patient-results{position:absolute;top:100%;left:0;right:0;background:#fff;border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 8px 18px rgba(0,0,0,.12);z-index:30;max-height:240px;overflow:auto}.course-share-search-form{position:relative}.certificate-print,.receipt-print{min-height:270mm;position:relative}.cert-sign{position:absolute;right:40px;bottom:36px;margin-top:0}.signature-line{position:absolute;right:18mm;bottom:14mm;text-align:center}.receipt-print{padding-bottom:34mm!important}.receipt-header-block{position:relative}.receipt-logo-col{display:flex;justify-content:flex-start;align-items:flex-start}.receipt-logo-col .receipt-logo,.branded-doc-head .doc-logo{object-fit:contain!important}
@media(max-width:900px){.pie-chart-wrap{grid-template-columns:1fr}.pie-chart{margin:auto}.app-footer span{display:block;margin-left:0}.share-course-form{align-items:flex-start}.share-patient-picker,.share-patient-search{min-width:220px;width:100%}}
@media print{.certificate-print{min-height:277mm!important;padding:14mm!important;box-sizing:border-box}.certificate-print .branded-doc-head{min-height:32mm!important;padding-left:32mm!important;text-align:center!important}.certificate-print .branded-doc-head .doc-logo{position:absolute!important;left:0!important;top:0!important;transform:none!important;width:26mm!important;height:22mm!important;max-width:26mm!important;max-height:22mm!important}.cert-sign{position:absolute!important;right:16mm!important;bottom:18mm!important;width:78mm!important}.receipt-print{min-height:277mm!important;box-sizing:border-box;padding-bottom:32mm!important}.receipt-header-block{grid-template-columns:26mm 1fr 42mm!important}.receipt-logo-col .receipt-logo{width:23mm!important;height:18mm!important;max-width:23mm!important;max-height:18mm!important}.signature-line{position:absolute!important;right:14mm!important;bottom:12mm!important}.receipt-items-table tr{page-break-inside:avoid;break-inside:avoid}.receipt-items-table thead{display:table-header-group}@page{size:A4;margin:8mm}body.receipt-print-a5 .receipt-print{min-height:200mm!important}.receipt-print.receipt-a5{min-height:200mm!important}}


/* v2.4.14 navigation icons, mobile appointment table, sticky footer, print refinements */
html,body{min-height:100%;}body{min-height:100vh;display:flex;align-items:stretch}.main{min-height:100vh;display:flex;flex-direction:column;width:calc(100% - 245px)}.content{flex:1}.app-footer{margin-top:auto;justify-content:center!important;text-align:center!important;align-items:center!important}.side-nav a{display:flex;align-items:center;gap:10px}.nav-icon{width:22px;text-align:center;flex:0 0 22px;font-size:16px}.sortable-th{color:#1f2937;text-decoration:none;display:inline-flex;align-items:center;gap:4px;font-weight:800}.sortable-th:hover{text-decoration:underline}.appointment-table{font-size:14px}.appointment-table th{position:sticky;top:0;z-index:3}.appointment-table td{vertical-align:middle}.patient-name-cell a{font-weight:700;color:#24318b}.status-pill{white-space:nowrap}.btn-small{white-space:nowrap}.commission-table .action-buttons{min-width:120px!important}.commission-table .modal{white-space:normal}.certificate-print{font-size:15px;line-height:1.55}.certificate-print .cert-box{min-height:unset;margin:8px 0;padding:9px 11px}.certificate-print .cert-head h1{font-size:26px;margin-bottom:8px}.certificate-print p{margin:7px 0}
@media(max-width:1100px){.appointment-table{min-width:980px}.appointment-table th:last-child,.appointment-table td:last-child{min-width:430px}.appointment-table th,.appointment-table td{padding:8px 9px}.appointment-table-wrap{border-radius:12px;border:1px solid #e5e7eb;background:#fff}.appointment-toolbar{gap:8px}}
@media(max-width:700px){body{display:block}.main{width:100%;min-height:100vh}.appointment-table-wrap.mobile-friendly-table{overflow:visible;border:0;background:transparent}.mobile-friendly-table .appointment-table{min-width:0;width:100%;border:0;background:transparent}.mobile-friendly-table thead{display:none}.mobile-friendly-table tbody,.mobile-friendly-table tr,.mobile-friendly-table td{display:block;width:100%}.mobile-friendly-table tr{background:#fff;border:1px solid #e5e7eb;border-radius:14px;margin:12px 0;padding:10px;box-shadow:0 3px 14px rgba(15,23,42,.06)}.mobile-friendly-table tr.row-done{background:#f3f4f6}.mobile-friendly-table td{border:0;padding:7px 6px 7px 44%;position:relative;min-height:34px}.mobile-friendly-table td:before{content:attr(data-label);position:absolute;left:8px;top:7px;width:38%;font-weight:700;color:#6b7280}.mobile-friendly-table td.actions-cell{padding-left:6px}.mobile-friendly-table td.actions-cell:before{position:static;display:block;width:auto;margin-bottom:6px}.mobile-friendly-table .action-buttons{overflow-x:auto;min-width:0!important;display:flex!important}.mobile-friendly-table .note-cell .note-display{white-space:normal}.appointment-add-row .btn{width:100%;text-align:center}}
@media print{.sidebar,.topbar,.app-footer,.print-actions,.receipt-actions,.no-print{display:none!important}.main{margin:0!important;width:100%!important;min-height:0!important;display:block!important}.content{padding:0!important;background:#fff!important}.certificate-print{width:190mm!important;min-height:277mm!important;max-height:277mm!important;overflow:hidden!important;margin:0 auto!important;border:0!important;border-radius:0!important;padding:12mm 14mm!important;box-sizing:border-box;font-size:12.5px!important;line-height:1.42!important}.certificate-print .branded-doc-head{min-height:28mm!important;margin-bottom:6mm!important;padding-left:30mm!important;border-bottom:1px solid #111!important}.certificate-print .branded-doc-head .doc-logo{left:0!important;top:0!important;width:25mm!important;height:20mm!important;max-width:25mm!important;max-height:20mm!important}.certificate-print .cert-head h1{font-size:20px!important;margin:0 0 3mm!important}.certificate-print p{margin:3mm 0!important}.certificate-print .cert-box{margin:3mm 0!important;padding:2.5mm 3mm!important;min-height:14mm!important;break-inside:avoid;page-break-inside:avoid}.certificate-print .cert-sign{position:absolute!important;right:15mm!important;bottom:14mm!important;width:75mm!important;font-size:12px!important}.receipt-print{max-height:none!important}.receipt-print .app-footer{display:none!important}@page{size:A4;margin:8mm}}

/* v2.4.15 patient paging/sorting, login refresh, report shortcuts, stronger mobile appointments */
.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#f5f7ff 0%,#eef8ff 48%,#fff7ed 100%);padding:24px}.modern-login-card{width:min(430px,100%);background:#fff;border:1px solid #e5e7eb;border-radius:24px;box-shadow:0 24px 70px rgba(15,23,42,.16);padding:34px;text-align:center}.modern-login-card h1{margin:10px 0 4px;font-size:28px}.login-subtitle{margin:0 0 22px;color:#6b7280}.login-logo-wrap{display:flex;justify-content:center;min-height:54px}.login-logo{max-width:150px;max-height:64px;object-fit:contain}.login-form{text-align:left;display:grid;gap:10px}.login-form input{width:100%;padding:12px 14px;border:1px solid #d1d5db;border-radius:12px}.login-form button{width:100%;padding:12px 14px;margin-top:8px;border-radius:12px}.table-meta{color:#6b7280;font-size:13px;margin:8px 0}.pagination{display:flex;gap:6px;flex-wrap:wrap;margin:14px 0}.pagination a{border:1px solid #d1d5db;background:#fff;color:#374151;border-radius:8px;padding:6px 10px;text-decoration:none}.pagination a.active{background:#4f46e5;color:#fff;border-color:#4f46e5}.responsive-table-wrap{overflow-x:auto}.quick-date-buttons{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 12px}.patient-table th{white-space:nowrap}.patient-table a{font-weight:700}
@media(max-width:900px){.appointment-table-wrap.mobile-friendly-table{overflow:visible!important;border:0!important;background:transparent!important}.mobile-friendly-table .appointment-table{min-width:0!important;width:100%!important;border:0!important;background:transparent!important}.mobile-friendly-table .appointment-table thead{display:none!important}.mobile-friendly-table .appointment-table tbody,.mobile-friendly-table .appointment-table tr,.mobile-friendly-table .appointment-table td{display:block!important;width:100%!important}.mobile-friendly-table .appointment-table tr{background:#fff!important;border:1px solid #e5e7eb!important;border-radius:14px!important;margin:12px 0!important;padding:10px!important;box-shadow:0 3px 14px rgba(15,23,42,.06)!important}.mobile-friendly-table .appointment-table tr.row-done{background:#f3f4f6!important}.mobile-friendly-table .appointment-table td{border:0!important;padding:7px 6px 7px 44%!important;position:relative!important;min-height:34px!important;white-space:normal!important;min-width:0!important}.mobile-friendly-table .appointment-table td:before{content:attr(data-label);position:absolute;left:8px;top:7px;width:38%;font-weight:700;color:#6b7280}.mobile-friendly-table .appointment-table td.actions-cell{padding-left:6px!important}.mobile-friendly-table .appointment-table td.actions-cell:before{position:static;display:block;width:auto;margin-bottom:6px}.mobile-friendly-table .appointment-table .action-buttons{overflow-x:auto;min-width:0!important;display:flex!important;flex-wrap:nowrap!important}.appointment-table th:last-child,.appointment-table td:last-child{min-width:0!important}.appointment-add-row .btn{width:100%;text-align:center}.modern-login-card{padding:26px 20px}}

/* v2.4.15a: keep appointments as a wide table on mobile, with taller touch-friendly rows */
@media(max-width:900px){
  .appointment-table-wrap.mobile-friendly-table,
  .appointment-table-wrap{
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch!important;
    border:1px solid #e5e7eb!important;
    border-radius:12px!important;
    background:#fff!important;
    padding-bottom:8px!important;
  }
  .mobile-friendly-table .appointment-table,
  .appointment-table{
    display:table!important;
    min-width:1250px!important;
    width:1250px!important;
    border-collapse:collapse!important;
    background:#fff!important;
    border:1px solid #e5e7eb!important;
  }
  .mobile-friendly-table .appointment-table thead,
  .appointment-table thead{display:table-header-group!important;}
  .mobile-friendly-table .appointment-table tbody,
  .appointment-table tbody{display:table-row-group!important;}
  .mobile-friendly-table .appointment-table tr,
  .appointment-table tr{
    display:table-row!important;
    width:auto!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:transparent!important;
  }
  .mobile-friendly-table .appointment-table th,
  .appointment-table th{
    display:table-cell!important;
    position:sticky!important;
    top:0!important;
    z-index:3!important;
    padding:12px 10px!important;
    white-space:nowrap!important;
    background:#6b6b6b!important;
    color:#fff!important;
    vertical-align:middle!important;
  }
  .mobile-friendly-table .appointment-table td,
  .appointment-table td{
    display:table-cell!important;
    width:auto!important;
    min-width:0!important;
    padding:14px 10px!important;
    min-height:52px!important;
    line-height:1.45!important;
    border-bottom:1px solid #e5e7eb!important;
    position:static!important;
    white-space:nowrap!important;
    vertical-align:middle!important;
    background:#fff!important;
  }
  .mobile-friendly-table .appointment-table td:before,
  .appointment-table td:before{content:none!important;display:none!important;}
  .mobile-friendly-table .appointment-table td.actions-cell,
  .appointment-table td.actions-cell{
    padding-left:10px!important;
    min-width:430px!important;
  }
  .mobile-friendly-table .appointment-table .action-buttons,
  .appointment-table .action-buttons{
    display:flex!important;
    flex-wrap:nowrap!important;
    gap:8px!important;
    min-width:430px!important;
    overflow-x:visible!important;
  }
  .appointment-table .btn-small,
  .appointment-table button.btn-small,
  .appointment-table a.btn-small{
    padding:9px 12px!important;
    min-height:38px!important;
    line-height:1.25!important;
    font-size:13px!important;
  }
  .appointment-table .time-chip{
    padding:8px 12px!important;
    min-height:38px!important;
    min-width:78px!important;
  }
  .appointment-table .line-btn{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
  }
  .appointment-table .note-display{
    max-width:260px!important;
    white-space:nowrap!important;
  }
  .appointment-table .row-done td{background:#e5e7eb!important;color:#4b5563!important;}
  .appointment-table .row-active td{background:#f7c7c1!important;}
}

/* FoodWork 0.1.0 — configurable admin color system */
:root,
:root[data-theme="red"]{
  --fw-primary:#b42318;--fw-primary-hover:#912018;--fw-primary-dark:#7a271a;
  --fw-primary-soft:#fef3f2;--fw-primary-subtle:#fee4e2;--fw-primary-border:#fecdca;
  --fw-focus:rgba(180,35,24,.22);--fw-sidebar-start:#641e16;--fw-sidebar-end:#b42318;
  --fw-rgb:180,35,24;
}
:root[data-theme="blue"]{
  --fw-primary:#175cd3;--fw-primary-hover:#1849a9;--fw-primary-dark:#194185;
  --fw-primary-soft:#eff8ff;--fw-primary-subtle:#d1e9ff;--fw-primary-border:#b2ddff;
  --fw-focus:rgba(23,92,211,.22);--fw-sidebar-start:#102a56;--fw-sidebar-end:#175cd3;
  --fw-rgb:23,92,211;
}
:root[data-theme="orange"]{
  --fw-primary:#e04f16;--fw-primary-hover:#b93815;--fw-primary-dark:#932f19;
  --fw-primary-soft:#fff6ed;--fw-primary-subtle:#ffead5;--fw-primary-border:#fed7aa;
  --fw-focus:rgba(224,79,22,.22);--fw-sidebar-start:#70210d;--fw-sidebar-end:#e04f16;
  --fw-rgb:224,79,22;
}
:root[data-theme="yellow"]{
  --fw-primary:#b7791f;--fw-primary-hover:#935f12;--fw-primary-dark:#754c0d;
  --fw-primary-soft:#fffaeb;--fw-primary-subtle:#fef0c7;--fw-primary-border:#fedf89;
  --fw-focus:rgba(183,121,31,.24);--fw-sidebar-start:#5e3b0b;--fw-sidebar-end:#b7791f;
  --fw-rgb:183,121,31;
}
:root[data-theme="green"]{
  --fw-primary:#16803c;--fw-primary-hover:#116a32;--fw-primary-dark:#14532d;
  --fw-primary-soft:#ecfdf3;--fw-primary-subtle:#d1fadf;--fw-primary-border:#a6f4c5;
  --fw-focus:rgba(22,128,60,.22);--fw-sidebar-start:#123d25;--fw-sidebar-end:#16803c;
  --fw-rgb:22,128,60;
}

body{font-family:'Sarabun','Prompt',Tahoma,Arial,sans-serif;background:#f7f8fa;color:#20242c}
.sidebar{background:linear-gradient(165deg,var(--fw-sidebar-start) 0%,var(--fw-primary-dark) 48%,var(--fw-sidebar-end) 135%)!important;box-shadow:10px 0 30px rgba(15,23,42,.08)}
.sidebar .side-nav>a,.sidebar .nav-parent{border:1px solid transparent;transition:background .18s ease,transform .18s ease,border-color .18s ease}
.sidebar .side-nav>a:hover,.sidebar .nav-parent:hover{background:rgba(255,255,255,.13)!important;transform:translateX(2px)}
.sidebar .side-nav>a.active,.sidebar .nav-parent.active,.sidebar .nav-group.active>.nav-parent{background:#fff!important;color:var(--fw-primary-dark)!important;border-color:rgba(255,255,255,.5)!important;box-shadow:0 8px 22px rgba(17,24,39,.18)}
.sidebar .nav-children a.active{background:rgba(255,255,255,.16)!important;color:#fff!important}
.topbar{height:64px!important;position:sticky;top:0;z-index:30;box-shadow:0 1px 0 rgba(15,23,42,.06),0 8px 24px rgba(15,23,42,.04)}
.topbar-title{display:flex;flex-direction:column;line-height:1.15}.topbar-title b{color:var(--fw-primary-dark);font-size:17px}.topbar-title small{margin-top:3px;color:#667085;font-weight:600}
.topbar-user em{background:var(--fw-primary-soft);color:var(--fw-primary-dark);border:1px solid var(--fw-primary-border);border-radius:999px;padding:3px 8px;font-style:normal}
.content{max-width:1680px;width:100%;margin:0 auto;padding:26px}
.page-head h1,h1{letter-spacing:-.02em;color:#20242c}.section-title,.card strong,.profile-section h2,.info-grid b{color:var(--fw-primary)!important}
.card,.white-card,.toolbar,.form-grid.card{border-color:#e4e7ec!important;box-shadow:0 1px 3px rgba(16,24,40,.04),0 8px 24px rgba(16,24,40,.03)!important}
.btn,button,.btn-small,.form-grid legend{background:var(--fw-primary)!important;color:#fff}
.btn:hover,button:hover,.btn-small:hover{background:var(--fw-primary-hover)!important}
.btn.secondary,.secondary{background:#667085!important}.btn.danger,.danger{background:#d92d20!important}
input:focus,select:focus,textarea:focus{outline:0;border-color:var(--fw-primary)!important;box-shadow:0 0 0 4px var(--fw-focus)}
th{background:var(--fw-primary-soft)!important;color:var(--fw-primary-dark)}
.badge,.status-pill:not(.status-arrived):not(.status-in_treatment):not(.status-completed):not(.status-paid){background:var(--fw-primary-subtle);color:var(--fw-primary-dark)}
.menu-toggle{background:var(--fw-primary)!important}.settings-mobile-subnav a.active,.accounting-mobile-subnav a.active{background:var(--fw-primary)!important;color:#fff!important;border-color:var(--fw-primary)!important}
.app-footer{color:#98a2b3;border-top:1px solid #eaecf0;background:#fff}

.theme-setting-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(230px,330px);gap:18px;padding:18px;border:1px solid var(--fw-primary-border);border-radius:18px;background:linear-gradient(135deg,var(--fw-primary-soft),#fff 48%)}
.theme-setting-copy{grid-column:1/-1;display:flex;align-items:baseline;justify-content:space-between;gap:12px}.theme-setting-copy b{font-size:17px}.theme-setting-copy small{color:#667085}
.theme-options{display:grid;grid-template-columns:repeat(2,minmax(160px,1fr));gap:10px}.theme-option{position:relative;display:flex!important;align-items:center;gap:10px;padding:11px!important;border:1px solid #d0d5dd;border-radius:14px;background:#fff;cursor:pointer;transition:.18s ease}.theme-option:hover{border-color:var(--swatch);transform:translateY(-1px);box-shadow:0 8px 18px rgba(16,24,40,.08)}
.theme-option input{position:absolute;opacity:0;pointer-events:none}.theme-option:has(input:checked){border:2px solid var(--swatch);padding:10px!important;box-shadow:0 0 0 4px color-mix(in srgb,var(--swatch) 14%,transparent)}
.theme-swatch{width:42px;height:34px;display:grid;grid-template-columns:13px 1fr;grid-template-rows:9px 1fr;border-radius:8px;overflow:hidden;background:#f2f4f7;box-shadow:inset 0 0 0 1px rgba(16,24,40,.08);flex:0 0 auto}.theme-swatch i:first-child{grid-row:1/-1;background:linear-gradient(var(--swatch-dark),var(--swatch))}.theme-swatch i:nth-child(2){background:#fff}.theme-swatch i:nth-child(3){margin:4px;border-radius:3px;background:var(--swatch)}
.theme-option>span:nth-of-type(2){display:flex;flex-direction:column}.theme-option b{font-size:13px}.theme-option small{font-size:10px;color:#98a2b3}.theme-check{margin-left:auto;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#f2f4f7;color:transparent;font-weight:800}.theme-option:has(input:checked) .theme-check{background:var(--swatch);color:#fff}
.theme-live-preview{display:grid;grid-template-columns:62px 1fr;min-height:184px;border-radius:16px;overflow:hidden;background:#fff;box-shadow:0 12px 30px rgba(16,24,40,.12);border:1px solid rgba(var(--fw-rgb),.16)}.preview-sidebar{background:linear-gradient(165deg,var(--fw-sidebar-start),var(--fw-sidebar-end))}.preview-main{display:flex;flex-direction:column;padding:18px;gap:12px}.preview-main i{height:8px;width:72%;background:#eaecf0;border-radius:999px}.preview-main b{color:var(--fw-primary);font-size:14px}.preview-main em{height:42px;border-radius:9px;background:var(--fw-primary-soft);border:1px solid var(--fw-primary-border)}
.settings-form>.form-actions{position:sticky;bottom:12px;z-index:15;display:flex;justify-content:flex-end;padding:12px!important;border-radius:14px;background:rgba(255,255,255,.9);box-shadow:0 10px 30px rgba(16,24,40,.12);backdrop-filter:blur(12px)}

@media(max-width:900px){.content{padding:14px}.topbar{height:58px!important}.theme-setting-panel{grid-template-columns:1fr}.theme-setting-copy{display:block}.theme-setting-copy small{display:block;margin-top:4px}.theme-live-preview{min-height:130px}.theme-options{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.theme-options{grid-template-columns:1fr}.theme-option{min-height:58px}.topbar-user em{display:none}}
@media print{.settings-form>.form-actions{position:static;box-shadow:none}}

/* v2.5 login center fix + footer version */
body:not(:has(.sidebar)) .login-wrap,
.login-wrap{
  flex:1 1 auto!important;
  width:100vw!important;
  max-width:100vw!important;
  margin:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.modern-login-card{margin:auto!important;}
.course-order-block{margin-top:18px;border-top:2px solid #e5e7eb;padding-top:12px}.course-order-block h3{margin:0 0 8px;color:#24318b}.course-order-table th{background:#f8fafc;color:#111827}.course-delete-form{display:inline}.course-status-course{background:#fef3c7!important;color:#92400e!important}.status-course{background:#fef3c7!important;color:#92400e!important}

/* v2.5.1 login hard-center + appointment quick today */
html, body.login-page{width:100%;min-width:100%;min-height:100%;}
body.login-page{
  margin:0!important;
  min-height:100vh!important;
  width:100vw!important;
  display:grid!important;
  place-items:center!important;
  align-items:center!important;
  justify-items:center!important;
  background:linear-gradient(135deg,#eef7ff 0%,#f7f7fb 55%,#fff7ef 100%)!important;
  overflow-x:hidden!important;
}
body.login-page .login-wrap{
  width:100vw!important;
  min-height:100vh!important;
  margin:0!important;
  padding:24px!important;
  display:grid!important;
  place-items:center!important;
  background:transparent!important;
}
body.login-page .modern-login-card,
body.login-page .login-card{
  width:min(430px, calc(100vw - 32px))!important;
  max-width:430px!important;
  margin:0 auto!important;
  justify-self:center!important;
  align-self:center!important;
}
.appointment-toolbar .today-shortcut{align-self:end;white-space:nowrap;}

/* v2.5.3 course usage modal diagnostics + appointment service edit */
.course-usage-modal{width:min(920px,98vw)}
.course-usage-list{display:flex;flex-direction:column;gap:10px;margin-top:12px;max-height:60vh;overflow:auto;padding-right:4px}
.course-usage-row{display:grid;grid-template-columns:28px 1fr auto;gap:10px;align-items:center;border:1px solid #e5e7eb;border-radius:12px;padding:10px 12px;background:#fff;cursor:pointer}
.course-usage-row.is-disabled{background:#f9fafb;color:#6b7280;cursor:not-allowed}.course-usage-row.is-disabled input{cursor:not-allowed}.course-usage-row.is-usable{border-color:#bbf7d0;background:#f0fdf4}.course-usage-main{display:flex;flex-direction:column;gap:2px}.course-usage-main small{color:#6b7280}.course-reason{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:800;white-space:nowrap;background:#eef2ff;color:#3730a3}.course-reason.ok{background:#dcfce7;color:#166534}.course-reason.bad{background:#fee2e2;color:#991b1b}.course-reason.muted{background:#f3f4f6;color:#6b7280}@media(max-width:700px){.course-usage-row{grid-template-columns:24px 1fr}.course-usage-row .course-reason{grid-column:2/3;justify-self:flex-start}.course-usage-list{max-height:70vh}}

/* v2.5.4 web app branding, report payment list, certificate handwriting blanks */
.app-brand{display:flex;align-items:center;justify-content:center;margin-bottom:22px;padding:6px 4px;background:rgba(255,255,255,.08);border-radius:14px;min-height:58px}.webapp-logo{display:block;width:100%;max-width:190px;max-height:54px;object-fit:contain}.webapp-login-logo{max-width:210px!important;max-height:76px!important;width:auto!important;object-fit:contain!important}.topbar b{font-size:18px}.report-payment-table th,.report-payment-table td{white-space:nowrap}.report-payment-table td:nth-child(4){white-space:normal;min-width:260px}.date-range-card{font-size:20px!important}.handwrite-lines{display:block;padding-top:2mm}.handwrite-lines span{display:block;height:7mm;border-bottom:1px dotted #9ca3af;margin-bottom:1mm}.certificate-print .cert-box .handwrite-lines{min-height:22mm}.doc-logo{max-width:90px!important;max-height:58px!important;object-fit:contain}@media print{.handwrite-lines span{border-bottom:1px dotted #777!important}.app-footer,.print-actions{display:none!important}}

/* v2.5.6 assets back in public/assets, transparent logo, cleaner brand block */
.app-brand{
  background:transparent!important;
  box-shadow:none!important;
  padding:4px 0 14px!important;
  min-height:64px!important;
  justify-content:flex-start!important;
}
.webapp-logo{
  max-width:205px!important;
  max-height:72px!important;
  object-fit:contain!important;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.18));
}
.sidebar .brand img{margin-left:0!important;}


/* v2.5.10 report/dashboard calming KPI colors */
.report-kpi-cards,.soft-kpi-cards{align-items:stretch}
.kpi-card,.soft-kpi{border:0!important;box-shadow:0 12px 30px rgba(15,23,42,.08)!important;position:relative;overflow:hidden}
.kpi-card:after,.soft-kpi:after{content:'';position:absolute;right:-34px;top:-34px;width:108px;height:108px;border-radius:999px;background:rgba(255,255,255,.18)}
.kpi-card span,.kpi-card b,.soft-kpi span,.soft-kpi b{display:block;font-weight:700;opacity:.92}
.kpi-card strong,.soft-kpi strong{color:inherit!important;font-weight:800}
.kpi-total{background:linear-gradient(135deg,#059669,#10b981)!important;color:#fff!important}
.kpi-doctor{background:linear-gradient(135deg,#2563eb,#60a5fa)!important;color:#fff!important}
.kpi-physio{background:linear-gradient(135deg,#0891b2,#22d3ee)!important;color:#fff!important}
.kpi-period{background:linear-gradient(135deg,#4f46e5,#818cf8)!important;color:#fff!important}
.kpi-blue-1{background:linear-gradient(135deg,#e0f2fe,#bfdbfe)!important;color:#0f3b70!important}
.kpi-blue-2{background:linear-gradient(135deg,#dbeafe,#c7d2fe)!important;color:#1e3a8a!important}
.kpi-blue-3{background:linear-gradient(135deg,#e0e7ff,#ddd6fe)!important;color:#3730a3!important}
.kpi-blue-4{background:linear-gradient(135deg,#dbeafe,#bae6fd)!important;color:#075985!important}
.kpi-teal-1{background:linear-gradient(135deg,#ccfbf1,#a7f3d0)!important;color:#065f46!important}
.kpi-sky-1{background:linear-gradient(135deg,#e0f2fe,#cffafe)!important;color:#155e75!important}
.soft-kpi strong{font-size:30px}
.dashboard-summary-cards .kpi-total{order:-2}

/* v2.5.12 login remember, report active preset, footer */
.remember-login{display:flex!important;align-items:center;gap:8px;margin:4px 0 2px;color:#374151;font-size:14px;font-weight:600}.remember-login input{width:auto!important;margin:0}.quick-date-buttons .btn-small.active{background:#059669!important;color:#fff!important;border-color:#059669!important;box-shadow:0 4px 12px rgba(5,150,105,.22)}.app-footer{font-size:12px;color:#6b7280;justify-content:center!important;text-align:center!important;gap:0!important}.topbar b{color:#111827}

/* v2.6 attendance + commission summary */
.commission-role-cards{margin:10px 0 18px}.commission-role-cards small{display:block;margin-top:4px;opacity:.8;font-weight:700}.today-working-card{margin:12px 0 18px}.working-staff-list{display:flex;flex-wrap:wrap;gap:10px}.working-pill{display:flex;flex-direction:column;gap:2px;padding:10px 13px;border-radius:14px;background:linear-gradient(135deg,#eff6ff,#ecfeff);border:1px solid #bfdbfe;box-shadow:0 6px 18px rgba(15,23,42,.06)}.working-pill b{color:#0f172a}.working-pill small{color:#2563eb;font-weight:700}.attendance-filter{align-items:end}.attendance-form-card{margin:12px 0 16px}.compact-grid{grid-template-columns:repeat(4,minmax(150px,1fr))}.attendance-sheet-wrap{max-height:72vh;border:1px solid #e5e7eb;border-radius:14px;background:#fff}.attendance-sheet{border-collapse:separate;border-spacing:0;min-width:1200px}.attendance-sheet th{position:sticky;top:0;z-index:3;background:#f8fafc;color:#0f172a}.attendance-sheet .sticky-col{position:sticky;left:0;z-index:4;background:#fff}.attendance-sheet th.sticky-col{z-index:5;background:#f8fafc}.attendance-sheet .staff-col{min-width:230px;text-align:left}.attendance-sheet .day-col{min-width:76px;text-align:center}.attendance-sheet .day-col small{display:block;color:#64748b}.attendance-sheet .day-col.weekend{background:#fef2f2}.attendance-cell{min-width:76px;height:58px;text-align:center;vertical-align:middle;position:relative;font-size:12px}.attendance-cell span{display:block;font-weight:800}.attendance-cell small{display:block;font-size:11px;line-height:1.25}.attendance-cell.att-work{background:#dcfce7;color:#166534}.attendance-cell.att-special{background:#fef3c7;color:#92400e}.attendance-cell.att-ot{background:#dbeafe;color:#1d4ed8}.attendance-cell.att-off{background:#f3f4f6;color:#4b5563}.attendance-cell.att-leave{background:#fee2e2;color:#991b1b}.cell-delete{position:absolute;top:2px;right:2px;border:0;border-radius:999px;width:18px;height:18px;line-height:15px;background:#ef4444;color:#fff;font-weight:900;cursor:pointer}.attendance-sheet td:last-child,.attendance-sheet th:last-child{white-space:nowrap}.appointment-working-card h2{margin-top:0}@media(max-width:900px){.compact-grid{grid-template-columns:1fr 1fr}.attendance-sheet-wrap{max-height:none}.working-pill{width:100%}}


/* v2.6.1 staff employment type + attendance edit modal */
.staff-type-pill{display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:4px 9px;font-size:12px;font-weight:800;border:1px solid rgba(15,23,42,.08);white-space:nowrap}.staff-cat-reception{background:#e0f2fe!important;color:#075985!important;border-color:#7dd3fc!important}.staff-cat-physio_full_time{background:#dcfce7!important;color:#166534!important;border-color:#86efac!important}.staff-cat-physio_part_time{background:#f3e8ff!important;color:#6b21a8!important;border-color:#d8b4fe!important}.staff-cat-doctor{background:#fef3c7!important;color:#92400e!important;border-color:#fcd34d!important}.staff-cat-other{background:#f1f5f9!important;color:#334155!important;border-color:#cbd5e1!important}.badge-soft-blue{background:#dbeafe;color:#1d4ed8}.badge-soft-purple{background:#ede9fe;color:#6d28d9}.attendance-legend{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 12px}.attendance-staff-row.staff-cat-row-reception .sticky-col{box-shadow:inset 4px 0 0 #38bdf8}.attendance-staff-row.staff-cat-row-physio_full_time .sticky-col{box-shadow:inset 4px 0 0 #22c55e}.attendance-staff-row.staff-cat-row-physio_part_time .sticky-col{box-shadow:inset 4px 0 0 #a855f7}.attendance-staff-row.staff-cat-row-doctor .sticky-col{box-shadow:inset 4px 0 0 #f59e0b}.attendance-staff-row.staff-cat-row-other .sticky-col{box-shadow:inset 4px 0 0 #94a3b8}.attendance-cell-button{display:block;width:100%;height:100%;min-height:58px;border:0;background:transparent;color:inherit;padding:4px;cursor:pointer;font:inherit}.attendance-cell-button span{display:block;font-weight:900}.attendance-cell-button small{display:block;font-size:11px;line-height:1.25}.attendance-cell-button em{display:block;margin-top:2px;font-style:normal;font-size:10px;opacity:.65}.attendance-cell-button:hover{outline:2px solid rgba(37,99,235,.28);outline-offset:-2px;background:rgba(255,255,255,.38)}.attendance-edit-modal-card{max-width:860px}.modal-actions{display:flex;gap:10px;justify-content:flex-end;align-items:center}#attendanceDeleteForm{display:none}@media(max-width:900px){.modal-actions{justify-content:stretch;flex-direction:column}.modal-actions .btn{width:100%}}

/* v2.6.2 active menu + attendance bulk calendar */
.sidebar a.active,
.sidebar a.active:hover{background:linear-gradient(135deg,rgba(255,255,255,.24),rgba(255,255,255,.12));box-shadow:inset 4px 0 0 #fbbf24;color:#fff;font-weight:800}.side-nav .nav-icon{display:inline-block;width:22px;text-align:center;margin-right:4px}.dashboard-working-card h2{margin-top:0}.attendance-month-section{margin-bottom:18px}.attendance-bulk-form{display:grid!important;grid-template-columns:repeat(4,minmax(150px,1fr));gap:14px}.attendance-bulk-form label{display:block;font-size:13px}.span4{grid-column:span 4}.attendance-date-picker{background:#f8fafc;border:1px solid #e5e7eb;border-radius:14px;padding:12px}.attendance-picker-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;flex-wrap:wrap}.attendance-picker-head .actions{display:flex;gap:6px;flex-wrap:wrap}.attendance-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(42px,1fr));gap:6px}.att-cal-head{text-align:center;font-weight:800;font-size:12px;color:#475569;padding:5px}.att-cal-empty{min-height:42px}.att-cal-day{display:flex!important;align-items:center;justify-content:center;flex-direction:column;gap:2px;min-height:54px;border:1px solid #dbeafe;background:#fff;border-radius:10px;cursor:pointer;position:relative;font-weight:800;color:#1e3a8a}.att-cal-day input{position:absolute;left:6px;top:6px;width:auto!important;margin:0}.att-cal-day small{font-size:10px;color:#64748b}.att-cal-day.weekend{background:#fff7ed;border-color:#fed7aa;color:#9a3412}.att-cal-day.today{outline:2px solid #10b981;outline-offset:1px}.att-cal-day:has(input:checked){background:#dbeafe;border-color:#2563eb;color:#1d4ed8;box-shadow:0 6px 16px rgba(37,99,235,.18)}@supports not selector(:has(*)){.att-cal-day input:checked+span{color:#2563eb}}@media(max-width:900px){.attendance-bulk-form{grid-template-columns:1fr 1fr}.span4{grid-column:span 2}.attendance-calendar-grid{grid-template-columns:repeat(7,minmax(36px,1fr));gap:4px}.att-cal-day{min-height:48px}}@media(max-width:560px){.attendance-bulk-form{grid-template-columns:1fr}.span4{grid-column:span 1}.attendance-picker-head{align-items:flex-start}.attendance-calendar-grid{grid-template-columns:repeat(7,1fr)}.att-cal-day{min-height:42px;font-size:12px}}

/* v2.6.3 attendance nickname/sticky column + public working table */
.attendance-sheet-wrap{overflow:auto!important;position:relative}.attendance-sheet .sticky-col{position:sticky!important;left:0!important;z-index:6!important;background:#fff!important}.attendance-sheet th.sticky-col{z-index:8!important;background:#f8fafc!important}.attendance-sheet .staff-col{min-width:155px!important;max-width:190px!important}.attendance-name-cell{display:flex;flex-direction:column;gap:3px;white-space:nowrap}.attendance-name-cell b{font-size:18px;color:#0f172a;line-height:1.1}.attendance-name-cell small{font-size:10.5px;color:#64748b;line-height:1.1;overflow:hidden;text-overflow:ellipsis;max-width:160px}.staff-type-mini{display:inline-flex;width:max-content;align-items:center;border-radius:999px;padding:2px 7px;font-size:10px;font-weight:900;border:1px solid rgba(15,23,42,.08);line-height:1.1}.public-working-page{background:#f4f6fb}.public-working-shell{padding:22px;max-width:100vw}.public-working-head{margin-bottom:10px}.public-working-wrap{max-height:calc(100vh - 190px);box-shadow:0 8px 24px rgba(15,23,42,.08)}.public-working-note{padding:10px 2px}.public-attendance-sheet{font-size:12px}@media(max-width:900px){.attendance-sheet .staff-col{min-width:135px!important}.attendance-name-cell b{font-size:16px}.public-working-shell{padding:12px}.public-working-wrap{max-height:calc(100vh - 230px)}}


/* v2.6.4 stronger attendance sticky first column */
.attendance-sheet-wrap{overflow:auto!important;position:relative!important;max-width:100%;isolation:isolate}
.attendance-sheet-wrap .attendance-sheet{border-collapse:separate!important;border-spacing:0!important;overflow:visible!important;table-layout:auto!important}
.attendance-sheet-wrap .attendance-sheet th.sticky-col,
.attendance-sheet-wrap .attendance-sheet td.sticky-col{position:-webkit-sticky!important;position:sticky!important;left:0!important;z-index:20!important;background:#fff!important;min-width:170px!important;max-width:210px!important;box-shadow:8px 0 12px -12px rgba(15,23,42,.55)!important}
.attendance-sheet-wrap .attendance-sheet th.sticky-col{z-index:40!important;background:#f8fafc!important;top:0!important}
.attendance-sheet-wrap .attendance-sheet td.sticky-col{background-clip:padding-box!important}
.attendance-sheet-wrap .attendance-sheet .attendance-name-cell{display:flex!important;flex-direction:column!important;gap:3px!important;white-space:nowrap!important;min-width:0!important}
.attendance-sheet-wrap .attendance-sheet .attendance-name-cell b{font-size:18px;color:#0f172a;line-height:1.1}
.attendance-sheet-wrap .attendance-sheet .attendance-name-cell small{font-size:10.5px;color:#64748b;line-height:1.1;overflow:hidden;text-overflow:ellipsis;max-width:180px}
@media(max-width:900px){.attendance-sheet-wrap .attendance-sheet th.sticky-col,.attendance-sheet-wrap .attendance-sheet td.sticky-col{min-width:145px!important;max-width:165px!important}.attendance-sheet-wrap .attendance-sheet .attendance-name-cell b{font-size:16px}}

/* v2.7 patient nickname + compact working staff + payroll */
.patient-nickname{font-size:.68em;color:#64748b;font-weight:700}.working-staff-list.compact-working-list,.dashboard-working-card .working-staff-list,.appointment-working-card .working-staff-list{display:flex;flex-wrap:wrap;gap:6px;overflow-x:auto;padding-bottom:4px}.dashboard-working-card .working-pill,.appointment-working-card .working-pill{min-width:105px;max-width:135px;padding:6px 8px;border-radius:10px;gap:0;box-shadow:none}.dashboard-working-card .working-pill b,.appointment-working-card .working-pill b{font-size:14px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-working-card .working-pill small,.appointment-working-card .working-pill small{font-size:10px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media(max-width:700px){.dashboard-working-card .working-staff-list,.appointment-working-card .working-staff-list{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch}.dashboard-working-card .working-pill,.appointment-working-card .working-pill{flex:0 0 108px}}
.payroll-kpi-cards{margin:12px 0 18px}.payroll-dashboard-grid{display:grid;grid-template-columns:2fr 1fr;gap:16px;margin-bottom:16px}.payroll-bar-chart{height:260px;display:flex;align-items:flex-end;gap:12px;padding:20px 10px 4px;border-bottom:1px solid #e5e7eb}.payroll-bar-item{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:6px}.payroll-bar-item .bar{width:100%;max-width:42px;background:linear-gradient(180deg,#38bdf8,#0284c7);border-radius:8px 8px 0 0;position:relative;min-height:4px}.payroll-bar-item .bar span{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);font-size:10px;color:#64748b;white-space:nowrap}.payroll-bar-item small{font-size:11px;color:#475569}.payroll-role-list{display:flex;flex-direction:column;gap:10px}.payroll-role-list div{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #eef2f7;padding-bottom:8px}.payroll-role-list b{color:#0f766e}.payslip-print-body,.print-body{background:#d1d5db!important;padding:32px}.payslip-a5{background:#fff;width:210mm;max-width:100%;min-height:145mm;margin:auto;padding:18mm;box-sizing:border-box;color:#111827}.payslip-head{display:flex;justify-content:space-between;gap:22px;border-bottom:2px solid #111827;padding-bottom:10px}.payslip-logo{max-width:62px;max-height:62px;object-fit:contain}.payslip-head h1{font-size:24px;margin:0}.payslip-head h2{font-size:16px;margin:4px 0}.payslip-employee{padding:10px 0;border-bottom:1px solid #e5e7eb}.payslip-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:14px}.payslip-grid table,.wht50-doc table{width:100%;border-collapse:collapse}.payslip-grid th,.payslip-grid td,.wht50-doc th,.wht50-doc td{border:1px solid #111827;padding:6px 8px;text-align:left}.payslip-sign{display:flex;justify-content:space-between;margin-top:24px;gap:22px}.wht50-doc{background:#fff;width:210mm;max-width:100%;min-height:297mm;margin:auto;padding:15mm;box-sizing:border-box;color:#111827}.wht50-doc h1,.wht50-doc h2{text-align:center;margin:4px 0}.wht-box{border:1px solid #111827;padding:10px;margin:10px 0}.print-actions{position:fixed;right:16px;bottom:16px}.inline{display:inline}.white-card{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:14px;margin:12px 0}@media(max-width:900px){.payroll-dashboard-grid{grid-template-columns:1fr}.payslip-grid{grid-template-columns:1fr}.payslip-a5,.wht50-doc{width:auto;padding:12mm}.print-body{padding:12px}}@media print{.sidebar,.topbar,.app-footer,.print-actions{display:none!important}.print-body,.payslip-print-body{background:#fff!important;padding:0!important}.payslip-a5{width:210mm;min-height:148mm;margin:0;box-shadow:none}.wht50-doc{width:210mm;min-height:297mm;margin:0;box-shadow:none}}

/* v2.8 PTWork Tabler UI Refresh — Medical Plum / Violet Rose */
:root{
  --primary:#3B1768;--primary-dark:#271044;--accent:#A0175D;--accent-rose:#C12A74;
  --bg:#F7F3FA;--card:#FFFFFF;--border:#E7DDEC;--text:#263041;--muted:#6B7280;
  --success:#16A34A;--warning:#F59E0B;--danger:#DC2626;--info:#2563EB;
  --radius:16px;--shadow:0 14px 35px rgba(59,23,104,.09);--shadow-soft:0 6px 20px rgba(39,16,68,.07);
}
html{background:var(--bg)}
body.ptwork-v28, body.app-shell{background:var(--bg)!important;color:var(--text)!important;font-family:'Sarabun','Prompt', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif!important;}body.login-page{font-family:'Sarabun','Prompt', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif!important;}
.sidebar{width:264px!important;background:linear-gradient(180deg,var(--primary-dark),var(--primary) 50%,#4b1e78)!important;color:#fff!important;padding:18px 14px!important;box-shadow:14px 0 34px rgba(39,16,68,.22)!important;z-index:30!important;}
.main{margin-left:264px!important;min-height:100vh!important;display:flex!important;flex-direction:column!important;}
.content{padding:24px!important;flex:1 0 auto!important;}
.app-brand{min-height:78px!important;align-items:center!important;justify-content:center!important;padding:6px 8px 20px!important;margin-bottom:8px!important;border-bottom:1px solid rgba(255,255,255,.12)!important;}
.webapp-logo{max-width:210px!important;max-height:68px!important;filter:drop-shadow(0 8px 16px rgba(0,0,0,.2))!important;}
.side-nav{display:flex;flex-direction:column;gap:4px;}
.side-nav a,.sidebar a{display:flex!important;align-items:center!important;gap:10px!important;color:rgba(255,255,255,.88)!important;text-decoration:none!important;padding:10px 12px!important;border-radius:14px!important;margin:1px 0!important;font-weight:650!important;letter-spacing:.01em!important;transition:.16s ease!important;}
.sidebar a:hover{background:rgba(255,255,255,.12)!important;transform:translateX(2px);}
.sidebar a.active{background:linear-gradient(135deg,rgba(160,23,93,.98),rgba(193,42,116,.92))!important;color:#fff!important;box-shadow:0 10px 24px rgba(160,23,93,.32)!important;}
.nav-icon{width:24px;height:24px;display:inline-flex!important;align-items:center!important;justify-content:center!important;background:rgba(255,255,255,.12);border-radius:8px;font-size:14px;}
.sidebar a.active .nav-icon{background:rgba(255,255,255,.2)}
.topbar{height:66px!important;background:rgba(255,255,255,.9)!important;backdrop-filter:blur(10px);border-bottom:1px solid var(--border)!important;padding:0 24px!important;box-shadow:0 1px 0 rgba(255,255,255,.6)!important;}
.topbar-title{display:flex;flex-direction:column;line-height:1.1}.topbar-title b{font-size:20px!important;color:var(--primary-dark)!important}.topbar-title small{font-size:12px;color:var(--muted);margin-top:4px}.topbar-user{display:inline-flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--border);border-radius:999px;padding:7px 12px;color:var(--text);box-shadow:var(--shadow-soft)}.topbar-user em{font-style:normal;font-size:12px;color:#fff;background:var(--primary);border-radius:999px;padding:2px 8px}.menu-toggle{background:#fff!important;color:var(--primary)!important;border:1px solid var(--border)!important;border-radius:12px!important;box-shadow:var(--shadow-soft)!important;}
.page-head{margin-bottom:20px!important}.page-head h1,h1{color:var(--primary-dark)!important;font-weight:800!important;letter-spacing:-.02em!important}.page-head .actions{display:flex;gap:8px;flex-wrap:wrap}.card,.white-card,table,.toolbar,.form-grid fieldset,.modal-card,.login-card{background:var(--card)!important;border:1px solid var(--border)!important;border-radius:var(--radius)!important;box-shadow:var(--shadow-soft)!important;}
.card{padding:18px!important}.white-card{padding:16px!important}.cards{gap:18px!important}.card strong{color:var(--primary)!important}
.btn,button,.btn-small{border-radius:12px!important;font-weight:750!important;background:var(--accent)!important;color:#fff!important;border:1px solid transparent!important;box-shadow:0 8px 18px rgba(160,23,93,.18)!important;transition:.15s ease!important}.btn:hover,button:hover,.btn-small:hover{filter:brightness(.98);transform:translateY(-1px)}.btn.secondary,.secondary,.btn-small.light{background:#fff!important;color:var(--primary)!important;border-color:var(--border)!important;box-shadow:var(--shadow-soft)!important}.success,.btn.success,.btn-small.success{background:var(--success)!important;color:#fff!important}.danger,.btn.danger,.btn-small.danger{background:var(--danger)!important;color:#fff!important}.btn-small{padding:7px 10px!important;font-size:12px!important}
input,select,textarea{border:1px solid var(--border)!important;border-radius:12px!important;padding:10px 12px!important;background:#fff!important;color:var(--text)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.6)!important}input:focus,select:focus,textarea:focus{outline:3px solid rgba(193,42,116,.14)!important;border-color:var(--accent-rose)!important}.toolbar{padding:14px!important}.form-grid fieldset{border-color:var(--border)!important}.form-grid legend,.section-title{background:linear-gradient(135deg,var(--primary),var(--accent))!important;color:#fff!important;border-radius:10px!important;padding:7px 12px!important;font-weight:800!important}
table{border-collapse:separate!important;border-spacing:0!important;overflow:hidden!important}th{background:#F1E8F5!important;color:var(--primary-dark)!important;font-weight:800!important;border-bottom:1px solid var(--border)!important}td{border-bottom:1px solid #F0E8F3!important}tr:hover td{background:#FCF8FE!important}.responsive-table-wrap,.appointment-table-wrap{border-radius:var(--radius);border:1px solid var(--border);box-shadow:var(--shadow-soft);background:#fff;overflow:auto}.responsive-table-wrap table,.appointment-table-wrap table{box-shadow:none!important;border:0!important;border-radius:0!important}.appointment-table th{background:linear-gradient(135deg,var(--primary),#552789)!important;color:#fff!important}.appointment-table .row-active td{background:#FCE7F1!important}.appointment-table .row-done td{background:#F3F0F6!important;color:#5b6472!important}.status-pill,.badge{border-radius:999px!important;padding:4px 10px!important;font-weight:750!important}.badge{background:#F1E8F5!important;color:var(--primary)!important}.status-paid,.status-completed{background:#DCFCE7!important;color:#166534!important}.status-cancelled{background:#FEE2E2!important;color:#991B1B!important}.status-scheduled{background:#EDE9FE!important;color:#5B21B6!important}.status-arrived,.status-in_treatment{background:#DBEAFE!important;color:#1E40AF!important}.course-status-course,.status-course{background:#FEF3C7!important;color:#92400E!important}
.modal{backdrop-filter:blur(4px)}.modal-card{border-radius:22px!important;box-shadow:0 30px 70px rgba(39,16,68,.26)!important}.modal-close{background:#F3EDF7!important;color:var(--primary)!important;box-shadow:none!important}
.kpi-card,.soft-kpi{border-radius:22px!important;box-shadow:0 16px 34px rgba(59,23,104,.1)!important}.kpi-total{background:linear-gradient(135deg,#16A34A,#34D399)!important;color:#fff!important}.kpi-doctor{background:linear-gradient(135deg,#3B1768,#7C3AED)!important;color:#fff!important}.kpi-physio{background:linear-gradient(135deg,#A0175D,#EC4899)!important;color:#fff!important}.kpi-period{background:linear-gradient(135deg,#2563EB,#60A5FA)!important;color:#fff!important}.kpi-blue-1{background:linear-gradient(135deg,#EEF2FF,#E0E7FF)!important;color:#3B1768!important}.kpi-blue-2{background:linear-gradient(135deg,#FCE7F3,#F3E8FF)!important;color:#861657!important}.kpi-blue-3{background:linear-gradient(135deg,#F5F3FF,#EDE9FE)!important;color:#5B21B6!important}.kpi-blue-4{background:linear-gradient(135deg,#E0F2FE,#F0F9FF)!important;color:#075985!important}.kpi-teal-1{background:linear-gradient(135deg,#DCFCE7,#CCFBF1)!important;color:#065F46!important}
.login-page{background:radial-gradient(circle at 20% 10%,rgba(193,42,116,.14),transparent 30%),linear-gradient(135deg,#F7F3FA 0%,#fff 55%,#F5EAF1 100%)!important;min-height:100vh!important;display:grid!important;place-items:center!important}.login-main{width:100%;min-height:100vh;display:grid;place-items:center}.login-card{width:min(440px,calc(100vw - 36px))!important;border-radius:24px!important;padding:32px!important;box-shadow:0 28px 70px rgba(59,23,104,.16)!important}.login-logo-wrap{text-align:center}.login-logo{max-width:270px!important;max-height:86px!important}.login-card h1{text-align:center;margin-top:12px!important}.login-subtitle{text-align:center;color:var(--muted)}.remember-login{display:flex!important;gap:8px;align-items:center}.remember-login input{width:auto!important}
.app-footer{color:var(--muted)!important;background:transparent!important;border-top:1px solid rgba(231,221,236,.8)!important;padding:14px 24px!important;text-align:center!important}.print-body{background:#cfd4dc!important;color:#111!important;font-family:Tahoma,Arial,sans-serif!important}.print-body .btn,.print-body button{box-shadow:none!important}.print-body table{box-shadow:none!important;border-radius:0!important;border-collapse:collapse!important}.print-body th{background:#fff!important;color:#111!important}
@media(max-width:900px){.sidebar{position:fixed!important;transform:translateX(-105%);transition:.2s ease;width:270px!important}.sidebar.open{transform:translateX(0)}.main{margin-left:0!important}.topbar{padding:0 14px!important}.topbar-title small{display:none}.topbar-user{max-width:48vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.content{padding:14px!important}.cards{grid-template-columns:1fr!important}.page-head{align-items:flex-start!important;flex-direction:column!important}.toolbar{display:grid!important;grid-template-columns:1fr!important}.toolbar input,.toolbar select{width:100%!important}.card{padding:14px!important}.modal-card{width:min(96vw,760px)!important}.side-nav a{padding:11px 12px!important}}
@media print{body.print-body{background:#fff!important}.print-actions,.app-footer,.sidebar,.topbar{display:none!important}}

/* v2.8 payroll print templates */
.payslip-template-v28{width:210mm;min-height:148mm;margin:18mm auto;background:#fff;padding:16mm 18mm;color:#111;box-shadow:none;border:0;font-size:12px}.ps-head{display:grid;grid-template-columns:1.1fr .9fr;gap:20mm;align-items:start;margin-bottom:10mm}.ps-company{display:grid;grid-template-columns:26mm 1fr;gap:8mm}.payslip-logo{max-width:25mm;max-height:25mm;object-fit:contain}.ps-company h2,.ps-title h1{margin:0 0 4mm;color:#111!important;font-size:20px}.ps-title h1{font-size:22px}.ps-company p,.ps-title p{margin:1mm 0}.ps-employee{border-top:1px solid #222;border-bottom:1px solid #222;padding:3mm 0;margin-bottom:6mm;line-height:1.7}.ps-employee span{margin-left:10mm}.ps-main{width:100%;border-collapse:collapse!important;border:1px solid #222!important;font-size:12px}.ps-main th,.ps-main td{border:1px solid #222!important;padding:2.2mm 3mm!important;background:#fff!important;color:#111!important}.ps-main td:nth-child(2),.ps-main td:nth-child(4),.ps-main td:nth-child(6){text-align:right}.ps-main small{font-size:10px}.ps-remarks{margin:5mm 0 8mm}.ps-sign{text-align:right;margin-top:2mm}.ps-confidential{text-align:center;border-top:1px solid #999;margin-top:8mm;padding-top:3mm;font-size:10px}.wht50-form-v28{width:190mm;margin:8mm auto;background:#fff;padding:6mm;color:#111;border:1px solid #222;font-size:12px}.wht50-form-v28 h1{font-size:20px!important;text-align:center!important;color:#111!important;margin:0!important}.wht50-form-v28 h2{font-size:14px;text-align:center;margin:1mm 0 3mm}.wht-top{display:flex;justify-content:space-between;gap:12mm;font-size:11px}.wht-party{border:1px solid #222;padding:2mm;margin-top:2mm;line-height:1.6}.tax-boxes{display:inline-flex;gap:1px;vertical-align:middle;margin-left:3mm}.tax-boxes i{display:inline-flex;width:5mm;height:5mm;border:1px solid #222;align-items:center;justify-content:center;font-style:normal}.box-check{display:inline-flex;width:4mm;height:4mm;border:1px solid #222;align-items:center;justify-content:center;margin:0 1mm}.wht-choice{border:1px solid #222;border-top:0;padding:2mm}.wht-table{width:100%;border-collapse:collapse!important;border:1px solid #222!important;margin-top:0}.wht-table th,.wht-table td{border:1px solid #222!important;background:#fff!important;color:#111!important;padding:1.6mm 2mm!important}.wht-table th{text-align:center!important}.wht-table td:nth-child(2){text-align:center;width:30mm}.wht-table td:nth-child(3),.wht-table td:nth-child(4){text-align:right;width:28mm}.wht-baht,.wht-footer-grid{border:1px solid #222;border-top:0;padding:2mm}.wht-sign{border:1px solid #222;border-top:0;padding:4mm;text-align:center;min-height:28mm}.wht-stamp{max-width:28mm;max-height:20mm;object-fit:contain;margin-top:2mm}@media print{.payslip-template-v28{width:210mm;height:148mm;margin:0!important;padding:13mm 16mm!important}.wht50-form-v28{margin:0 auto!important;box-shadow:none!important}.print-body{background:#fff!important}@page{size:A4;margin:8mm}.payslip-print-body @page{size:A4 landscape;margin:6mm}}


/* PTWork v2.8.1 */
.app-shell.ptwork-v28 .appointment-table thead th,
.app-shell.ptwork-v28 .appointment-table thead th a,
.app-shell.ptwork-v28 .appointment-table thead th .sortable-th,
.app-shell.ptwork-v28 .appointment-table thead th .sortable-th:visited,
.app-shell.ptwork-v28 .appointment-table thead th .sortable-th:hover,
.app-shell.ptwork-v28 .appointment-table thead th .sortable-th:active{color:#fff!important;text-decoration:none!important;}
.app-shell.ptwork-v28 .appointment-table thead th .sortable-th::after{color:#fff!important;}
.app-brand{background:transparent!important;box-shadow:none!important;border:0!important;}
.webapp-logo{object-fit:contain!important;background:transparent!important;filter:drop-shadow(0 8px 16px rgba(0,0,0,.18))!important;}
.print-preview-toolbar{position:sticky;top:0;z-index:50;display:flex;gap:8px;justify-content:flex-end;align-items:center;background:rgba(255,255,255,.94);border:1px solid #e5e7eb;border-radius:12px;padding:10px;margin:0 auto 12px;max-width:210mm;box-shadow:0 10px 28px rgba(15,23,42,.12)}
.payslip-template-v281{width:210mm;height:148mm;min-height:148mm;margin:8mm auto;background:#fff;padding:10mm 12mm;color:#111;box-shadow:0 12px 36px rgba(15,23,42,.18);border:0;font-size:11px;box-sizing:border-box;overflow:hidden}.payslip-template-v281 .ps-head{display:grid;grid-template-columns:1.15fr .85fr;gap:10mm;align-items:start;margin-bottom:5mm}.payslip-template-v281 .ps-company{display:grid;grid-template-columns:22mm 1fr;gap:6mm}.payslip-template-v281 .payslip-logo{max-width:20mm;max-height:20mm;object-fit:contain}.payslip-template-v281 .ps-company h2,.payslip-template-v281 .ps-title h1{margin:0 0 2mm;color:#111!important;font-size:17px}.payslip-template-v281 .ps-title h1{font-size:18px}.payslip-template-v281 .ps-company p,.payslip-template-v281 .ps-title p{margin:1mm 0}.payslip-template-v281 .ps-employee{border-top:1px solid #222;border-bottom:1px solid #222;padding:2mm 0;margin-bottom:4mm;line-height:1.55}.payslip-template-v281 .ps-employee span{margin-left:6mm}.payslip-template-v281 .ps-main{width:100%;border-collapse:collapse!important;border:1px solid #222!important;font-size:10.5px}.payslip-template-v281 .ps-main th,.payslip-template-v281 .ps-main td{border:1px solid #222!important;padding:1.3mm 2mm!important;background:#fff!important;color:#111!important}.payslip-template-v281 .ps-main td:nth-child(2),.payslip-template-v281 .ps-main td:nth-child(4),.payslip-template-v281 .ps-main td:nth-child(6){text-align:right}.payslip-template-v281 .ps-remarks{margin:3mm 0}.payslip-template-v281 .ps-sign{display:flex;justify-content:space-between;margin-top:4mm}.payslip-template-v281 .ps-confidential{text-align:center;border-top:1px solid #999;margin-top:4mm;padding-top:2mm;font-size:9px}
.wht50-form-v281{width:196mm;margin:4mm auto;background:#fff;padding:4mm;color:#111;border:1px solid #222;font-size:10.2px;line-height:1.25;box-sizing:border-box;box-shadow:0 12px 36px rgba(15,23,42,.18)}.wht50-form-v281 h1{font-size:18px!important;text-align:center!important;color:#111!important;margin:0!important}.wht50-form-v281 h2{font-size:12px;text-align:center;margin:1mm 0 2mm}.wht-top{display:flex;justify-content:space-between;gap:8mm;font-size:10px}.wht-party{border:1px solid #222;padding:1.5mm;margin-top:1.5mm;line-height:1.45}.tax-boxes{display:inline-flex;gap:1px;vertical-align:middle;margin-left:2mm}.tax-boxes i{display:inline-flex;width:4.7mm;height:4.7mm;border:1px solid #222;align-items:center;justify-content:center;font-style:normal}.box-check{display:inline-flex;width:4mm;height:4mm;border:1px solid #222;align-items:center;justify-content:center;margin:0 1mm;font-weight:bold}.wht-choice{border:1px solid #222;border-top:0;padding:1.5mm}.wht-table{width:100%;border-collapse:collapse!important;border:1px solid #222!important;margin-top:0}.wht-table th,.wht-table td{border:1px solid #222!important;background:#fff!important;color:#111!important;padding:1mm 1.3mm!important;vertical-align:top}.wht-table th{text-align:center!important}.wht-table td:nth-child(2){text-align:center;width:24mm}.wht-table td:nth-child(3),.wht-table td:nth-child(4){text-align:right;width:25mm}.wht-table .indent{padding-left:5mm!important}.wht-table .indent2{padding-left:8mm!important}.wht-table .indent3{padding-left:11mm!important;font-size:9.3px}.wht-baht,.wht-fund-row,.wht-tax-condition{border:1px solid #222;border-top:0;padding:1.5mm}.wht-sign-v281{border:1px solid #222;border-top:0;padding:2mm;display:grid;grid-template-columns:1fr 28mm 65mm;gap:4mm;align-items:center;min-height:24mm}.wht-warning{font-size:9.2px}.juristic-stamp-circle{width:24mm;height:24mm;border:1px dashed #555;border-radius:50%;display:flex;align-items:center;justify-content:center;text-align:center;font-size:9px;line-height:1.25}.wht-sign-text{text-align:center;font-size:10px}.wht-sign-text p{margin:1.2mm 0}.payroll-actions{white-space:nowrap}.payroll-period-info{line-height:1.6}
@media(max-width:900px){.print-preview-toolbar{position:static;flex-wrap:wrap}.payslip-template-v281,.wht50-form-v281{width:auto;height:auto;min-height:0;padding:8mm;margin:0 auto}.wht-sign-v281{grid-template-columns:1fr}.juristic-stamp-circle{margin:auto}.payslip-template-v281 .ps-head{grid-template-columns:1fr}.payslip-template-v281 .ps-company{grid-template-columns:1fr}.payslip-template-v281 .ps-employee span{display:block;margin-left:0}.payroll-actions .btn-small{margin-bottom:4px}}
@media print{.no-print,.print-preview-toolbar,.print-actions,.sidebar,.topbar,.app-footer{display:none!important}body.print-body,body.payslip-print-body{background:#fff!important;padding:0!important}.payslip-template-v281{width:210mm!important;height:148mm!important;margin:0!important;padding:8mm 10mm!important;box-shadow:none!important;break-inside:avoid;page-break-inside:avoid}.wht50-form-v281{width:196mm!important;margin:0 auto!important;padding:3.5mm!important;box-shadow:none!important;font-size:9.6px!important;line-height:1.2!important;break-inside:avoid;page-break-inside:avoid}.wht-table th,.wht-table td{padding:.8mm 1mm!important}.wht-sign-v281{min-height:22mm!important}@page{size:A4;margin:6mm}}

/* PTWork v2.8.3 */
.app-shell.ptwork-v28 .app-brand{background:transparent!important;border-bottom:1px solid rgba(255,255,255,.10)!important;box-shadow:none!important;overflow:visible!important;}
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0');max-width:224px!important;max-height:74px!important;width:100%!important;object-fit:contain!important;background:transparent!important;filter:drop-shadow(0 8px 16px rgba(0,0,0,.16))!important;}
@media(max-width:900px){
  body.sidebar-open{overflow:hidden;}
  body.sidebar-open .sidebar{transform:translateX(0)!important;}
  body.sidebar-open::after{content:'';position:fixed;inset:0;background:rgba(15,23,42,.35);z-index:25;}
  body.sidebar-open .sidebar{z-index:40!important;}
  .dashboard-summary-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
  .dashboard-summary-cards .card{padding:12px!important;border-radius:18px!important;min-width:0!important;}
  .dashboard-summary-cards .card b{font-size:12.5px!important;line-height:1.25!important;white-space:normal!important;}
  .dashboard-summary-cards .card strong{font-size:22px!important;line-height:1.15!important;word-break:break-word;}
  .dashboard-summary-cards .kpi-total{grid-column:span 2;}
}
.print-preview-toolbar{position:sticky!important;top:0!important;left:0!important;right:0!important;z-index:100!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;width:100%!important;max-width:none!important;margin:0 0 14px!important;padding:10px 18px!important;background:rgba(255,255,255,.98)!important;border:0!important;border-bottom:1px solid #e5e7eb!important;border-radius:0!important;box-shadow:0 8px 24px rgba(15,23,42,.12)!important;}
.print-preview-toolbar .preview-title{font-weight:800;color:#3B1768;font-size:16px;}
.print-preview-toolbar .preview-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end;}
.print-preview-toolbar .btn{padding:9px 14px!important;}
.wht50-form-v283{width:200mm;min-height:287mm;margin:4mm auto;background:#fff;padding:3.5mm 4.5mm;color:#111;border:1px solid #222;font-size:9.25px;line-height:1.16;box-sizing:border-box;box-shadow:0 12px 36px rgba(15,23,42,.18);overflow:hidden;}
.wht50-form-v283 h1{font-size:17px!important;text-align:center!important;color:#111!important;margin:0!important;line-height:1.15!important;}
.wht50-form-v283 h2{font-size:11.4px;text-align:center;margin:.6mm 0 1.4mm;line-height:1.1;}
.wht50-form-v283 .wht-top{display:flex;justify-content:space-between;gap:7mm;font-size:8.8px;line-height:1.18;}
.wht50-form-v283 .wht-party{border:1px solid #222;padding:1.1mm 1.3mm;margin-top:1mm;line-height:1.3;}
.wht50-form-v283 .tax-boxes{display:inline-flex;gap:1px;vertical-align:middle;margin-left:1.5mm;}
.wht50-form-v283 .tax-boxes i{display:inline-flex;width:4.35mm;height:4.35mm;border:1px solid #222;align-items:center;justify-content:center;font-style:normal;}
.wht50-form-v283 .box-check{display:inline-flex;width:3.8mm;height:3.8mm;border:1px solid #222;align-items:center;justify-content:center;margin:0 .7mm;font-weight:bold;}
.wht50-form-v283 .wht-choice{border:1px solid #222;border-top:0;padding:1.1mm 1.3mm;line-height:1.25;}
.wht50-form-v283 .wht-table{width:100%;border-collapse:collapse!important;border:1px solid #222!important;margin-top:0;table-layout:fixed!important;}
.wht50-form-v283 .wht-col-type{width:137mm;}.wht50-form-v283 .wht-col-date{width:21mm;}.wht50-form-v283 .wht-col-amount{width:20mm;}.wht50-form-v283 .wht-col-tax{width:20mm;}
.wht50-form-v283 .wht-table th,.wht50-form-v283 .wht-table td{border:1px solid #222!important;background:#fff!important;color:#111!important;padding:.65mm .85mm!important;vertical-align:top!important;line-height:1.12!important;}
.wht50-form-v283 .wht-table th{text-align:center!important;font-size:9.4px!important;line-height:1.12!important;}
.wht50-form-v283 .wht-table td:nth-child(2){text-align:center;}.wht50-form-v283 .wht-table td:nth-child(3),.wht50-form-v283 .wht-table td:nth-child(4){text-align:right;}
.wht50-form-v283 .wht-table .indent{padding-left:3.6mm!important}.wht50-form-v283 .wht-table .indent2{padding-left:5.8mm!important}.wht50-form-v283 .wht-table .indent3{padding-left:7.5mm!important;font-size:8.55px!important;}
.wht50-form-v283 .wht-baht,.wht50-form-v283 .wht-fund-row,.wht50-form-v283 .wht-tax-condition{border:1px solid #222;border-top:0;padding:1.05mm 1.3mm;line-height:1.25;}
.wht50-form-v283 .wht-sign-v281{border:1px solid #222;border-top:0;padding:1.3mm;display:grid;grid-template-columns:1fr 24mm 62mm;gap:3mm;align-items:center;min-height:20mm;}
.wht50-form-v283 .wht-warning{font-size:8.2px;line-height:1.18;}
.wht50-form-v283 .juristic-stamp-circle{width:22mm;height:22mm;border:1px dashed #555;border-radius:50%;display:flex;align-items:center;justify-content:center;text-align:center;font-size:8px;line-height:1.18;}
.wht50-form-v283 .wht-sign-text{text-align:center;font-size:8.8px;line-height:1.18;}.wht50-form-v283 .wht-sign-text p{margin:.9mm 0;}
@media(max-width:900px){
  .print-preview-toolbar{position:sticky!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;padding:10px 12px!important;}
  .print-preview-toolbar .preview-actions{justify-content:flex-start!important;}
  .wht50-form-v283{width:auto!important;min-height:0!important;height:auto!important;margin:0 auto!important;padding:8mm!important;font-size:10px!important;line-height:1.25!important;overflow:visible!important;}
  .wht50-form-v283 .wht-sign-v281{grid-template-columns:1fr!important;}.wht50-form-v283 .juristic-stamp-circle{margin:auto;}
}
@media print{
  .no-print,.print-preview-toolbar{display:none!important;}
  .wht50-form-v283{width:200mm!important;min-height:287mm!important;margin:0 auto!important;padding:3mm 4mm!important;box-shadow:none!important;font-size:8.9px!important;line-height:1.12!important;break-inside:avoid;page-break-inside:avoid;}
  .wht50-form-v283 .wht-table th,.wht50-form-v283 .wht-table td{padding:.55mm .75mm!important;line-height:1.08!important;}
  .wht50-form-v283 .wht-sign-v281{min-height:19mm!important;}
  @page{size:A4;margin:5mm;}
}


/* PTWork v2.8.4 */
.app-shell.ptwork-v28 .webapp-logo{
  content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0');
  max-width:232px!important;
  max-height:76px!important;
  width:auto!important;
  background:transparent!important;
  filter:drop-shadow(0 6px 12px rgba(0,0,0,.10))!important;
}
.print-preview-toolbar{
  position:sticky!important;
  top:8px!important;
  left:auto!important;
  right:auto!important;
  z-index:120!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  width:min(680px,calc(100% - 24px))!important;
  max-width:680px!important;
  margin:10px auto 12px!important;
  padding:8px 12px!important;
  background:rgba(255,255,255,.98)!important;
  border:1px solid #e5e7eb!important;
  border-radius:999px!important;
  box-shadow:0 10px 28px rgba(15,23,42,.14)!important;
}
.print-preview-toolbar .preview-title{font-weight:800;color:#3B1768;font-size:14px;white-space:nowrap;}
.print-preview-toolbar .preview-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:flex-end;}
.print-preview-toolbar .btn{padding:6px 11px!important;font-size:13px!important;line-height:1.2!important;border-radius:999px!important;}
.payslip-template-v281{margin:6px auto 14px!important;width:210mm!important;height:148mm!important;min-height:148mm!important;padding:9mm 10mm!important;}
.wht50-form-v284{width:196mm;min-height:287mm;margin:4mm auto 10mm;background:#fff;padding:3.2mm 3.6mm;color:#111;border:1px solid #222;font-size:9.15px;line-height:1.14;box-sizing:border-box;box-shadow:0 12px 36px rgba(15,23,42,.18);overflow:hidden;}
.wht50-form-v284 h1{font-size:17px!important;text-align:center!important;color:#111!important;margin:0!important;line-height:1.1!important;}
.wht50-form-v284 h2{font-size:11.2px;text-align:center;margin:.6mm 0 1.2mm;line-height:1.08;}
.wht50-form-v284 .wht-top{display:flex;justify-content:space-between;gap:7mm;font-size:8.8px;line-height:1.16;}
.wht50-form-v284 .wht-party{border:1px solid #222;padding:1.1mm 1.3mm;margin-top:1mm;line-height:1.28;}
.wht50-form-v284 .tax-boxes{display:inline-flex;gap:1px;vertical-align:middle;margin-left:1.5mm;}
.wht50-form-v284 .tax-boxes i{display:inline-flex;width:4.45mm;height:4.45mm;border:1px solid #222;align-items:center;justify-content:center;font-style:normal;}
.wht50-form-v284 .box-check{display:inline-flex;width:3.9mm;height:3.9mm;border:1px solid #222;align-items:center;justify-content:center;margin:0 .7mm;font-weight:bold;}
.wht50-form-v284 .wht-choice{border:1px solid #222;border-top:0;padding:1.1mm 1.3mm;line-height:1.22;}
.wht50-form-v284 .wht-table{width:100%;border-collapse:collapse!important;border:1px solid #222!important;margin-top:0;table-layout:fixed!important;}
.wht50-form-v284 .wht-col-type{width:133mm;}
.wht50-form-v284 .wht-col-date{width:21mm;}
.wht50-form-v284 .wht-col-amount{width:19mm;}
.wht50-form-v284 .wht-col-tax{width:19mm;}
.wht50-form-v284 .wht-table th,.wht50-form-v284 .wht-table td{border:1px solid #222!important;background:#fff!important;color:#111!important;padding:.6mm .8mm!important;vertical-align:top!important;line-height:1.1!important;}
.wht50-form-v284 .wht-table th{text-align:center!important;font-size:9.15px!important;line-height:1.1!important;}
.wht50-form-v284 .wht-table td:nth-child(2){text-align:center;}
.wht50-form-v284 .wht-table td:nth-child(3),.wht50-form-v284 .wht-table td:nth-child(4){text-align:right;}
.wht50-form-v284 .wht-table .indent{padding-left:3.8mm!important;}
.wht50-form-v284 .wht-table .indent2{padding-left:5.8mm!important;}
.wht50-form-v284 .wht-table .indent3{padding-left:7.4mm!important;font-size:8.45px!important;}
.wht50-form-v284 .wht-baht,.wht50-form-v284 .wht-fund-row,.wht50-form-v284 .wht-tax-condition{border:1px solid #222;border-top:0;padding:1mm 1.3mm;line-height:1.18;}
.wht50-form-v284 .wht-sign-v281{border:1px solid #222;border-top:0;padding:1.3mm;display:grid;grid-template-columns:1fr 24mm 62mm;gap:3mm;align-items:center;min-height:20mm;}
.wht50-form-v284 .wht-warning{font-size:8.15px;line-height:1.15;}
.wht50-form-v284 .juristic-stamp-circle{width:22mm;height:22mm;border:1px dashed #555;border-radius:50%;display:flex;align-items:center;justify-content:center;text-align:center;font-size:7.9px;line-height:1.15;}
.wht50-form-v284 .wht-sign-text{text-align:center;font-size:8.75px;line-height:1.15;}
.wht50-form-v284 .wht-sign-text p{margin:.9mm 0;}
@media(max-width:900px){
  .print-preview-toolbar{top:6px!important;width:calc(100% - 16px)!important;max-width:none!important;margin:8px auto 10px!important;padding:8px 10px!important;border-radius:16px!important;flex-direction:row!important;align-items:center!important;}
  .print-preview-toolbar .preview-title{font-size:13px!important;}
  .print-preview-toolbar .preview-actions{justify-content:flex-end!important;gap:6px!important;}
  .print-preview-toolbar .btn{padding:6px 10px!important;font-size:12px!important;}
  .dashboard-summary-cards,.payroll-kpi-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
  .dashboard-summary-cards .card,.payroll-kpi-cards .card{padding:12px!important;border-radius:18px!important;min-width:0!important;}
  .dashboard-summary-cards .card b,.payroll-kpi-cards .card b{font-size:12.5px!important;line-height:1.25!important;white-space:normal!important;}
  .dashboard-summary-cards .card strong,.payroll-kpi-cards .card strong{font-size:22px!important;line-height:1.15!important;word-break:break-word;}
  .dashboard-summary-cards .kpi-total{grid-column:span 2;}
  .payroll-kpi-cards .kpi-total{grid-column:auto!important;order:0!important;}
  .wht50-form-v284{width:auto!important;min-height:0!important;height:auto!important;margin:0 auto!important;padding:8mm!important;font-size:9.9px!important;line-height:1.22!important;overflow:visible!important;}
  .wht50-form-v284 .wht-sign-v281{grid-template-columns:1fr!important;}
  .wht50-form-v284 .juristic-stamp-circle{margin:auto;}
}
@media print{
  .no-print,.print-preview-toolbar{display:none!important;}
  .payslip-template-v281{width:210mm!important;height:148mm!important;min-height:148mm!important;margin:0!important;padding:8mm 10mm!important;box-shadow:none!important;}
  .wht50-form-v284{width:196mm!important;min-height:287mm!important;margin:0 auto!important;padding:3mm 3.4mm!important;box-shadow:none!important;font-size:8.8px!important;line-height:1.08!important;break-inside:avoid;page-break-inside:avoid;}
  .wht50-form-v284 .wht-table th,.wht50-form-v284 .wht-table td{padding:.52mm .72mm!important;line-height:1.04!important;}
  .wht50-form-v284 .wht-sign-v281{min-height:18.5mm!important;}
  @page{size:A4;margin:5mm;}
}


/* PTWork v2.8.5 */
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0');max-width:232px!important;max-height:78px!important;width:auto!important;object-fit:contain!important;filter:drop-shadow(0 6px 14px rgba(0,0,0,.16))!important;}
.doc-preview-body{background:#d8dde3!important;padding:0!important;}
.doc-preview-shell{min-height:100vh;display:flex;flex-direction:column;}
.doc-preview-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 16px;background:#fff;border-bottom:1px solid #d1d5db;position:sticky;top:0;z-index:50;}
.doc-preview-code{font-size:18px;font-weight:800;color:#2b8fc9;letter-spacing:.2px;}
.doc-preview-header-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.doc-preview-header-actions .btn{padding:10px 18px!important;border-radius:6px!important;}
.doc-preview-main{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:18px;align-items:start;padding:22px 18px 26px;flex:1;}
.doc-preview-stage{background:#d8dde3;display:flex;justify-content:center;align-items:flex-start;min-width:0;overflow:auto;padding-right:10px;}
.doc-preview-side{background:#fff;border-left:1px solid #d1d5db;min-height:calc(100vh - 78px);padding:18px 16px;position:sticky;top:63px;}
.doc-preview-side label{display:block;font-weight:700;color:#374151;}
.doc-preview-side select{margin-top:10px;width:100%;}
.payslip-template-v281{margin:6px auto 18px!important;box-shadow:none!important;border:1px solid #cfd4dc!important;}
.wht50-form-v285{width:186mm;min-height:287mm;margin:6px auto 18px;background:#fff;padding:3.4mm 3.8mm;color:#111;border:1px solid #222;font-size:9.2px;line-height:1.18;box-sizing:border-box;box-shadow:none!important;overflow:hidden;}
.wht50-form-v285 h1{font-size:17px!important;text-align:center!important;color:#111!important;margin:0!important;line-height:1.1!important;}
.wht50-form-v285 h2{font-size:11.1px;text-align:center;margin:.7mm 0 1.5mm;line-height:1.12;}
.wht50-form-v285 .wht-top{display:flex;justify-content:space-between;gap:7mm;font-size:8.7px;line-height:1.2;}
.wht50-form-v285 .wht-party{border:1px solid #222;padding:1.2mm 1.4mm;margin-top:1.1mm;line-height:1.34;}
.wht50-form-v285 .tax-boxes{display:inline-flex;gap:1px;vertical-align:middle;margin-left:1.5mm;}
.wht50-form-v285 .tax-boxes i{display:inline-flex;width:4.35mm;height:4.35mm;border:1px solid #222;align-items:center;justify-content:center;font-style:normal;}
.wht50-form-v285 .box-check{display:inline-flex;width:3.8mm;height:3.8mm;border:1px solid #222;align-items:center;justify-content:center;margin:0 .7mm;font-weight:bold;}
.wht50-form-v285 .wht-choice{border:1px solid #222;border-top:0;padding:1.2mm 1.4mm;line-height:1.28;}
.wht50-form-v285 .wht-table{width:100%;border-collapse:collapse!important;border:1px solid #222!important;margin-top:0;table-layout:fixed!important;}
.wht50-form-v285 .wht-col-type{width:126mm;}.wht50-form-v285 .wht-col-date{width:22mm;}.wht50-form-v285 .wht-col-amount{width:18mm;}.wht50-form-v285 .wht-col-tax{width:18mm;}
.wht50-form-v285 .wht-table th,.wht50-form-v285 .wht-table td{border:1px solid #222!important;background:#fff!important;color:#111!important;padding:1.0mm .9mm!important;vertical-align:top!important;line-height:1.22!important;}
.wht50-form-v285 .wht-table th{text-align:center!important;font-size:9.1px!important;line-height:1.15!important;}
.wht50-form-v285 .wht-table td:nth-child(2){text-align:center;}.wht50-form-v285 .wht-table td:nth-child(3),.wht50-form-v285 .wht-table td:nth-child(4){text-align:right;}
.wht50-form-v285 .wht-table tbody tr{min-height:7.2mm!important;}
.wht50-form-v285 .wht-table .indent{padding-left:3.8mm!important}.wht50-form-v285 .wht-table .indent2{padding-left:5.7mm!important}.wht50-form-v285 .wht-table .indent3{padding-left:7.2mm!important;font-size:8.55px!important;line-height:1.2!important;}
.wht50-form-v285 .wht-baht,.wht50-form-v285 .wht-fund-row,.wht50-form-v285 .wht-tax-condition{border:1px solid #222;border-top:0;padding:1.2mm 1.4mm;line-height:1.25;}
.wht50-form-v285 .wht-sign-v281{border:1px solid #222;border-top:0;padding:1.5mm;display:grid;grid-template-columns:1fr 24mm 62mm;gap:3mm;align-items:center;min-height:22mm;}
.wht50-form-v285 .wht-warning{font-size:8.2px;line-height:1.18;}
.wht50-form-v285 .juristic-stamp-circle{width:22mm;height:22mm;border:1px dashed #555;border-radius:50%;display:flex;align-items:center;justify-content:center;text-align:center;font-size:8px;line-height:1.14;}
.wht50-form-v285 .wht-sign-text{text-align:center;font-size:8.75px;line-height:1.18;}.wht50-form-v285 .wht-sign-text p{margin:.95mm 0;}
@media(max-width:1100px){.doc-preview-main{grid-template-columns:1fr;}.doc-preview-side{min-height:auto;position:static;border-left:0;border-top:1px solid #d1d5db;}}
@media(max-width:900px){.doc-preview-header{padding:10px 12px;}.doc-preview-code{font-size:16px;}.doc-preview-header-actions{gap:8px;}.doc-preview-header-actions .btn{padding:8px 12px!important;}.doc-preview-main{padding:12px 10px 20px;gap:12px;}.doc-preview-stage{padding-right:0;overflow:auto;}.payslip-template-v281{width:210mm!important;min-width:210mm!important;}.wht50-form-v285{width:186mm!important;min-width:186mm!important;margin:0 auto!important;}.doc-preview-side{padding:12px;}}
@media print{body.doc-preview-body{background:#fff!important;padding:0!important;}.doc-preview-header,.doc-preview-side{display:none!important;}.doc-preview-main{display:block!important;padding:0!important;}.doc-preview-stage{display:block!important;padding:0!important;overflow:visible!important;background:#fff!important;}.payslip-template-v281{width:210mm!important;height:148mm!important;min-height:148mm!important;margin:0!important;padding:8mm 10mm!important;box-shadow:none!important;border:0!important;}.wht50-form-v285{width:186mm!important;min-height:287mm!important;margin:0 auto!important;padding:3.2mm 3.5mm!important;box-shadow:none!important;font-size:8.95px!important;line-height:1.12!important;break-inside:avoid;page-break-inside:avoid;}.wht50-form-v285 .wht-table th,.wht50-form-v285 .wht-table td{padding:.9mm .8mm!important;line-height:1.16!important;}.wht50-form-v285 .wht-sign-v281{min-height:20mm!important;}@page{size:A4;margin:5mm;}}


/* PTWork v2.8.6 */
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0')!important;}
.doc-preview-body{height:100vh!important;overflow:hidden!important;background:#d8dde3!important;}
.doc-preview-shell{height:100vh!important;width:100vw!important;max-width:none!important;overflow:hidden!important;}
.doc-preview-header{position:relative!important;top:auto!important;width:100%!important;box-sizing:border-box!important;min-height:58px!important;padding:8px 16px!important;}
.doc-preview-main{display:grid!important;grid-template-columns:minmax(0,1fr) 260px!important;gap:0!important;width:100vw!important;height:calc(100vh - 58px)!important;padding:0!important;overflow:hidden!important;}
.doc-preview-stage{height:calc(100vh - 58px)!important;width:100%!important;overflow:auto!important;padding:18px 20px!important;box-sizing:border-box!important;background:#d8dde3!important;align-items:flex-start!important;}
.doc-preview-side{position:static!important;top:auto!important;height:calc(100vh - 58px)!important;min-height:0!important;overflow:auto!important;border-left:1px solid #cbd5e1!important;border-top:0!important;box-sizing:border-box!important;}
.wht50-form-v285,.wht50-form-v286{width:180mm!important;min-height:287mm!important;margin:0 auto 18px!important;padding:3.2mm 3.4mm!important;font-size:8.85px!important;line-height:1.16!important;box-sizing:border-box!important;overflow:hidden!important;}
.wht50-form-v285{ /* legacy class in case cached view is loaded */ }
.wht50-form-v285 .wht-col-type,.wht50-form-v286 .wht-col-type{width:118mm!important;}
.wht50-form-v285 .wht-col-date,.wht50-form-v286 .wht-col-date{width:21mm!important;}
.wht50-form-v285 .wht-col-amount,.wht50-form-v286 .wht-col-amount{width:18mm!important;}
.wht50-form-v285 .wht-col-tax,.wht50-form-v286 .wht-col-tax{width:18mm!important;}
.wht50-form-v285 .wht-table,.wht50-form-v286 .wht-table{width:100%!important;table-layout:fixed!important;}
.wht50-form-v285 .wht-table th,.wht50-form-v285 .wht-table td,.wht50-form-v286 .wht-table th,.wht50-form-v286 .wht-table td{padding:.95mm .72mm!important;line-height:1.18!important;word-break:break-word!important;overflow-wrap:anywhere!important;}
.wht50-form-v285 .wht-table th,.wht50-form-v286 .wht-table th{font-size:8.85px!important;line-height:1.12!important;}
.wht50-form-v285 .wht-party,.wht50-form-v286 .wht-party{padding:1.05mm 1.25mm!important;line-height:1.26!important;}
.wht50-form-v285 .wht-choice,.wht50-form-v286 .wht-choice{padding:1.05mm 1.25mm!important;line-height:1.2!important;}
.wht50-form-v285 .wht-table .indent3,.wht50-form-v286 .wht-table .indent3{font-size:8.05px!important;line-height:1.15!important;padding-left:6.6mm!important;}
.wht50-form-v285 .wht-table .indent2,.wht50-form-v286 .wht-table .indent2{padding-left:5.1mm!important;}
.wht50-form-v285 .wht-table .indent,.wht50-form-v286 .wht-table .indent{padding-left:3.4mm!important;}
.wht50-form-v285 .wht-baht,.wht50-form-v285 .wht-fund-row,.wht50-form-v285 .wht-tax-condition,.wht50-form-v286 .wht-baht,.wht50-form-v286 .wht-fund-row,.wht50-form-v286 .wht-tax-condition{padding:1.05mm 1.25mm!important;line-height:1.18!important;}
.wht50-form-v285 .wht-sign-v281,.wht50-form-v286 .wht-sign-v281{min-height:20mm!important;grid-template-columns:1fr 23mm 58mm!important;gap:2.5mm!important;}
@media(max-width:1100px){.doc-preview-main{grid-template-columns:1fr!important;}.doc-preview-side{display:none!important;}.doc-preview-stage{height:calc(100vh - 58px)!important;}.wht50-form-v285,.wht50-form-v286{min-width:180mm!important;}}
@media(max-width:900px){.doc-preview-header{min-height:54px!important;padding:8px 10px!important;}.doc-preview-main,.doc-preview-stage{height:calc(100vh - 54px)!important;}.doc-preview-stage{padding:12px!important;}.doc-preview-header-actions .btn{padding:7px 10px!important;}.doc-preview-code{font-size:15px!important;}}
@media print{body.doc-preview-body{height:auto!important;overflow:visible!important;background:#fff!important;}.doc-preview-shell{height:auto!important;width:auto!important;overflow:visible!important;}.doc-preview-main{display:block!important;height:auto!important;width:auto!important;padding:0!important;overflow:visible!important;}.doc-preview-stage{display:block!important;height:auto!important;width:auto!important;padding:0!important;overflow:visible!important;background:#fff!important;}.wht50-form-v285,.wht50-form-v286{width:180mm!important;min-height:287mm!important;margin:0 auto!important;padding:3mm 3.2mm!important;font-size:8.55px!important;line-height:1.1!important;box-shadow:none!important;}.wht50-form-v285 .wht-table th,.wht50-form-v285 .wht-table td,.wht50-form-v286 .wht-table th,.wht50-form-v286 .wht-table td{padding:.82mm .62mm!important;line-height:1.12!important;}@page{size:A4;margin:6mm;}}


/* PTWork v2.8.7 */
.app-shell.ptwork-v28 .app-brand{justify-content:flex-start!important;padding:6px 8px 18px!important;min-height:84px!important;}
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0')!important;max-width:260px!important;max-height:96px!important;width:100%!important;object-fit:contain!important;filter:drop-shadow(0 6px 14px rgba(0,0,0,.20))!important;}
.appointment-note-presets{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px;}
.appointment-note-presets .btn-mini{border:1px solid #d8c6ee;background:#faf5ff;color:#4c1d95;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:700;cursor:pointer;}
.appointment-note-presets .btn-mini:hover{background:#f3e8ff;border-color:#a855f7;}
.doc-preview-body{height:100vh!important;overflow:hidden!important;background:#d8dde3!important;}
.doc-preview-shell{height:100vh!important;width:100vw!important;max-width:none!important;overflow:hidden!important;}
.doc-preview-header{position:relative!important;top:auto!important;width:100%!important;box-sizing:border-box!important;min-height:54px!important;padding:7px 16px!important;background:#fff!important;}
.doc-preview-code{font-size:17px!important;color:#1684c7!important;font-weight:800!important;}
.doc-preview-main{display:grid!important;grid-template-columns:minmax(0,1fr) 240px!important;gap:0!important;width:100vw!important;height:calc(100vh - 54px)!important;padding:0!important;overflow:hidden!important;}
.doc-preview-stage{height:calc(100vh - 54px)!important;width:100%!important;overflow:auto!important;padding:18px 20px!important;box-sizing:border-box!important;background:#d8dde3!important;align-items:flex-start!important;justify-content:center!important;}
.doc-preview-side{position:static!important;top:auto!important;height:calc(100vh - 54px)!important;min-height:0!important;overflow:auto!important;border-left:1px solid #cbd5e1!important;border-top:0!important;box-sizing:border-box!important;background:#fff!important;}
.wht50-form-v287{width:210mm!important;height:297mm!important;min-height:297mm!important;margin:0 auto 18px!important;padding:8mm 9mm!important;background:#fff!important;color:#111!important;border:0!important;font-size:8.45px!important;line-height:1.12!important;box-sizing:border-box!important;box-shadow:0 2px 6px rgba(15,23,42,.20)!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;}
.wht50-form-v287 *{box-sizing:border-box!important;}
.wht50-form-v287 .wht-page-content{width:100%;display:block;}
.wht50-form-v287 h1{font-size:16px!important;line-height:1.05!important;text-align:center!important;color:#111!important;margin:0!important;}
.wht50-form-v287 h2{font-size:10px!important;text-align:center!important;line-height:1.05!important;margin:.6mm 0 1.2mm!important;}
.wht50-form-v287 .wht-top{display:flex!important;justify-content:space-between!important;gap:6mm!important;font-size:7.7px!important;line-height:1.12!important;margin:0!important;}
.wht50-form-v287 .wht-party,.wht50-form-v287 .wht-choice,.wht50-form-v287 .wht-table,.wht50-form-v287 .wht-baht,.wht50-form-v287 .wht-fund-row,.wht50-form-v287 .wht-tax-condition,.wht50-form-v287 .wht-sign-v287{width:100%!important;max-width:100%!important;}
.wht50-form-v287 .wht-party{border:1px solid #222!important;padding:.85mm 1mm!important;margin-top:.9mm!important;line-height:1.16!important;}
.wht50-form-v287 .tax-boxes{display:inline-flex!important;gap:1px!important;vertical-align:middle!important;margin-left:1mm!important;}
.wht50-form-v287 .tax-boxes i{display:inline-flex!important;width:4mm!important;height:4mm!important;border:1px solid #222!important;align-items:center!important;justify-content:center!important;font-style:normal!important;font-size:8px!important;}
.wht50-form-v287 .box-check{display:inline-flex!important;width:3.6mm!important;height:3.6mm!important;border:1px solid #222!important;align-items:center!important;justify-content:center!important;margin:0 .5mm!important;font-weight:bold!important;font-style:normal!important;line-height:1!important;vertical-align:middle!important;}
.wht50-form-v287 .wht-choice-v287{border:1px solid #222!important;border-top:0!important;padding:.85mm 1mm!important;line-height:1.14!important;}
.wht50-form-v287 .wht-seq{margin-bottom:.8mm!important;white-space:nowrap!important;}
.wht50-form-v287 .wht-choice-options{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;column-gap:3mm!important;row-gap:.75mm!important;align-items:center!important;}
.wht50-form-v287 .wht-choice-options span{white-space:nowrap!important;display:flex!important;align-items:center!important;}
.wht50-form-v287 .wht-table{border-collapse:collapse!important;border:1px solid #222!important;margin:0!important;table-layout:fixed!important;}
.wht50-form-v287 .wht-col-type{width:63%!important;}.wht50-form-v287 .wht-col-date{width:13%!important;}.wht50-form-v287 .wht-col-amount{width:12%!important;}.wht50-form-v287 .wht-col-tax{width:12%!important;}
.wht50-form-v287 .wht-table th,.wht50-form-v287 .wht-table td{border:1px solid #222!important;background:#fff!important;color:#111!important;padding:.62mm .58mm!important;vertical-align:top!important;line-height:1.09!important;word-break:normal!important;overflow-wrap:break-word!important;}
.wht50-form-v287 .wht-table th{text-align:center!important;font-size:8.25px!important;line-height:1.04!important;font-weight:800!important;}
.wht50-form-v287 .wht-table td:nth-child(2){text-align:center!important;}
.wht50-form-v287 .wht-table td:nth-child(3),.wht50-form-v287 .wht-table td:nth-child(4){text-align:right!important;}
.wht50-form-v287 .wht-table .indent{padding-left:3.1mm!important;}
.wht50-form-v287 .wht-table .indent2{padding-left:4.6mm!important;}
.wht50-form-v287 .wht-table .indent3{padding-left:5.8mm!important;font-size:7.75px!important;line-height:1.05!important;}
.wht50-form-v287 .wht-baht,.wht50-form-v287 .wht-fund-row,.wht50-form-v287 .wht-tax-condition{border:1px solid #222!important;border-top:0!important;padding:.72mm 1mm!important;line-height:1.12!important;}
.wht50-form-v287 .dotted-blank{display:inline-block;width:30mm;border-bottom:1px dotted #111;height:2.8mm;vertical-align:baseline;}
.wht50-form-v287 .wht-sign-v287{border:1px solid #222!important;border-top:0!important;display:grid!important;grid-template-columns:1fr 3fr!important;min-height:24mm!important;}
.wht50-form-v287 .wht-answer-box{border-right:1px solid #222!important;padding:2mm!important;font-size:8px!important;line-height:1.22!important;}
.wht50-form-v287 .wht-sign-area{display:grid!important;grid-template-columns:30mm 1fr!important;gap:4mm!important;align-items:center!important;padding:2mm!important;}
.wht50-form-v287 .wht-stamp-slot{display:flex!important;align-items:center!important;justify-content:center!important;min-height:24mm!important;}
.wht50-form-v287 .wht-stamp-slot img{max-width:28mm!important;max-height:24mm!important;object-fit:contain!important;}
.wht50-form-v287 .juristic-stamp-circle{width:24mm!important;height:24mm!important;border:1px dashed #555!important;border-radius:50%!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;font-size:7.6px!important;line-height:1.15!important;}
.wht50-form-v287 .wht-sign-text{text-align:center!important;font-size:8.1px!important;line-height:1.15!important;}
.wht50-form-v287 .wht-sign-text p{margin:1mm 0!important;}
.wht50-form-v287 .wht-footer-note{margin-top:auto!important;border-top:1px solid #222!important;padding-top:1.2mm!important;font-size:7.6px!important;line-height:1.25!important;}
@media(max-width:1100px){.doc-preview-main{grid-template-columns:1fr!important;}.doc-preview-side{display:none!important;}.doc-preview-stage{height:calc(100vh - 54px)!important;}.wht50-form-v287{min-width:210mm!important;}}
@media(max-width:900px){.doc-preview-header{min-height:52px!important;padding:8px 10px!important;}.doc-preview-main,.doc-preview-stage{height:calc(100vh - 52px)!important;}.doc-preview-stage{padding:12px!important;}.doc-preview-code{font-size:15px!important;}.doc-preview-header-actions .btn{padding:7px 10px!important;}}
@media print{body.doc-preview-body{height:auto!important;overflow:visible!important;background:#fff!important;padding:0!important;}.doc-preview-shell{height:auto!important;width:auto!important;overflow:visible!important;}.doc-preview-header,.doc-preview-side{display:none!important;}.doc-preview-main{display:block!important;height:auto!important;width:auto!important;padding:0!important;overflow:visible!important;}.doc-preview-stage{display:block!important;height:auto!important;width:auto!important;padding:0!important;overflow:visible!important;background:#fff!important;}.wht50-form-v287{width:210mm!important;height:297mm!important;min-height:297mm!important;margin:0!important;padding:8mm 9mm!important;font-size:8.25px!important;line-height:1.08!important;box-shadow:none!important;border:0!important;}.wht50-form-v287 .wht-table th,.wht50-form-v287 .wht-table td{padding:.55mm .5mm!important;line-height:1.05!important;}.wht50-form-v287 .wht-sign-v287{min-height:23mm!important;}.payslip-template-v281{width:210mm!important;height:148.5mm!important;min-height:148.5mm!important;margin:0!important;padding:8mm 10mm!important;box-shadow:none!important;border:0!important;break-after:avoid!important;page-break-after:avoid!important;}.payslip-print-body .doc-preview-stage{display:block!important;padding:0!important;}@page{size:A4;margin:0;}}

/* PTWork v2.8.13 - WHT A4 true preview/print */
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0')!important;}
body.wht-preview-body{height:100vh!important;overflow:hidden!important;background:#dfe3e8!important;margin:0!important;padding:0!important;}
.wht-preview-shell{width:100vw;min-height:100vh;display:flex;flex-direction:column;background:#dfe3e8;}
.wht-preview-toolbar{height:54px;min-height:54px;background:#fff;border-bottom:1px solid #d1d5db;display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 16px;box-sizing:border-box;z-index:80;}
.wht-preview-toolbar .doc-preview-code{font-size:17px!important;color:#1684c7!important;font-weight:800!important;}
.wht-preview-toolbar .doc-preview-header-actions{display:flex;gap:8px;align-items:center;}
.wht-preview-toolbar .btn{border-radius:6px!important;padding:8px 16px!important;}
.wht-preview-stage{width:100%;height:calc(100vh - 54px);overflow:auto;display:flex;justify-content:center;align-items:flex-start;padding:20px 12px;box-sizing:border-box;background:#dfe3e8;}
.wht-a4-document{width:210mm;height:297mm;min-height:297mm;background:#fff;color:#000;box-sizing:border-box;padding:8mm 9mm 6mm 9mm;margin:0 auto 18px;font-family:"TH Sarabun New","Sarabun",Arial,sans-serif;font-size:11.5px;line-height:1.16;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 2px 6px rgba(15,23,42,.22);}
.wht-a4-document *{box-sizing:border-box;color:#000!important;}
.wht-header-section{display:grid;grid-template-columns:1fr 1.4fr 1fr;align-items:start;gap:4mm;min-height:17mm;}
.wht-copy-text{font-size:8.6px;line-height:1.18;}
.wht-title-block{text-align:center;}
.wht-title-block h1{font-size:18px!important;line-height:1.05!important;margin:0!important;font-weight:800;}
.wht-title-block h2{font-size:11px!important;line-height:1.1!important;margin:1mm 0 0!important;font-weight:700;}
.wht-book-no{text-align:right;font-size:9.4px;line-height:1.24;}
.wht-taxpayer-section{min-height:44mm;}
.wht-party{border:1px solid #000;padding:1.25mm 1.5mm;margin-top:1.2mm;line-height:1.25;min-height:20mm;}
.tax-boxes{display:inline-flex;gap:1px;vertical-align:middle;margin-left:1.5mm;}
.tax-boxes i{display:inline-flex;width:4.3mm;height:4.3mm;border:1px solid #000;align-items:center;justify-content:center;font-style:normal;font-size:9px;line-height:1;}
.box-check{display:inline-flex;width:3.8mm;height:3.8mm;border:1px solid #000;align-items:center;justify-content:center;margin:0 .7mm;font-weight:800;font-style:normal;line-height:1;vertical-align:middle;}
.wht-form-type-section{border:1px solid #000;border-top:0;padding:1.3mm 1.5mm;min-height:13mm;}
.wht-seq{margin-bottom:1mm;white-space:nowrap;}
.wht-choice-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:3mm;row-gap:.9mm;align-items:center;}
.wht-choice-options span{white-space:nowrap;display:flex;align-items:center;}
.wht-income-table{width:100%;border-collapse:collapse;table-layout:fixed;flex:0 0 137mm;height:137mm;min-height:132mm;max-height:142mm;margin:0;border:1px solid #000;font-size:10.8px;}
.wht-income-table th,.wht-income-table td{border:1px solid #000;padding:1.05mm 1.1mm;vertical-align:top;line-height:1.16;background:#fff!important;overflow:hidden;word-break:normal;overflow-wrap:break-word;}
.wht-income-table th{text-align:center;font-size:10px;font-weight:800;line-height:1.1;}
.wht-income-table td:nth-child(2){text-align:center;}
.wht-income-table td:nth-child(3),.wht-income-table td:nth-child(4){text-align:right;}
.wht-income-table tbody tr{height:6.9mm;}
.wht-income-table tbody tr.long-row{height:12.4mm;}
.wht-income-table tbody tr.extra-long-row{height:18mm;}
.wht-income-table tbody tr.total-row{height:7.2mm;}
.wht-income-table .indent{padding-left:4.5mm;}
.wht-income-table .indent2{padding-left:6mm;}
.wht-income-table .sub-text{font-size:10.2px;line-height:1.14;}
.wht-income-table .small-text{font-size:9.3px;line-height:1.12;}
.wht-total-section,.wht-fund-row,.wht-condition-section{border:1px solid #000;border-top:0;padding:1.15mm 1.5mm;line-height:1.18;min-height:5.7mm;}
.dotted-blank{display:inline-block;width:31mm;border-bottom:1px dotted #111;height:3mm;vertical-align:baseline;}
.wht-signature-section{display:grid;grid-template-columns:25% 75%;border:1px solid #000;border-top:0;min-height:36mm;}
.wht-warning-box{border-right:1px solid #000;padding:2mm;font-size:9.5px;line-height:1.24;}
.wht-sign-area{display:grid;grid-template-columns:30mm 1fr;align-items:center;padding:2mm 4mm;gap:4mm;}
.wht-stamp-area{display:flex;align-items:center;justify-content:center;}
.wht-stamp-circle{width:26mm;height:26mm;border:1px dashed #555;border-radius:50%;display:flex;align-items:center;justify-content:center;text-align:center;font-size:8.5px;line-height:1.15;}
.wht-stamp-img{width:26mm;height:26mm;object-fit:contain;}
.wht-sign-text{text-align:center;font-size:10px;line-height:1.2;}
.wht-sign-text p{margin:1.3mm 0;}
.wht-footer-note{margin-top:auto;border-top:1px solid #000;padding-top:1.5mm;font-size:8.4px;line-height:1.2;min-height:10mm;}
@media(max-width:900px){.wht-preview-toolbar{height:52px;min-height:52px;padding:7px 10px;}.wht-preview-toolbar .btn{padding:7px 10px!important;}.wht-preview-stage{height:calc(100vh - 52px);justify-content:flex-start;padding:12px;}.wht-a4-document{min-width:210mm;margin-left:0;margin-right:0;}}
@media print{body.wht-preview-body{height:auto!important;overflow:visible!important;background:#fff!important;padding:0!important;margin:0!important;}.wht-preview-shell{display:block!important;width:auto!important;min-height:0!important;background:#fff!important;}.wht-preview-toolbar{display:none!important;}.wht-preview-stage{display:block!important;width:auto!important;height:auto!important;min-height:0!important;overflow:visible!important;padding:0!important;background:#fff!important;}.wht-a4-document{width:210mm!important;height:297mm!important;min-height:297mm!important;margin:0!important;box-shadow:none!important;border:0!important;page-break-after:avoid!important;page-break-inside:avoid!important;}.wht-income-table th,.wht-income-table td{padding:.95mm 1mm!important;line-height:1.12!important;}@page{size:A4 portrait;margin:0;}}


/* PTWork v2.8.13 - hotfix payroll document 500 and cache bust */
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0')!important;}
.payslip-print-body .payslip-template-v281{width:210mm!important;height:148.5mm!important;min-height:148.5mm!important;}
@media print{
  .payslip-print-body .doc-preview-shell,.payslip-print-body .doc-preview-main,.payslip-print-body .doc-preview-stage{height:auto!important;overflow:visible!important;background:#fff!important;padding:0!important;display:block!important;}
  .payslip-print-body .doc-preview-header,.payslip-print-body .doc-preview-side{display:none!important;}
  .payslip-print-body .payslip-template-v281{width:210mm!important;height:148.5mm!important;min-height:148.5mm!important;margin:0!important;padding:8mm 10mm!important;box-shadow:none!important;border:0!important;page-break-after:avoid!important;break-after:avoid!important;}
  @page{size:A4 portrait;margin:0;}
}


/* PTWork v2.8.13 - WHT spacing + payslip print fidelity */
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0')!important;}
.wht-a4-document{padding:7.5mm 9mm 6mm 9mm!important;font-size:11.15px!important;line-height:1.12!important;}
.wht-header-section{min-height:16mm!important;}
.wht-taxpayer-section{min-height:41mm!important;}
.wht-party{min-height:19mm!important;padding:1.05mm 1.35mm!important;line-height:1.18!important;}
.wht-form-type-section{min-height:12mm!important;padding:1mm 1.3mm!important;}
.wht-income-table{flex:0 0 138mm!important;height:138mm!important;min-height:138mm!important;max-height:138mm!important;font-size:10.2px!important;}
.wht-income-table th,.wht-income-table td{padding:.65mm .82mm!important;line-height:1.08!important;}
.wht-income-table th{font-size:9.2px!important;}
.wht-income-table tbody tr{height:5.8mm!important;}
.wht-income-table tbody tr.long-row{height:18mm!important;}
.wht-income-table tbody tr.extra-long-row{height:19.5mm!important;}
.wht-income-table tbody tr.total-row{height:6.5mm!important;}
.wht-income-table .sub-text{font-size:9.55px!important;line-height:1.08!important;}
.wht-income-table .small-text{font-size:8.75px!important;line-height:1.05!important;}
.wht-total-section,.wht-condition-section{min-height:5.2mm!important;padding:.85mm 1.25mm!important;line-height:1.08!important;}
.wht-fund-row{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:2mm!important;white-space:nowrap!important;min-height:5.2mm!important;padding:.75mm 1.05mm!important;font-size:9.55px!important;line-height:1.05!important;overflow:hidden!important;}
.wht-fund-row span{display:inline-flex!important;align-items:baseline!important;white-space:nowrap!important;min-width:0!important;}
.wht-fund-row .dotted-blank,.dotted-blank{width:18mm!important;height:2.5mm!important;vertical-align:baseline!important;}
.wht-signature-section{min-height:39mm!important;grid-template-columns:25% 75%!important;}
.wht-warning-box{font-size:9px!important;line-height:1.18!important;padding:1.8mm!important;}
.wht-sign-area{grid-template-columns:30mm 1fr!important;padding:2mm 4mm!important;align-items:center!important;}
.wht-sign-text{font-size:9.5px!important;line-height:1.18!important;}
.wht-sign-text p{margin:1.1mm 0!important;}
.wht-sign-spacer{height:10mm!important;}
.wht-footer-note{min-height:8.5mm!important;font-size:8px!important;line-height:1.12!important;padding-top:1mm!important;}
.payslip-template-v281 .ps-main td:nth-child(5):empty,.payslip-template-v281 .ps-main td:nth-child(6):empty{background:#fff!important;}
@media print{
  body.payslip-print-body{width:210mm!important;height:148.5mm!important;margin:0!important;padding:0!important;overflow:hidden!important;background:#fff!important;}
  .payslip-print-body .doc-preview-shell,.payslip-print-body .doc-preview-main,.payslip-print-body .doc-preview-stage{width:210mm!important;height:148.5mm!important;min-height:148.5mm!important;max-height:148.5mm!important;margin:0!important;padding:0!important;overflow:hidden!important;display:block!important;background:#fff!important;}
  .payslip-print-body .doc-preview-header,.payslip-print-body .doc-preview-side{display:none!important;}
  .payslip-print-body .payslip-template-v281{width:210mm!important;height:148.5mm!important;min-height:148.5mm!important;max-height:148.5mm!important;margin:0!important;padding:7mm 9mm!important;box-shadow:none!important;border:0!important;overflow:hidden!important;transform:none!important;page-break-before:avoid!important;page-break-after:avoid!important;break-before:avoid!important;break-after:avoid!important;}
  .payslip-print-body .payslip-template-v281 .ps-main th,.payslip-print-body .payslip-template-v281 .ps-main td{padding:1.15mm 1.7mm!important;}
  body.wht-preview-body{margin:0!important;padding:0!important;}
  .wht-a4-document{width:210mm!important;height:297mm!important;min-height:297mm!important;max-height:297mm!important;margin:0!important;padding:7.5mm 9mm 6mm 9mm!important;box-shadow:none!important;border:0!important;overflow:hidden!important;}
  .wht-income-table th,.wht-income-table td{padding:.6mm .78mm!important;line-height:1.05!important;}
}


/* PTWork v2.8.13 - WHT subitem font + exact payslip A4 half-page print */
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0')!important;}
/* ขยายตัวหนังสือเฉพาะรายการย่อย (1.1) ถึง (2.5) โดยไม่ลดทั้งเอกสาร */
.wht-income-table .wht-subitems,
.wht-income-table .small-text{
  font-size:9.8px!important;
  line-height:1.14!important;
  font-weight:500!important;
}
.wht-income-table tbody tr.long-row .wht-subitems{line-height:1.14!important;}

/* Pay Slip preview must remain a true half A4 canvas */
body.payslip-print-page{background:#d8dde3!important;}
body.payslip-print-page .payslip-template-v281{
  width:210mm!important;
  height:148.5mm!important;
  min-height:148.5mm!important;
  max-height:148.5mm!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  background:#fff!important;
  margin:0 auto!important;
  padding:9mm 10mm!important;
  transform:none!important;
}
body.payslip-print-page .doc-preview-main{display:grid;grid-template-columns:minmax(0,1fr) 250px;}
body.payslip-print-page .doc-preview-stage{display:flex;justify-content:center;align-items:flex-start;overflow:auto;}

@media print{
  @page{size:A4 portrait;margin:0;}
  html,body.payslip-print-page{
    width:210mm!important;
    height:297mm!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
    overflow:hidden!important;
  }
  body.payslip-print-page .no-print,
  body.payslip-print-page .doc-preview-header,
  body.payslip-print-page .doc-preview-side,
  body.payslip-print-page .print-preview-toolbar,
  body.payslip-print-page .sidebar,
  body.payslip-print-page .topbar,
  body.payslip-print-page .app-footer{
    display:none!important;
  }
  body.payslip-print-page .doc-preview-shell,
  body.payslip-print-page .doc-preview-main,
  body.payslip-print-page .doc-preview-stage{
    display:block!important;
    position:static!important;
    width:210mm!important;
    height:297mm!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
    overflow:visible!important;
    box-sizing:border-box!important;
    transform:none!important;
  }
  body.payslip-print-page .payslip-a5,
  body.payslip-print-page .payslip-template-v281{
    display:block!important;
    position:absolute!important;
    left:0!important;
    top:0!important;
    width:210mm!important;
    height:148.5mm!important;
    min-height:148.5mm!important;
    max-height:148.5mm!important;
    margin:0!important;
    padding:9mm 10mm!important;
    box-sizing:border-box!important;
    background:#fff!important;
    box-shadow:none!important;
    border:0!important;
    overflow:hidden!important;
    transform:none!important;
    zoom:1!important;
    page-break-before:avoid!important;
    page-break-inside:avoid!important;
    page-break-after:avoid!important;
    break-before:avoid!important;
    break-inside:avoid!important;
    break-after:avoid!important;
    -webkit-print-color-adjust:exact!important;
    print-color-adjust:exact!important;
  }
  body.payslip-print-page .payslip-template-v281 .ps-head{margin-bottom:4mm!important;}
  body.payslip-print-page .payslip-template-v281 .ps-employee{margin-bottom:3.5mm!important;}
  body.payslip-print-page .payslip-template-v281 .ps-main{font-size:10.2px!important;}
  body.payslip-print-page .payslip-template-v281 .ps-main th,
  body.payslip-print-page .payslip-template-v281 .ps-main td{padding:1.1mm 1.6mm!important;line-height:1.18!important;}
  body.payslip-print-page .payslip-template-v281 .ps-sign{margin-top:4mm!important;}
  body.payslip-print-page .payslip-template-v281 .ps-confidential{margin-top:3mm!important;}
  /* Keep WHT A4 rules separate and preserve the larger subitem font in print */
  body.wht-preview-body .wht-income-table .wht-subitems,
  body.wht-preview-body .wht-income-table .small-text{font-size:9.55px!important;line-height:1.12!important;}
}


/* PTWork v2.8.13 payroll pay-date + totals */
.payroll-period-edit{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-top:10px;padding-top:10px;border-top:1px solid #e5e7eb;}
.payroll-period-edit label{display:flex;flex-direction:column;gap:4px;font-weight:700;}
.payroll-total-row th,.payroll-total-row td{background:#f8fafc!important;font-weight:800!important;border-top:2px solid #3B1768!important;}
.payroll-total-row .total-label{text-align:right;color:#3B1768;}
.payroll-item-pay-date{white-space:nowrap;}
.payroll-modal-social-hidden{display:none!important;}
@media(max-width:900px){.payroll-period-edit{align-items:stretch}.payroll-period-edit label,.payroll-period-edit .btn{width:100%;}}


/* PTWork v2.8.13 - WHT dividend block, mobile filters, staff signature, payslip print-only */
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0')!important;}
.staff-signature-preview{max-width:220px;max-height:80px;object-fit:contain;border:1px solid #e5e7eb;border-radius:10px;background:#fff;padding:8px;}
.current-signature-box{background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:12px;}
.payslip-signature-img{display:inline-block;max-width:42mm;max-height:12mm;object-fit:contain;vertical-align:middle;margin-left:4mm;}
.payslip-stamp-img{display:inline-block;max-width:18mm;max-height:18mm;object-fit:contain;vertical-align:middle;margin-left:4mm;}
.wht-signature-img{display:block;max-width:45mm;max-height:16mm;object-fit:contain;margin:3mm auto 1mm;}
.wht-dividend-block{height:43mm!important;}
.wht-dividend-block td{line-height:1.15!important;}
.wht-dividend-block .indent,.wht-dividend-block .indent2{display:inline-block;}
.wht-dividend-block .wht-subitems{font-size:10.65px!important;line-height:1.18!important;font-weight:600!important;}
.wht-income-table .wht-subitems{font-size:10.65px!important;line-height:1.18!important;font-weight:600!important;}
.wht-income-table .small-text{font-size:10.3px!important;line-height:1.15!important;}
@media(max-width:900px){
  .appointment-toolbar{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;align-items:end!important;}
  .appointment-toolbar input[type="hidden"]{display:none!important;}
  .appointment-toolbar select,.appointment-toolbar label{grid-column:1 / -1!important;width:100%!important;margin:0!important;}
  .appointment-toolbar button,.appointment-toolbar .today-shortcut{grid-column:auto!important;width:100%!important;margin:0!important;text-align:center!important;justify-content:center!important;}
}

.payslip-preview-body{background:#d8dde3!important;}
.payslip-paper,.payslip-template-v281{width:210mm!important;height:148.5mm!important;min-height:148.5mm!important;max-height:148.5mm!important;box-sizing:border-box!important;background:#fff!important;overflow:hidden!important;padding:9mm 10mm!important;margin:0 auto!important;}
.payslip-preview-stage{min-height:calc(100vh - 56px);display:flex!important;justify-content:center!important;align-items:flex-start!important;padding:28px 12px!important;overflow:auto!important;background:#d8dde3!important;}
.payslip-preview-stage .payslip-paper{box-shadow:0 8px 24px rgba(15,23,42,.18)!important;}
body.payslip-print-only{background:#fff!important;margin:0!important;padding:0!important;width:210mm!important;height:297mm!important;overflow:hidden!important;}
body.payslip-print-only .payslip-paper{position:absolute!important;left:0!important;top:0!important;box-shadow:none!important;border:0!important;margin:0!important;}
@media print{
  @page{size:A4 portrait;margin:0;}
  html,body.payslip-print-page{width:210mm!important;height:297mm!important;margin:0!important;padding:0!important;background:#fff!important;overflow:hidden!important;}
  body.payslip-print-page *{box-sizing:border-box!important;}
  body.payslip-print-page .no-print,
  body.payslip-print-page .no-print-ui,
  body.payslip-print-page .doc-preview-header,
  body.payslip-print-page .doc-preview-side,
  body.payslip-print-page .print-preview-toolbar,
  body.payslip-print-page .sidebar,
  body.payslip-print-page .topbar,
  body.payslip-print-page .app-footer{display:none!important;}
  body.payslip-print-page .doc-preview-shell,
  body.payslip-print-page .doc-preview-main,
  body.payslip-print-page .doc-preview-stage,
  body.payslip-print-page .payslip-preview-stage{display:block!important;width:210mm!important;height:297mm!important;min-height:297mm!important;max-height:297mm!important;margin:0!important;padding:0!important;background:#fff!important;overflow:hidden!important;position:static!important;transform:none!important;}
  body.payslip-print-page .payslip-paper,
  body.payslip-print-page .payslip-a5,
  body.payslip-print-page .payslip-template-v281{position:absolute!important;left:0!important;top:0!important;display:block!important;width:210mm!important;height:148.5mm!important;min-height:148.5mm!important;max-height:148.5mm!important;margin:0!important;padding:9mm 10mm!important;background:#fff!important;box-shadow:none!important;border:none!important;overflow:hidden!important;transform:none!important;zoom:1!important;page-break-before:avoid!important;page-break-inside:avoid!important;page-break-after:avoid!important;break-before:avoid!important;break-inside:avoid!important;break-after:avoid!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;}
  body.payslip-print-page .payslip-paper table{width:100%!important;border-collapse:collapse!important;}
  body.payslip-print-page .payslip-paper th,
  body.payslip-print-page .payslip-paper td{padding:1.15mm 1.7mm!important;line-height:1.18!important;}
  body.payslip-print-page .ps-head{margin-bottom:4mm!important;}
  body.payslip-print-page .ps-employee{margin-bottom:3.5mm!important;}
  body.payslip-print-page .ps-main{font-size:10.2px!important;}
}

/* PTWork v2.9 - login signer, single add appointment button, safer payslip print */
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0')!important;}
.payer-signature-img{max-width:38mm!important;max-height:11mm!important;margin-left:2mm!important;}
.appointment-add-row{display:flex;justify-content:flex-start;margin:10px 0 14px;}
.appointment-add-row .btn{min-width:180px;}
@media(max-width:900px){
  .appointment-add-row .btn{width:50vw!important;max-width:50vw!important;min-width:0!important;justify-content:center!important;text-align:center!important;padding-left:8px!important;padding-right:8px!important;}
}
/* Keep payslip preview layout only on screen */
@media screen{
  body.payslip-preview-body .payslip-preview-stage{display:flex!important;justify-content:center!important;align-items:flex-start!important;padding:28px 12px!important;background:#d8dde3!important;overflow:auto!important;}
  body.payslip-preview-body .payslip-paper{width:210mm!important;height:148.5mm!important;min-height:148.5mm!important;max-height:148.5mm!important;margin:0 auto!important;padding:9mm 10mm!important;box-shadow:0 8px 24px rgba(15,23,42,.18)!important;}
}
/* Highest-priority print override for pay slip only. This must stay at the end. */
@media print{
  @page{size:A4 portrait;margin:0;}
  html,body.payslip-print-page,body.payslip-print-only{width:210mm!important;height:297mm!important;margin:0!important;padding:0!important;background:#fff!important;overflow:hidden!important;}
  body.payslip-print-page .no-print,
  body.payslip-print-page .no-print-ui,
  body.payslip-print-page .doc-preview-header,
  body.payslip-print-page .doc-preview-side,
  body.payslip-print-page .print-preview-toolbar,
  body.payslip-print-page .sidebar,
  body.payslip-print-page .topbar,
  body.payslip-print-page .app-footer{display:none!important;}
  body.payslip-print-page .doc-preview-shell,
  body.payslip-print-page .doc-preview-main,
  body.payslip-print-page .doc-preview-stage,
  body.payslip-print-page .payslip-preview-stage{display:block!important;width:210mm!important;height:297mm!important;min-height:297mm!important;max-height:297mm!important;margin:0!important;padding:0!important;background:#fff!important;overflow:hidden!important;position:static!important;transform:none!important;zoom:1!important;}
  body.payslip-print-page .payslip-paper,
  body.payslip-print-page .payslip-a5,
  body.payslip-print-page .payslip-template-v281{position:absolute!important;left:0!important;top:0!important;display:block!important;width:210mm!important;height:148.5mm!important;min-height:148.5mm!important;max-height:148.5mm!important;margin:0!important;padding:9mm 10mm!important;box-sizing:border-box!important;background:#fff!important;box-shadow:none!important;border:0!important;overflow:hidden!important;transform:none!important;zoom:1!important;page-break-before:avoid!important;page-break-inside:avoid!important;page-break-after:avoid!important;break-before:avoid!important;break-inside:avoid!important;break-after:avoid!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;}
  body.payslip-print-page .payslip-paper table{width:100%!important;border-collapse:collapse!important;}
  body.payslip-print-page .payslip-paper th,
  body.payslip-print-page .payslip-paper td{padding:1.1mm 1.6mm!important;line-height:1.18!important;}
  body.payslip-print-page .ps-head{margin-bottom:4mm!important;}
  body.payslip-print-page .ps-employee{margin-bottom:3.2mm!important;}
  body.payslip-print-page .ps-main{font-size:10.1px!important;}
  body.payslip-print-page .ps-sign{margin-top:4mm!important;}
}

/* PTWork v2.9 - nested settings menu, accounting/finance, mobile buttons, payslip print isolation */
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0')!important;}
.side-nav .nav-group{display:block;margin:2px 0;}
.side-nav .nav-parent{display:flex!important;align-items:center;}
.side-nav .nav-parent .nav-caret{margin-left:auto;opacity:.8;font-size:12px;}
.side-nav .nav-children{display:none;margin:2px 0 8px 34px;border-left:1px solid rgba(255,255,255,.18);padding-left:8px;}
.side-nav .nav-group.open .nav-children{display:block;}
.side-nav .nav-children a{font-size:13px;padding:8px 10px!important;border-radius:10px;opacity:.88;}
.side-nav .nav-children a.active{opacity:1;background:rgba(255,255,255,.18)!important;box-shadow:none!important;}
.finance-kpi-cards{grid-template-columns:repeat(3,minmax(180px,1fr));margin:12px 0 18px;}
.finance-dashboard-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:18px;align-items:stretch;}
.finance-bars{height:280px;display:flex;align-items:flex-end;gap:10px;border-bottom:1px solid #e5e7eb;padding:12px 8px 4px;}
.finance-bar-item{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;height:100%;justify-content:flex-end;}
.bar-pair{height:240px;display:flex;align-items:flex-end;gap:3px;}
.bar-pair .bar{display:block;width:11px;border-radius:5px 5px 0 0;min-height:4px;background:#cbd5e1;}
.bar-pair .income{background:#2b9ed8;}.bar-pair .expense{background:#e23b83;}
.chart-legend{display:flex;gap:14px;align-items:center;justify-content:center;margin-top:10px;color:#64748b}.dot{display:inline-block;width:10px;height:10px;border-radius:50%}.dot.income{background:#2b9ed8}.dot.expense{background:#e23b83}
.finance-cat-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}.finance-cat-list li{display:flex;justify-content:space-between;border-bottom:1px solid #eef2f7;padding:8px 0}.finance-cat-list b{color:#0f766e}.accounting-expense-form .expense-item-table{width:100%;border-collapse:collapse;margin:12px 0}.accounting-expense-form .expense-item-table th,.accounting-expense-form .expense-item-table td{border:1px solid #e5e7eb;padding:8px}.accounting-payment-section{margin-top:16px;border-top:1px solid #e5e7eb;padding-top:12px}
@media(max-width:900px){.finance-kpi-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.finance-dashboard-grid{grid-template-columns:1fr}.appointment-add-row .btn.success,.dashboard-working-card + .page-head + .appointment-toolbar + .appointment-add-row .btn.success{width:50vw!important;max-width:240px!important;min-width:150px!important}.appointment-toolbar button,.appointment-toolbar .today-shortcut{width:calc(50% - 8px)!important;flex:0 0 calc(50% - 8px)!important;justify-content:center;text-align:center}.side-nav .nav-children{margin-left:26px}}
/* v2.9 print-only payslip: keep preview CSS out of print-only page */
body.payslip-print-only-v29{background:#fff!important;margin:0!important;padding:0!important;}

/* PTWork v2.9.2 - accounting improvements */
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0')!important;}
.finance-pie-wrap{display:grid;grid-template-columns:220px 1fr;gap:18px;align-items:center}.finance-pie{width:210px;height:210px;border-radius:50%;position:relative;box-shadow:inset 0 0 0 1px rgba(15,23,42,.06)}.finance-pie:after{content:'';position:absolute;inset:54px;border-radius:50%;background:#fff}.finance-cat-list li span{display:flex;align-items:center;gap:8px}.finance-cat-list li i{display:inline-block;width:10px;height:10px;border-radius:50%}.accounting-expense-form .expense-item-table th,.accounting-expense-form .expense-item-table td{vertical-align:top}.accounting-expense-form .expense-item-table input,.accounting-expense-form .expense-item-table select{min-width:110px}.actions .inline{display:inline}.status-pill{display:inline-flex;border-radius:999px;padding:4px 8px;background:#eef2ff;color:#3730a3;font-weight:700}.nav-group.active>.nav-parent{background:linear-gradient(135deg,rgba(255,255,255,.24),rgba(255,255,255,.12));color:#fff;font-weight:800}
@media(max-width:900px){.finance-pie-wrap{grid-template-columns:1fr}.finance-pie{margin:auto}.accounting-expense-form .expense-item-table{min-width:980px}.accounting-expense-form{overflow:auto}}


/* PTWork v2.9.2 accounting upload, filters, vendors, WHT cleanup */
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0')!important;}
.accounting-filter,.wht-list-filter{display:flex;align-items:end;gap:10px;flex-wrap:wrap}.accounting-filter .btn-small,.wht-list-filter .btn-small{align-self:end}
.accounting-dropzone{border:2px dashed #a5b4fc!important;background:#f8fafc!important;border-radius:16px!important;min-height:136px;display:flex!important;align-items:center!important;justify-content:center!important;flex-direction:column!important;gap:6px!important;text-align:center!important;cursor:pointer;color:#334155;position:relative;padding:18px!important}.accounting-dropzone.dragover{background:#eef2ff!important;border-color:#4f46e5!important}.accounting-dropzone input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer}.dropzone-icon{font-size:30px}.accounting-dropzone ul{margin:6px 0 0;padding-left:18px;text-align:left;max-width:100%;font-size:12px;color:#475569}.vendor-form-card .form-grid,.vendor-form{grid-template-columns:repeat(2,minmax(220px,1fr))}.vendor-form .span2{grid-column:span 2}.wht-list-filter input[type=month]{min-width:160px}.wht-dividend-block .wht-subitems{font-size:10.85px!important;line-height:1.2!important}.wht-dividend-block td{border-top:1px solid #111!important;border-bottom:1px solid #111!important}.wht-dividend-block td+td{border-left:1px solid #111!important}.wht-fund-row{white-space:nowrap;display:flex!important;gap:8px!important;align-items:center!important;justify-content:space-between!important}.wht-fund-row .dotted-blank{display:inline-block;min-width:28mm;border-bottom:1px dotted #111;height:1em;vertical-align:baseline}
@media(max-width:900px){.vendor-form-card .form-grid,.vendor-form{grid-template-columns:1fr}.vendor-form .span2{grid-column:auto}.accounting-filter .btn-small,.wht-list-filter .btn-small{width:calc(50% - 8px);text-align:center;justify-content:center}.accounting-dropzone{min-height:110px}}


/* PTWork v2.9.5 - accounting WHT signature, finance bar hover, certificate menu */
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0')!important;}
.bar-pair .bar{position:relative;cursor:default;}
.bar-pair .bar:hover{filter:brightness(1.08);box-shadow:0 0 0 2px rgba(15,23,42,.08);}
.wht-signature-img{display:block;max-width:48mm;max-height:14mm;object-fit:contain;margin:2mm auto 1mm;}
.wht-sign-text .wht-signature-img + p{margin-top:1mm;}

/* PTWork v2.9.5 - accounting assets, journals, medical certificate, chart tooltip */
.nav-children .nav-sub-title{font-size:12px;font-weight:800;color:rgba(255,255,255,.72);padding:10px 18px 4px;margin-top:4px;border-top:1px solid rgba(255,255,255,.08)}
.finance-bars .bar{position:relative;cursor:pointer}
.finance-bars .bar:hover::after{content:attr(title);position:absolute;left:50%;bottom:calc(100% + 8px);transform:translateX(-50%);white-space:nowrap;background:#111827;color:#fff;padding:6px 9px;border-radius:8px;font-size:12px;font-weight:700;box-shadow:0 10px 24px rgba(15,23,42,.18);z-index:20}
.finance-bars .bar:hover::before{content:"";position:absolute;left:50%;bottom:100%;transform:translateX(-50%);border:5px solid transparent;border-top-color:#111827;z-index:21}
.dropdown{position:relative;display:inline-block}.dropdown-menu{display:none;position:absolute;right:0;top:100%;background:#fff;border:1px solid #e5e7eb;border-radius:10px;box-shadow:0 18px 38px rgba(15,23,42,.18);min-width:220px;z-index:50;overflow:hidden}.dropdown:hover .dropdown-menu{display:block}.dropdown-menu a{display:block;padding:12px 16px;color:#0f172a;text-decoration:none}.dropdown-menu a:hover{background:#f1f5f9}.legend-dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-left:14px;margin-right:4px;background:#38bdf8}.legend-dot.hold{background:#f59e0b}.legend-dot.danger{background:#ef4444}
.asset-form input,.asset-form select,.asset-form textarea,.journal-form input,.journal-form select,.journal-form textarea{width:100%}.journal-tabs{gap:8px;flex-wrap:wrap}.journal-tabs .primary{background:#2b9ed8;color:#fff}.finance-kpi-cards .card small{display:block;margin-top:4px}.asset-filter{align-items:center;gap:8px}
.medical-cert-body{background:#dfe3e8;margin:0;font-family:"TH Sarabun New","Sarabun",Tahoma,sans-serif;color:#111}.cert-preview-toolbar{height:52px;background:#fff;border-bottom:1px solid #d1d5db;display:flex;justify-content:flex-end;gap:10px;align-items:center;padding:8px 18px;position:sticky;top:0;z-index:10}.medical-cert-a4{width:210mm;height:297mm;background:#fff;margin:18px auto;padding:24mm 26mm 16mm;box-sizing:border-box;position:relative;overflow:hidden;box-shadow:0 8px 30px rgba(15,23,42,.18);font-size:18px;line-height:1.45}.medical-cert-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:24mm}.medical-cert-clinic{display:flex;gap:10mm;align-items:flex-start}.medical-cert-clinic img{width:22mm;height:22mm;object-fit:contain}.medical-cert-clinic b{font-size:19px}.medical-cert-clinic p{margin:0;line-height:1.28}.medical-cert-no{font-size:18px;margin-top:3mm}.medical-cert-title{text-align:center;margin-bottom:18mm}.medical-cert-title h1{font-size:22px;margin:0 0 2mm}.medical-cert-title h2{font-size:20px;margin:0;font-weight:500;letter-spacing:.4px}.medical-cert-content p{margin:5.5mm 0}.cert-fill{display:inline-block;min-width:38mm;border-bottom:1px dotted #111;padding:0 4mm;text-align:center;line-height:1.2}.cert-long-lines{min-height:20mm;border-bottom:1px dotted #111;line-height:1.6;white-space:pre-wrap;padding:2mm 0}.cert-long-lines::before{content:"";display:block;border-top:1px dotted #111;margin-bottom:7mm}.cert-long-lines.three{min-height:26mm}.cert-section-title{margin-top:14mm;margin-bottom:4mm;font-weight:700}.medical-cert-sign{position:absolute;right:30mm;bottom:39mm;width:68mm;text-align:center;font-size:18px}.medical-cert-sign p{margin:2mm 0}.medical-signature-img{max-width:42mm;max-height:18mm;object-fit:contain;display:block;margin:0 auto -2mm}.medical-cert-note{position:absolute;left:26mm;right:26mm;bottom:18mm;font-size:15px}
@media print{.medical-cert-body{background:#fff}.cert-preview-toolbar{display:none!important}.medical-cert-a4{width:210mm!important;height:297mm!important;margin:0!important;padding:24mm 26mm 16mm!important;box-shadow:none!important;page-break-inside:avoid!important;break-inside:avoid!important}@page{size:A4 portrait;margin:0}}


/* PTWork v2.9.5 */
.finance-bars-v295 .bar-pair{height:240px;align-items:flex-end;}
.finance-bars-v295 .bar{min-height:0;}
.finance-bars-v295 .bar[style*="height:0"]{display:none;}
.num{text-align:right;white-space:nowrap;}
.inline{display:inline;}

/* PTWork v2.9.7 */
.text-danger{color:#dc2626!important;font-weight:800}.text-success{color:#16a34a!important;font-weight:800}.status-pill.success{background:#dcfce7!important;color:#166534!important}.journal-entry-table tfoot th{background:#f8fafc;border-top:2px solid #cbd5e1!important;text-align:right}.journal-entry-table .money-input{text-align:right;font-variant-numeric:tabular-nums}.journal-form .btn.success:disabled{opacity:.45;cursor:not-allowed}.side-nav .nav-sub-title{font-size:12px;opacity:.72;padding:8px 16px 4px 48px;font-weight:800;color:#cbd5e1}.finance-bars-v296 .bar-pair,.finance-bars-v295 .bar-pair{height:240px!important;display:flex;align-items:flex-end;gap:4px}.finance-bars-v296 .bar,.finance-bars-v295 .bar{width:13px;border-radius:8px 8px 0 0;display:inline-block;position:relative}.finance-bars-v296 .bar.income,.finance-bars-v295 .bar.income{background:#2b9ed8}.finance-bars-v296 .bar.expense,.finance-bars-v295 .bar.expense{background:#e23b83}.finance-bars-v296 .bar:hover::after,.finance-bars-v295 .bar:hover::after{content:attr(title);position:absolute;left:50%;bottom:calc(100% + 8px);transform:translateX(-50%);white-space:nowrap;background:#111827;color:#fff;padding:6px 9px;border-radius:8px;font-size:12px;font-weight:700;box-shadow:0 10px 24px rgba(15,23,42,.18);z-index:20}.finance-bars-v296 .bar:hover::before,.finance-bars-v295 .bar:hover::before{content:"";position:absolute;left:50%;bottom:100%;transform:translateX(-50%);border:5px solid transparent;border-top-color:#111827;z-index:21}
.medical-cert-v296-body{background:#e5e7eb!important;margin:0!important;font-family:"TH Sarabun New","Sarabun",Tahoma,sans-serif;color:#111}.medical-cert-v296{width:210mm!important;height:297mm!important;background:#fff;margin:16px auto!important;padding:26mm 26mm 18mm!important;box-sizing:border-box;position:relative;overflow:hidden;box-shadow:0 8px 30px rgba(15,23,42,.18);font-size:18px;line-height:1.34}.medical-cert-v296 .mc-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:34mm}.medical-cert-v296 .mc-clinic{display:flex;gap:10mm;align-items:flex-start}.medical-cert-v296 .mc-clinic img{width:22mm;height:22mm;object-fit:contain}.medical-cert-v296 .mc-clinic b{font-size:19px;font-weight:800}.medical-cert-v296 .mc-clinic p{margin:0;line-height:1.28}.medical-cert-v296 .mc-number{font-size:18px;margin-top:2mm}.medical-cert-v296 .mc-title{text-align:center;margin-bottom:24mm}.medical-cert-v296 .mc-title h1{font-size:23px;margin:0 0 1mm;font-weight:800}.medical-cert-v296 .mc-title h2{font-size:21px;margin:0;font-weight:500;letter-spacing:.4px}.medical-cert-v296 .mc-content{font-size:18px}.medical-cert-v296 .mc-row{display:flex;align-items:baseline;gap:5mm;margin:4.3mm 0;white-space:nowrap}.medical-cert-v296 .center-row{justify-content:center}.medical-cert-v296 .indent-row{padding-left:16mm}.medical-cert-v296 .issue-row{margin-top:13mm}.medical-cert-v296 .mc-value{display:inline-block;min-width:42mm;border-bottom:1px dotted #111;text-align:center;padding:0 3mm;line-height:1.08;white-space:normal}.medical-cert-v296 .mc-value.wide{min-width:70mm}.medical-cert-v296 .mc-label{margin-top:4mm}.medical-cert-v296 .mc-dotted-lines{white-space:pre-wrap;line-height:1.55}.medical-cert-v296 .mc-dotted-lines:before,.medical-cert-v296 .mc-dotted-lines:after{content:"";display:block;border-top:1px dotted #111;height:8mm}.medical-cert-v296 .mc-dotted-lines.three-lines:before,.medical-cert-v296 .mc-dotted-lines.three-lines:after{height:7mm}.medical-cert-v296 .mc-section-title{font-weight:700;margin:12mm 0 3mm}.medical-cert-v296 .mc-signature{position:absolute;right:29mm;bottom:43mm;width:76mm;text-align:center;font-size:18px}.medical-cert-v296 .mc-signature p{margin:2.2mm 0}.medical-cert-v296 .medical-signature-img{max-width:42mm;max-height:18mm;object-fit:contain;display:block;margin:0 auto -2mm}.medical-cert-v296 .mc-note{position:absolute;left:26mm;right:26mm;bottom:18mm;font-size:15px;white-space:nowrap}
@media print{.medical-cert-v296-body{background:#fff!important}.cert-preview-toolbar{display:none!important}.medical-cert-v296{width:210mm!important;height:297mm!important;margin:0!important;padding:26mm 26mm 18mm!important;box-shadow:none!important;page-break-inside:avoid!important;break-inside:avoid!important}@page{size:A4 portrait;margin:0}}
@media(max-width:900px){.side-nav .nav-sub-title{padding-left:38px}.journal-entry-table{min-width:760px}}


/* PTWork v2.9.7 */
.medical-preview-stage{min-height:calc(100vh - 58px);background:#dfe3e8;display:flex;justify-content:center;align-items:flex-start;padding:18px 12px;overflow:auto}.medical-cert-a4-v297{width:210mm;height:297mm;background:#fff;box-sizing:border-box;margin:0 auto;padding:24mm 26mm 18mm;position:relative;overflow:hidden;box-shadow:0 8px 30px rgba(15,23,42,.18);font-family:"TH Sarabun New","Sarabun",Tahoma,sans-serif;color:#111;font-size:19px;line-height:1.32}.mc297-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:23mm}.mc297-clinic{display:flex;gap:8mm;align-items:flex-start}.mc297-clinic img{width:22mm;height:22mm;object-fit:contain}.mc297-clinic b{font-size:21px}.mc297-clinic p{margin:0;line-height:1.18}.mc297-no{font-size:18px;line-height:1.4;margin-right:10mm}.mc297-title{text-align:center;margin-bottom:17mm}.mc297-title h1{font-size:23px;color:#2b164d;margin:0 0 1mm;font-weight:900}.mc297-title h2{font-size:20px;margin:0;font-family:Georgia,"Times New Roman",serif;font-weight:500;letter-spacing:.2px}.mc297-content p{margin:3.6mm 0}.mc297-centerline{text-align:center}.mc297-fill{display:inline-block;border-bottom:1px dotted #111;min-width:30mm;text-align:center;padding:0 2.5mm;line-height:1.08}.mc297-fill.tiny{min-width:18mm}.mc297-fill.small{min-width:30mm}.mc297-fill.medium{min-width:48mm}.mc297-fill.large{min-width:74mm}.mc297-fill.xlarge{min-width:110mm;text-align:left}.mc297-gap{height:4mm}.mc297-label{margin-top:5mm!important}.mc297-label.strong{font-weight:900;margin-top:12mm!important}.mc297-indent{padding-left:17mm}.mc297-lines{white-space:pre-wrap;line-height:1.4;min-height:22mm;background:repeating-linear-gradient(to bottom, transparent 0, transparent 9.2mm, #111 9.2mm, #111 9.45mm);background-size:100% 9.45mm}.mc297-lines.two{min-height:19mm}.mc297-lines.three{min-height:29mm}.mc297-issue{margin-top:12mm!important}.mc297-sign{position:absolute;right:28mm;bottom:43mm;width:76mm;text-align:center;font-size:18px}.mc297-sign p{margin:1.8mm 0}.mc297-note{position:absolute;left:26mm;right:26mm;bottom:18mm;font-size:15px;white-space:nowrap}.medical-signature-img{max-width:42mm;max-height:18mm;object-fit:contain;display:block;margin:0 auto -2mm}
@media print{body.medical-cert-preview-body{background:#fff!important;margin:0!important;padding:0!important}.medical-cert-preview-body .doc-preview-header{display:none!important}.medical-preview-stage{display:block!important;background:#fff!important;min-height:0!important;padding:0!important;overflow:visible!important}.medical-cert-a4-v297{width:210mm!important;height:297mm!important;margin:0!important;padding:24mm 26mm 18mm!important;box-shadow:none!important;page-break-inside:avoid!important;break-inside:avoid!important}@page{size:A4 portrait;margin:0}}
@media(max-width:900px){.medical-preview-stage{justify-content:flex-start}.medical-cert-a4-v297{min-width:210mm}.expense-dashboard-link{display:none!important}}


/* PTWork v2.9.8 - medical certificate compact + accounting auto journals support */
.medical-cert-a4-v297{
  font-size:11.4px!important;
  line-height:1.32!important;
  padding:24mm 26mm 18mm!important;
}
.medical-cert-a4-v297 .mc297-header{margin-bottom:22mm!important;}
.medical-cert-a4-v297 .mc297-clinic b{font-size:13px!important;}
.medical-cert-a4-v297 .mc297-clinic p{font-size:11.4px!important;line-height:1.22!important;}
.medical-cert-a4-v297 .mc297-no{font-size:11.4px!important;}
.medical-cert-a4-v297 .mc297-title{margin-bottom:16mm!important;}
.medical-cert-a4-v297 .mc297-title h1{font-size:13.8px!important;}
.medical-cert-a4-v297 .mc297-title h2{font-size:12px!important;}
.medical-cert-a4-v297 .mc297-content p{margin:3.2mm 0!important;}
.medical-cert-a4-v297 .mc297-fill{padding:0 2mm!important;}
.medical-cert-a4-v297 .mc297-label.strong{margin-top:11mm!important;}
.medical-cert-a4-v297 .mc297-lines{line-height:1.35!important;min-height:18mm!important;background:repeating-linear-gradient(to bottom, transparent 0, transparent 7.5mm, #111 7.5mm, #111 7.72mm)!important;background-size:100% 7.72mm!important;}
.medical-cert-a4-v297 .mc297-lines.two{min-height:16mm!important;}
.medical-cert-a4-v297 .mc297-lines.three{min-height:25mm!important;}
.medical-cert-a4-v297 .mc297-sign{font-size:11.4px!important;bottom:42mm!important;}
.medical-cert-a4-v297 .mc297-note{font-size:9px!important;}
@media print{
  .medical-cert-a4-v297{font-size:11.4px!important;line-height:1.32!important;padding:24mm 26mm 18mm!important;}
}

/* PTWork v2.9.10 - medical certificate smaller, journal/trial balance/expense filters */
.medical-cert-a4-v297{font-size:10.25px!important;line-height:1.30!important;}
.medical-cert-a4-v297 .mc297-clinic b{font-size:11.7px!important;}
.medical-cert-a4-v297 .mc297-clinic p,.medical-cert-a4-v297 .mc297-no{font-size:10.25px!important;}
.medical-cert-a4-v297 .mc297-title h1{font-size:12.4px!important;}
.medical-cert-a4-v297 .mc297-title h2{font-size:10.8px!important;}
.medical-cert-a4-v297 .mc297-content p{margin:2.9mm 0!important;}
.medical-cert-a4-v297 .mc297-sign{font-size:10.25px!important;}
.medical-cert-a4-v297 .mc297-note{font-size:8.1px!important;}
.status-pill.danger,.badge.danger{background:#fee2e2!important;color:#991b1b!important;}
.trial-report-company.print-only{display:none;}
.trial-balance-table .tb-row-asset{background:#eef6ff;}
.trial-balance-table .tb-row-contra_asset{background:#f5f3ff;}
.trial-balance-table .tb-row-liability{background:#fff7ed;}
.trial-balance-table .tb-row-equity{background:#ecfdf5;}
.trial-balance-table .tb-row-income{background:#eff6ff;}
.trial-balance-table .tb-row-expense{background:#fff1f2;}
.trial-balance-table .trial-total-row{background:#e5e7eb;font-weight:800;}
.accounting-expense-filter input[name="q"]{min-width:260px;}
@media print{
  .no-print,.sidebar,.topbar,.app-footer,.toolbar{display:none!important;}
  .main{width:100%!important;margin:0!important;display:block!important;}
  .content{padding:10mm!important;background:#fff!important;}
  .trial-report-company.print-only{display:block!important;text-align:center;margin-bottom:8mm;}
  .trial-report-company h2{margin:0;font-size:18px;}
  .trial-report-company p{margin:2mm 0 0;font-size:13px;}
  .trial-balance-card{box-shadow:none!important;border:0!important;padding:0!important;}
  .trial-balance-table{font-size:11px!important;width:100%!important;border-collapse:collapse!important;}
  .trial-balance-table th,.trial-balance-table td{border:1px solid #111!important;padding:3px 5px!important;}
  .trial-balance-print-head{display:none!important;}
}


/* PTWork v2.9.10 financial statements */
.financial-report-page{max-width:960px;margin:18px auto;padding:28px 34px;background:#fff;color:#111;box-shadow:0 10px 30px rgba(15,23,42,.08);}
.financial-report-head{text-align:center;margin-bottom:22px;line-height:1.35;}
.financial-report-head h2{font-size:22px;margin:0;color:#111;}
.financial-report-head h3{font-size:20px;margin:18px 0 4px;color:#111;}
.financial-report-head p{margin:2px 0;color:#334155;}
.financial-statement-table{width:100%;border-collapse:collapse;font-size:14px;}
.financial-statement-table th,.financial-statement-table td{border-bottom:1px solid #e5e7eb;padding:9px 10px;}
.financial-statement-table .num{text-align:right;white-space:nowrap;}
.statement-section th{background:#eef6fb;color:#0e7490;text-align:left;border-top:2px solid #38bdf8;}
.statement-total th,.statement-total td{background:#f8fafc;font-weight:800;border-top:1px solid #cbd5e1;}
.statement-grand-total th,.statement-grand-total td{background:#f1f5f9;font-size:16px;font-weight:900;border-top:2px solid #334155;border-bottom:3px double #334155;}
.financial-position-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px;align-items:start;}
.financial-report-sign{display:flex;justify-content:space-between;gap:20px;margin-top:42px;font-size:13px;color:#334155;}
.wht-a4-document .wht-dividend-block .wht-subitems{font-size:inherit!important;line-height:1.22!important;}

/* Payroll WHT 50: match the verified A4 proportions used by the accounting WHT certificate. */
body.wht-payroll-preview .wht-header-section{grid-template-columns:1.42fr 1.26fr .82fr!important;}
body.wht-payroll-preview .wht-title-block{min-width:0!important;}
body.wht-payroll-preview .wht-title-block h1{font-size:16.8px!important;line-height:1.05!important;white-space:nowrap;}
body.wht-payroll-preview .wht-title-block h2{font-size:10.5px!important;line-height:1.1!important;}
body.wht-payroll-preview .wht-book-no{font-size:13.2px!important;line-height:1.24!important;}
body.wht-payroll-preview .wht-taxpayer-section{min-height:50mm!important;}
body.wht-payroll-preview .wht-party{padding:1mm 1.4mm!important;line-height:1.32!important;font-size:13.5px!important;}
body.wht-payroll-preview .wht-party-row1,body.wht-payroll-preview .wht-party-row2{display:flex;align-items:baseline;justify-content:space-between;gap:2mm;min-width:0;}
body.wht-payroll-preview .wht-party-row1>span:first-child,body.wht-payroll-preview .wht-party-row2>span:first-child{min-width:0;}
body.wht-payroll-preview .wht-party-row3{line-height:1.22;}
body.wht-payroll-preview .wht-party-taxid{display:flex;align-items:center;gap:1mm;flex:none;font-size:10.6px;line-height:1.32;white-space:nowrap;}
body.wht-payroll-preview .wht-party-caption{font-size:9.2px;line-height:1.15;margin:.2mm 0 .5mm;}
body.wht-payroll-preview .tax-boxes{display:flex;gap:1px;vertical-align:middle;margin-left:1mm;}
body.wht-payroll-preview .tax-boxes i{display:flex;width:3.5mm;height:3.5mm;border:1px solid #000;align-items:center;justify-content:center;font-style:normal;font-size:10.3px;line-height:1;}
body.wht-payroll-preview .tax-box-sep{display:flex;align-items:center;justify-content:center;font-size:10.6px;font-weight:400;}
body.wht-payroll-preview .tax-boxes-blank{min-width:42.5mm;}
body.wht-payroll-preview .wht-form-type-section{min-height:15mm!important;}
body.wht-payroll-preview .wht-income-table{flex:0 0 118mm!important;height:118mm!important;min-height:118mm!important;max-height:118mm!important;font-size:12.2px!important;}
body.wht-payroll-preview .wht-income-table th{font-size:12.2px!important;}
body.wht-payroll-preview .wht-income-table tbody tr{height:5.2mm!important;}
body.wht-payroll-preview .wht-income-table tbody tr.total-row{height:6.5mm!important;}
body.wht-payroll-preview .wht-income-table tbody tr.long-row{height:20mm!important;}
body.wht-payroll-preview .wht-income-table tbody tr.extra-long-row{height:17mm!important;}
body.wht-payroll-preview .wht-income-table .wht-subitems{font-size:12.65px!important;line-height:1.16!important;font-weight:normal!important;}
body.wht-payroll-preview .wht-income-table .small-text{font-size:12.3px!important;line-height:1.12!important;}
body.wht-payroll-preview .wht-fill-line{display:inline-block;min-width:55mm;border-bottom:1px dotted #000;}
body.wht-payroll-preview .wht-income-table tbody tr:not(.total-row) td:first-child{border-bottom:0!important;}
body.wht-payroll-preview .wht-income-table tbody tr:not(.total-row) + tr:not(.total-row) td:first-child{border-top:0!important;}
body.wht-payroll-preview .wht-signature-section{min-height:50mm!important;}
body.wht-payroll-preview .wht-warning-box{font-size:12px!important;line-height:1.18!important;}
body.wht-payroll-preview .wht-sign-area{font-size:11.15px!important;line-height:1.12!important;}
body.wht-payroll-preview .wht-sign-text{font-size:11.5px!important;line-height:1.18!important;}
body.wht-payroll-preview .wht-footer-note{font-size:10px!important;line-height:1.12!important;}
body.wht-payroll-preview .wht-copy-text{font-size:8.6px!important;line-height:1.35!important;letter-spacing:-.1px;white-space:nowrap;}
@media(max-width:900px){.financial-position-grid{grid-template-columns:1fr}.financial-report-page{padding:18px 14px}.financial-report-sign{display:block;line-height:2.2}}
@media print{.no-print,.sidebar,.topbar,.app-footer{display:none!important}.main,.content{margin:0!important;padding:0!important;background:#fff!important}.financial-report-page{max-width:none!important;width:190mm!important;min-height:270mm!important;margin:0 auto!important;padding:12mm 10mm!important;box-shadow:none!important;border:0!important}.financial-report-head h2{font-size:18px!important}.financial-report-head h3{font-size:17px!important}.financial-statement-table{font-size:12px!important}.financial-statement-table th,.financial-statement-table td{padding:6px 7px!important}.financial-report-sign{margin-top:30px!important}@page{size:A4 portrait;margin:10mm}}

/* PTWork v2.9.11 - General Ledger / Audit trail */
.status-pill.info{background:#dbeafe!important;color:#1d4ed8!important;}
.status-pill.warning,.badge.warning{background:#fef3c7!important;color:#92400e!important;}
.journal-status-tabs{gap:6px;flex-wrap:wrap;}
.journal-status-draft{background:#fffef2;}
.journal-status-approved,.journal-status-posted{background:#f0fdf4;}
.journal-status-cancelled{background:#fff1f2;color:#991b1b;text-decoration:line-through;}
.journal-list-table .actions{white-space:nowrap;}
.gl-account-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;}
.gl-table{width:100%;border-collapse:collapse;}
.gl-table th,.gl-table td{border-bottom:1px solid #e5e7eb;padding:8px 10px;vertical-align:top;}
.gl-table .num{text-align:right;white-space:nowrap;}
.gl-opening,.gl-table .trial-total-row{background:#f8fafc;font-weight:800;}
.gl-report-card{padding:18px;}
@media print{
  .gl-report-card{box-shadow:none!important;border:0!important;padding:0!important;}
  .gl-account-head{display:block!important;text-align:left;margin:0 0 4mm!important;}
  .gl-table{font-size:11px!important;width:100%!important;border-collapse:collapse!important;}
  .gl-table th,.gl-table td{border:1px solid #111!important;padding:3px 5px!important;}
}

/* PTWork v2.9.12 accounting period / GL print */
.period-status-open{background:#f0fdf4}.period-status-locked{background:#fffbeb}.period-status-closed{background:#fef2f2}.accounting-period-table td{vertical-align:middle}.gl-filter-form input[name="account_code_from"],.gl-filter-form input[name="account_code_to"]{max-width:120px}.gl-account-section{page-break-inside:avoid}.gl-page-break{break-before:page;page-break-before:always}.gl-account-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.status-pill.warning{background:#fef3c7;color:#92400e}.kpi-grid.small{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.kpi-grid.small .card strong{display:block;font-size:24px;color:#2b91c5;margin-top:6px}
@media(max-width:900px){.kpi-grid.small{grid-template-columns:repeat(2,minmax(0,1fr))}.gl-account-head{display:block}.accounting-period-table .actions form{display:block;margin:4px 0}}
@media print{.gl-page-break{break-before:page!important;page-break-before:always!important}.gl-report-card{box-shadow:none!important;border:0!important;margin:0!important;padding:0!important}.gl-table{font-size:11px}.gl-account-head{margin-top:8px}.toolbar,.page-head.no-print,.no-print{display:none!important}}

/* PTWork v2.9.14 - VAT/WHT/Payroll tax, trial print, GL range dropdown, accounting two-level rail */
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0')!important;}
.inline-check{display:flex!important;align-items:center!important;gap:8px!important;min-width:260px!important;}
.inline-check input[type="checkbox"]{width:auto!important;min-width:0!important;}
.tax-report-page .tax-submission-form{margin-top:18px;border:1px solid #dbeafe;background:#f8fbff;border-radius:12px;padding:14px;}
.form-inline-grid{display:grid;grid-template-columns:repeat(5,minmax(140px,1fr));gap:10px;align-items:end;}
.form-inline-grid button{height:42px;align-self:end;}
.trial-balance-table a{color:inherit!important;text-decoration:none!important;pointer-events:none!important;}
.trial-balance-table .tb-row-asset td,.trial-balance-table .tb-row-asset th{background:#eaf5ff!important;}
.trial-balance-table .tb-row-contra_asset td,.trial-balance-table .tb-row-contra_asset th{background:#f3edff!important;}
.trial-balance-table .tb-row-liability td,.trial-balance-table .tb-row-liability th{background:#fff2df!important;}
.trial-balance-table .tb-row-equity td,.trial-balance-table .tb-row-equity th{background:#e8fbf0!important;}
.trial-balance-table .tb-row-income td,.trial-balance-table .tb-row-income th{background:#edf7ff!important;}
.trial-balance-table .tb-row-expense td,.trial-balance-table .tb-row-expense th{background:#fff0f3!important;}
.trial-balance-table .trial-total-row th{background:#dbeafe!important;color:#0f172a!important;}
.gl-filter-form select[name="account_code_from"],.gl-filter-form select[name="account_code_to"]{min-width:250px!important;max-width:320px!important;}
@media(min-width:901px){
  body[class*="route-accounting"] .sidebar{width:86px!important;padding:14px 10px!important;overflow:visible!important;}
  body[class*="route-accounting"] .main{margin-left:306px!important;}
  body[class*="route-accounting"] .app-brand{min-height:72px!important;padding:6px 4px 14px!important;justify-content:center!important;}
  body[class*="route-accounting"] .webapp-logo{max-width:64px!important;max-height:54px!important;object-fit:contain!important;}
  body[class*="route-accounting"] .side-nav>a span:not(.nav-icon),
  body[class*="route-accounting"] .nav-parent>span:not(.nav-icon){display:none!important;}
  body[class*="route-accounting"] .side-nav a{justify-content:center!important;padding:12px 8px!important;}
  body[class*="route-accounting"] .side-nav .nav-icon{margin:0!important;font-size:22px!important;min-width:34px!important;}
  body[class*="route-accounting"] .side-nav .nav-group.open>.nav-children{display:block!important;position:fixed!important;left:86px!important;top:0!important;bottom:0!important;width:220px!important;margin:0!important;padding:18px 12px!important;background:linear-gradient(180deg,#f8fafc,#eef6ff)!important;border-right:1px solid #dbeafe!important;border-left:0!important;box-shadow:12px 0 28px rgba(15,23,42,.10)!important;z-index:28!important;overflow:auto!important;}
  body[class*="route-accounting"] .side-nav .nav-group.open>.nav-children a{display:flex!important;justify-content:flex-start!important;color:#334155!important;background:transparent!important;border-radius:10px!important;font-size:14px!important;font-weight:700!important;box-shadow:none!important;padding:9px 12px!important;}
  body[class*="route-accounting"] .side-nav .nav-group.open>.nav-children a.active{background:#dbeafe!important;color:#075985!important;}
  body[class*="route-accounting"] .nav-children .nav-sub-title{color:#0f172a!important;border-top:1px solid #dbeafe!important;margin-top:8px!important;padding:12px 12px 5px!important;}
}
@media(max-width:900px){.form-inline-grid{grid-template-columns:1fr}.gl-filter-form select[name="account_code_from"],.gl-filter-form select[name="account_code_to"]{min-width:0!important;max-width:none!important;width:100%!important;}}
@media print{
  .trial-balance-table td:first-child,.trial-balance-table td:nth-child(2){font-weight:700!important;color:#111!important;text-decoration:none!important;}
  .trial-balance-table .tb-row-asset td{background:#eaf5ff!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;}
  .trial-balance-table .tb-row-contra_asset td{background:#f3edff!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;}
  .trial-balance-table .tb-row-liability td{background:#fff2df!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;}
  .trial-balance-table .tb-row-equity td{background:#e8fbf0!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;}
  .trial-balance-table .tb-row-income td{background:#edf7ff!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;}
  .trial-balance-table .tb-row-expense td{background:#fff0f3!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;}
}

/* PTWork v2.9.14 - Asset lifecycle and GL zero rows */
.mini-bars{display:flex;align-items:flex-end;gap:10px;min-height:130px;padding:12px 4px 4px;overflow:auto}
.mini-bar{min-width:56px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:4px;color:#475569;font-size:12px}
.mini-bar span{width:22px;background:#8b5cf6;border-radius:8px 8px 0 0;display:block;min-height:3px}
.mini-bar small{white-space:nowrap;font-size:11px;color:#64748b}
.asset-filter a.btn-small{margin-right:4px}
@media print{.gl-report-card.gl-page-break{page-break-before:always;break-before:page}.gl-report-card{box-shadow:none!important;border:0!important}.asset-filter,.page-head.no-print,.toolbar.no-print{display:none!important}}

/* PTWork v2.9.17 - year-end closing, financial statement package, settings second rail */
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0')!important;}
.fs-cover{text-align:center;padding:40px 24px;}
.fs-cover h1{font-size:30px;margin:24px 0 8px;color:#0f172a;}
.fs-page{page-break-before:always;}
.fs-package .section th,.fs-package .section td{background:#dbeafe!important;color:#0f172a;font-weight:900;}
.asset-status-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:-6px 0 14px;}
.pagination{display:flex;gap:8px;align-items:center;justify-content:center;margin:14px 0 24px;}
@media(min-width:901px){
  body.route-settings .sidebar,body.route-courses .sidebar,body.route-courses-patients .sidebar,body.route-menu .sidebar,body.route-rooms .sidebar,body.route-staff .sidebar,body[class*="route-staff-"] .sidebar{width:86px!important;padding:14px 10px!important;overflow:visible!important;}
  body.route-settings .main,body.route-courses .main,body.route-courses-patients .main,body.route-menu .main,body.route-rooms .main,body.route-staff .main,body[class*="route-staff-"] .main{margin-left:306px!important;}
  body.route-settings .app-brand,body.route-courses .app-brand,body.route-courses-patients .app-brand,body.route-menu .app-brand,body.route-rooms .app-brand,body.route-staff .app-brand,body[class*="route-staff-"] .app-brand{min-height:72px!important;padding:6px 4px 14px!important;justify-content:center!important;}
  body.route-settings .webapp-logo,body.route-courses .webapp-logo,body.route-courses-patients .webapp-logo,body.route-menu .webapp-logo,body.route-rooms .webapp-logo,body.route-staff .webapp-logo,body[class*="route-staff-"] .webapp-logo{max-width:64px!important;max-height:54px!important;object-fit:contain!important;}
  body.route-settings .side-nav>a span:not(.nav-icon),body.route-courses .side-nav>a span:not(.nav-icon),body.route-courses-patients .side-nav>a span:not(.nav-icon),body.route-menu .side-nav>a span:not(.nav-icon),body.route-rooms .side-nav>a span:not(.nav-icon),body.route-staff .side-nav>a span:not(.nav-icon),body[class*="route-staff-"] .side-nav>a span:not(.nav-icon),
  body.route-settings .nav-parent>span:not(.nav-icon),body.route-courses .nav-parent>span:not(.nav-icon),body.route-courses-patients .nav-parent>span:not(.nav-icon),body.route-menu .nav-parent>span:not(.nav-icon),body.route-rooms .nav-parent>span:not(.nav-icon),body.route-staff .nav-parent>span:not(.nav-icon),body[class*="route-staff-"] .nav-parent>span:not(.nav-icon){display:none!important;}
  body.route-settings .side-nav a,body.route-courses .side-nav a,body.route-courses-patients .side-nav a,body.route-menu .side-nav a,body.route-rooms .side-nav a,body.route-staff .side-nav a,body[class*="route-staff-"] .side-nav a{justify-content:center!important;padding:12px 8px!important;}
  body.route-settings .side-nav .nav-icon,body.route-courses .side-nav .nav-icon,body.route-courses-patients .side-nav .nav-icon,body.route-menu .side-nav .nav-icon,body.route-rooms .side-nav .nav-icon,body.route-staff .side-nav .nav-icon,body[class*="route-staff-"] .side-nav .nav-icon{margin:0!important;font-size:22px!important;min-width:34px!important;}
  body.route-settings .side-nav .nav-group.open>.nav-children,body.route-courses .side-nav .nav-group.open>.nav-children,body.route-courses-patients .side-nav .nav-group.open>.nav-children,body.route-menu .side-nav .nav-group.open>.nav-children,body.route-rooms .side-nav .nav-group.open>.nav-children,body.route-staff .side-nav .nav-group.open>.nav-children,body[class*="route-staff-"] .side-nav .nav-group.open>.nav-children{display:block!important;position:fixed!important;left:86px!important;top:0!important;bottom:0!important;width:220px!important;margin:0!important;padding:18px 12px!important;background:linear-gradient(180deg,#f8fafc,#fff7ed)!important;border-right:1px solid #fed7aa!important;border-left:0!important;box-shadow:12px 0 28px rgba(15,23,42,.10)!important;z-index:28!important;overflow:auto!important;}
  body.route-settings .side-nav .nav-group.open>.nav-children a,body.route-courses .side-nav .nav-group.open>.nav-children a,body.route-courses-patients .side-nav .nav-group.open>.nav-children a,body.route-menu .side-nav .nav-group.open>.nav-children a,body.route-rooms .side-nav .nav-group.open>.nav-children a,body.route-staff .side-nav .nav-group.open>.nav-children a,body[class*="route-staff-"] .side-nav .nav-group.open>.nav-children a{display:flex!important;justify-content:flex-start!important;color:#334155!important;background:transparent!important;border-radius:10px!important;font-size:14px!important;font-weight:700!important;box-shadow:none!important;padding:9px 12px!important;}
  body.route-settings .side-nav .nav-group.open>.nav-children a.active,body.route-courses .side-nav .nav-group.open>.nav-children a.active,body.route-courses-patients .side-nav .nav-group.open>.nav-children a.active,body.route-menu .side-nav .nav-group.open>.nav-children a.active,body.route-rooms .side-nav .nav-group.open>.nav-children a.active,body.route-staff .side-nav .nav-group.open>.nav-children a.active,body[class*="route-staff-"] .side-nav .nav-group.open>.nav-children a.active{background:#ffedd5!important;color:#9a3412!important;}
}
@media print{.fs-page{page-break-before:always}.fs-cover{box-shadow:none!important}.pagination,.asset-status-tabs{display:none!important}.fs-package .section th,.fs-package .section td{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;}}

/* PTWork v2.9.17 - accounting health check and business-neutral accounting core */
.health-check-table .health-ok{background:#f0fdf4}.health-check-table .health-warn{background:#fffbeb}.health-check-table .health-error{background:#fef2f2}.status-pill.danger{background:#fee2e2!important;color:#991b1b!important}.health-check-table td{vertical-align:top}.route-accounting-health-check .finance-kpi-cards .card h2{font-size:30px}.route-accounting-settings textarea{width:100%}.route-accounting-settings .form-grid select{width:100%}

/* PTWork v2.9.18 - accounting core separation prep */
.accounting-setup-steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.accounting-setup-steps .step{border:1px solid #e5e7eb;border-radius:14px;padding:14px;background:#fff}.accounting-setup-steps .step b{display:block}.table-compact select,.table-compact input{min-width:120px}

/* PTWork v2.9.19 - Queue Availability Core from Roster */
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0')!important;}
.queue-kpi .card span{display:block;color:#64748b;font-size:13px}.queue-kpi .card strong{font-size:28px;color:#0f766e}.queue-slot-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px}.queue-slot-pill{border:1px solid #bbf7d0;background:#f0fdf4;border-radius:14px;padding:10px 12px;box-shadow:0 8px 22px rgba(15,23,42,.06)}.queue-slot-pill b{display:block;font-size:18px;color:#166534}.queue-slot-pill span{display:block;font-weight:800;color:#0f172a}.queue-slot-pill small{color:#64748b}.queue-summary-table tr.roster-status-leave,.queue-summary-table tr.roster-status-day_off,.queue-summary-table tr.roster-status-blocked,.queue-summary-table tr.roster-status-cancelled{opacity:.75}.roster-status-scheduled td:first-child{border-left:4px solid #22c55e}.roster-status-leave td:first-child{border-left:4px solid #f59e0b}.roster-status-day_off td:first-child{border-left:4px solid #94a3b8}.roster-status-blocked td:first-child{border-left:4px solid #ef4444}.roster-status-cancelled td:first-child{border-left:4px solid #64748b}.queue-roster-form .check-row{display:flex;align-items:center;gap:8px;font-weight:700}.queue-roster-form .check-row input{width:auto}.queue-filter label{min-width:180px}.route-queue-actual-attendance .data-table input,.route-queue-actual-attendance .data-table select{min-width:90px}.route-queue-actual-attendance .data-table input[type="text"]{min-width:170px}@media(max-width:720px){.queue-slot-grid{grid-template-columns:1fr}.queue-filter label{min-width:100%}}

/* PTWork V 2.10 - LINE Booking Bot */
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0')!important;}
.line-settings-form textarea{width:100%;min-height:82px}.form-grid.five{grid-template-columns:repeat(5,minmax(0,1fr))}.span-5{grid-column:1/-1}.line-message-list{display:flex;flex-direction:column;gap:10px}.line-message{max-width:80%;border-radius:14px;padding:10px 12px;background:#f1f5f9}.line-message.inbound{align-self:flex-start}.line-message.outbound{align-self:flex-end;background:#dcfce7}.line-message p{margin:4px 0;white-space:pre-wrap}.line-message small{color:#64748b}.queue-filter select[name="provider_id"]{min-width:240px}@media(max-width:760px){.form-grid.five{grid-template-columns:1fr}.span-5{grid-column:auto}.line-message{max-width:100%}}
.line-settings-form .span-2{grid-column:1/-1}

/* V 2.10.1 — queue availability colors, bot channels, today attendance column */
.provider-dot{display:inline-block;width:12px;height:12px;border-radius:50%;background:var(--provider-color,#eef);border:1px solid rgba(0,0,0,.12);margin-right:6px;vertical-align:middle}
.queue-provider-legend{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 14px}
.provider-legend-item{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid #e5e7eb;border-radius:999px;background:#fff;font-size:.88rem}
.provider-legend-item i{display:inline-block;width:16px;height:16px;border-radius:999px;background:var(--provider-color,#eef);border:1px solid rgba(0,0,0,.12)}
.provider-legend-item small{color:#64748b;margin-left:2px}
.queue-slot-pill.provider-colored{background:var(--provider-color,#eef);border-color:rgba(15,23,42,.16);box-shadow:0 1px 0 rgba(15,23,42,.05)}
.queue-slot-pill.provider-colored b,.queue-slot-pill.provider-colored span,.queue-slot-pill.provider-colored small{color:#172033}
.availability-debug-card pre{background:#0f172a;color:#e5e7eb;border-radius:10px;padding:12px;overflow:auto;max-height:320px}.small-table{font-size:.85rem}.small-table code{font-size:.78rem;white-space:normal}
.attendance-sheet .today-column{background:#fff7ed!important;box-shadow:inset 0 0 0 1px #fed7aa}.attendance-sheet th.today-column{background:#ffedd5!important;color:#9a3412}.attendance-sheet th.today-column em{display:block;font-style:normal;font-size:.7rem;color:#ea580c}.attendance-cell.today-column .attendance-cell-button{box-shadow:inset 0 0 0 1px #fb923c}
.channel-pill{display:inline-flex;align-items:center;padding:3px 8px;border-radius:999px;font-size:.75rem;font-weight:700;background:#eef2ff;color:#3730a3}.channel-facebook{background:#dbeafe;color:#1d4ed8}.channel-instagram{background:#fce7f3;color:#be185d}.channel-line{background:#dcfce7;color:#15803d}
.bot-message-timeline{display:grid;gap:10px}.bot-message{border:1px solid #e5e7eb;border-radius:12px;padding:10px;background:#fff}.bot-message.outbound{background:#f8fafc}.bot-message b{display:block}.bot-message time{font-size:.78rem;color:#64748b}.bot-message p{margin:.35rem 0}.bot-message pre{background:#0f172a;color:#e5e7eb;border-radius:8px;padding:10px;overflow:auto;max-height:280px}
@media(max-width:760px){.queue-provider-legend{display:grid}.provider-legend-item{justify-content:flex-start}.attendance-sheet .today-column{border-left:2px solid #fb923c;border-right:2px solid #fb923c}.bot-message{font-size:.9rem}}

/* PTWork v2.10.5 - force settings second rail and LINE availability fixes */
@media(min-width:901px){
  body.settings-two-rail .sidebar{width:86px!important;padding:14px 10px!important;overflow:visible!important;}
  body.settings-two-rail .main{margin-left:306px!important;}
  body.settings-two-rail .app-brand{min-height:72px!important;padding:6px 4px 14px!important;justify-content:center!important;}
  body.settings-two-rail .webapp-logo{max-width:64px!important;max-height:54px!important;object-fit:contain!important;}
  body.settings-two-rail .side-nav>a span:not(.nav-icon),
  body.settings-two-rail .nav-parent>span:not(.nav-icon){display:none!important;}
  body.settings-two-rail .side-nav a{justify-content:center!important;padding:12px 8px!important;}
  body.settings-two-rail .side-nav .nav-icon{margin:0!important;font-size:22px!important;min-width:34px!important;}
  body.settings-two-rail .side-nav .nav-group.open>.nav-children{display:block!important;position:fixed!important;left:86px!important;top:0!important;bottom:0!important;width:220px!important;margin:0!important;padding:18px 12px!important;background:linear-gradient(180deg,#f8fafc,#fff7ed)!important;border-right:1px solid #fed7aa!important;border-left:0!important;box-shadow:12px 0 28px rgba(15,23,42,.10)!important;z-index:28!important;overflow:auto!important;}
  body.settings-two-rail .side-nav .nav-group.open>.nav-children a{display:flex!important;justify-content:flex-start!important;color:#334155!important;background:transparent!important;border-radius:10px!important;font-size:14px!important;font-weight:700!important;box-shadow:none!important;padding:9px 12px!important;}
  body.settings-two-rail .side-nav .nav-group.open>.nav-children a.active{background:#ffedd5!important;color:#9a3412!important;}
}
.provider-name-filter{display:inline-flex;align-items:center;gap:7px;color:#0f172a;text-decoration:none;border-radius:10px;padding:3px 5px}.provider-name-filter:hover{background:#f1f5f9}.provider-name-filter small{margin-left:4px}.slot-provider-link{display:block;text-decoration:none;color:#0f172a;font-weight:700}.slot-provider-link:hover{text-decoration:underline}.provider-legend-item{cursor:pointer;text-decoration:none!important;color:#334155!important}.queue-slot-pill .slot-provider-link{margin:4px 0}.line-bot-test-card details{margin-top:12px}.line-bot-test-card pre{white-space:pre-wrap;background:#0f172a;color:#e2e8f0;border-radius:12px;padding:12px;max-height:360px;overflow:auto}.line-bot-test-card .toolbar label{min-width:160px}


/* PTWork v2.10.5 - mobile settings submenu, attendance queue submenu, course valuation, roster edit */
.settings-mobile-subnav{display:none}
.accounting-mobile-subnav{display:none}
.course-valuation-summary .valuation-cards{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:10px}.course-valuation-summary .compact span{display:block;color:#64748b;font-size:13px}.course-valuation-summary .compact h2{margin:6px 0 0;color:#0f172a}.course-valuation-summary .compact.highlight{background:#fff7ed;border-color:#fed7aa}.course-valuation-summary .compact.highlight h2{color:#9a3412}.course-patient-report-table .num{text-align:right;font-variant-numeric:tabular-nums}.course-patient-report-table .valuation-excluded td{opacity:.72}.course-valuation-toolbar label{min-width:180px}.mini-head{margin-bottom:8px}.roster-actions{display:flex;gap:6px;flex-wrap:nowrap;align-items:center}.roster-actions form{margin:0}.route-queue-roster .queue-roster-form .attendance-date-picker{border-color:#dbeafe}.route-queue-roster .queue-roster-form input#roster_id:not([value=""]){outline:2px solid #fb923c}
@media(max-width:900px){
  body.settings-two-rail .sidebar{width:min(88vw,330px)!important;overflow:auto!important;max-height:100vh!important;padding-bottom:28px!important;}
  body.settings-two-rail .side-nav .nav-group.open>.nav-children{display:block!important;position:static!important;width:auto!important;max-height:none!important;overflow:visible!important;margin:4px 0 10px 28px!important;padding:6px 0 6px 10px!important;background:rgba(255,255,255,.06)!important;border-left:1px solid rgba(255,255,255,.22)!important;border-right:0!important;box-shadow:none!important;}
  body.settings-two-rail .side-nav .nav-group.open>.nav-children a{display:flex!important;justify-content:flex-start!important;color:rgba(255,255,255,.92)!important;background:transparent!important;padding:10px 10px!important;font-size:14px!important;}
  body.settings-two-rail .side-nav .nav-group.open>.nav-children a.active{background:rgba(255,255,255,.18)!important;color:#fff!important;}
  .settings-mobile-subnav{display:flex;gap:8px;overflow-x:auto;padding:10px 14px;background:#fff7ed;border-bottom:1px solid #fed7aa;position:sticky;top:56px;z-index:20;box-shadow:0 8px 18px rgba(15,23,42,.06);scrollbar-width:thin;}
  .settings-mobile-subnav a{white-space:nowrap;text-decoration:none;color:#9a3412;background:#fff;border:1px solid #fed7aa;border-radius:999px;padding:8px 11px;font-weight:800;font-size:13px;box-shadow:0 3px 10px rgba(15,23,42,.05)}
  .settings-mobile-subnav a.active{background:#9a3412;color:#fff;border-color:#9a3412;}
  .accounting-mobile-subnav{display:flex;gap:8px;overflow-x:auto;padding:10px 14px;background:#f5f3ff;border-bottom:1px solid #ddd6fe;position:sticky;top:56px;z-index:20;box-shadow:0 8px 18px rgba(15,23,42,.06);scrollbar-width:thin;}
  .accounting-mobile-subnav a{white-space:nowrap;text-decoration:none;color:#5b21b6;background:#fff;border:1px solid #ddd6fe;border-radius:999px;padding:8px 11px;font-weight:800;font-size:13px;box-shadow:0 3px 10px rgba(15,23,42,.05)}
  .accounting-mobile-subnav a.active{background:#5b21b6;color:#fff;border-color:#5b21b6;}
  .finance-kpi-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .accounting-filter{display:flex!important;flex-wrap:wrap!important;gap:8px!important;align-items:end!important;}
  .accounting-filter label{flex:1 1 calc(50% - 4px)!important;min-width:0!important;font-size:12px!important;}
  .accounting-filter label input,.accounting-filter label select{width:100%!important;}
  .accounting-filter>button{flex:1 1 100%!important;order:3;}
  .accounting-filter>a.btn-small{flex:1 1 calc(33.333% - 6px)!important;text-align:center!important;justify-content:center!important;order:4;}
  .course-valuation-summary .valuation-cards{grid-template-columns:1fr 1fr!important}.course-patient-report-wrap{overflow:auto}.course-patient-report-table{min-width:1180px}.roster-actions{flex-wrap:wrap}.route-queue-roster .page-head .actions{width:100%;display:grid;grid-template-columns:1fr;}
}
@media(max-width:560px){.course-valuation-summary .valuation-cards{grid-template-columns:1fr!important}.settings-mobile-subnav{top:52px}.settings-mobile-subnav a{font-size:12px;padding:7px 10px}.accounting-mobile-subnav{top:52px}.accounting-mobile-subnav a{font-size:12px;padding:7px 10px}}
@media print{.course-valuation-toolbar,.pagination,.page-head .actions,.settings-mobile-subnav,.accounting-mobile-subnav,.sidebar,.topbar,.app-footer{display:none!important}.main{margin:0!important;width:100%!important}.content{padding:0!important}.course-patient-report-table{font-size:11px}.course-valuation-summary{box-shadow:none!important;border:1px solid #ddd!important}}

/* v2.11 Customer-facing POS display */
.pos-display-panel{background:#fff7f6;border:1px solid #ead6d2;border-radius:14px;padding:14px;margin-bottom:16px;box-shadow:0 8px 24px rgba(190,135,122,.08)}
.pos-display-panel h2{margin-top:0;color:#8d5f57}.pos-display-panel label{display:block;margin:10px 0}.pos-display-panel select{width:100%}.btn.rose{background:linear-gradient(135deg,#b98678,#e7c4bc);border-color:#b98678;color:#fff}.small-note{display:block;margin-top:8px;font-size:12px}.pos-settings-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(280px,.7fr);gap:16px}.compact-list li{margin:8px 0}.inline-edit-details{display:inline-block}.inline-edit-form{margin-top:8px;padding:12px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;display:grid;gap:8px;min-width:260px}.muted-badge{background:#e5e7eb;color:#4b5563}.table-responsive{overflow:auto}
.customer-display-body{margin:0;background:radial-gradient(circle at top left,#fff9f8,#f3f4f6 58%,#ebe1de);font-family:'Sarabun','Prompt',ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Tahoma,Arial,sans-serif;color:#2f2f35}.customer-display{min-height:100vh;box-sizing:border-box;padding:22px;display:flex;flex-direction:column;gap:18px}.cd-header{display:flex;align-items:center;justify-content:space-between;gap:16px;background:rgba(255,255,255,.9);border:1px solid rgba(185,134,120,.28);border-radius:24px;padding:16px 20px;box-shadow:0 16px 40px rgba(105,79,73,.08)}.cd-brand{display:flex;align-items:center;gap:14px}.cd-brand img{width:58px;height:58px;object-fit:contain;border-radius:14px;background:#fff}.cd-brand h1{font-size:clamp(22px,3.2vw,38px);margin:0;color:#7d554d}.cd-brand p{margin:4px 0 0;color:#6b7280}.cd-status{border-radius:999px;padding:10px 16px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.cd-status.idle{background:#f3f4f6;color:#4b5563}.cd-status.waiting{background:#fff1df;color:#9a5b12}.cd-status.paid{background:#e4f8ea;color:#166534}.cd-status.error{background:#fee2e2;color:#991b1b}.cd-empty{flex:1;display:grid;place-content:center;text-align:center;background:rgba(255,255,255,.7);border:2px dashed rgba(185,134,120,.32);border-radius:28px}.cd-empty h2{font-size:clamp(30px,5vw,54px);margin:0;color:#8d5f57}.cd-empty p{font-size:clamp(16px,2vw,24px);color:#6b7280}.cd-payment{background:rgba(255,255,255,.96);border-radius:28px;border:1px solid rgba(185,134,120,.25);padding:20px;box-shadow:0 18px 45px rgba(79,55,51,.10)}.cd-payment-head{display:flex;justify-content:space-between;gap:14px;border-bottom:1px solid #ead6d2;padding-bottom:14px}.cd-payment-head h2{font-size:clamp(24px,3.5vw,42px);margin:0;color:#8d5f57}.cd-patient{font-size:clamp(16px,2.2vw,26px);font-weight:700;text-align:right;color:#374151}.cd-items{display:grid;gap:10px;margin:18px 0}.cd-item{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:14px 16px;border-radius:18px;background:#faf7f6}.cd-item b{font-size:clamp(16px,2.2vw,24px);display:block}.cd-item small{color:#6b7280}.cd-item strong{font-size:clamp(18px,2.5vw,28px);white-space:nowrap}.cd-summary{display:grid;gap:8px;margin-left:auto;max-width:520px}.cd-summary>div{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #eee;padding:8px 0;font-size:clamp(16px,2vw,22px)}.cd-summary .net{border:0;border-radius:22px;background:linear-gradient(135deg,#8d5f57,#d6aa9f);color:#fff;padding:18px 20px;margin-top:8px}.cd-summary .net b{font-size:clamp(30px,5.8vw,64px)}.cd-qr-box{text-align:center;margin:18px auto 0;max-width:440px;border:1px solid #ead6d2;border-radius:24px;padding:16px;background:#fff}.cd-qr-box h3{margin:0 0 10px;color:#8d5f57}.cd-qr-box img{width:min(54vw,280px);height:min(54vw,280px);object-fit:contain}.cd-paid-box{text-align:center;margin-top:18px;border-radius:24px;background:#e4f8ea;color:#166534;font-size:clamp(26px,4vw,48px);font-weight:900;padding:24px}.cd-footer{text-align:center;color:#9ca3af;font-size:13px;margin-top:auto}@media(max-width:900px){.pos-settings-grid{grid-template-columns:1fr}.cd-header,.cd-payment-head{display:block}.cd-status{display:inline-block;margin-top:12px}.cd-patient{text-align:left;margin-top:8px}.cd-item{padding:12px}.customer-display{padding:12px}.cd-summary{max-width:none}}@media(max-width:520px){.cd-brand img{width:46px;height:46px}.cd-payment{padding:12px;border-radius:20px}.cd-summary .net{display:block;text-align:center}.cd-summary .net b{display:block}}

/* V 2.11.1 — compact payment checkout + landscape customer POS display */
.payment-detail-compact{align-self:start;max-height:48vh;display:flex;flex-direction:column;min-height:280px}
.payment-detail-compact h2{margin:0 0 10px}
.payment-detail-scroll{overflow:auto;border:1px solid #eef0f4;border-radius:12px;max-height:calc(48vh - 54px)}
.payment-detail-scroll table{margin:0;min-width:620px}
.payment-side-compact{position:sticky;top:78px;max-height:calc(100vh - 96px);overflow:auto;padding:14px}
.payment-side-compact h2{font-size:17px;margin:12px 0 8px;color:#7d554d}
.payment-side-compact label{font-size:13px;margin:7px 0}
.payment-side-compact input,.payment-side-compact select,.payment-side-compact textarea{min-height:36px;padding:7px 10px;font-size:14px}
.payment-side-compact textarea{min-height:54px;max-height:80px}
.payment-side-compact .pay-row{padding:6px 0}
.payment-side-compact .pay-row.total{font-size:16px;margin:8px -6px;padding:10px 6px;border-radius:10px}
.checkout-compact-form .payment-method-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.checkout-compact-form .payment-method-buttons .btn-small{font-size:12px;padding:7px 6px;white-space:normal;line-height:1.25}
.checkout-compact-form .pay-method-label{display:grid;grid-template-columns:120px minmax(0,1fr);align-items:center;gap:8px}
.pos-display-panel{padding:12px;margin-bottom:12px}.pos-display-panel h2{font-size:17px}.pos-display-panel label{font-size:13px;margin:7px 0}.pos-display-panel select{min-height:36px}
.accounting-expense-form textarea[name="description"]{min-height:70px;max-height:110px}.expense-item-table{display:block;overflow:auto;max-height:42vh}.expense-item-table thead,.expense-item-table tbody,.expense-item-table tr{display:table;width:100%;table-layout:fixed}
@media(max-width:900px){.payment-detail-compact{max-height:none}.payment-detail-scroll{max-height:45vh}.payment-side-compact{position:static;max-height:none}.checkout-compact-form .payment-method-buttons{grid-template-columns:1fr}.checkout-compact-form .pay-method-label{grid-template-columns:1fr}.payment-detail-scroll table{min-width:560px}}

.customer-display-body{overflow:hidden;background:linear-gradient(135deg,#fffaf8 0%,#f7efed 45%,#eceff3 100%)}
.customer-display{height:100vh;min-height:0;padding:16px;gap:12px;overflow:hidden}
.cd-header{flex:0 0 auto;padding:12px 18px;border-radius:20px}.cd-brand img{width:52px;height:52px}.cd-brand h1{font-size:clamp(22px,3vw,36px)}.cd-brand p{font-size:clamp(13px,1.4vw,17px)}
.cd-status{padding:8px 14px;font-size:clamp(12px,1.25vw,16px)}
.cd-idle-stage{flex:1;min-height:0;border:0;background:transparent;place-content:center}.cd-idle-card{width:min(86vw,980px);min-height:54vh;display:grid;place-items:center;text-align:center;border:1px solid rgba(185,134,120,.22);border-radius:34px;background:rgba(255,255,255,.76);box-shadow:0 24px 60px rgba(105,79,73,.10);padding:34px}.cd-idle-card img{max-width:min(34vw,280px);max-height:26vh;object-fit:contain;margin-bottom:12px}.cd-idle-card h2{font-size:clamp(32px,5.4vw,76px);margin:0;color:#8d5f57}.cd-idle-card p{font-size:clamp(19px,2.7vw,38px);line-height:1.35;color:#6b4f4a;margin:12px 0 0;max-width:900px}
.cd-landscape-payment{flex:1;min-height:0;overflow:hidden;padding:16px;border-radius:24px}.cd-payment-head{padding-bottom:10px;margin-bottom:10px}.cd-payment-head h2{font-size:clamp(22px,3vw,36px)}.cd-patient{font-size:clamp(15px,2vw,22px)}
.cd-landscape-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:16px;height:calc(100% - 86px);min-height:0}.cd-items-panel,.cd-pay-panel{min-height:0;border-radius:22px;background:#fff;border:1px solid rgba(185,134,120,.16);padding:14px;overflow:hidden}.cd-items-panel{display:flex;flex-direction:column}.cd-items-panel h3,.cd-method-box h3{margin:0 0 10px;color:#8d5f57}.cd-items{overflow:auto;margin:0;gap:8px;padding-right:4px}.cd-item{padding:12px 14px;border-radius:16px}.cd-item b{font-size:clamp(15px,1.75vw,22px)}.cd-item small{font-size:clamp(12px,1.2vw,15px)}.cd-item strong{font-size:clamp(16px,2vw,26px)}
.cd-pay-panel{display:flex;flex-direction:column;gap:12px;overflow:auto}.cd-summary{max-width:none;margin:0}.cd-summary>div{font-size:clamp(15px,1.7vw,21px);padding:7px 0}.cd-summary .net{padding:16px 18px;border-radius:20px}.cd-summary .net b{font-size:clamp(34px,5.4vw,72px)}.cd-method-box{border:1px solid #ead6d2;border-radius:20px;padding:12px;background:#fffaf9}.cd-method{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #f0e2df;padding:8px 0;font-size:clamp(15px,1.6vw,20px)}.cd-method:last-child{border-bottom:0}.cd-method b{white-space:nowrap}.cd-qr-box{margin:0;max-width:none;padding:12px;border-radius:20px}.cd-qr-box img{width:min(24vw,240px);height:min(24vw,240px)}.cd-paid-box{margin-top:0;font-size:clamp(24px,3.5vw,46px);padding:20px;border-radius:20px}.cd-footer{display:none!important}
@media(max-width:900px){.customer-display-body{overflow:auto}.customer-display{height:auto;min-height:100vh;overflow:visible}.cd-landscape-payment{overflow:visible}.cd-landscape-grid{grid-template-columns:1fr;height:auto}.cd-items-panel,.cd-pay-panel{overflow:visible}.cd-qr-box img{width:min(58vw,260px);height:min(58vw,260px)}.cd-idle-card{min-height:56vh}.cd-idle-card img{max-width:min(54vw,240px)}}

/* V 2.11.2 — expense actions, vendor modal/list, category account link, course sorting */
.table-meta{font-size:13px;color:var(--muted,#667085);margin:8px 2px 12px}.action-menu{position:relative;display:inline-block}.action-menu summary{list-style:none;cursor:pointer;border:1px solid rgba(160,23,93,.2);background:#fff;border-radius:10px;padding:6px 10px;font-weight:900;color:#9b2f65;box-shadow:0 4px 12px rgba(68,40,40,.06)}.action-menu summary::-webkit-details-marker{display:none}.action-menu[open] summary{background:#fff6fb}.action-list{position:absolute;right:0;top:calc(100% + 6px);min-width:135px;background:#fff;border:1px solid rgba(160,23,93,.15);border-radius:14px;box-shadow:0 18px 48px rgba(31,25,42,.16);padding:6px;z-index:20}.action-list a,.action-list button{display:block;width:100%;text-align:left;padding:9px 10px;border:0;background:transparent;border-radius:10px;color:#352833;text-decoration:none;font:inherit;cursor:pointer}.action-list a:hover,.action-list button:hover{background:#fff1f7}.action-list .danger-link{color:#b42318}
/* The table wrapper scrolls (overflow:auto), which clips an absolutely-positioned
   .action-list that opens downward past its bottom edge — invisible for the last
   row(s). Flip those to open upward instead so they stay inside the scroll box. */
.responsive-table-wrap tbody tr:last-child .action-list,
.responsive-table-wrap tbody tr:nth-last-child(2) .action-list{top:auto;bottom:calc(100% + 6px)}
.expense-action-cell{white-space:nowrap}.vendor-search-toolbar input{min-width:min(440px,90vw)}.vendor-list-card{padding:12px}.vendor-list-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:10px}.vendor-name-list{display:grid;gap:8px}.vendor-name-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid rgba(160,23,93,.12);border-radius:16px;padding:12px 14px;background:linear-gradient(135deg,#fff,#fff8fb)}.vendor-name-row small{display:block;color:var(--muted,#667085);font-weight:500}.modal-backdrop{display:none;position:fixed;inset:0;background:rgba(26,19,31,.42);z-index:1000;align-items:flex-start;justify-content:center;padding:36px 12px;overflow:auto}.modal-backdrop.show{display:flex}.modal-card{width:min(880px,100%);background:#fff;border-radius:22px;border:1px solid rgba(160,23,93,.16);box-shadow:0 32px 80px rgba(34,23,45,.24);padding:18px}.vendor-modal-card textarea{min-height:90px}.sort-link{text-decoration:none;color:inherit;font-weight:800}.sort-link:hover{color:#a0175d}.sortable-table th{white-space:nowrap}@media(max-width:720px){.vendor-list-head{display:block}.action-list{right:0}.modal-backdrop{padding:12px}.modal-card{border-radius:18px}.vendor-name-row{padding:12px}.toolbar.vendor-search-toolbar{display:grid}.toolbar.vendor-search-toolbar input{min-width:0;width:100%}}

/* v2.11.3 dashboard compact UI + certificate actions */
.dashboard-summary-cards{gap:10px!important;margin-bottom:12px!important;}
.dashboard-summary-cards .card{padding:8px 12px!important;border-radius:14px!important;min-height:58px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;}
.dashboard-summary-cards .card:after{width:62px!important;height:62px!important;right:-22px!important;top:-24px!important;}
.dashboard-summary-cards .card b{font-size:12px!important;line-height:1.15!important;margin:0!important;}
.dashboard-summary-cards .card strong{font-size:20px!important;line-height:1.05!important;margin-top:4px!important;}
.dashboard-working-card{padding:10px 12px!important;margin:8px 0 12px!important;}
.dashboard-section-title{font-size:15px!important;line-height:1.25!important;margin:0 0 8px!important;font-weight:800!important;color:var(--primary-dark,#3B1768)!important;}
.dashboard-appointment-head{margin:4px 0 8px!important;}
.appointment-date-nav{display:inline-flex!important;align-items:center!important;justify-content:center!important;white-space:nowrap!important;}
.certificate-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap;}
.certificate-actions form{margin:0;}
.certificate-form .form-actions{padding-bottom:24px;}
@media(max-width:900px){
  .dashboard-summary-cards .card{padding:7px 10px!important;min-height:52px!important;}
  .dashboard-summary-cards .card strong{font-size:18px!important;}
  .appointment-date-nav{width:calc(50% - 8px)!important;flex:0 0 calc(50% - 8px)!important;}
  .certificate-actions{gap:5px;}
}


/* V 2.11.7 — dashboard logo inherits the same sidebar logo rules as other pages */
.payment-page-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:16px;
}
.payment-title-block h1{margin:0;line-height:1.2;}
.payment-page-header .customer-display-actions{
  flex:1 1 420px;
  margin:0;
  padding:4px 0;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:nowrap;
  background:transparent;
  border:0;
  box-shadow:none;
  min-width:0;
}
.payment-page-header .customer-display-actions h2{
  margin:0 2px 0 0;
  color:#111827;
  font-size:14px;
  line-height:1.1;
  white-space:nowrap;
}
.payment-page-header .customer-display-actions label{display:none;}
.payment-page-header .customer-display-actions .pos-display-select,
.payment-page-header .customer-display-actions select{
  flex:0 0 88px;
  width:88px;
  min-width:0;
  max-width:88px;
  min-height:20px;
  padding:2px 5px;
  font-size:10px;
  line-height:1.1;
  border-color:#e7b6ce;
  border-radius:5px;
}
.payment-page-header .customer-display-actions .btn,
.payment-page-header .customer-display-actions .btn-small{
  flex:0 0 auto;
  min-height:22px;
  padding:3px 8px;
  border-radius:5px;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}
.btn.rose-secondary{background:#a0175d!important;color:#fff!important;}
.payment-page-header #posDisplayResult{flex:0 1 auto;text-align:left;margin-top:0;white-space:nowrap;font-size:11px;overflow:hidden;text-overflow:ellipsis;}
@media(max-width:900px){
  .payment-page-header{display:block;}
  .payment-page-header .customer-display-actions{display:flex;flex-wrap:wrap;justify-content:flex-start;padding:10px 0 0;}
  .payment-page-header .customer-display-actions h2{flex:1 0 100%;}
  .payment-page-header #posDisplayResult{flex:1 0 100%;text-align:left;white-space:normal;}
  .payment-page-header .customer-display-actions .pos-display-select,
  .payment-page-header .customer-display-actions select{flex:1 1 calc(50% - 8px);width:auto;max-width:none;}
  .payment-page-header .customer-display-actions .btn,
  .payment-page-header .customer-display-actions .btn-small{flex:1 1 calc(50% - 8px);}
}
@media(max-width:560px){
  .payment-page-header .customer-display-actions{display:flex;flex-direction:column;align-items:stretch;}
  .payment-page-header .customer-display-actions .pos-display-select,
  .payment-page-header .customer-display-actions select,
  .payment-page-header .customer-display-actions .btn,
  .payment-page-header .customer-display-actions .btn-small{width:100%;flex:0 0 auto;}
}


/* V 2.11.7 — refreshed logo assets and compact customer display controls */
.app-shell.ptwork-v28 .webapp-logo{content:url('/assets/img/ptwork-logo-clean.png?v=2.14.0')!important;}

/* V 2.12.0 — unified financial / marketing / AI reports */
.report-main-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px;padding:6px;background:#f3edf6;border:1px solid #e4d7ea;border-radius:12px}.report-main-tabs a{display:inline-flex;align-items:center;justify-content:center;padding:10px 18px;border-radius:9px;color:#5c2a55;text-decoration:none;font-weight:800}.report-main-tabs a.active{background:#8f1758;color:#fff;box-shadow:0 4px 12px rgba(119,20,73,.18)}
.report-filter-bar{align-items:end;gap:9px}.report-filter-bar label{min-width:125px}.report-filter-bar label input,.report-filter-bar label select{min-width:125px}.report-section-head{align-items:center;margin-top:8px}.report-section-head h2{margin:0}.report-section-head p{margin:3px 0 0}
.marketing-kpi-grid{grid-template-columns:repeat(5,minmax(150px,1fr))}.marketing-kpi{min-height:104px;padding:14px}.marketing-kpi span{font-size:12px;color:#6d6470}.marketing-kpi strong{font-size:23px;display:block;margin:6px 0}.marketing-kpi small{font-size:10px}.positive{color:#087b55}.negative{color:#b42318}.marketing-two-col{grid-template-columns:repeat(2,minmax(0,1fr))}.course-kpi-grid{grid-template-columns:repeat(6,minmax(135px,1fr))}.retention-kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin:8px 0 12px}.retention-kpis>div,.mini-kpi-grid>div{padding:9px;border-radius:8px;background:#f4eff6;text-align:center}.retention-kpis span,.mini-kpi-grid span{display:block;font-size:11px;color:#6a6070}.retention-kpis strong,.mini-kpi-grid strong{font-size:18px;color:#7e1651}.marketing-insights{margin-top:18px;border-left:5px solid #9d1c61}.marketing-insights li{margin:6px 0}
.ai-marketing-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,.8fr);gap:16px}.ai-marketing-form-card h2,.ai-marketing-context h2{margin-top:0}.ai-marketing-form{padding:0;background:transparent;box-shadow:none;border:0}.ai-privacy-note{margin-top:12px;padding:10px;border-radius:8px;background:#ecf8f5;border:1px solid #bfe2d8;font-size:12px}.mini-kpi-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.campaign-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:14px}.campaign-card{position:relative;border-top:4px solid #9f1c61}.campaign-priority{display:flex;justify-content:space-between;font-size:11px;font-weight:800;color:#7e1651}.campaign-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.campaign-grid .span2{grid-column:1/-1}.campaign-grid p{margin:3px 0 0}.campaign-copy-box{margin-top:10px;padding:10px;border-radius:8px;background:#f8f5f8}.campaign-copy-box label{font-weight:800;display:block;margin:6px 0 3px}.copy-row{display:flex;gap:7px;align-items:stretch}.copy-row textarea{flex:1;min-height:58px;resize:vertical}.campaign-footer{display:grid;grid-template-columns:1fr 2fr;gap:8px;margin-top:10px;padding-top:8px;border-top:1px solid #ddd}.ai-mode-notice{margin-top:14px}.empty-state{text-align:center;padding:30px;margin-top:15px}.modal-footer-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:10px;border-top:1px solid #e2e2e2}
@media(max-width:1180px){.marketing-kpi-grid{grid-template-columns:repeat(3,minmax(150px,1fr))}.course-kpi-grid{grid-template-columns:repeat(4,minmax(135px,1fr))}.campaign-results{grid-template-columns:1fr}}
@media(max-width:850px){.marketing-two-col,.ai-marketing-layout{grid-template-columns:1fr}.marketing-kpi-grid{grid-template-columns:repeat(2,minmax(140px,1fr))}.course-kpi-grid{grid-template-columns:repeat(2,minmax(135px,1fr))}.report-filter-bar label{flex:1 1 160px}.campaign-grid,.campaign-footer{grid-template-columns:1fr}.campaign-grid .span2{grid-column:auto}}
@media(max-width:520px){.report-main-tabs a{flex:1 1 0;min-width:0;padding:9px 4px;font-size:13px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.report-kpi-cards,.soft-kpi-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}.report-kpi-cards .card strong,.soft-kpi-cards .card strong{font-size:20px!important;line-height:1.15!important;word-break:break-word}.report-kpi-cards .card,.soft-kpi-cards .card{padding:12px!important}.marketing-kpi-grid,.course-kpi-grid{grid-template-columns:1fr}.retention-kpis{grid-template-columns:repeat(2,1fr)}.report-section-head{display:block}.report-section-head .btn{margin-top:8px;width:100%}.copy-row{display:block}.copy-row .btn-small{width:100%;margin-top:4px}}

/* V 2.12.0 report export and campaign copy actions */
.report-export-actions,.campaign-copy-actions{display:flex;gap:7px;flex-wrap:wrap;align-items:center}.copy-source-hidden{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0!important}.campaign-copy-actions{margin-top:9px}.report-export-actions .btn{white-space:nowrap}
@media(max-width:520px){.report-export-actions{display:grid;grid-template-columns:1fr}.report-export-actions .btn{width:100%;margin-top:0!important}.campaign-copy-actions .btn-small{flex:1 1 100%}}
.report-drill-link{color:#851650;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px}.report-drill-link:hover{color:#b11f6e}.compact-head{align-items:center;margin-top:14px}.compact-head h2{margin:0}.marketing-timing-grid{margin-top:14px}.timing-peak{margin:10px 0 0;padding:8px 10px;border-radius:8px;background:#fff7e8;border:1px solid #f1d3a1}.marketing-timing-grid table{font-size:12px}
@media print{
  .report-main-tabs,.quick-date-buttons,.report-filter-bar,.financial-report-actions .no-print,.modal,.pagination,.toolbar{display:none!important}
  .main,.content{margin:0!important;padding:0!important;background:#fff!important}
  .report-grid,.marketing-two-col{display:block!important}
  .card{box-shadow:none!important;break-inside:avoid;page-break-inside:avoid}
  table{font-size:9px!important}thead{display:table-header-group}
  @page{size:A4 landscape;margin:8mm}
}

/* PTWork V 2.14.0 — report filter layouts */
.report-filter-bar{box-sizing:border-box;width:100%;max-width:100%;margin:10px 0 16px;padding:12px;background:#fff;border:1px solid #e5e7eb;border-radius:10px}
.report-filter-financial{display:flex;align-items:end;flex-wrap:wrap;gap:9px}
.report-filter-financial label{flex:0 1 170px;min-width:140px;margin:0}
.report-filter-financial label input,.report-filter-financial label select{width:100%;min-width:0}
.report-filter-or{align-self:center;color:#6b7280;font-size:12px;padding-bottom:8px}
.report-filter-marketing{display:block}
.report-filter-row{display:flex;align-items:end;flex-wrap:wrap;gap:9px;width:100%;max-width:100%;min-width:0}
.report-filter-row+ .report-filter-row{margin-top:10px;padding-top:10px;border-top:1px dashed #d9dde5}
.report-filter-row label{flex:1 1 155px;min-width:135px;max-width:240px;margin:0}
.report-filter-row label input,.report-filter-row label select{width:100%;min-width:0;max-width:100%}
.report-filter-row-primary label:last-of-type{flex-basis:200px}
.report-filter-actions{display:flex;gap:8px;align-items:end;flex-wrap:wrap;margin-left:auto}
@media(max-width:900px){.report-filter-row label,.report-filter-financial label{flex:1 1 180px;max-width:none}.report-filter-or{display:none}.report-filter-actions{width:100%;margin-left:0}.report-filter-actions>*{flex:1 1 auto;text-align:center}}
@media(max-width:520px){.report-filter-row label,.report-filter-financial label{flex-basis:100%;max-width:none}.report-filter-financial>button,.report-filter-financial>.btn{flex:1 1 45%;text-align:center}}

/* Financial report mobile layout: keep related filters and actions on the same row. */
@media(max-width:520px){
  .report-filter-financial{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 8px;align-items:end}
  .report-filter-financial>input[type="hidden"],.report-filter-financial>.report-filter-or{display:none}
  .report-filter-financial label{min-width:0!important;max-width:none!important;width:100%;margin:0}
  .report-filter-financial label input,.report-filter-financial label select{width:100%;min-width:0;max-width:100%;box-sizing:border-box}
  .report-filter-financial .report-filter-single-date{grid-column:1;grid-row:1}
  .report-filter-financial .report-filter-branch{grid-column:2;grid-row:1}
  .report-filter-financial .report-filter-from-date{grid-column:1;grid-row:2}
  .report-filter-financial .report-filter-to-date{grid-column:2;grid-row:2}
  .report-filter-financial>button{grid-column:1;grid-row:3;width:100%;min-width:0;margin:0}
  .report-filter-financial>.btn{grid-column:2;grid-row:3;width:100%;min-width:0;margin:0;display:flex;align-items:center;justify-content:center}
  .financial-report-actions .report-export-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;margin-top:8px}
  .financial-report-actions .report-export-actions .btn{width:100%;min-width:0;margin:0!important;padding-left:6px;padding-right:6px;text-align:center;display:flex;align-items:center;justify-content:center}
}

/* PTWork AI Center */
.ai-center-head{align-items:center;gap:15px}.ai-center-head h1{margin-bottom:2px}.ai-center-version{font-weight:800;background:#201722;color:#fff;border-radius:999px;padding:7px 12px;white-space:nowrap}
.ai-center-tabs{display:flex;gap:6px;overflow-x:auto;padding:5px 0 10px;margin-bottom:10px;border-bottom:1px solid #e2e4e8;scrollbar-width:thin}.ai-center-tabs a{display:inline-flex;align-items:center;white-space:nowrap;padding:8px 12px;border-radius:8px;color:#363039;text-decoration:none;font-weight:700;font-size:13px}.ai-center-tabs a:hover{background:#f3edf1}.ai-center-tabs a.active{background:#8e1d5d;color:#fff}
.ai-center-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:8px 0 15px}.ai-center-kpis>div{background:#fff;border:1px solid #e4e5e8;border-radius:10px;padding:12px;display:flex;flex-direction:column;min-width:0}.ai-center-kpis span{font-size:12px;color:#68616a}.ai-center-kpis strong{font-size:25px;line-height:1.1;margin:4px 0}.ai-center-kpis small{font-size:11px;color:#8a828a}
.ai-center-grid{display:grid;gap:15px;margin-bottom:15px}.ai-center-grid.two-col{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.ai-center-grid.testing-grid{grid-template-columns:minmax(320px,.8fr) minmax(0,1.2fr)}
.ai-center-grid .card{min-width:0}.compact-form{padding:0;background:transparent;border:0;box-shadow:none}.compact-form textarea{resize:vertical}.compact-form select[multiple]{min-height:112px}.form-actions{display:flex;gap:8px;flex-wrap:wrap}
.block{display:block}.nowrap{white-space:nowrap}.inline{display:inline-block;margin:0}.status.danger{background:#fee2e2;color:#991b1b;border-radius:999px;padding:2px 7px;font-size:11px;font-weight:800}
.ai-intent-list,.ai-prompt-list{display:grid;gap:9px;max-height:760px;overflow:auto}.ai-intent-list article,.ai-prompt-list article{border:1px solid #e3e4e8;border-radius:9px;padding:10px}.ai-intent-list article>div{display:flex;justify-content:space-between;gap:8px}.ai-intent-list code{font-size:11px}.ai-intent-list small,.ai-prompt-list small{display:block;color:#726a73;margin:3px 0}.ai-intent-list p,.ai-prompt-list p{margin:6px 0;font-size:12px}
.ai-log-filter{flex-wrap:wrap}.ai-log-filter label{flex:1 1 160px;min-width:140px}.feedback-form{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin-top:9px}.feedback-form input{flex:1 1 180px}
.ai-settings-card{max-width:900px}.ai-safety-note,.ai-privacy-note{margin-top:12px;padding:11px;border:1px solid #bfe2d8;background:#edf9f6;border-radius:9px;font-size:12px}
.channel-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.channel-card{border:1px solid #e3e4e8;border-radius:9px;padding:11px;display:grid;gap:7px;min-width:0}.channel-card h3{margin:0}.channel-card label{font-size:12px}.channel-card textarea{font-family:monospace;font-size:11px}.scope-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.token-reveal{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.token-reveal code{padding:7px;background:#fff;border:1px solid #d4d4d8;border-radius:6px;overflow-wrap:anywhere}.api-endpoints{white-space:pre-wrap;background:#17151a;color:#f5f5f5;padding:12px;border-radius:8px;line-height:1.6;overflow:auto}
.ai-test-result pre{max-height:460px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;background:#17151a;color:#e9e9e9;border-radius:8px;padding:12px}.ai-response-box{border-left:4px solid #8e1d5d;background:#faf6f9;padding:10px 12px;margin-bottom:10px}.ai-response-box p{margin:5px 0 0}.ai-center .check,.route-ai-center .check{display:flex;align-items:center;gap:7px}.route-ai-center .check input{width:auto}
@media(max-width:1050px){.channel-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ai-center-grid.testing-grid{grid-template-columns:1fr}}
@media(max-width:850px){.ai-center-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.ai-center-grid.two-col,.channel-grid{grid-template-columns:1fr}.ai-center-tabs{margin-left:-4px;margin-right:-4px;padding-left:4px;padding-right:4px}}
@media(max-width:480px){.ai-center-kpis{grid-template-columns:1fr 1fr}.ai-center-kpis strong{font-size:21px}.scope-grid{grid-template-columns:1fr}.ai-center-head{align-items:flex-start}}

/* PTWork V 2.14.0 — OpenAI chat settings */
.ai-openai-status{padding:12px 14px;border-radius:12px;border:1px solid #d8dee9;background:#f7f9fc;line-height:1.55}
.ai-openai-status.is-ready{border-color:#9fd9b5;background:#eefaf2;color:#1f6b3c}
.ai-openai-status.is-off{border-color:#e2c7a7;background:#fff8ef;color:#7a4b16}
.openai-setting-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding-top:4px}
.openai-setting-actions small{color:#667085}
@media(max-width:768px){.openai-setting-actions .btn{width:100%}.ai-openai-status{font-size:.92rem}}

/* POS customer display — fit 14-inch landscape screens without page scrolling. */
@media (min-width:761px) {
  .customer-display-body {
    width:100vw;
    height:100vh;
    height:100dvh;
    overflow:hidden;
  }
  .customer-display {
    width:100vw;
    max-width:none;
    flex:1 0 100vw;
    height:100vh;
    height:100dvh;
    padding:10px;
    gap:8px;
  }
  .cd-header {
    padding:8px 14px;
    min-height:48px;
    border-radius:16px;
  }
  .cd-brand {gap:10px}
  .cd-brand img {width:42px;height:42px;border-radius:10px}
  .cd-brand h1 {font-size:clamp(19px,2.25vw,30px);line-height:1.05}
  .cd-brand p {margin-top:2px;font-size:clamp(11px,1.15vw,15px)}
  .cd-status {padding:7px 12px;font-size:clamp(11px,1.1vw,14px)}

  .cd-landscape-payment {
    padding:10px;
    border-radius:18px;
  }
  .cd-payment-head {
    min-height:46px;
    padding-bottom:7px;
    margin-bottom:7px;
    align-items:center;
  }
  .cd-payment-head .muted {margin:0 0 2px;font-size:12px}
  .cd-payment-head h2 {font-size:clamp(20px,2.4vw,30px);line-height:1}
  .cd-patient {font-size:clamp(14px,1.65vw,20px)}
  .cd-landscape-grid {
    grid-template-columns:minmax(250px,.92fr) minmax(520px,1.08fr);
    gap:10px;
    height:calc(100% - 62px);
  }
  .cd-items-panel,
  .cd-pay-panel {
    border-radius:16px;
    padding:10px;
  }
  .cd-items-panel h3,
  .cd-method-box h3 {margin-bottom:6px;font-size:16px}
  .cd-items {gap:6px}
  .cd-item {padding:9px 11px;border-radius:12px}
  .cd-item b {font-size:clamp(14px,1.45vw,19px);line-height:1.15}
  .cd-item small {font-size:clamp(11px,1vw,13px)}
  .cd-item strong {font-size:clamp(15px,1.65vw,22px)}

  .cd-pay-panel {
    display:grid;
    grid-template-columns:minmax(210px,.82fr) minmax(260px,1.18fr);
    grid-template-rows:auto minmax(0,1fr);
    align-items:stretch;
    gap:8px 10px;
    overflow:hidden;
  }
  .cd-summary {
    grid-column:1;
    grid-row:1;
    min-width:0;
  }
  .cd-summary>div {
    padding:4px 0;
    font-size:clamp(13px,1.35vw,18px);
  }
  .cd-summary .net {
    padding:10px 12px;
    margin-top:4px;
    border-radius:15px;
  }
  .cd-summary .net b {font-size:clamp(30px,4.25vw,58px);line-height:1}
  .cd-method-box {
    grid-column:1;
    grid-row:2;
    min-height:0;
    align-self:start;
    padding:9px 10px;
    border-radius:14px;
  }
  .cd-method {padding:5px 0;font-size:clamp(13px,1.3vw,17px)}
  .cd-qr-box {
    grid-column:2;
    grid-row:1 / span 2;
    width:100%;
    min-width:0;
    min-height:0;
    box-sizing:border-box;
    margin:0;
    padding:8px;
    border:2px solid #ead6d2;
    border-radius:16px;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    overflow:hidden;
  }
  .cd-qr-box h3 {
    margin:0 0 4px;
    font-size:clamp(16px,1.7vw,22px);
    line-height:1.15;
  }
  .cd-qr-box img {
    display:block;
    width:min(26vw,38vh,310px);
    height:min(26vw,38vh,310px);
    min-width:210px;
    min-height:210px;
    padding:5px;
    box-sizing:border-box;
    border-radius:8px;
    background:#fff;
    object-fit:contain;
    filter:contrast(1.08);
  }
  .cd-qr-box p {
    margin:4px 0 0;
    font-size:clamp(11px,1.05vw,14px);
    line-height:1.15;
  }
  .cd-paid-box {
    grid-column:1 / -1;
    grid-row:1 / span 2;
    place-content:center;
    margin:0;
  }
}

@media (min-width:761px) and (max-height:650px) {
  .customer-display {padding:7px;gap:6px}
  .cd-header {padding:6px 12px;min-height:42px}
  .cd-brand img {width:36px;height:36px}
  .cd-landscape-payment {padding:7px}
  .cd-payment-head {min-height:40px;margin-bottom:5px;padding-bottom:5px}
  .cd-landscape-grid {height:calc(100% - 52px);gap:7px}
  .cd-items-panel,.cd-pay-panel {padding:7px}
  .cd-summary .net {padding:7px 10px}
  .cd-method-box {padding:7px 9px}
  .cd-qr-box img {
    width:min(24vw,36vh,260px);
    height:min(24vw,36vh,260px);
    min-width:190px;
    min-height:190px;
  }
}

@media (max-width:760px) {
  .customer-display-body {overflow:auto}
  .customer-display {height:auto;min-height:100vh;overflow:visible}
  .cd-landscape-payment {overflow:visible}
  .cd-landscape-grid {grid-template-columns:1fr;height:auto}
  .cd-items-panel,.cd-pay-panel {overflow:visible}
  .cd-pay-panel {display:flex}
  .cd-qr-box img {width:min(68vw,300px);height:min(68vw,300px)}
}

/* Receipt A5 portrait — keep compact receipts and signature on one physical sheet. */
@media print {
  html.receipt-print-a5-page {
    display:block!important;
    width:148mm!important;
    min-width:148mm!important;
    max-width:148mm!important;
    height:210mm!important;
    min-height:210mm!important;
    max-height:210mm!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    background:#fff!important;
  }
  body.receipt-print-a5 {
    display:block!important;
    position:relative!important;
    width:148mm!important;
    min-width:148mm!important;
    max-width:148mm!important;
    height:210mm!important;
    min-height:210mm!important;
    max-height:210mm!important;
    overflow:hidden!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
  }
  body.receipt-print-a5 .main,
  body.receipt-print-a5 .content {
    display:block!important;
    width:148mm!important;
    min-width:148mm!important;
    max-width:148mm!important;
    height:210mm!important;
    min-height:210mm!important;
    max-height:210mm!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
  body.receipt-print-a5 .receipt-print,
  body.receipt-print-a5 .receipt-print.receipt-a5 {
    position:absolute!important;
    left:0!important;
    top:0!important;
    box-sizing:border-box!important;
    width:148mm!important;
    min-width:148mm!important;
    max-width:148mm!important;
    height:210mm!important;
    min-height:210mm!important;
    max-height:210mm!important;
    margin:0!important;
    padding:8mm 7mm 20mm!important;
    overflow:hidden!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    font-size:13.5px!important;
    line-height:1.4!important;
    break-inside:avoid!important;
    page-break-inside:avoid!important;
  }
  body.receipt-print-a5 .receipt-header-block {
    grid-template-columns:23mm minmax(0,1fr) 37mm!important;
    gap:3mm!important;
    margin-bottom:3mm!important;
    padding-bottom:3mm!important;
  }
  body.receipt-print-a5 .receipt-logo-col .receipt-logo {
    width:21mm!important;
    height:19mm!important;
    max-width:21mm!important;
    max-height:19mm!important;
  }
  body.receipt-print-a5 .receipt-clinic-col h1 {
    font-size:21px!important;
    margin:0 0 1mm!important;
  }
  body.receipt-print-a5 .receipt-clinic-col h2 {
    font-size:16px!important;
    margin:0 0 1mm!important;
  }
  body.receipt-print-a5 .receipt-meta-col {
    font-size:11px!important;
    line-height:1.45!important;
    overflow-wrap:anywhere!important;
  }
  body.receipt-print-a5 .license-text {
    font-size:10.5px!important;
    line-height:1.32!important;
  }
  body.receipt-print-a5 .receipt-customer-box {
    margin:3mm 0!important;
    padding:2.5mm 3mm!important;
    font-size:12px!important;
    line-height:1.45!important;
  }
  body.receipt-print-a5 .receipt-items-table th,
  body.receipt-print-a5 .receipt-items-table td {
    padding:1.8mm 1.7mm!important;
    font-size:11.5px!important;
    line-height:1.28!important;
  }
  body.receipt-print-a5 .receipt-bottom-section {
    grid-template-columns:minmax(0,1fr) 60mm!important;
    gap:4mm!important;
    margin-top:3.5mm!important;
  }
  body.receipt-print-a5 .receipt-payment-methods {
    font-size:12px!important;
    line-height:1.5!important;
  }
  body.receipt-print-a5 .receipt-total-box {
    padding:2.5mm!important;
  }
  body.receipt-print-a5 .receipt-total-box div {
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:2mm!important;
    font-size:15px!important;
    white-space:nowrap!important;
  }
  body.receipt-print-a5 .receipt-total-box div span,
  body.receipt-print-a5 .receipt-total-box div b {
    display:inline-block!important;
    min-width:0!important;
    white-space:nowrap!important;
    word-break:keep-all!important;
    overflow-wrap:normal!important;
  }
  body.receipt-print-a5 .signature-line {
    position:absolute!important;
    right:8mm!important;
    bottom:9mm!important;
    margin:0!important;
    font-size:12px!important;
    white-space:nowrap!important;
  }
}

/* Dashboard appointment filters — four equal date actions on one mobile row. */
@media (max-width:600px) {
  .appointment-toolbar {
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    column-gap:6px!important;
    row-gap:8px!important;
  }
  .appointment-toolbar > select,
  .appointment-toolbar > label {
    grid-column:1 / -1!important;
  }
  .appointment-toolbar > button,
  .appointment-toolbar > .today-shortcut,
  .appointment-toolbar > .appointment-date-nav {
    grid-column:auto!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:42px!important;
    margin:0!important;
    padding:5px 2px!important;
    border-radius:10px!important;
    font-size:11.5px!important;
    line-height:1.15!important;
    text-align:center!important;
    white-space:nowrap!important;
    flex:none!important;
  }
}
/* Mobile two-column layout for appointment creation and patient history. */
@media(max-width:600px){
  #appointment_create_modal .modal-card{width:calc(100vw - 16px);padding:16px 12px}
  #appointment_create_modal .modal-form{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 8px}
  #appointment_create_modal .modal-form>label{min-width:0;margin:0}
  #appointment_create_modal .modal-form>label input,
  #appointment_create_modal .modal-form>label select,
  #appointment_create_modal .modal-form>label textarea{width:100%;min-width:0;max-width:100%;box-sizing:border-box}
  #appointment_create_modal .modal-form .span2{grid-column:1/-1}
  #appointment_create_modal .patient-picker{min-width:0}
  .patient-info-card .info-grid,
  .profile-section .info-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .patient-info-card .info-grid>div,
  .profile-section .info-grid>div{min-width:0;padding:10px 8px}
  .patient-info-card .info-grid .span2,
  .profile-section .info-grid .span2{grid-column:1/-1}
  .patient-info-card .info-grid b,
  .profile-section .info-grid b{font-size:14px;line-height:1.3}
  .patient-info-card .info-grid span,
  .profile-section .info-grid span{font-size:14px;overflow-wrap:anywhere;word-break:break-word}
}

/* FoodWork theme priority layer — keep last in the cascade */
html[data-theme] body.app-shell .sidebar{background:linear-gradient(165deg,var(--fw-sidebar-start) 0%,var(--fw-primary-dark) 48%,var(--fw-sidebar-end) 135%)!important}
html[data-theme] body.app-shell .sidebar .side-nav>a.active,
html[data-theme] body.app-shell .sidebar .nav-parent.active,
html[data-theme] body.app-shell .sidebar .nav-group.active>.nav-parent{background:#fff!important;color:var(--fw-primary-dark)!important}
html[data-theme] body.app-shell .sidebar .nav-children a.active{background:rgba(255,255,255,.18)!important;color:#fff!important}
html[data-theme] .btn:not(.secondary):not(.danger):not(.success):not(.light):not(.rose),
html[data-theme] button:not(.secondary):not(.danger):not(.success):not(.light):not(.modal-close),
html[data-theme] .btn-small:not(.secondary):not(.danger):not(.success):not(.light){background:var(--fw-primary)!important;color:#fff!important}
html[data-theme] .section-title,
html[data-theme] .page-head h1,
html[data-theme] .topbar-title b{color:var(--fw-primary-dark)!important}
html[data-theme] .settings-mobile-subnav a.active,
html[data-theme] .accounting-mobile-subnav a.active{background:var(--fw-primary)!important;border-color:var(--fw-primary)!important;color:#fff!important}
html[data-theme] input:focus,
html[data-theme] select:focus,
html[data-theme] textarea:focus{border-color:var(--fw-primary)!important;box-shadow:0 0 0 4px var(--fw-focus)!important}
.foodwork-brand{display:flex!important;align-items:center!important;gap:10px!important;padding:4px 2px 16px!important;margin-bottom:10px!important}
.foodwork-mark{position:relative;display:grid;place-items:center;width:48px;height:48px;flex:0 0 48px;border-radius:15px;background:#fff;color:var(--fw-primary-dark);font-size:17px;font-weight:900;letter-spacing:-1px;box-shadow:0 10px 24px rgba(16,24,40,.18)}
.foodwork-mark span{position:absolute;right:-3px;top:-7px;color:#ffd166;font-size:17px;text-shadow:0 2px 5px rgba(0,0,0,.22)}
.foodwork-wordmark{display:flex;flex-direction:column;color:#fff;font-size:22px;font-weight:800;line-height:1.05;letter-spacing:-.4px}.foodwork-wordmark small{margin-top:6px;color:rgba(255,255,255,.7);font-size:8px;font-weight:700;letter-spacing:1.7px}
.foodwork-login-brand{display:flex;justify-content:center;align-items:center;gap:12px;margin:2px auto 20px}.foodwork-login-brand .foodwork-mark{width:58px;height:58px;flex-basis:58px;font-size:20px;background:var(--fw-primary);color:#fff}.foodwork-login-brand .foodwork-wordmark{color:#20242c;font-size:28px;text-align:left}.foodwork-login-brand .foodwork-wordmark small{color:var(--fw-primary);font-size:9px}
.login-page{background:radial-gradient(circle at 12% 10%,var(--fw-primary-subtle),transparent 34%),linear-gradient(135deg,#f9fafb,#f2f4f7)!important}.modern-login-card{border:1px solid var(--fw-primary-border);box-shadow:0 24px 70px rgba(var(--fw-rgb),.14)!important}.modern-login-card h1{text-align:center;color:var(--fw-primary-dark)!important}.modern-login-card .login-subtitle{text-align:center}.modern-login-card .btn{width:100%;background:var(--fw-primary)!important}
@media(min-width:901px){body.settings-two-rail .foodwork-brand .foodwork-wordmark,body[class*="route-accounting"] .foodwork-brand .foodwork-wordmark{display:none}body.settings-two-rail .foodwork-brand,body[class*="route-accounting"] .foodwork-brand{justify-content:center!important}}

/* FoodWork Restaurant Floor v0.2 */
.restaurant-floor-section{margin:0 0 24px;padding:20px;border:1px solid #e4e7ec;border-radius:24px;background:#fff;box-shadow:0 16px 44px rgba(16,24,40,.07)}
.restaurant-floor-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:16px}.restaurant-floor-head h2{margin:3px 0 4px;font-size:25px;color:#101828}.restaurant-floor-head p{margin:0;color:#667085}.eyebrow{font-size:11px;font-weight:800;letter-spacing:1.7px;color:var(--fw-primary)}
.floor-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.floor-legend{display:inline-flex;align-items:center;gap:6px;color:#475467;font-size:12px;font-weight:700}.floor-legend i{width:10px;height:10px;border-radius:50%;box-shadow:0 0 0 3px #fff,0 0 0 4px #e4e7ec}.floor-legend .is-available{background:#12b76a}.floor-legend .is-open{background:#f79009}.floor-legend .is-billing{background:#f04438}
.restaurant-floor-plan{position:relative;min-height:580px;overflow:hidden;border:1px solid #d0d5dd;border-radius:22px;background-color:#f8f7f3;background-image:linear-gradient(rgba(71,84,103,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(71,84,103,.055) 1px,transparent 1px);background-size:28px 28px;box-shadow:inset 0 0 0 8px #fff,inset 0 0 0 9px #e4e7ec}
.restaurant-floor-plan:before{content:'';position:absolute;left:62%;top:8%;bottom:8%;border-left:2px dashed rgba(71,84,103,.16)}.floor-zone-label{position:absolute;z-index:1;color:#98a2b3;font-size:10px;font-weight:900;letter-spacing:1.8px}.zone-main{left:4%;top:4%}.zone-private{left:66%;top:4%}
.floor-service-counter{position:absolute;left:var(--x);top:var(--y);width:var(--w);height:var(--h);border-radius:15px;background:linear-gradient(135deg,#344054,#1d2939);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 10px 20px rgba(16,24,40,.15);z-index:2;touch-action:none}.floor-service-counter span{font-weight:800}.floor-service-counter small{color:#d0d5dd;font-size:10px;text-transform:uppercase;letter-spacing:1px}.fixture-drag-hint{display:none;position:absolute;top:-25px;padding:4px 8px;border-radius:8px;background:var(--fw-primary);font-size:10px}.restaurant-floor-plan.is-editing .floor-service-counter{cursor:grab;outline:3px dashed var(--fw-primary);outline-offset:3px}.restaurant-floor-plan.is-editing .floor-service-counter:active{cursor:grabbing}.restaurant-floor-plan.is-editing .fixture-drag-hint{display:block}
.floor-table{position:absolute!important;left:var(--x)!important;top:var(--y)!important;width:var(--w)!important;height:var(--h)!important;min-width:92px;min-height:82px;margin:0!important;padding:10px!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:3px solid #fff!important;border-radius:18px!important;color:#101828!important;background:#fff!important;box-shadow:0 8px 22px rgba(16,24,40,.13),0 0 0 1px #d0d5dd!important;transition:transform .18s ease,box-shadow .18s ease;touch-action:none;z-index:3}.floor-table:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(16,24,40,.18),0 0 0 2px var(--fw-primary)!important}.floor-table.shape-round{border-radius:999px!important}.floor-table strong{font-size:16px;line-height:1.1}.floor-table small{font-size:11px;color:#667085}.table-status-dot{position:absolute;right:10px;top:10px;width:10px;height:10px;border-radius:50%}.floor-table-available .table-status-dot{background:#12b76a}.floor-table-open{background:#fffaeb!important;box-shadow:0 8px 22px rgba(247,144,9,.18),0 0 0 2px #fdb022!important}.floor-table-open .table-status-dot{background:#f79009}.floor-table-billing{background:#fef3f2!important;box-shadow:0 8px 22px rgba(240,68,56,.18),0 0 0 2px #f97066!important}.floor-table-billing .table-status-dot{background:#f04438;animation:billingPulse 1.3s infinite}.table-meta{font-size:10px;color:#475467}.table-total{font-size:13px;color:var(--fw-primary)}.table-available-label{margin-top:3px;color:#027a48;font-size:10px;font-weight:800}@keyframes billingPulse{50%{transform:scale(1.45);opacity:.55}}
.restaurant-floor-plan.is-editing{outline:4px solid var(--fw-focus);cursor:move}.restaurant-floor-plan.is-editing .floor-table{cursor:grab;animation:tableEditWiggle 1.4s ease-in-out infinite alternate}.restaurant-floor-plan.is-editing .floor-table:active{cursor:grabbing;z-index:20;animation:none;transform:scale(1.04)}@keyframes tableEditWiggle{from{box-shadow:0 6px 18px rgba(16,24,40,.10),0 0 0 2px var(--fw-primary)}to{box-shadow:0 10px 25px rgba(16,24,40,.16),0 0 0 2px var(--fw-primary)}}
.floor-layout-save{display:none;align-items:center;gap:8px;margin-top:12px;padding:12px;border-radius:14px;background:var(--fw-primary-soft);border:1px solid var(--fw-primary-border)}.floor-layout-save.show{display:flex}.floor-layout-save small{margin-left:auto}.floor-empty{position:absolute;inset:0;display:grid;place-content:center;text-align:center;color:#667085}.floor-empty b{font-size:18px}.floor-empty a{margin-top:6px;color:var(--fw-primary)}
.restaurant-table-modal{width:min(620px,96vw)!important}.table-modal-head{display:flex;align-items:center;gap:12px;padding-bottom:14px;border-bottom:1px solid #eaecf0}.table-modal-head h2{margin:2px 0 0}.table-modal-head small{color:var(--fw-primary);font-weight:800;letter-spacing:1px}.table-modal-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;background:var(--fw-primary-soft);font-size:24px}.table-action-form{display:grid;gap:12px;margin-top:16px}.table-action-form label,.table-order-form label{font-weight:700;color:#344054}.table-primary-action{width:100%}.table-session-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:16px 0}.table-session-summary>div{padding:11px;border-radius:13px;background:#f9fafb;border:1px solid #eaecf0}.table-session-summary span{display:block;color:#667085;font-size:11px}.table-session-summary b{display:block;margin-top:3px;font-size:16px}.table-order-form{display:grid;grid-template-columns:1fr 110px;gap:10px;padding:14px;border:1px solid var(--fw-primary-border);border-radius:15px;background:var(--fw-primary-soft)}.table-inline-action{display:inline-block;margin:12px 8px 0 0}.billing-callout{margin-top:12px;padding:13px;border-radius:13px;background:#fef3f2;color:#b42318;font-weight:800;text-align:center}
@media(max-width:900px){.restaurant-floor-section{padding:14px;border-radius:18px}.restaurant-floor-head{display:block}.floor-toolbar{justify-content:flex-start;margin-top:12px}.restaurant-floor-plan{min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:14px;background:#f8f7f3}.restaurant-floor-plan:before,.floor-zone-label{display:none}.floor-table,.floor-service-counter{position:relative!important;left:auto!important;top:auto!important;width:auto!important;height:112px!important;min-width:0}.floor-service-counter{grid-column:1/-1;height:72px!important}.restaurant-floor-plan.is-editing .floor-table{animation:none}.floor-layout-save{position:sticky;bottom:8px;z-index:20;flex-wrap:wrap}.floor-layout-save small{width:100%;margin-left:0}.table-session-summary{grid-template-columns:1fr}.table-order-form{grid-template-columns:1fr}.table-order-form .span2{grid-column:auto}}

/* FoodWork floor editor and live orders v0.3 */
.floor-edit-button{font-weight:800!important;box-shadow:0 8px 20px rgba(var(--fw-rgb),.2)!important}.floor-howto{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:-2px 0 14px;padding:12px 14px;border:1px solid var(--fw-primary-border);border-radius:14px;background:var(--fw-primary-soft);color:#475467;font-size:12px}.floor-howto b{color:var(--fw-primary-dark);font-size:13px}.floor-howto span{display:inline-flex;align-items:center;gap:6px}.floor-howto i{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#fff;color:var(--fw-primary);font-style:normal;font-weight:900;box-shadow:0 0 0 1px var(--fw-primary-border)}.floor-howto a{margin-left:auto;color:var(--fw-primary);font-weight:800}.floor-howto.is-active{border-width:2px;box-shadow:0 0 0 4px var(--fw-focus)}
.table-drag-hint{display:none;position:absolute;left:50%;top:-27px;transform:translateX(-50%);padding:4px 8px;border-radius:8px;background:var(--fw-primary-dark);color:#fff;font-size:10px;font-weight:800;white-space:nowrap}.restaurant-floor-plan.is-editing .table-drag-hint{display:block}.restaurant-floor-plan.is-editing:after{content:'โหมดจัดผัง: ลากโต๊ะเพื่อย้ายตำแหน่ง';position:absolute;left:50%;bottom:14px;transform:translateX(-50%);z-index:10;padding:8px 14px;border-radius:999px;background:#101828;color:#fff;font-size:12px;font-weight:800;box-shadow:0 8px 20px rgba(16,24,40,.25)}
.floor-layout-save.show{position:sticky;bottom:10px;z-index:30;box-shadow:0 14px 34px rgba(16,24,40,.18)}
.live-orders-section{margin:22px 0;padding:20px;border:1px solid #e4e7ec;border-radius:22px;background:#fff;box-shadow:0 12px 32px rgba(16,24,40,.06)}.live-orders-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}.live-orders-head h3{margin:3px 0;font-size:21px}.live-orders-head p{margin:0;color:#667085}.live-orders-table{width:100%;border-collapse:separate;border-spacing:0}.live-orders-table th{padding:11px 10px;background:#f9fafb;color:#475467;font-size:11px;text-align:left;white-space:nowrap}.live-orders-table td{padding:13px 10px;border-top:1px solid #eaecf0;vertical-align:middle}.live-orders-table td small{display:block;margin-top:2px;color:#98a2b3;font-size:10px}.order-number{color:var(--fw-primary)}.order-items-summary{min-width:210px;max-width:360px;color:#475467}.order-status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap}.order-status-open{background:#fffaeb;color:#b54708}.order-status-billing{background:#fef3f2;color:#b42318}.live-order-row.status-billing{background:#fffafa}.live-orders-empty{display:flex;flex-direction:column;align-items:center;padding:28px;color:#667085}.live-orders-empty b{color:#344054;font-size:16px}.live-orders-empty span{margin-top:4px;font-size:12px}
@media(max-width:900px){.floor-howto{align-items:flex-start}.floor-howto b{width:100%}.floor-howto a{margin-left:0}.table-drag-hint,.restaurant-floor-plan.is-editing:after{display:none!important}.live-orders-section{padding:14px}.live-orders-head{align-items:flex-start;flex-direction:column}.live-orders-table-wrap{overflow-x:auto}.live-orders-table{min-width:950px}}

/* FoodWork multi-floor designer */
.floor-designer-title p{margin:5px 0 0;color:#667085}.floor-designer-title .btn+.btn{margin-left:7px}.floor-designer-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:18px;align-items:start}.floor-designer-main{padding:0;overflow:hidden}.floor-designer-nav{padding:18px 20px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #eaecf0}.floor-designer-nav small{display:block;color:#667085;font-weight:700}.floor-level-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-top:7px}.floor-level-tab{padding:8px 14px;border-radius:12px;background:#f2f4f7;color:#475467;font-weight:800;text-decoration:none}.floor-level-tab small{font-size:9px}.floor-level-tab.active{background:var(--fw-primary);color:#fff}.floor-level-tab.active small{color:#fff}.floor-quick-form{display:none;gap:8px;padding:12px 20px;background:#fffbfa}.floor-quick-form.show{display:grid;grid-template-columns:2fr 1fr 90px auto}.floor-canvas-head{display:flex;justify-content:space-between;align-items:center;padding:14px 20px}.floor-canvas-head h2{margin:0 0 8px}.floor-canvas-head>span{font-size:12px;color:#667085;font-weight:700}.floor-zone-chips{display:flex;gap:7px;flex-wrap:wrap}.floor-zone-chips button{border:0;border-radius:999px;padding:7px 13px;background:#eef1ec;color:#475467;font-weight:800;cursor:pointer}.floor-zone-chips button:not(:first-child):before{content:'';display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:50%;background:var(--zone-color)}.floor-zone-chips button.active{background:#1f3b25;color:#fff}.floor-designer-canvas{margin:0 20px;min-height:620px;border-radius:14px}.floor-designer-canvas:before{display:none}.floor-designer-canvas .floor-table{border-color:var(--zone-color)!important}.floor-designer-canvas .floor-table em{font-size:9px;font-style:normal;color:#667085}.floor-designer-canvas .zone-muted{opacity:.18;pointer-events:none}.floor-designer-save{display:flex;justify-content:flex-end;align-items:center;gap:14px;padding:16px 20px}.floor-designer-save span{margin-right:auto;color:#667085;font-size:12px}.floor-settings-card{padding:16px;margin-bottom:14px}.floor-settings-card h3{margin:0 0 13px}.floor-settings-card form>label{display:block;margin-bottom:10px}.floor-settings-card input:not([type=checkbox]):not([type=color]){width:100%}.settings-card-head{display:flex;justify-content:space-between;align-items:center}.settings-card-head button,.link-danger{border:0;background:none;color:var(--fw-primary);font-weight:800;cursor:pointer}.floor-zone-create{display:none;padding:10px;background:#f9fafb;border-radius:12px;margin-bottom:10px}.floor-zone-create.show{display:block}.floor-zone-row{display:grid!important;grid-template-columns:1fr 42px 55px;gap:6px;padding:10px 0;border-top:1px solid #eaecf0;align-items:center}.floor-zone-row input[type=color]{width:40px;height:38px;padding:2px}.floor-zone-row .check{margin:0!important}.floor-zone-row small{color:#667085}.floor-zone-row .link-danger{font-size:11px}.floor-table.is-floor-hidden,.floor-service-counter.is-floor-hidden{display:none!important}
@media(max-width:1050px){.floor-designer-layout{grid-template-columns:1fr}.floor-designer-sidebar{display:grid;grid-template-columns:1fr 1fr;gap:14px}.floor-designer-canvas{min-height:520px}}@media(max-width:700px){.floor-designer-sidebar{display:block}.floor-quick-form.show{grid-template-columns:1fr}.floor-designer-canvas{margin:0 10px;display:block;min-height:520px}.floor-designer-canvas .floor-table,.floor-designer-canvas .floor-service-counter{position:absolute!important;width:var(--w)!important;height:var(--h)!important}.floor-designer-save{align-items:stretch;flex-direction:column}.floor-designer-title .btn{display:inline-block;margin-top:8px}}
.room-type-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px;margin-top:16px}.room-type-card{display:grid;gap:11px}.room-type-card.is-disabled{opacity:.68;background:#f9fafb}.room-type-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.room-type-actions span{margin-right:auto;color:#667085;font-size:12px}

/* Shared FoodWork menu ordering UI — staff table modal and future QR ordering */
.table-menu-launch{width:100%;display:grid!important;grid-template-columns:42px 1fr;align-items:center;text-align:left;margin-top:12px;padding:13px 15px!important;border-radius:15px!important}.table-menu-launch>span{grid-row:1/3;font-size:25px}.table-menu-launch b{font-size:15px}.table-menu-launch small{opacity:.8;font-size:11px}.food-menu-modal{z-index:1200!important;padding:0!important}.food-menu-shell{position:relative;width:min(1120px,100vw)!important;height:min(860px,100vh);max-height:100vh!important;padding:0!important;overflow:hidden!important;border-radius:24px!important;background:#fff9ef!important}.food-menu-header{display:flex;align-items:center;gap:16px;padding:20px 24px;background:#fff9ef}.food-menu-back{width:42px;height:42px;border:0!important;border-radius:50%!important;background:#fff!important;color:#2c1810!important;font-size:34px;line-height:1!important;box-shadow:0 4px 16px rgba(80,46,24,.1)}.food-menu-brand{display:flex;align-items:center;gap:12px}.food-menu-brand>span{display:grid;place-items:center;width:58px;height:58px;border-radius:16px;background:var(--fw-primary);color:#fff;font-weight:900}.food-menu-brand h2{margin:0;color:#2c1810;font-size:22px}.food-menu-brand small{color:#8a7465}.food-menu-table{margin-left:auto;text-align:right}.food-menu-table small{display:block;color:#9b8577}.food-menu-table b{color:#2c1810;font-size:16px}.food-menu-categories{display:flex;gap:10px;overflow:auto;padding:4px 24px 14px;border-bottom:1px solid #f1e4d2;scrollbar-width:none}.food-menu-categories button{flex:0 0 auto;padding:10px 20px!important;border:1px solid #eadbc8!important;border-radius:999px!important;background:#fffaf3!important;color:#725f52!important;font-weight:700!important;box-shadow:0 4px 12px rgba(80,46,24,.05)!important}.food-menu-categories button.active{background:var(--fw-primary)!important;border-color:var(--fw-primary)!important;color:#fff!important}.food-menu-content{height:calc(100% - 145px);overflow-y:auto;padding:18px 24px 110px}.food-menu-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.food-menu-item{position:relative;display:grid!important;grid-template-columns:132px 1fr;min-height:152px;padding:12px!important;border:1px solid #f3e6d5!important;border-radius:22px!important;background:#fffaf3!important;color:#2d1d15!important;text-align:left!important;box-shadow:0 8px 22px rgba(91,57,31,.08)!important;overflow:hidden}.food-menu-item:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(91,57,31,.14)!important}.food-menu-photo{display:grid;place-items:center;width:100%;height:128px;border-radius:16px;background:#fff;overflow:hidden}.food-menu-photo img{width:100%;height:100%;object-fit:cover}.food-menu-photo i{font-style:normal;font-size:46px}.food-menu-info{display:flex;flex-direction:column;padding:8px 12px}.food-menu-info>small{color:#a48b79;font-weight:700}.food-menu-info>strong{margin-top:4px;font-size:17px;line-height:1.35}.food-menu-info>em{margin-top:auto;color:#dc6b24;font-size:20px;font-style:normal;font-weight:900}.food-menu-info>span{margin-top:4px;color:#9b8577;font-size:11px}.food-menu-add{position:absolute;right:13px;bottom:13px;display:grid;place-items:center;width:31px;height:31px;border-radius:50%;background:var(--fw-primary);color:#fff;font-size:22px;font-weight:700}.food-menu-empty{padding:50px;text-align:center;color:#8a7465}.food-cart-fab{position:absolute;right:24px;bottom:22px;z-index:5;display:flex!important;align-items:center;gap:8px;padding:12px 15px!important;border:0!important;border-radius:999px!important;background:#df711f!important;color:#fff!important;box-shadow:0 12px 30px rgba(185,83,18,.32)!important}.food-cart-fab>span{font-size:23px}.food-cart-fab>b{display:grid;place-items:center;min-width:23px;height:23px;padding:0 5px;border-radius:20px;background:#d92d47;font-size:11px}.food-cart-fab>em{font-style:normal;font-weight:800}.food-cart-fab.cart-pop{transform:scale(1.12)}.food-cart{position:absolute;top:0;right:0;bottom:0;z-index:10;width:min(420px,100%);padding:22px;background:#fff;box-shadow:-18px 0 45px rgba(60,35,20,.18);transform:translateX(105%);transition:transform .25s ease;overflow-y:auto}.food-cart.show{transform:translateX(0)}.food-cart-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:16px;border-bottom:1px solid #eee2d5}.food-cart-head span{display:block;color:#8a7465;font-size:12px}.food-cart-head b{font-size:20px}.food-cart-head button{width:36px;height:36px;border-radius:50%!important;background:#f5eee7!important;color:#39251b!important;font-size:20px}.food-cart-lines{display:grid;gap:10px;margin:16px 0}.food-cart-line{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border-radius:14px;background:#fff9ef}.food-cart-line small{display:block;color:#dc6b24}.food-cart-qty{display:flex;align-items:center;gap:9px}.food-cart-qty button{display:grid;place-items:center;width:29px;height:29px;padding:0!important;border-radius:50%!important;background:#fff!important;color:var(--fw-primary)!important;border:1px solid var(--fw-primary-border)!important}.food-cart-empty{padding:32px 10px;color:#9b8577;text-align:center}.food-cart form label{display:block;color:#594337;font-weight:700}.food-cart-submit{width:100%;display:flex!important;justify-content:space-between;margin-top:14px;padding:14px 16px!important}.food-cart-submit b{color:#fff}
@media(max-width:720px){.food-menu-shell{height:100vh!important;border-radius:0!important}.food-menu-header{padding:14px 16px}.food-menu-brand>span{width:48px;height:48px}.food-menu-brand h2{font-size:18px}.food-menu-categories{padding:4px 16px 12px}.food-menu-content{padding:14px 16px 100px}.food-menu-grid{grid-template-columns:1fr}.food-menu-item{grid-template-columns:120px 1fr;min-height:142px}.food-menu-photo{height:118px}.food-cart-fab{right:16px;bottom:16px}.food-menu-table small{display:none}}
html[data-theme] .food-menu-item{background:#fffaf3!important;color:#2d1d15!important}html[data-theme] .food-menu-categories button:not(.active){background:#fffaf3!important;color:#725f52!important}html[data-theme] .food-menu-back,html[data-theme] .food-cart-head button,html[data-theme] .food-cart-qty button{background:#fff!important;color:var(--fw-primary)!important}
html[data-theme] body .food-menu-shell button.food-menu-item{background:#fffaf3!important;color:#2d1d15!important}html[data-theme] body .food-menu-shell .food-menu-categories button:not(.active){background:#fffaf3!important;color:#725f52!important}html[data-theme] body .food-menu-shell .food-menu-categories button.active{background:var(--fw-primary)!important;color:#fff!important}
.food-menu-item[hidden]{display:none!important}.food-cart-line{display:block}.food-cart-line-main{display:flex;align-items:center;justify-content:space-between;gap:12px}.food-item-note{display:block;margin-top:10px;color:#725f52;font-size:11px;font-weight:700}.food-item-note input{width:100%;margin-top:5px;padding:9px 10px;border:1px solid #eadbc8;border-radius:10px;background:#fff;font-size:13px}
html[data-theme] body .food-menu-shell button.food-menu-item[hidden]{display:none!important}
.menu-option-admin{margin-top:16px}.option-choice-list{display:grid;gap:8px;margin:14px 0}.option-choice-list form{display:grid;grid-template-columns:1.3fr 1.3fr 110px 80px auto auto auto;gap:8px;align-items:center;padding:9px;border-radius:12px;background:#f9fafb}@media(max-width:800px){.option-choice-list form{grid-template-columns:1fr 1fr}.option-choice-list form>*{min-width:0}}
.food-item-options{display:grid;gap:7px;margin-top:10px}.food-item-options label{display:grid;grid-template-columns:120px 1fr;align-items:center;gap:8px;color:#725f52;font-size:11px;font-weight:700}.food-item-options select{padding:8px;border:1px solid #eadbc8;border-radius:9px;background:#fff}
.table-current-orders{margin:4px 0 12px;border:1px solid #eaecf0;border-radius:14px;overflow:hidden;background:#fff}.table-current-orders-head{display:flex;justify-content:space-between;padding:10px 12px;background:#f9fafb;color:#344054}.table-current-orders-head span{color:#667085;font-size:11px}.table-current-orders-scroll{max-height:240px;overflow-y:auto;overscroll-behavior:contain}.table-current-order-row{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:9px;align-items:start;padding:11px 12px;border-top:1px solid #f2f4f7}.table-current-order-row:first-child{border-top:0}.ordered-qty{display:grid;place-items:center;min-height:30px;border-radius:9px;background:var(--fw-primary-soft);color:var(--fw-primary);font-weight:900}.table-current-order-row b{display:block;color:#101828}.table-current-order-row small{display:block;margin-top:3px;color:#667085;font-size:11px}.table-current-order-row em{display:inline-block;margin-top:5px;color:#b54708;font-size:10px;font-style:normal;font-weight:800}.table-current-order-row>strong{color:var(--fw-primary);white-space:nowrap}.table-no-orders{margin:4px 0 12px;padding:13px;border-radius:12px;background:#f9fafb;color:#667085;text-align:center;font-size:12px}
.pos-checkout-modal{width:min(980px,97vw)!important;max-height:94vh!important;overflow-y:auto!important}.pos-item-edit{grid-column:2/4;display:grid;grid-template-columns:90px 1fr auto auto;gap:7px;align-items:end;margin-top:5px}.pos-item-edit label{font-size:10px;color:#667085}.pos-item-edit input{padding:7px;font-size:12px}.pos-payment-panel{padding:15px;border:2px solid var(--fw-primary-border);border-radius:16px;background:#fcfcfd}.pos-bill-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.pos-bill-title span{color:var(--fw-primary);font-size:10px;font-weight:900;letter-spacing:1.5px}.pos-bill-title h3{margin:1px 0}.pos-adjustments{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.pos-payment-form label{color:#475467;font-size:11px;font-weight:700}.pos-methods{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin:13px 0}.pos-methods label{cursor:pointer}.pos-methods input{position:absolute;opacity:0}.pos-methods span{display:grid;place-items:center;min-height:60px;padding:8px;border:1px solid #d0d5dd;border-radius:12px;background:#fff;text-align:center}.pos-methods input:checked+span{border:2px solid var(--fw-primary);background:var(--fw-primary-soft);color:var(--fw-primary-dark)}.pos-payment-details{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.pos-totals{margin-top:13px;padding:12px;border-radius:13px;background:#fff}.pos-totals>div{display:flex;justify-content:space-between;padding:3px}.pos-grand-total{margin-top:6px;padding-top:9px!important;border-top:1px solid #eaecf0;font-size:18px}.pos-grand-total strong{color:var(--fw-primary);font-size:23px}.pos-pay-button{width:100%;margin-top:12px;padding:14px!important;font-size:16px!important}@media(max-width:700px){.pos-adjustments,.pos-payment-details{grid-template-columns:1fr}.pos-methods{grid-template-columns:repeat(2,1fr)}.pos-item-edit{grid-template-columns:1fr 1fr}.pos-item-edit label:nth-child(2){grid-column:1/-1}}
.floor-table.is-floor-hidden,.floor-service-counter.is-floor-hidden{display:none!important}.dashboard-floor-selector{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:12px}.dashboard-floor-selector .floor-level-tab{border:0;cursor:pointer}.dashboard-floor-selector .floor-zone-chips span{border-radius:999px;padding:7px 12px;background:#eef1ec;font-size:12px;font-weight:800;color:#475467}.dashboard-floor-selector .floor-zone-chips span:before{content:'';display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:50%;background:var(--zone-color)}.dashboard-floor-selector .is-floor-hidden{display:none}
html[data-theme] body .floor-designer-main .floor-quick-form{display:none!important}html[data-theme] body .floor-designer-main .floor-quick-form.show{display:grid!important}html[data-theme] body .floor-designer-main .floor-level-tab{display:inline-flex!important;flex-direction:column;background:#f2f4f7!important;color:#475467!important;text-decoration:none!important}html[data-theme] body .floor-designer-main .floor-level-tab.active{background:var(--fw-primary)!important;color:#fff!important}html[data-theme] body .floor-designer-canvas button.floor-table{background:#fff!important;color:#101828!important;border-color:var(--zone-color)!important}html[data-theme] body .floor-designer-canvas button.floor-table em{color:#667085!important}.floor-zone-create{display:none!important}.floor-zone-create.show{display:block!important}

/* FoodWork brand logo images */
.foodwork-mark{background:transparent;box-shadow:none;border-radius:12px}
.foodwork-mark img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 0 1.5px rgba(255,255,255,.95)) drop-shadow(0 6px 14px rgba(0,0,0,.22))}
.foodwork-login-brand{margin:0 auto 12px}
.foodwork-login-logo{display:block;width:min(230px,70%);height:auto;margin:0 auto}

/* FoodWork POS order screen (open table): menu grid left, order panel right */
.modal.pos-modal{padding:16px!important;align-items:center!important}
.modal-card.pos-shell{display:grid;grid-template-columns:minmax(0,1fr) 380px;min-width:0;width:min(1320px,100%)!important;max-width:none!important;height:min(880px,calc(100vh - 32px));padding:0!important;overflow:hidden;background:#f4f2ee!important;border:0!important;border-radius:20px!important}
.pos-shell [hidden]{display:none!important}
.pos-shell button:disabled{opacity:.45;cursor:not-allowed}
.pos-menu{display:flex;flex-direction:column;min-width:0;min-height:0}
.pos-menu-head{display:flex;align-items:center;gap:12px;padding:14px 18px 10px}
.pos-shell .pos-back{flex:0 0 42px;width:42px;height:42px;padding:0!important;border:0!important;border-radius:12px!important;background:#fff!important;color:#2c1810!important;font-size:30px;line-height:1;box-shadow:0 2px 8px rgba(40,24,12,.08)!important;cursor:pointer}
.pos-search{flex:1;display:flex;align-items:center;gap:8px;margin:0!important;padding:0 14px;height:42px;border-radius:12px;background:#fff;box-shadow:0 2px 8px rgba(40,24,12,.06)}
.pos-search span{font-size:14px;opacity:.55}
.pos-shell .pos-search input{flex:1;height:40px;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;font-size:15px;outline:0}
.pos-cats{display:flex;gap:8px;min-width:0;padding:2px 18px 12px;overflow-x:auto;scrollbar-width:none}
.pos-shell .pos-cats button{flex:0 0 auto;padding:9px 18px!important;border:1px solid #e4ddd3!important;border-radius:999px!important;background:#fff!important;color:#5b4a3e!important;font-weight:700;font-size:14px;cursor:pointer;box-shadow:none!important}
.pos-shell .pos-cats button.active{background:var(--fw-primary)!important;border-color:var(--fw-primary)!important;color:#fff!important}
.pos-menu-scroll{flex:1;min-height:0;overflow-y:auto;padding:4px 18px 18px;overscroll-behavior:contain}
.pos-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.pos-shell .pos-item{position:relative;display:flex;flex-direction:column;padding:0!important;border:1px solid #ebe5dc!important;border-radius:14px!important;background:#fff!important;color:#24170f!important;text-align:left;overflow:hidden;cursor:pointer;box-shadow:0 2px 8px rgba(40,24,12,.05)!important;transition:transform .12s ease,box-shadow .12s ease}
.pos-shell .pos-item:hover{box-shadow:0 8px 20px rgba(40,24,12,.12)!important}
.pos-shell .pos-item:active,.pos-shell .pos-item.is-added{transform:scale(.96)}
.pos-item-photo{display:grid;place-items:center;width:100%;aspect-ratio:4/3;background:#f7f2ea;overflow:hidden}
.pos-item-photo img{width:100%;height:100%;object-fit:cover}
.pos-item-photo i{font-style:normal;font-size:40px}
.pos-item-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.7em;padding:8px 10px 2px;font-size:14px;font-weight:700;line-height:1.35}
.pos-item-price{padding:0 10px 10px;color:var(--fw-primary);font-size:15px;font-weight:800}
.pos-item-badge{position:absolute;top:8px;right:8px;display:grid;place-items:center;min-width:28px;height:28px;padding:0 7px;border-radius:999px;background:var(--fw-primary);color:#fff;font-size:14px;box-shadow:0 3px 10px rgba(0,0,0,.25)}
.pos-menu-empty{padding:48px 16px;color:#8a7465;text-align:center}
.pos-order{display:flex;flex-direction:column;min-height:0;background:#fff;border-left:1px solid #ebe5dc}
.pos-order-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:16px 18px 12px;background:#fffaf0;border-bottom:1px solid #f0e6d6}
.pos-order-head small{display:block;color:#9b8577;font-size:11px;font-weight:700;letter-spacing:.6px;text-transform:uppercase}
.pos-order-head h2{margin:2px 0;color:#24170f;font-size:22px;line-height:1.2}
.pos-order-meta{color:#7a6658;font-size:12px}
.pos-shell .pos-order-close{display:none;width:36px;height:36px;padding:0!important;border:0!important;border-radius:50%!important;background:#f3ece2!important;color:#3a271c!important;font-size:20px;cursor:pointer}
.pos-order-body{flex:1;min-height:0;overflow-y:auto;padding:4px 0 8px;overscroll-behavior:contain}
.pos-block h3{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:0;padding:12px 18px 6px;color:#24170f;font-size:14px}
.pos-block h3 span{color:#98a2b3;font-size:11px;font-weight:600}
.pos-block-new{margin-top:6px;border-top:6px solid #f4f2ee}
.pos-block-new h3{color:var(--fw-primary-dark,var(--fw-primary))}
.pos-empty{margin:4px 18px 8px;padding:14px;border:1px dashed #e4ddd3;border-radius:12px;color:#98a2b3;font-size:12px;text-align:center}
.pos-sent-row{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:8px;align-items:start;padding:9px 18px;border-top:1px solid #f2f4f7}
.pos-sent-row:first-of-type{border-top:0}
.pos-sent-qty{color:#667085;font-weight:800}
.pos-sent-name b{display:block;color:#344054;font-size:14px;font-weight:600}
.pos-sent-name small{display:block;margin-top:2px;color:#667085;font-size:11px}
.pos-status{display:inline-block;margin-top:4px;padding:1px 8px;border-radius:999px;background:#f2f4f7;color:#475467;font-size:10px;font-style:normal;font-weight:700}
.pos-status-preparing{background:#fef0c7;color:#93370d}
.pos-status-ready{background:#d1fadf;color:#05603a}
.pos-status-served{background:#eaecf0;color:#667085}
.pos-sent-row>strong{color:#344054;font-size:14px;white-space:nowrap}
.pos-lines{display:grid;gap:8px;padding:2px 12px 4px}
.pos-line{padding:10px;border:1px solid var(--fw-primary-border,#f3c7c2);border-left:4px solid var(--fw-primary);border-radius:12px;background:#fff}
.pos-line.is-missing{border-color:#f04438;background:#fff6f5}
.pos-line-main{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center}
.pos-line-name b{display:block;color:#24170f;font-size:14px}
.pos-line-name small{color:#98a2b3;font-size:11px}
.pos-line-main>strong{min-width:70px;color:#24170f;font-size:14px;text-align:right;white-space:nowrap}
.pos-qty{display:flex;align-items:center;gap:6px}
.pos-qty span{min-width:20px;font-weight:800;text-align:center}
.pos-shell .pos-qty button{display:grid;place-items:center;width:30px;height:30px;padding:0!important;border:1px solid var(--fw-primary-border,#f3c7c2)!important;border-radius:50%!important;background:#fff!important;color:var(--fw-primary)!important;font-size:18px;line-height:1;cursor:pointer;box-shadow:none!important}
.pos-line-options{display:grid;gap:6px}
.pos-line-options:not(:empty){margin-top:8px}
.pos-line-options label{display:grid;grid-template-columns:96px minmax(0,1fr);align-items:center;gap:8px;margin:0;color:#5b4a3e;font-size:11px;font-weight:700}
.pos-shell .pos-line-options select,.pos-shell .pos-line-note{padding:6px 9px!important;border:1px solid #e4ddd3!important;border-radius:8px!important;font-size:13px;box-shadow:none!important}
.pos-shell .pos-line-note{width:100%;margin-top:8px}
.pos-order-foot{padding:10px 18px 14px;border-top:1px solid #ebe5dc;background:#fffaf0}
.pos-sum{display:flex;justify-content:space-between;padding:2px 0;color:#667085;font-size:13px}
.pos-sum b{color:#344054}
.pos-sum-total{margin-top:4px;padding-top:6px;border-top:1px dashed #e4ddd3;color:#24170f;font-size:15px;font-weight:700}
.pos-sum-total strong{color:var(--fw-primary);font-size:24px;line-height:1.1}
.pos-actions{display:grid;grid-template-columns:1fr 1.3fr;gap:8px;margin-top:10px}
.pos-actions form{margin:0}
.pos-shell .pos-actions .btn{width:100%;min-height:52px;padding:10px!important;border-radius:12px!important;font-size:16px!important}
.pos-shell .pos-actions .btn.pos-bill{background:#fff!important;color:var(--fw-primary)!important;border:1px solid var(--fw-primary-border,#f3c7c2)!important;box-shadow:none!important}
.pos-cancel-table{margin:8px 0 0;text-align:center}
.pos-shell .pos-cancel-table button{padding:4px 8px!important;border:0!important;background:transparent!important;color:#98a2b3!important;font-size:12px;text-decoration:underline;cursor:pointer;box-shadow:none!important}
.pos-shell .pos-cancel-table button:hover{color:#d92d20!important}
.pos-cart-bar{display:none}
@media(max-width:900px){
  .modal.pos-modal{padding:0!important}
  .modal-card.pos-shell{grid-template-columns:minmax(0,1fr);width:100%!important;height:100vh;height:100dvh;border-radius:0!important}
  .pos-menu-scroll{padding-bottom:84px}
  .pos-grid{grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px}
  .pos-order{position:absolute;left:0;right:0;bottom:0;z-index:20;height:88%;border-left:0;border-radius:18px 18px 0 0;box-shadow:0 -18px 40px rgba(30,16,8,.25);transform:translateY(105%);transition:transform .25s ease}
  .pos-order.show{transform:translateY(0)}
  .pos-shell .pos-order-close{display:grid;place-items:center}
  .pos-shell .pos-cart-bar{position:absolute;left:12px;right:12px;bottom:12px;z-index:15;display:flex!important;align-items:center;justify-content:space-between;padding:14px 18px!important;border:0!important;border-radius:14px!important;font-size:15px;font-weight:700;box-shadow:0 10px 26px rgba(0,0,0,.25)!important;transition:transform .15s ease}
  .pos-cart-bar strong{font-size:18px}
  .pos-cart-bar.cart-pop{transform:scale(1.04)}
}

/* FoodWork completed orders (paid + closed) */
.order-status-paid{background:#ecfdf3;color:#067647}
.completed-orders-section .eyebrow{color:#067647}
.completed-orders-filter{margin:0}
.completed-orders-filter label{display:flex;align-items:center;gap:8px;margin:0;color:#475467;font-size:12px;font-weight:700;white-space:nowrap}
.completed-orders-filter input{width:auto!important;min-width:150px}
.completed-orders-section .live-orders-table td small{display:block;color:#98a2b3;font-size:11px}
.completed-order-totals{margin-top:12px;border:1px solid #eaecf0}

/* FoodWork QR self-ordering: customer page */
body.qr-order-body{display:block;min-height:100vh;margin:0;background:#f4f2ee}
.pos-page{position:fixed;inset:0}
.pos-shell.pos-shell-customer{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 400px;min-width:0;height:100%;overflow:hidden;background:#f4f2ee}
.pos-shop{display:flex;flex:0 0 auto;align-items:center;gap:10px;max-width:46%;min-width:0}
.pos-shop img{width:40px;height:40px;flex:0 0 40px;object-fit:contain;border-radius:10px}
.pos-shop b{display:block;overflow:hidden;color:#24170f;font-size:14px;line-height:1.2;white-space:nowrap;text-overflow:ellipsis}
.pos-shop small{display:block;color:var(--fw-primary);font-size:13px;font-weight:800}
.pos-order-tools{display:flex;align-items:center;gap:8px}
.pos-qr-print{padding:7px 11px;border:1px solid var(--fw-primary-border,#f3c7c2);border-radius:10px;background:#fff;color:var(--fw-primary);font-size:13px;font-weight:800;text-decoration:none;white-space:nowrap}
.pos-qr-print:hover{background:var(--fw-primary-soft,#fef3f2)}
.pos-status-qr{margin-left:4px;background:#eff8ff;color:#175cd3}
.qr-toast{position:fixed;left:50%;top:14px;z-index:50;max-width:calc(100% - 32px);padding:12px 18px;border-radius:12px;color:#fff;font-weight:700;box-shadow:0 10px 30px rgba(0,0,0,.25);transform:translateX(-50%);transition:opacity .4s ease,transform .4s ease}
.qr-toast-success{background:#067647}
.qr-toast-error{background:#d92d20}
.qr-toast.hide{opacity:0;transform:translate(-50%,-20px);pointer-events:none}
.qr-card-wrap{display:grid;place-items:center;min-height:100vh;min-height:100dvh;padding:20px 16px}
.qr-card{width:min(420px,100%);padding:28px 22px;border-radius:22px;background:#fff;text-align:center;box-shadow:0 18px 50px rgba(40,24,12,.12)}
.qr-card-logo{width:72px;height:72px;object-fit:contain}
.qr-card-shop{margin-top:6px;color:#7a6658;font-weight:700}
.qr-card-eyebrow{display:inline-block;margin-top:14px;padding:3px 12px;border-radius:999px;background:var(--fw-primary-soft,#fef3f2);color:var(--fw-primary);font-size:12px;font-weight:800}
.qr-card h1{margin:8px 0 6px;color:#24170f;font-size:28px}
.qr-card p{margin:0 0 18px;color:#667085;line-height:1.6}
.qr-open-form{display:grid;gap:16px}
.qr-open-form label{display:grid;gap:8px;color:#344054;font-weight:700}
.qr-stepper{display:grid;grid-template-columns:52px 1fr 52px;gap:8px}
body.qr-order-body .qr-stepper button{height:52px;padding:0!important;border:1px solid #e4ddd3!important;border-radius:12px!important;background:#fff!important;color:var(--fw-primary)!important;font-size:24px;cursor:pointer}
body.qr-order-body .qr-stepper input{height:52px;padding:0!important;font-size:22px;font-weight:800;text-align:center}
body.qr-order-body .qr-primary{width:100%;min-height:56px;border-radius:14px!important;font-size:17px!important}
.qr-bill-list{display:grid;gap:8px;text-align:left}
.qr-bill-list>div{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #f2f4f7}
.qr-bill-list small{display:block;color:#98a2b3;font-size:12px}
.qr-bill-total{border-bottom:0!important;font-size:18px}
.qr-bill-total b{color:var(--fw-primary)}
@media(max-width:900px){
  .pos-shell.pos-shell-customer{grid-template-columns:minmax(0,1fr)}
  .pos-shop{max-width:52%}
}

/* FoodWork QR self-ordering: staff QR page */
.qr-howto{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 16px}
.qr-howto>div{padding:14px 16px;border:1px solid #eaecf0;border-radius:14px;background:#fff}
.qr-howto b{display:block;margin-bottom:4px;color:#101828}
.qr-howto span{color:#667085;font-size:13px;line-height:1.55}
.qr-table-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}
.qr-table-card{display:flex;flex-direction:column;gap:10px;padding:14px;border:1px solid #eaecf0;border-radius:16px;background:#fff;box-shadow:0 4px 14px rgba(16,24,40,.05)}
.qr-table-card .qr-code{width:150px;height:150px;margin:0 auto}
.qr-table-card .qr-code svg{display:block;width:100%;height:100%}
.qr-table-info{text-align:center}
.qr-table-info b{display:block;font-size:18px}
.qr-table-info small{display:block;margin:2px 0 6px;color:#667085}
.qr-table-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.qr-table-actions form{margin:0}
.qr-table-actions .btn-small{text-decoration:none}
@media(max-width:700px){.qr-howto{grid-template-columns:1fr}}

/* Open-table form: dine-in / takeaway */
.order-type-choice{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.order-type-choice label{margin:0;cursor:pointer}
.order-type-choice input{position:absolute;opacity:0}
.order-type-choice span{display:block;padding:12px;border:1px solid #d0d5dd;border-radius:12px;background:#fff;font-weight:700;text-align:center}
.order-type-choice input:checked+span{border:2px solid var(--fw-primary);background:var(--fw-primary-soft,#fef3f2);color:var(--fw-primary-dark,var(--fw-primary))}

/* Dashboard restaurant KPIs */
.cards.restaurant-kpi-cards{grid-template-columns:repeat(5,minmax(0,1fr))!important}
.restaurant-kpi-cards strong small{font-size:13px;font-weight:600;opacity:.75}
@media(max-width:900px){.cards.restaurant-kpi-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}.restaurant-kpi-cards .kpi-total{grid-column:1/-1}}

/* FoodWork take away orders + pickup queue */
.live-orders-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.live-orders-actions .btn{white-space:nowrap}
.queue-code{font-size:18px;letter-spacing:.5px}
.live-order-row td small{display:block}
.live-order-row.is-called{background:#f0fdf4}
.live-order-actions{white-space:nowrap}
.live-order-actions form{display:inline-block;margin:0}
.live-order-actions>*{margin:2px 0}
.live-order-actions .btn-small{text-decoration:none}
.order-status+.order-status{margin-left:4px}
.queue-status-waiting{background:#fff4e5;color:#93370d}
.queue-status-called{background:#dcfae6;color:#067647}
html[data-theme] .live-order-actions .queue-call-btn{background:#067647!important;color:#fff!important}
html[data-theme] .live-order-actions .btn-small.success{background:#fff!important;color:#067647!important;border:1px solid #75e0a7!important}
.live-orders-table td:nth-child(2) b{white-space:nowrap}

/* FoodWork checkout: split bill, mixed / partial payment, tips */
.co-due-head{text-align:right}
.co-due-head small{display:block;color:#667085;font-size:11px}
.co-due-head b{color:var(--fw-primary);font-size:22px}
.co-locked-note{margin-top:4px;padding:6px 8px!important;border-radius:8px;background:#fffaeb;color:#93370d;font-size:11px}
.co-paid-list{display:grid;gap:4px;margin:10px 0;padding:10px 12px;border:1px solid #d1fadf;border-radius:12px;background:#f6fef9}
.co-paid-list>b{color:#067647;font-size:12px}
.co-paid-list div,.co-tx{display:flex;justify-content:space-between;gap:10px;font-size:13px}
.co-paid-list small{color:#667085}
.co-split{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:12px 0 8px}
.co-split label{margin:0;cursor:pointer}
.co-split input{position:absolute;opacity:0}
.co-split span{display:block;padding:9px 6px;border:1px solid #d0d5dd;border-radius:10px;background:#fff;font-size:13px;font-weight:700;text-align:center}
.co-split input:checked+span{border:2px solid var(--fw-primary);background:var(--fw-primary-soft,#fef3f2);color:var(--fw-primary-dark,var(--fw-primary))}
.co-panel{display:grid;gap:8px;margin-bottom:8px;padding:10px;border-radius:12px;background:#f9fafb}
.co-panel[hidden]{display:none}
.co-panel>label{display:grid;gap:4px;margin:0;color:#475467;font-size:12px;font-weight:700}
.co-hint{color:#475467;font-size:13px;font-weight:700}
.co-item{display:grid;grid-template-columns:auto minmax(0,1fr) 80px 80px;align-items:center;gap:8px;margin:0;padding:6px 4px;border-bottom:1px solid #eaecf0;cursor:pointer}
.co-item:last-child{border-bottom:0}
.co-item-name{font-size:13px;font-weight:700}
.co-item-name small{display:block;color:#667085;font-weight:500}
.co-item.is-paid{opacity:.5;cursor:default}
.co-item input[type="number"]{padding:6px!important}
.co-item em{color:var(--fw-primary);font-style:normal;font-weight:800;text-align:right}
.co-amount-row,.co-change-row{display:flex;justify-content:space-between;align-items:center;margin:6px 0;padding:10px 12px;border-radius:12px;background:#fff;border:1px solid #eaecf0}
.co-amount-row strong{color:var(--fw-primary);font-size:20px}
.co-progress{display:block;margin-top:4px;color:#067647;font-size:11px;font-weight:700}
@media(max-width:700px){.co-split{grid-template-columns:repeat(2,1fr)}.co-item{grid-template-columns:auto minmax(0,1fr) 70px}.co-item em{grid-column:2/-1;text-align:left}}
/* FoodWork KDS v0.7 */
.kds-head,.kds-head-actions,.kds-stations,.kds-summary{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.kds-head{justify-content:space-between;margin-bottom:14px}.kds-head h1{margin:0}.kds-head p{margin:4px 0;color:#6b7280}.kds-stations{margin:10px 0 12px}.kds-stations a{border:1px solid #ddd;border-left:5px solid var(--station-color,#9ca3af);border-radius:12px;padding:9px 13px;background:#fff;color:#27211d;text-decoration:none}.kds-stations a.active{background:#2c211d;color:#fff}.kds-stations small{display:block;opacity:.72}.kds-summary{background:#fff;border-radius:12px;padding:10px 14px;margin-bottom:14px}.kds-summary span{margin-right:14px}.kds-summary span:last-child{margin-left:auto;color:#6b7280}.kds-board{display:grid;grid-template-columns:repeat(auto-fill,minmax(285px,1fr));gap:14px;align-items:start}.kds-empty{grid-column:1/-1;text-align:center;background:#fff;border:2px dashed #ddd;border-radius:16px;padding:44px;color:#6b7280}.kds-ticket{background:#fff;border:2px solid #ddd;border-radius:15px;overflow:hidden;box-shadow:0 5px 16px #29180d12}.kds-ticket.urgent{border-color:#e11d48;box-shadow:0 0 0 3px #fb718533}.kds-ticket.overdue{animation:kdsPulse 1.8s infinite}.kds-ticket header{display:flex;justify-content:space-between;gap:8px;padding:12px 14px;border-top:7px solid var(--station-color);background:#fffaf5}.kds-ticket header b{font-size:1.2rem}.kds-ticket header small{display:block}.kds-ticket header>span{font-weight:700;color:var(--station-color)}.kds-ticket-meta{display:flex;justify-content:space-between;padding:8px 13px;background:#2c211d;color:#fff;font-size:.88rem}.kds-ticket.status-ready .kds-ticket-meta{background:#15803d}.kds-ticket.status-new .kds-ticket-meta{background:#b91c1c}.kds-items{padding:6px 13px}.kds-items>div{display:flex;gap:10px;padding:10px 0;border-bottom:1px dashed #ddd}.kds-items>div>b{font-size:1.3rem;color:#b91c1c}.kds-items span{display:flex;flex-direction:column}.kds-items small{color:#6d28d9}.kds-items em{font-style:normal;color:#b45309;background:#fff7ed;padding:3px 5px;border-radius:5px;margin-top:4px}.kds-ticket footer{display:grid;grid-template-columns:2fr 1fr auto;gap:7px;padding:10px;background:#f7f4f1}.kds-ticket footer button,.kds-ticket footer a{border:0;border-radius:9px;padding:9px;text-align:center;cursor:pointer;text-decoration:none;background:#e5e7eb;color:#222}.kds-ticket footer .kds-main-action{background:#b91c1c;color:#fff;font-weight:700}.kds-ticket footer .kds-urgent{background:#fff1f2;color:#be123c}.expo-board{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:14px}.expo-card{background:#fff;border:2px solid #e5e7eb;border-radius:15px;overflow:hidden}.expo-card.all-ready{border-color:#16a34a}.expo-card>header{display:flex;justify-content:space-between;padding:14px;background:#29201c;color:#fff}.expo-card>header small{display:block}.expo-card.all-ready>header{background:#15803d}.expo-stations{padding:9px 14px}.expo-stations>div{border-left:6px solid var(--station-color);padding:8px 10px;margin:7px 0;background:#fafafa;display:grid;grid-template-columns:1fr auto;gap:3px 8px}.expo-stations small{grid-column:1}.kitchen-settings-grid{display:grid;grid-template-columns:minmax(360px,.9fr) minmax(420px,1.2fr);gap:16px}.station-form{display:grid;grid-template-columns:1fr 1.4fr .8fr .8fr;gap:7px;align-items:end;border-bottom:1px solid #eee;padding:10px 0}.station-form label{font-size:.78rem}.menu-station-list{max-height:68vh;overflow:auto;margin-top:10px}.menu-station-list>label{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:9px;border-bottom:1px solid #eee}.menu-station-list>label span{display:flex;flex-direction:column}.sticky-save{position:sticky;bottom:0;background:#fff;padding:10px 0}.text-danger{color:#b91c1c;font-weight:700}.co-refund-form{padding:8px;background:#fff1f2;border:1px solid #fecdd3;border-radius:8px}.co-refund-form label{display:inline-flex;gap:4px;align-items:center;margin-right:6px}.co-refund-form input{width:120px}@keyframes kdsPulse{50%{border-color:#dc2626;box-shadow:0 0 0 4px #ef444433}}@media(max-width:900px){.kitchen-settings-grid{grid-template-columns:1fr}.station-form{grid-template-columns:1fr 1fr}.kds-head{align-items:flex-start;flex-direction:column}}@media(max-width:600px){.kds-board{grid-template-columns:1fr}.kds-ticket footer{grid-template-columns:1fr 1fr}.kds-ticket footer .kds-main-action{grid-column:1/-1}.kds-summary span:last-child{margin-left:0}.expo-board{grid-template-columns:1fr}.co-refund-form label{display:flex}.co-refund-form input{width:100%}}

/* FoodWork staff groups (attendance sheet + dashboard "working today") */
.staff-cat-manager{background:#ede9fe!important;color:#5b21b6!important;border-color:#c4b5fd!important}
.staff-cat-service{background:#e0f2fe!important;color:#075985!important;border-color:#7dd3fc!important}
.staff-cat-cashier{background:#dcfce7!important;color:#166534!important;border-color:#86efac!important}
.staff-cat-kitchen{background:#fee4e2!important;color:#912018!important;border-color:#fda29b!important}
.staff-cat-bar{background:#fef3c7!important;color:#92400e!important;border-color:#fcd34d!important}
.staff-cat-support{background:#f1f5f9!important;color:#334155!important;border-color:#cbd5e1!important}
.staff-cat-delivery{background:#fce7f3!important;color:#9d174d!important;border-color:#f9a8d4!important}
.staff-cat-row-manager .sticky-col{box-shadow:inset 4px 0 0 #8b5cf6}
.staff-cat-row-service .sticky-col{box-shadow:inset 4px 0 0 #38bdf8}
.staff-cat-row-cashier .sticky-col{box-shadow:inset 4px 0 0 #22c55e}
.staff-cat-row-kitchen .sticky-col{box-shadow:inset 4px 0 0 #f04438}
.staff-cat-row-bar .sticky-col{box-shadow:inset 4px 0 0 #f59e0b}
.staff-cat-row-support .sticky-col{box-shadow:inset 4px 0 0 #94a3b8}
.staff-cat-row-delivery .sticky-col{box-shadow:inset 4px 0 0 #ec4899}

/* FoodWork POS floor: clear table status, live seat time, plan / grid views */
.fw-floor-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}
.fw-floor-title h2{margin:2px 0 0;color:#101828;font-size:24px}
.fw-floor-stats{display:flex;flex-wrap:wrap;gap:8px}
.fw-floor .fw-stat{display:flex;align-items:center;gap:8px;min-width:104px;padding:8px 14px!important;border:1px solid #e4e7ec!important;border-radius:14px!important;background:#fff!important;color:#344054!important;font-weight:700;cursor:pointer;box-shadow:none!important}
.fw-stat b{font-size:24px;line-height:1}
.fw-stat span{font-size:13px}
.fw-stat.is-available b{color:#079455}
.fw-stat.is-open b{color:#dc6803}
.fw-stat.is-billing b{color:#d92d20}
.fw-floor .fw-stat.active{border-color:#101828!important;box-shadow:inset 0 0 0 1px #101828!important}
.fw-floor-tools{display:flex;align-items:center;gap:8px}
.fw-view-toggle{display:inline-flex;padding:3px;border-radius:12px;background:#f2f4f7}
.fw-floor .fw-view-toggle button{padding:7px 12px!important;border:0!important;border-radius:9px!important;background:transparent!important;color:#475467!important;font-weight:700;cursor:pointer;box-shadow:none!important}
.fw-floor .fw-view-toggle button.active{background:#fff!important;color:#101828!important;box-shadow:0 1px 3px rgba(16,24,40,.14)!important}
.fw-floor .floor-level-tab{display:inline-flex;flex-direction:column;align-items:flex-start;padding:7px 14px!important;border:1px solid #e4e7ec!important;border-radius:12px!important;background:#fff!important;color:#344054!important;font-weight:800;cursor:pointer;box-shadow:none!important}
.fw-floor .floor-level-tab small{color:#667085;font-size:10px;font-weight:600}
.fw-floor .floor-level-tab.active{border-color:#101828!important;background:#101828!important;color:#fff!important}
.fw-floor .floor-level-tab.active small{color:#d0d5dd}
.fw-floor .fw-table{--st:#12b76a;--st-bg:#ecfdf3;--st-ink:#05603a;container-type:inline-size;justify-content:flex-start!important;align-items:stretch!important;gap:3px;padding:10px 12px!important;border:2px solid var(--st)!important;border-radius:16px!important;background:var(--st-bg)!important;color:#101828!important;text-align:left!important;overflow:hidden;cursor:pointer;box-shadow:0 4px 12px rgba(16,24,40,.08)!important;transition:transform .12s ease,box-shadow .12s ease}
.fw-floor .fw-table.shape-round{border-radius:28px!important}
.fw-floor .fw-table:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(16,24,40,.16)!important}
.fw-floor .fw-table.is-open{--st:#f79009;--st-bg:#fffaeb;--st-ink:#93370d}
.fw-floor .fw-table.is-billing{--st:#f04438;--st-bg:#fef3f2;--st-ink:#912018;animation:fwBillGlow 1.6s ease-in-out infinite}
@keyframes fwBillGlow{50%{box-shadow:0 0 0 6px rgba(240,68,56,.2)}}
.fw-table-head{display:flex;align-items:flex-start;justify-content:space-between;gap:6px}
.fw-table-head strong{color:#101828;font-size:16px;line-height:1.15}
.fw-chip{flex:0 0 auto;padding:2px 8px;border-radius:999px;background:var(--st);color:#fff;font-size:11px;font-style:normal;font-weight:800;white-space:nowrap}
.fw-table-amount{color:var(--st-ink);font-size:18px;font-weight:800}
.fw-table-meta{display:flex;flex-wrap:wrap;gap:3px 10px;color:#475467;font-size:12px;font-weight:600}
.fw-table.is-long .fw-elapsed{color:#d92d20;font-weight:800}
.fw-table-tags{display:flex;flex-wrap:wrap;gap:4px}
.fw-table-tags:empty{display:none}
.fw-table-tags i{padding:1px 7px;border:1px solid #e4e7ec;border-radius:999px;background:#fff;color:#344054;font-size:10px;font-style:normal;font-weight:700}
.fw-table-tags i.is-due{border-color:#fda29b;color:#b42318}
.fw-table-cta{margin-top:auto;padding-top:4px;color:var(--st-ink);font-size:12px;font-weight:800}
.fw-floor[data-floor-view="plan"] .fw-table-tags,.fw-floor[data-floor-view="plan"] .fw-table-cta{display:none}
@container (max-width:118px){.fw-chip{display:none}.fw-table-meta span:not(.fw-elapsed){display:none}.fw-table-amount{font-size:15px}}
.fw-floor[data-floor-view="grid"] .fw-floor-plan{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px;min-height:0;padding:0;border:0!important;background:none!important;box-shadow:none!important;overflow:visible}
.fw-floor[data-floor-view="grid"] .fw-floor-plan:before,.fw-floor[data-floor-view="grid"] .floor-service-counter{display:none!important}
.fw-floor[data-floor-view="grid"] .fw-table{position:relative!important;left:auto!important;top:auto!important;width:auto!important;height:auto!important;min-height:136px;border-radius:16px!important}
.fw-floor[data-floor-filter="available"] .fw-table:not(.is-available),.fw-floor[data-floor-filter="open"] .fw-table:not(.is-open),.fw-floor[data-floor-filter="billing"] .fw-table:not(.is-billing){opacity:.15;filter:grayscale(1);pointer-events:none}
.fw-floor[data-floor-view="grid"][data-floor-filter="available"] .fw-table:not(.is-available),.fw-floor[data-floor-view="grid"][data-floor-filter="open"] .fw-table:not(.is-open),.fw-floor[data-floor-view="grid"][data-floor-filter="billing"] .fw-table:not(.is-billing){display:none!important}
.fw-guest-pick{display:grid;gap:6px;color:#344054;font-weight:700}
.fw-guest-buttons{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.fw-guest-buttons label{margin:0;cursor:pointer}
.fw-guest-buttons input[type="radio"]{position:absolute;opacity:0}
.fw-guest-buttons span{display:grid;place-items:center;height:46px;border:1px solid #d0d5dd;border-radius:12px;background:#fff;font-size:18px;font-weight:800}
.fw-guest-buttons input:checked+span{border:2px solid var(--fw-primary);background:var(--fw-primary-soft,#fef3f2);color:var(--fw-primary)}
.fw-guest-more input{height:46px;padding:0 6px!important;font-size:16px!important;text-align:center}
@media(max-width:700px){.fw-floor-stats{width:100%}.fw-floor .fw-stat{flex:1;min-width:0;padding:8px!important}.fw-stat b{font-size:20px}.fw-floor-tools{width:100%;justify-content:space-between}.fw-floor[data-floor-view="grid"] .fw-floor-plan{grid-template-columns:repeat(2,minmax(0,1fr))}}
