/* Shared screen theme. Keep document printing and all business logic separate. */
/* Focused order lookup and the common site footer. */
.search-intro{text-align:center;margin:24px auto 28px;max-width:800px}
.search-intro-icon{display:inline-grid;place-items:center;width:54px;height:54px;border:1px solid #dce7f9;border-radius:16px;background:#edf3fd;color:#3268b9;font-size:1.4rem;margin-bottom:17px}
html body .search-intro h1{font-size:clamp(1.45rem,2.4vw,2.1rem);font-weight:700;margin:10px 0 12px}
.search-intro p{color:#71829a;font-size:.94rem;line-height:1.8;margin:0}
html body.search-page .order-search-panel{max-width:1000px;margin:0 auto 38px;border:1px solid #e0e7f1;box-shadow:0 12px 36px #203b6010!important;border-radius:20px;background:#fff}
html body.search-page .order-search-panel>.card-body{padding:30px}
.order-search-form{display:flex;align-items:flex-end;gap:12px}
.search-field{flex:1;min-width:0}
.search-input-wrap{position:relative}
.search-input-wrap>i{position:absolute;top:50%;left:16px;transform:translateY(-50%);color:#8b9cb3;pointer-events:none}
html body.search-page #query{height:52px;padding-left:44px;background:#fbfcfe;border-color:#d4deed}
html body.search-page .search-submit{height:52px;white-space:nowrap;padding:0 24px;background:#2563eb;border-color:#2563eb;font-size:.94rem}
html body.search-page .search-submit:hover{background:#1d4ed8;border-color:#1d4ed8;transform:none}
.search-help-row{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:.8rem;color:#7a8ba2;margin:14px 0 24px}
.search-help-row a{color:#426ba5;text-decoration:none}
.search-help-row a:hover{text-decoration:underline}
.search-empty-state{text-align:center;padding:30px 20px 14px;border-top:1px solid #edf1f6;color:#778ba4}
.search-empty-icon{display:inline-grid;place-items:center;border:1px solid #e7ecf3;border-radius:50%;width:62px;height:62px;background:#f8fafd;color:#91a6c2;font-size:1.7rem;margin-bottom:15px}
html body.search-page .search-empty-state h2{font-size:1.05rem;font-weight:700;color:#506580;margin:0 0 7px}
.search-empty-state p{font-size:.85rem;margin:0}
.search-detail-labels{display:flex;justify-content:center;gap:24px;flex-wrap:wrap;font-size:.76rem;margin-top:22px;color:#8293aa}
.search-detail-labels i{margin-right:4px}
html body.search-page #result:empty{display:none}
html body.search-page #result:not(:empty)~.search-empty-state{display:none}
html body.search-page .order-details-card{background:#fff;border:1px solid #dde7f1;border-left:3px solid #4a79b9;border-radius:12px;box-shadow:none!important}
html body.search-page .order-details-card .card-header{background:#f3f7fc;border:0;border-radius:8px!important;color:#29486e}
html body.search-page .order-details-card .card-header .text-white{color:#29486e!important}
html body.search-page .order-details-card .card-header .text-white-50{color:#607b9c!important;overflow-wrap:anywhere}
html body.search-page #order_details span{overflow-wrap:anywhere}
html body footer.site-footer{background:#fff;border-top:1px solid #e1e8f2;padding:0 24px;margin-top:auto;min-height:88px;text-align:left}
.site-footer-inner{max-width:1552px;margin:auto;min-height:88px;display:flex;justify-content:space-between;align-items:center;gap:24px;padding:18px 0}
.footer-identity{display:flex;align-items:center;gap:12px;min-width:0}
.footer-mark{display:grid;place-items:center;flex-shrink:0;width:36px;height:36px;border:1px solid #dfe7f2;border-radius:10px;background:#f3f6fb;color:#5879a6;font-size:1.1rem}
.footer-identity strong{display:block;font-size:.88rem;font-weight:700;color:#425a78;overflow-wrap:anywhere}
.footer-identity div>span{display:block;font-size:.74rem;color:#8998ac;margin-top:2px}
.footer-meta{display:flex;align-items:center;gap:22px;flex-wrap:wrap;font-size:.74rem;color:#8998ac}
.footer-meta a{color:#567295;text-decoration:none;padding:6px 10px;border:1px solid #e3eaf3;border-radius:7px}
.footer-meta a:hover{color:#2563eb;background:#f3f7fd;border-color:#c9daf3}
@media(max-width:767.98px){.search-intro{margin-top:8px;text-align:left}.search-intro p{font-size:.86rem}html body.search-page .order-search-panel>.card-body{padding:20px}.order-search-form{flex-direction:column;align-items:stretch}.search-help-row{font-size:.76rem;flex-direction:column;gap:10px}.search-empty-state{padding-inline:0}.search-detail-labels{gap:12px}html body footer.site-footer{padding:0 16px}.site-footer-inner{flex-direction:column;align-items:flex-start;gap:16px;padding:20px 0}.footer-meta{gap:14px;justify-content:space-between;width:100%}}
/* Task workspaces share the outer frame; inner panels follow their content. */
.workspace-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:8px 0 28px}
.workspace-kicker{display:block;font-size:.8rem;color:#74849a;margin-bottom:9px}
html body .workspace-heading h1{font-size:1.9rem;font-weight:700;margin:0 0 8px}
.workspace-heading p{margin:0;color:#74849a;font-size:.94rem}
.import-workspace{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,1fr);gap:30px;align-items:start}
html body.import-page .import-upload-card{overflow:hidden;border:1px solid #e2e8f0!important}
html body.import-page .import-upload-card .card-header{background:#fff;padding:24px 28px;border-bottom:1px solid #edf1f6}
html body.import-page .import-upload-card h4{font-size:1.12rem}
html body.import-page .import-upload-card .card-header p{font-size:.85rem}
html body.import-page .import-upload-card .card-body{padding:24px 28px}
html body.import-page .upload-drop-zone{border:1.5px dashed #bdcee4;border-radius:12px;background:#f8fafd;padding:35px 20px;min-height:240px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;margin-bottom:22px!important;box-shadow:none}
html body.import-page .upload-drop-zone:hover,html body.import-page .upload-drop-zone.dragover{background:#f0f5ff;border-color:#2563eb}
html body.import-page .upload-icon{font-size:2rem;color:#4778be;margin:0 0 6px;line-height:1.4;background:#e8effa;border-radius:14px;padding:12px 18px}
html body.import-page .upload-text{font-size:1.05rem;margin:0;color:#304663}
.file-picker-label{color:#2563eb;font-size:.9rem;text-decoration:underline;text-underline-offset:3px}
html body.import-page .upload-hint{font-size:.78rem;margin-top:2px;color:#7e8ba0}
html body.import-page #file-name-display:empty{display:none}
.upload-action-row{display:flex;align-items:center;justify-content:space-between;gap:15px}
html body.import-page .btn-upload-submit{font-size:.94rem;white-space:nowrap}
.import-guide{padding:18px 8px 20px}
.platform-tags{display:flex;gap:8px;margin-bottom:27px;flex-wrap:wrap}
.platform-tags span{font-size:.78rem;font-weight:700;border:1px solid #e0e6f0;background:white;padding:5px 12px;border-radius:7px;color:#526781}
.platform-tags span:first-child{color:#ba4b27;background:#fff6f0;border-color:#f3dfd3}
html body .import-guide h2,html body .scanner-instructions h2{font-size:1.25rem;font-weight:700;margin-bottom:18px}
.workflow-steps{list-style:none;padding:0;counter-reset:steps;margin:0}
.workflow-steps li{counter-increment:steps;position:relative;padding:0 0 23px 40px;font-size:.9rem}
.workflow-steps li:before{content:counter(steps);position:absolute;left:0;top:0;background:#e8eef7;color:#526c90;border-radius:50%;width:26px;height:26px;display:grid;place-items:center;font-size:.78rem;font-weight:700}
.workflow-steps p{color:#74849a;font-size:.85rem;line-height:1.8;margin:4px 0 0}
.workspace-note{display:flex;align-items:flex-start;gap:10px;border-top:1px solid #dde5ef;padding:18px 0 0;color:#74849a;font-size:.81rem;line-height:1.8}
.workspace-note i{color:#6584ad}
.scanner-grid{display:grid;grid-template-columns:minmax(240px,.9fr) minmax(0,1.1fr);gap:40px;align-items:center}
.scanner-instructions{padding:16px 20px}
.scanner-symbol{display:inline-grid;place-items:center;width:54px;height:54px;border-radius:14px;background:#e9f0fb;color:#4676b9;font-size:1.5rem;margin-bottom:20px}
.scanner-instructions>p{color:#74849a;font-size:.9rem;line-height:1.9;margin-bottom:25px}
.scanner-stage{background:#f4f7fb;border:1px solid #e3eaf3;border-radius:14px;padding:20px;min-width:0}
.scanner-stage-label{display:flex;gap:8px;align-items:center;font-size:.82rem;font-weight:700;color:#60748f}
html body.scan-page #reader{width:100%;max-width:480px;margin:20px auto;border:1px solid #dfe7f2!important;border-radius:12px;background:#fff;box-shadow:none;min-height:265px;padding:20px 8px!important}
html body.scan-page #reader button{background:#2563eb;color:#fff;border:1px solid #2563eb;border-radius:8px;padding:9px 16px;margin:8px 3px;font:600 .86rem 'Sarabun',sans-serif;cursor:pointer}
html body.scan-page #reader button:disabled{opacity:.55;cursor:default}
html body.scan-page #reader select{display:block;width:100%;max-width:100%;border:1px solid #ccd8e7;border-radius:8px;padding:9px;margin:10px auto;font: .85rem 'Sarabun',sans-serif;background:#fff;color:#304663}
html body.scan-page #reader a{color:#2563eb;font-size:.85rem}
html body.scan-page #reader video{border-radius:8px;max-width:100%}
.scanner-caption{font-size:.78rem;color:#7a8da5;text-align:center;margin:12px 0 0;line-height:1.8}
@media(max-width:991.98px){.import-workspace{grid-template-columns:minmax(0,1fr);gap:0}.import-guide{padding:4px 8px 24px}.scanner-grid{gap:16px}.scanner-instructions{padding:8px}}
@media(max-width:767.98px){.workspace-heading{align-items:flex-start;flex-direction:column;gap:16px;margin-bottom:22px}html body .workspace-heading h1{font-size:1.5rem}.scanner-grid{grid-template-columns:minmax(0,1fr)}.scanner-stage{grid-row:1;padding:14px}.scanner-instructions{padding-top:15px}html body.import-page .import-upload-card .card-header,html body.import-page .import-upload-card .card-body{padding:20px}.upload-action-row{align-items:stretch;flex-direction:column}.upload-action-row .btn{width:100%}html body.scan-page .scanner-workspace>.card-body{padding:16px!important}}
html{scrollbar-gutter:stable}
:root{--ui-ink:#172b46;--ui-muted:#64748b;--ui-blue:#2563eb;--ui-line:#e2e8f0;--ui-bg:#f4f7fb;--ui-page-width:1600px;--ui-header-height:64px;--bs-primary:#2563eb;--bs-primary-rgb:37,99,235;--bs-body-font-family:'Sarabun',sans-serif}
html body{background:var(--ui-bg)!important;color:var(--ui-ink);font-family:'Sarabun',sans-serif!important;line-height:1.65}
html body h1,html body h2,html body h3,html body h4{letter-spacing:-.025em;color:var(--ui-ink);line-height:1.4}
html body h2,html body h3{font-size:clamp(1.3rem,2vw,1.8rem)}
html body .text-muted{color:var(--ui-muted)!important}
html body .navbar-premium{background:#13243e!important;border-bottom:1px solid #293b56;box-shadow:0 4px 16px #172b4610;padding:5px 0;min-height:64px}
html body .navbar-premium .navbar-brand{font-size:1.08rem!important;letter-spacing:-.02em;color:#fff!important}
html body .navbar-premium .navbar-nav .nav-link{font-size:.86rem;padding:.65rem .7rem;color:#c4cfdf!important;border-radius:9px}
html body .navbar-premium .navbar-nav .nav-link:hover{background:#243954;color:#fff!important}
html body .navbar-premium .navbar-nav .nav-link.active{background:#2b4a75;color:#fff!important;box-shadow:inset 0 0 0 1px #ffffff12}
html body .navbar-premium .dropdown-menu{background:#fff;border:1px solid var(--ui-line);box-shadow:0 16px 40px #172b4626;border-radius:12px;padding:7px}
html body .navbar-premium .dropdown-menu .dropdown-item{color:#334155;padding:.65rem .9rem}
html body .navbar-premium .dropdown-menu .dropdown-item:hover,html body .navbar-premium .dropdown-menu .dropdown-item.active{background:#edf3ff;color:#1d4ed8}
html body .navbar-premium .dropdown-label{color:#64748b;font-size:.73rem;letter-spacing:0}
html body .navbar-premium .dropdown-divider{border-color:var(--ui-line)}
html body .nav-badge-alert{animation:none}
html body .btn-nav-logout{background:transparent;border-color:#516078;color:#e3e9f2!important;border-radius:9px}
html body .btn-nav-logout:hover{background:#3b2a3c;border-color:#d78c9e;color:#fff!important}
html body>.container-fluid,html body>.container{padding-top:14px;padding-bottom:24px}
html body>.container-fluid{max-width:1800px;margin-inline:auto}
html body .page-container{width:calc(100% - 48px);max-width:1400px;min-width:0;margin-inline:auto}
html body{display:flex;flex-direction:column;min-height:100vh}
html body:has(.navbar-premium){padding-top:var(--ui-header-height)!important}
html body:has(.navbar-premium)>:is(.container,.container-fluid,.page-container){width:100%;max-width:var(--ui-page-width)!important;padding:28px 24px!important;margin:0 auto!important;min-width:0;flex:1}
html body .navbar-premium{min-height:var(--ui-header-height);padding:0}
html body .navbar-premium>.container-fluid{width:100%;max-width:var(--ui-page-width);min-height:63px;padding:0 24px;margin:0 auto}
html body .card-body,html body .table-responsive{min-width:0}
html body .card{border:1px solid var(--ui-line);border-radius:16px;box-shadow:0 3px 10px #172b4605!important;overflow:visible}
html body .card-header{padding:1.1rem 1.35rem;border-bottom:1px solid var(--ui-line);border-radius:15px 15px 0 0!important;font-weight:700}
html body .card-header[class*='bg-']{background:#fff!important;color:var(--ui-ink)!important}
html body .card-header[class*='bg-'] .text-white{color:var(--ui-ink)!important}
html body .card-header h5{font-size:1.04rem;line-height:1.5}
html body .card-header i{color:var(--ui-blue)}
html body .card-header.bg-danger i{color:#dc3545}
/* ไอคอนบนปุ่มในหัวการ์ดต้องใช้สีตัวอักษรของปุ่ม (ไม่งั้นไอคอนน้ำเงินจมหายบนปุ่มน้ำเงิน เหลือแต่ช่องว่าง) */
html body .card-header .btn i{color:inherit}
html body .card-body{padding:1.35rem}
html body .btn{border-radius:9px;font-weight:600;box-shadow:none;transition:background-color .15s,border-color .15s;line-height:1.6}
html body .btn:not(.btn-sm):not(.btn-close){padding:.55rem 1rem}
html body .btn-primary{--bs-btn-bg:#2563eb;--bs-btn-border-color:#2563eb;--bs-btn-hover-bg:#1d4ed8;--bs-btn-hover-border-color:#1d4ed8;--bs-btn-active-bg:#1e40af;--bs-btn-active-border-color:#1e40af}
html body .btn-outline-primary{--bs-btn-color:#2563eb;--bs-btn-border-color:#bdd0f8;--bs-btn-hover-bg:#2563eb;--bs-btn-hover-border-color:#2563eb}
html body .form-control,html body .form-select{border-color:#cbd5e1;border-radius:9px;min-height:42px;font-size:.95rem;background-color:#fff}
html body .form-control:focus,html body .form-select:focus{border-color:#6999f2;box-shadow:0 0 0 3px #2563eb1c}
html body .form-control:disabled,html body .form-control[readonly]{background:#f1f5f9}
html body .form-label{font-size:.92rem;font-weight:600;color:#344761}
html body .input-group-text{background:#f8fafc;border-color:#cbd5e1;color:#64748b}
html body .input-group>.form-control:not(:last-child),html body .input-group>.form-select:not(:last-child),html body .input-group>.input-group-text:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}
html body .input-group>.form-control:not(:first-child),html body .input-group>.form-select:not(:first-child),html body .input-group>.input-group-text:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}
html body .table{--bs-table-color:#344761;--bs-table-bg:transparent;--bs-table-border-color:#e7edf4;--bs-table-hover-bg:#f2f6fc;font-size:.91rem;margin-bottom:0}
html body .table>:not(caption)>*>*{padding:.85rem .8rem;vertical-align:middle}
html body .table thead th{background:#f4f7fb!important;color:#52637b!important;border-bottom:1px solid #dbe4f0;font-size:.8rem;font-weight:700;white-space:nowrap}
html body .table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-accent-bg:#f8fafc;--bs-table-striped-bg:#f8fafc;--bs-table-striped-color:#344761}
html body .badge{font-weight:600;line-height:1.4;border-radius:6px;padding:.28em .58em}
html body .badge.bg-success{background:#e3f5ec!important;color:#166345!important}
html body .badge.bg-warning{background:#fff0cd!important;color:#855000!important}
html body .badge.bg-danger{background:#fde7ea!important;color:#ad2843!important}
html body .badge.bg-info,html body .badge.bg-primary{background:#e6efff!important;color:#2455a4!important}
html body .alert{border-radius:12px;font-size:.94rem}
html body .modal-content{border:1px solid var(--ui-line);border-radius:16px;box-shadow:0 24px 70px #14243e33}
html body .modal-header,html body .modal-footer{border-color:var(--ui-line);padding:1.1rem 1.3rem}
html body .modal-body{padding:1.3rem}
html body .page-link{color:#245bc3;border-color:var(--ui-line);padding:.5rem .8rem}
html body .active>.page-link{color:#fff;background:#2563eb;border-color:#2563eb}
html body .footer{background:transparent;border-top:1px solid var(--ui-line);color:#728097;font-size:.8rem;padding:20px 24px;min-height:64px;width:100%;margin: auto 0 0;flex-shrink:0;text-align:center;box-sizing:border-box}
html body .footer p{margin:0}
html body .form-card{background:#fff;border:1px solid var(--ui-line);border-radius:18px;box-shadow:0 16px 48px #172b4610;overflow:hidden}
html body .form-card-header{background:#17385d;color:#fff;padding:1.6rem}
html body .form-card-header :is(h1,h2,h3,h4){color:#fff}
html body :is(a,button,input,select,textarea):focus-visible{outline:3px solid #7aa6fa;outline-offset:3px}
/* Dashboard: hierarchy comes from spacing and typography, not large color blocks. */
html body.dashboard-page .dashboard-heading{margin-bottom:1.5rem!important}
.dashboard-eyebrow{font-size:.7rem;font-weight:700;letter-spacing:.18em;color:#75869e;text-transform:uppercase;margin-bottom:6px}
.dashboard-description{font-size:.92rem;color:#728097;margin:6px 0 0}
html body.dashboard-page .stat-card{background:#fff;border:1px solid var(--ui-line);min-height:164px}
html body.dashboard-page .stat-card:hover{transform:none;box-shadow:0 5px 16px #172b460a!important}
html body.dashboard-page .stat-card .icon-bg{display:none}
html body.dashboard-page .stat-card h6{font-size:.9rem;font-weight:400!important}
html body.dashboard-page .stat-card .card-text{font-size:2.1rem!important;letter-spacing:-.03em;font-variant-numeric:tabular-nums;margin-top:8px}
html body.dashboard-page .stat-card .rounded-circle{border-radius:12px!important;box-shadow:none!important;background:#eff5ff!important;padding:.65rem!important}
html body.dashboard-page .stat-card .icon-large{font-size:1.35rem;color:#3e73ca!important;opacity:1}
html body.dashboard-page .stat-card .mt-3{font-size:.79rem;color:#75859b!important}
html body.dashboard-page .bg-gradient-sales{background:#17385d!important;border-color:#17385d}
html body.dashboard-page .bg-gradient-sales :is(.text-dark,.card-title){color:#fff!important}
html body.dashboard-page .bg-gradient-sales .mt-3{color:#b9cde5!important}
html body.dashboard-page .bg-gradient-sales small,html body.dashboard-page .bg-gradient-sales small i{color:#b9cde5!important}
html body.dashboard-page .bg-gradient-sales .rounded-circle{background:#ffffff15!important}
html body.dashboard-page .bg-gradient-sales .icon-large{color:#a9d4ff!important}
html body.dashboard-page .bg-gradient-lowstock{background:#fff9f5!important;border-color:#f1dfd2}
html body.dashboard-page .bg-gradient-lowstock .text-danger{color:#ad5925!important}
html body.dashboard-page .bg-gradient-lowstock .rounded-circle{background:#ffecd9!important}
html body.dashboard-page .bg-gradient-lowstock .icon-large{color:#bb682d!important}
html body.dashboard-page .table-responsive table{table-layout:auto}
html body.dashboard-page .table-responsive table th,html body.dashboard-page .table-responsive table td{width:auto!important;min-width:85px}
html body.dashboard-page .table-responsive table td:nth-child(2){min-width:160px}
@media(max-width:1199.98px){html body .navbar-premium .navbar-collapse{max-height:calc(100dvh - 80px);overflow-y:auto;padding:10px 0}html body .navbar-premium .dropdown-menu{box-shadow:none}html body .navbar-premium .nav-divider{display:none}}
@media(max-width:767.98px){html body>.container-fluid{padding-left:16px!important;padding-right:16px!important}html body .page-container{width:calc(100% - 24px)}html body .card-body{padding:1rem}html body .card-header{padding:1rem;flex-wrap:wrap;gap:12px}html body .page-container .d-flex.justify-content-between{flex-wrap:wrap;gap:12px}html body .pagination{flex-wrap:wrap}html body.dashboard-page .stat-card{min-height:148px}html body .table>:not(caption)>*>*{padding:.7rem .6rem}.dashboard-description{font-size:.85rem}html body.dashboard-page .dashboard-heading{align-items:flex-start!important}}
@media(prefers-reduced-motion:reduce){html body *,html body *:before,html body *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(max-width:767.98px){html body:has(.navbar-premium)>:is(.container,.container-fluid,.page-container){padding:24px 16px!important}html body .navbar-premium>.container-fluid{padding:0 16px}html body .footer{padding-inline:16px}}
