/* Operational clarity, consistent help and accessible controls. */
:root{--muted:#615d68}
body{font-size:14px;line-height:1.45}
.page-heading{align-items:flex-start;gap:18px;margin-bottom:20px}
.page-heading h1{font-size:clamp(28px,2.8vw,38px);line-height:1.12}
.page-heading p{font-size:14px;line-height:1.55;max-width:760px}
.heading-actions{flex-wrap:wrap;justify-content:flex-end;gap:8px;max-width:640px}
.btn,.btn.small{font-size:13px;min-height:40px;line-height:1.25;gap:7px}
.btn.small{padding:9px 11px}.action-icon{width:17px;height:17px;flex:none}
.field{position:relative;min-width:0}.field>label{font-size:12px;letter-spacing:.025em;line-height:1.5;padding-right:28px;text-transform:none;color:#5e5869}
.field input,.field select,.field textarea,.select-trigger{min-height:44px;font-size:14px}
.field-help{position:absolute;right:0;top:0;width:25px;height:25px;display:grid;place-items:center;border:0;border-radius:50%;background:#eee8ff;color:#6246b0;cursor:pointer;padding:4px}
.field-help svg{width:16px;height:16px}.field-help:focus-visible{outline:2px solid #7658e8;outline-offset:2px}
.feature-guide-mount{margin-bottom:18px}.feature-guide{border:1px solid #ded8eb;border-radius:14px;background:rgba(255,255,255,.72);font-size:13px;color:#393044}
.feature-guide summary{display:flex;align-items:center;gap:9px;padding:11px 14px;list-style:none;cursor:pointer;font-weight:600;min-height:44px}
.feature-guide summary::-webkit-details-marker{display:none}.feature-guide summary>svg:last-child{margin-left:auto;transform:rotate(90deg);transition:transform .15s}.feature-guide[open] summary>svg:last-child{transform:rotate(-90deg)}
.feature-guide-body{padding:0 18px 14px;line-height:1.65}.feature-guide-body p{margin:6px 0 10px}.feature-guide-body ol{padding-left:22px;margin:0}.feature-guide-body li{padding:3px 0}.guide-note{display:flex;align-items:flex-start;gap:8px;padding:10px 12px;background:#f1edfa;border-radius:10px;color:#57496c}.guide-note svg{margin-top:2px;flex:none}
.modal-context-help{margin-bottom:16px}.modal-context-help .feature-guide{background:#f7f5fc}.modal-context-help summary{font-size:12px}
.jess-tooltip{position:fixed;z-index:30000;max-width:min(330px,calc(100vw - 16px));padding:10px 12px;border-radius:10px;background:#241d30;color:#fff;font-size:12px;line-height:1.55;box-shadow:0 8px 24px #20142933;pointer-events:none}.jess-tooltip[hidden]{display:none}
.modal{max-height:calc(100dvh - 40px)}#modalBox{display:flex;flex-direction:column;max-height:calc(100dvh - 40px)}#modalBody{overflow-y:auto;min-height:0}#modalFoot{flex:none;flex-wrap:wrap;gap:8px;border-top:1px solid #e5e0eb;padding-top:16px;background:#fff}
.unsaved-notice{width:100%;padding:12px;border:1px solid #e6c58a;border-radius:12px;background:#fffaef;font-size:13px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.unsaved-notice p{margin:0}.unsaved-notice .unsaved-actions{display:flex;gap:8px;flex-wrap:wrap}
.data-table th{font-size:11px;letter-spacing:.04em;padding:12px 14px}.data-table td{font-size:13px;padding:13px 14px}.data-table td .btn{white-space:nowrap}.data-table td:last-child{min-width:150px}.data-table td strong{line-height:1.4}
.filter-chip{font-size:12px;min-height:36px}.toolbar{gap:12px;align-items:flex-start}.filter-group{gap:6px;flex-wrap:wrap}.order-filter-controls{gap:8px;flex-wrap:wrap}.order-filter-controls>*{min-width:0}
#page-dashboard .metric-grid{margin-top:16px}#page-dashboard .metric-card{padding:18px;min-height:140px}#page-dashboard .metric-card .value{font-size:clamp(22px,2vw,30px)}#page-dashboard .metric-card .label{font-size:13px}#page-dashboard .metric-card .trend{font-size:12px}
#page-dashboard .hero-grid{grid-template-columns:1.4fr 1fr}#page-dashboard .hero-panel{min-height:200px;max-height:250px}#page-dashboard .hero-copy{padding:24px}#page-dashboard .hero-copy h2{font-size:26px;max-width:500px}#page-dashboard .hero-copy p{font-size:12px;margin:10px 0}#page-dashboard .mini-nail{display:none}#page-dashboard .spotlight{padding:20px;min-height:200px}#page-dashboard .spotlight-top h3{font-size:21px}#page-dashboard .spotlight-top p{font-size:12px}
.quote-customer-insight,.field-note,.task-manager-note,.empty-state,.inventory-form-help{font-size:12px;line-height:1.6}.quote-customer-field{align-self:start}.quote-contact-grid .field>input{min-height:44px}
.order-summary-box p,.task-detail-grid span,.production-detail-item,.employee-history-filters,.customer-detail-orders{font-size:12px}.order-card h4,.task-card h4{font-size:14px}.order-id,.meta,.customer-cell span{font-size:12px}.production-board .order-card{padding:14px}.order-card:focus-visible,[role=button]:focus-visible{outline:3px solid #9474ed;outline-offset:2px}
.hr-toolbar,.quote-actions{gap:8px;flex-wrap:wrap}.hr-toolbar .btn{white-space:nowrap}.date-picker-button{width:36px;height:36px}
@media(max-width:1000px){.heading-actions{max-width:none;justify-content:flex-start}.page-heading{flex-wrap:wrap}#page-dashboard .hero-grid{grid-template-columns:1fr}.table-card{overflow-x:auto}.data-table{min-width:760px}}
@media(max-width:760px){.content{padding-bottom:95px}.page-heading h1{font-size:28px}.page-heading p{font-size:13px}.heading-actions{width:100%;justify-content:flex-start}.btn,.btn.small,.select-trigger{min-height:44px}.heading-actions .btn{flex:1 1 auto}.field input,.field textarea,.select-trigger{font-size:16px}.field>label{font-size:12px}.feature-guide summary{padding:11px 12px;font-size:12px}.feature-guide-body{padding:0 14px 12px}#modalBox{max-height:calc(100dvh - 24px);width:calc(100vw - 24px);margin:0}#modalBody{padding:16px}#modalFoot{padding:12px 16px}#modalFoot>.btn{flex:1 1 auto;justify-content:center}.unsaved-notice .btn{min-height:40px}#page-dashboard .metric-grid{grid-template-columns:1fr 1fr;gap:10px}#page-dashboard .metric-card{padding:13px;min-height:125px}#page-dashboard .metric-card .value{font-size:21px}#page-dashboard .metric-card .trend{font-size:11px}#page-dashboard .hero-panel{min-height:210px;max-height:none}#page-dashboard .hero-copy{padding:20px}#page-dashboard .hero-copy h2{font-size:23px}.order-filter-controls{width:100%}.order-filter-controls>*{flex:1 1 145px}.toolbar{flex-direction:column;align-items:stretch}.feature-guide-mount{margin-bottom:14px}}
@media print{.feature-guide-mount,.modal-context-help,.field-help,.jess-tooltip,.unsaved-notice{display:none!important}}

@media(min-width:1100px){#page-dashboard .metric-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.topbar .neon-news-ticker{flex:1;min-width:200px;width:auto}.topbar .top-actions{flex:none;gap:10px}.profile-switch{flex-shrink:0}.profile-switch strong,.profile-switch span{white-space:nowrap}}
.priority-card strong{font-size:13px}.priority-card span{font-size:12px}

#modalBox.quote-picker-modal .quote-picker-sticky{position:static;top:auto}#modalBox.quote-picker-modal .quote-picker-viewbar{position:static}#modalBox.quote-picker-modal #modalBody{scroll-padding-top:16px}
.sidebar{overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#665a78 #1b1920;padding-bottom:24px}.sidebar-collapse-toggle{right:7px;top:83px}.sidebar .nav-label{margin-top:23px}.sidebar .slogan-line{font-size:11px}

.employee-mobile-item{display:none!important}body.employee-session .mobile-bottom-nav>button:not(.employee-mobile-item){display:none}body.employee-session .nav-label{display:none}.employee-session .mobile-bottom-nav{grid-template-columns:repeat(3,minmax(0,1fr))}.employee-session .employee-mobile-item{display:flex!important}.employee-session #employeeTaskList,.employee-session #hrOwnCalendarMount{scroll-margin-top:112px}
.employee-kpis span,.payslip-caption,.payslip-card button{font-size:12px}.hr-muted,.employee-card p,.tracking-order p,.tracking-empty p,.priority-card p,.card-header p{font-size:12px!important}.mobile-bottom-item span{font-size:11px}

#printablePayslip span,#printablePayslip p{font-size:12px!important}#printablePayslip .data-table{min-width:0;width:100%}#printablePayslip .data-table td:last-child{min-width:0}#printablePayslip .data-table td{padding:10px 8px}#printablePayslip .btn{white-space:normal}
@media(max-width:760px){#printablePayslip{padding:14px!important}#printablePayslip>div:nth-child(2){grid-template-columns:1fr!important;gap:10px!important}#printablePayslip>div:nth-child(2)>div:last-child{text-align:left!important}#printablePayslip>div:nth-child(2)>div:last-child>div{font-size:26px!important}}

.required-mark{color:#9a3b56;font-weight:700}.payslip-card button{display:flex;align-items:center;justify-content:center;gap:7px}

.carrier-choice-label{font-size:12px;font-weight:600;color:#4b4358}.carrier-choice input{width:1px!important;height:1px!important;min-height:0!important;padding:0!important}.carrier-choice:has(input:focus-visible){outline:3px solid #8e6ce7;outline-offset:3px}

.table-card{overflow-x:auto}
@media(max-width:760px){
:is(#page-orders,#page-customers,#page-materials,#page-payroll) .table-card{overflow:visible;background:transparent;border:0;box-shadow:none}
:is(#page-orders,#page-customers,#page-materials,#page-payroll) .data-table{display:block;width:100%;min-width:0}
:is(#page-orders,#page-customers,#page-materials,#page-payroll) .data-table thead{display:none}
:is(#page-orders,#page-customers,#page-materials,#page-payroll) .data-table tbody{display:block}
:is(#page-orders,#page-customers,#page-materials,#page-payroll) .data-table tbody tr{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:16px;margin:0 0 14px;border:1px solid #e0dae9;border-radius:16px;background:#fff;box-shadow:0 6px 18px #35224408}
:is(#page-orders,#page-customers,#page-materials,#page-payroll) .data-table td{display:block;padding:0;min-width:0;border:0;font-size:13px;white-space:normal;overflow-wrap:anywhere}
:is(#page-orders,#page-customers,#page-materials,#page-payroll) .data-table td[data-label]::before{content:attr(data-label);display:block;font-size:11px;font-weight:600;color:#6d617c;margin-bottom:5px}
:is(#page-orders,#page-customers,#page-materials,#page-payroll) .data-table td:last-child{grid-column:1/-1;display:flex;gap:8px;flex-wrap:wrap;padding-top:10px;border-top:1px solid #eee9f4}
:is(#page-orders,#page-customers,#page-materials,#page-payroll) .data-table td:last-child::before{display:none}
:is(#page-orders,#page-customers,#page-materials,#page-payroll) .data-table td:last-child .btn{flex:1 1 auto;justify-content:center}
#page-orders .data-table thead{display:block;margin-bottom:12px}#page-orders .data-table thead tr{display:block}#page-orders .data-table thead th{display:none}#page-orders .data-table thead th:first-child{display:flex;align-items:center;gap:10px;padding:8px 3px;border:0}#page-orders .data-table thead th:first-child::after{content:"Chọn tất cả đơn đang hiển thị";font-size:12px;letter-spacing:0;text-transform:none}
#page-orders .data-table tbody td:first-child{position:absolute;top:17px;right:17px}#page-orders .data-table tbody td:nth-child(2){grid-column:1/-1;padding-right:30px}#page-orders .data-table tbody td:nth-child(3),#page-orders .data-table tbody td:nth-child(4),#page-orders .data-table tbody td:nth-child(7){grid-column:1/-1}#page-orders .data-table tbody td:first-child::before,#page-orders .data-table tbody td:nth-child(2)::before{display:none}
#page-orders .status-select~.select-trigger,#page-orders .select-shell-status{width:100%;max-width:none}
#page-customers .data-table td:nth-child(1),#page-customers .data-table td:nth-child(2),#page-customers .data-table td:nth-child(5){grid-column:1/-1}#page-customers .data-table td:first-child::before{display:none}
#page-materials .data-table td:nth-child(1),#page-materials .data-table td:nth-child(2),#page-materials .data-table td:nth-child(7){grid-column:1/-1}
#page-payroll .data-table td:nth-child(1),#page-payroll .data-table td:nth-child(6),#page-payroll .data-table td:nth-child(7){grid-column:1/-1}#page-payroll .data-table td:first-child::before{display:none}
}
