/* Design study: preserve the original blue/cyan identity and original Thai wording. */
:root{--sidebar-width:254px;--topbar-height:82px;--app-bg:#f2f7fe;--shadow-sm:0 5px 16px #204b8420;--shadow-md:0 16px 38px #204b842b}
body.app-shell{background:radial-gradient(ellipse at 95% 0,#dfeeff 0,transparent 38%),#f3f7fc}
.app-sidebar{box-shadow:5px 0 24px #2751810b;background:#fff}
.sidebar-brand{padding:20px 18px;border-bottom:1px solid #e0eafa}
.brand-mark{box-shadow:0 7px 16px #179bbc35;border:1px solid #ffffff8a}
.sidebar-dashboard-link,.sidebar-group-toggle{border-radius:12px;padding:12px 14px}
.app-shell .sidebar-menu-link,.app-shell .sidebar-link-text{font-size:16px}
.sidebar-menu-link.active{background:linear-gradient(110deg,#e2f8f7,#e5efff);border-left:4px solid #10b9b2;color:#1551a0;box-shadow:0 5px 14px #2279c115}
.app-topbar{background:#ffffffee;box-shadow:0 4px 16px #2c5c8f0b;border-bottom:1px solid #dce7f6}
.app-content{padding:24px;max-width:2000px;margin-inline:auto}
.app-shell .topbar-heading h1{font-size:26px;font-weight:700;color:#10213d}
.app-shell .brand-subtitle{font-size:13px}
.app-shell .btn{font-size:15px;line-height:1.6;min-height:42px;padding:8px 14px;font-weight:600;border-radius:9px;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.btn:hover{transform:translateY(-1px)}
.btn:active{transform:translateY(0)}
.app-shell .btn-primary,.login-page .btn-primary{background:linear-gradient(110deg,#0baaaa,#2f80ed);border:1px solid #208bd2;box-shadow:0 6px 14px #237ece38,inset 0 1px #ffffff45;color:#fff}
.app-shell .btn-dark{background:linear-gradient(110deg,#148ebd,#2f80ed);border-color:#2380cb;box-shadow:0 6px 14px #237ece30;color:#fff}
.app-shell .btn-outline-primary{background:linear-gradient(#fff,#edf5ff);border-color:#90b6ed;color:#185fba;box-shadow:0 3px 8px #3167a111}
.app-shell .btn-outline-success,.app-shell .btn-success{background:linear-gradient(120deg,#10a88a,#087d65);color:#fff;border-color:#078569;box-shadow:0 4px 10px #06916f2b}
.app-shell .btn-info,.app-shell .btn-outline-info{background:linear-gradient(120deg,#ecfbff,#dcefff);border-color:#71b3df;color:#155980;box-shadow:0 3px 8px #247fa518}
.app-shell .btn-warning,.app-shell .btn-outline-warning{background:linear-gradient(#fff6df,#ffe6af);border-color:#e4aa3e;color:#845000;box-shadow:0 3px 8px #bf84281c}
.app-shell .btn-danger,.app-shell .btn-outline-danger{background:#fff0ef;color:#bc3027;border-color:#ef9c94;box-shadow:0 3px 8px #b9464212}
.app-shell .btn-outline-secondary{background:#f6f9fd;color:#395a7e;border-color:#b9cce1}
.btn:focus-visible,.form-control:focus,.form-select:focus{outline:0;border-color:#2f80ed;box-shadow:0 0 0 4px #2f80ed24}
.content-card,.dashboard-card{border-radius:16px;border:1px solid #dbe6f4;background:#fff;box-shadow:0 8px 23px #264e7f13,0 2px 5px #264e7f06;overflow:hidden}
.card-header{background:linear-gradient(100deg,#edf6ff,#f4fcfc)!important;border-bottom:1px solid #d9e7f8;padding:17px 20px;color:#174876}
.card-body{padding:23px}
.concept-filter-card{background:#fff;padding:14px 18px;border:1px solid #dae7f5;border-radius:14px;box-shadow:0 5px 17px #254b8310;margin-bottom:18px;position:relative}
.concept-filter-card:before{content:'';position:absolute;left:0;top:15px;bottom:15px;width:4px;background:linear-gradient(#2f80ed,#10b9b2);border-radius:0 5px 5px 0}
.quick-filter-group{display:flex;align-items:center;gap:14px;flex-wrap:wrap;border:0;background:transparent;box-shadow:none;padding:0;margin:0!important}
.quick-filter-group+.quick-filter-group{border-top:1px solid #e5eef8;padding-top:12px;margin-top:12px!important}
.quick-filter-label{width:125px;flex-shrink:0;margin:0;font-size:15px;color:#193e66;font-weight:600}
.quick-filter-options{gap:7px}
.app-shell .quick-filter.btn{font-size:14px;padding:6px 10px;min-height:36px;border-radius:8px;font-weight:500;box-shadow:0 2px 6px #2763ad0b}
.quick-filter.btn-outline-primary{background:#f3f8ff;border-color:#d2e2f8;color:#2163b2}
.quick-filter.btn-outline-primary[data-tone=warning]{background:#fff5e4;border-color:#efcf99;color:#905c0b}
.quick-filter.btn-outline-primary[data-tone=success]{background:#e8f7f0;border-color:#b2decb;color:#166c50}
.quick-filter.btn-outline-primary[data-tone=danger]{background:#fff0ef;border-color:#f0c1bc;color:#a94236}
.filter-count{background:#dceafe;color:inherit;font-size:13px;padding:0 6px}
.quick-filter[data-tone=warning] .filter-count{background:#f9e5bd}
.quick-filter[data-tone=success] .filter-count{background:#c9e9db}
.quick-filter[data-tone=danger] .filter-count{background:#f6d9d5}
.quick-filter[aria-current=true] .filter-count{background:#ffffff35;color:#fff}
.app-shell .table{font-size:16px;line-height:1.6;color:#183457}
.app-shell .table>:not(caption)>*>*{padding:14px 12px;border-bottom:1px solid #dfebf8}
.app-shell .table thead th{font-size:14px;color:#153e6b;background:linear-gradient(#dfedff,#d2e6ff);padding:14px 12px;border-bottom:2px solid #a7cafa}
.app-shell .table td .small,.app-shell .table td small{font-size:14px;line-height:1.6}
.app-shell .table td .badge{font-size:13px;white-space:nowrap;padding:6px 9px;border-radius:7px;box-shadow:inset 0 1px #ffffff40;line-height:1.4}
.app-shell .transaction-table{min-width:1120px;table-layout:auto}
.app-shell .transaction-table td{min-width:0}
.app-shell .transaction-table td:nth-child(3){min-width:130px}
.app-shell .transaction-table td:nth-child(4){min-width:125px}
.app-shell .transaction-table .doc-number-cell{min-width:182px;max-width:210px}
.app-shell .document-number-copy{font-size:15px;line-height:1.6;color:#1c5fa8;font-weight:700}
.app-shell .transaction-table td:last-child{min-width:150px}
.app-shell .table .btn{font-size:14px;min-height:38px;padding:6px 10px}
.app-shell .table td.text-end{font-variant-numeric:tabular-nums}
.bw-action-bar{display:flex;justify-content:flex-end;align-items:center;gap:6px;white-space:nowrap}
.bw-action-menu{position:fixed;inset:auto;margin:0;background:#fff;border:1px solid #d4e3f7;border-radius:12px;padding:8px;min-width:230px;max-width:330px;box-shadow:0 16px 44px #16355e33;z-index:1080}
.bw-action-menu .btn{display:block;width:100%;text-align:left;margin:0 0 5px!important}
.bw-action-menu:popover-open{display:block}
.app-shell .form-label,.app-shell .form-control,.app-shell .form-select,.app-shell .form-check-label{font-size:16px;line-height:1.65}
.form-label{font-weight:600;color:#2c486c}
.form-control,.form-select{min-height:46px;border:1px solid #bfd0e6;background:#fbfdff;border-radius:9px;box-shadow:inset 0 2px 4px #20487806}
.production-employee-card{background:linear-gradient(140deg,#fff,#f4f8ff);border-color:#ccddf1!important;box-shadow:0 4px 10px #294f800d}
.production-employee-card:has(input:checked){background:linear-gradient(130deg,#e2f9f1,#e4f1ff);border-color:#37a897!important;box-shadow:0 5px 13px #149d8120}
.production-employee-card small{font-size:14px}
.concept-form #productionForm>.col-12.text-end{padding-top:18px;border-top:1px solid #dbe7f5}
.concept-form #productionForm>.col-12.text-end .btn{min-width:190px}
.concept-form #productionForm .bg-light{background:linear-gradient(140deg,#f0f7ff,#e6effc)!important;border:1px solid #d7e5f8;box-shadow:0 3px 10px #2757810b}
body.login-page{background:radial-gradient(ellipse at 3% 86%,#caf1ee 0,transparent 43%),radial-gradient(ellipse at 95% 9%,#d3e6ff 0,transparent 45%),#f4f8ff;padding:32px}
.login-layout{max-width:1320px;min-height:calc(100dvh - 64px);display:grid;grid-template-columns:minmax(0,1.35fr) minmax(390px,1fr);gap:54px;align-items:center}
.login-hero{padding:16px 0}
.login-brand{margin-bottom:22px}
.shop-eyebrow{margin:0 0 10px;color:#166b99}
.login-hero h1{font-size:32px;line-height:1.65;font-weight:800;margin:0 0 14px;max-width:760px;letter-spacing:-.4px}
.shop-case-study{font-size:22px;margin:0 0 14px}
.login-hero-copy{font-size:16px;line-height:1.8;margin:0 0 10px;color:#445f7a}
.concept-products{display:block;width:100%;max-width:640px;height:245px;object-fit:contain;margin:14px 0 4px;filter:drop-shadow(0 14px 12px #24598920)}
.shop-login-note{font-size:14px;background:#ffffffa8;border:1px solid #cbe4f1;padding:12px 15px;box-shadow:0 5px 15px #1d709d0b;max-width:640px}
.login-card{padding:38px 36px;border:1px solid #d4e3f4;box-shadow:0 25px 60px #214f8b27,0 6px 16px #2b6fb315,inset 0 1px #fff;border-radius:24px;position:relative;background:linear-gradient(155deg,#fff,#fcfeff);overflow:hidden}
.login-card:before{content:'';position:absolute;top:0;left:0;right:0;height:5px;background:linear-gradient(90deg,#10b9b2,#2f80ed)}
.login-card h2{font-size:30px;font-weight:800;color:#10213d;margin-bottom:10px}
.login-card-intro{font-size:15px;color:#576f8b}
.login-page .form-label,.login-page .form-control{font-size:16px}
.login-page .form-control{min-height:53px;background:#f8fbff;border-color:#c2d6ef;box-shadow:inset 0 2px 4px #23466e05}
.login-options{gap:10px;flex-wrap:wrap}
.login-page .login-submit{min-height:52px;font-size:17px;font-weight:700;box-shadow:0 8px 19px #2682d340}
.login-footer{font-size:14px}
@media(max-width:900px){.login-layout{display:flex;flex-direction:column;gap:28px}.login-hero,.login-card{max-width:680px;width:100%}.login-hero h1{font-size:27px}.concept-products{height:210px}.login-card{padding:30px}.app-content{padding:18px}}
@media(max-width:600px){body.login-page{padding:20px}.login-hero h1{font-size:24px}.login-brand-title{font-size:24px}.login-hero-copy{font-size:16px}.concept-products{height:auto}.quick-filter-label{width:100%}.quick-filter-options{gap:6px}.app-shell .quick-filter.btn{min-height:40px}.login-card{padding:28px 22px}.app-content{padding:16px 12px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

.concept-editmode>.concept-filter-card,.concept-editmode>#history{display:none}
/* V3: compact filters and page actions share a single responsive surface. */
.bw-page-toolbar{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:16px 24px;padding:16px 18px;margin-bottom:20px;background:linear-gradient(120deg,#fff,#f7fbff);border:1px solid #d6e4f5;border-radius:14px;box-shadow:0 7px 22px #234b8214;position:relative}
.bw-page-toolbar:before{content:'';position:absolute;left:0;top:16px;bottom:16px;width:4px;border-radius:0 4px 4px 0;background:linear-gradient(#2f80ed,#10b9b2)}
.bw-toolbar-filters,.bw-toolbar-actions{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px}
.bw-toolbar-filters{flex:1 1 auto}.bw-toolbar-actions{justify-content:flex-end;margin-left:auto;gap:8px}
.bw-toolbar-actions>div{gap:8px!important}
.bw-filter-field{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0;max-width:100%}
.bw-filter-field .quick-filter-label{width:auto;font-size:14px;line-height:1.5;margin:0;color:#405b7a;font-weight:600}
.bw-status-select{min-width:200px;width:auto;max-width:340px;height:42px;min-height:42px;font-weight:600;cursor:pointer;background-color:#fff;box-shadow:0 2px 6px #244a8210}
.bw-filter-field .quick-filter-options{display:flex;flex-wrap:wrap;gap:5px}
.app-shell .bw-filter-field .quick-filter{min-height:42px;padding:8px 11px;line-height:1.6;font-size:14px}
.bw-toolbar-actions .btn{min-height:42px;padding:8px 13px}
.bw-details{border:1px solid #dae5f4;background:#fff;border-radius:12px;margin:0 0 18px;padding:0 18px;box-shadow:0 3px 10px #264e7f08}
.bw-details>summary{padding:14px 0;color:#225d9c;font-size:15px;font-weight:600;cursor:pointer}
.bw-details[open]{padding-bottom:18px}.bw-details .dashboard-mini-grid{margin-bottom:0!important}
.bw-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 16px;border-bottom:1px solid #cdddf0;padding-bottom:10px}
.bw-tabs .btn{border:1px solid #d5e3f3;background:#fff;color:#416083;box-shadow:0 2px 6px #2753840b}
.bw-tabs [aria-selected=true]{background:linear-gradient(110deg,#e2f8f7,#e3efff);border-color:#7eb4e0;color:#165aac;box-shadow:inset 0 -3px #2f80ed}
.bw-tab-panel[hidden]{display:none!important}
.bw-form-modal .modal-content{border:1px solid #d8e5f6;border-radius:18px;box-shadow:0 26px 80px #16375c40;max-height:100%;margin:0!important}
.bw-form-modal .modal-header{display:flex;flex-wrap:wrap;gap:12px;flex-shrink:0;padding:18px 22px;background:linear-gradient(110deg,#edf6ff,#f1fcf9)!important}
.bw-form-modal .modal-header>.btn-close{margin-left:auto;flex-shrink:0}
.bw-form-modal .modal-body{padding:24px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;min-height:0}
.bw-form-modal .modal-footer{padding:14px 22px;background:#f8fbff;border-top:1px solid #dbe7f6;box-shadow:0 -4px 14px #244a8010;flex-shrink:0;gap:8px}
.bw-form-modal .modal-footer .btn-primary{min-width:150px}
.bw-form-modal .modal-dialog{max-width:1180px;width:calc(100% - 48px);margin:24px auto;height:calc(100% - 48px)}
.bw-form-modal .modal-body form>.col-md-2{width:33.333333%}
.bw-form-modal .modal-body form>.col-md-3{width:50%}
.bw-tax-options{margin-top:22px;background:#f5f9ff}
.modal-content{border-radius:16px}
.modal-header{background:linear-gradient(110deg,#f0f7ff,#f7fdfd);border-bottom:1px solid #dce7f6!important}
.modal-footer{background:#f8fbff}
#saleCreateModal .modal-dialog,#purchaseCreateModal .modal-dialog,#transportCreateModal .modal-dialog{max-width:1320px;width:calc(100% - 40px)}
.table-responsive{overscroll-behavior-x:contain}
.app-shell .card:not(.modal-content){min-width:0}
.app-content{min-width:0;width:100%}
body.app-shell{font-size:16px}
.login-hero .concept-products{height:280px;margin-top:25px}
.login-card h2{margin-bottom:26px}
@media(max-width:767px){.bw-page-toolbar{padding:14px;gap:16px}.bw-toolbar-filters,.bw-toolbar-actions{width:100%;margin:0;justify-content:flex-start}.bw-filter-field{flex:1 1 100%}.bw-filter-field .bw-status-select{max-width:100%;width:100%}.bw-toolbar-actions{padding-top:12px;border-top:1px solid #dce8f6}.bw-toolbar-actions .btn{flex:1 1 auto}.bw-form-modal .modal-dialog{width:calc(100% - 12px);height:calc(100% - 12px);margin:6px auto}.bw-form-modal .modal-body{padding:18px}.bw-form-modal .modal-header,.bw-form-modal .modal-footer{padding:14px 16px}.bw-form-modal .modal-body form>[class*=col-md]{width:100%}.bw-form-modal .modal-footer .btn-primary{min-width:0;flex:1}.bw-tabs{flex-wrap:nowrap;overflow:auto}.bw-tabs .btn{white-space:nowrap}.bw-form-modal .modal-header .badge{white-space:normal}#saleCreateModal .modal-dialog,#purchaseCreateModal .modal-dialog,#transportCreateModal .modal-dialog{width:calc(100% - 8px)}.login-hero .concept-products{height:200px}}
@media print{.bw-page-toolbar,.bw-tabs,.bw-editor-trigger{display:none!important}.bw-tab-panel[hidden]{display:block!important}.bw-details:not([open]){display:none}}
/* Keep the dropdown affordance visible after the shared input background. */
.form-select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2339597f' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.7'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:16px 16px;padding-right:38px}
.bw-toolbar-actions a.btn-dark{background:#e7f2ff;color:#185aa6;border-color:#a5c7ed;box-shadow:inset 0 -2px #2f80ed}
.bw-row-editor .form-label{display:block}
@media(max-width:767px){.bw-form-modal .modal-body form .row>.col-4{width:100%}.bw-form-modal .modal-body form .row>.col-3{width:100%}.bw-form-modal .modal-header .d-flex{flex-wrap:wrap}}
.bw-form-modal .modal-footer .btn.w-100{width:auto!important;min-width:150px}

/* Consistent compact print controls; popup menus escape table overflow. */
.app-content .btn.bw-print-action{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:38px;min-width:38px;height:38px;padding:0!important;margin-bottom:0!important;border-radius:10px;gap:0;box-shadow:0 3px 8px #24518014;vertical-align:middle}
.app-content .btn.bw-print-action .bi{font-size:17px;line-height:1;margin:0!important}
.app-content .btn.bw-print-action.dropdown-toggle:after{display:none}
.app-content .btn.bw-print-action.btn-outline-secondary{color:#216cb3;border-color:#bfd8ee;background:#f5faff}
.app-content .btn.bw-print-action.btn-outline-secondary:hover{color:#fff;background:#267bbd;border-color:#267bbd}
.app-content .btn.bw-print-action:focus-visible{outline:3px solid #78b9ec;outline-offset:3px}
.bw-print-control{line-height:1}
.bw-print-menu{list-style:none;text-align:left;line-height:1.6;max-width:min(350px,calc(100vw - 20px));max-height:calc(100dvh - 24px);overflow-y:auto}
.bw-print-menu .dropdown-item{white-space:normal;border-radius:7px;padding:9px 12px;font-size:13px}
.bw-print-menu li+li{border-top:1px solid #edf2f8}
.bw-help-search-controls .btn.bw-print-action{flex:0 0 38px}
@media(max-width:767px){.app-content .btn.bw-print-action{width:42px;min-width:42px;height:42px}.bw-help-search-controls .btn.bw-print-action{flex-basis:42px}}
