.card{background:var(--hp-surface);border:1px solid var(--hp-border);border-radius:var(--hp-radius-md);padding:18px;margin:12px 0;box-shadow:var(--hp-shadow-sm)}.card:hover{border-color:#d5e1f1}.card h2,.card h3{color:var(--hp-text)}
label{color:#2c426d;font-weight:700;margin-top:11px;margin-bottom:5px}
input,select,textarea{min-height:var(--hp-control-h);padding:9px 11px;border:1px solid var(--hp-border-strong);border-radius:var(--hp-radius-sm);background:#fff;color:var(--hp-text);transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}textarea{min-height:92px;resize:vertical}input::placeholder,textarea::placeholder{color:#91a1bc}input:hover,select:hover,textarea:hover{border-color:#b7c9df}input:focus,select:focus,textarea:focus{outline:0!important;border-color:#6caafc!important;box-shadow:0 0 0 3px rgba(22,136,248,.12)!important}input:disabled,select:disabled,textarea:disabled{background:#f1f4f8;color:#8190a8;cursor:not-allowed}input[readonly],textarea[readonly]{background:#f7f9fc}
button,.btn{min-height:38px;padding:8px 14px;border:1px solid transparent;border-radius:9px;background:var(--hp-blue-600);color:#fff;font-weight:750;box-shadow:0 2px 5px rgba(22,136,248,.12);transition:transform .12s ease,box-shadow .15s ease,background .15s ease,border-color .15s ease}button:hover,.btn:hover{background:#0d78e4;box-shadow:0 6px 16px rgba(22,136,248,.18);transform:translateY(-1px)}button:active,.btn:active{transform:none}.btn.secondary,button.secondary{background:#fff;color:#4d6289;border-color:var(--hp-border);box-shadow:none}.btn.secondary:hover,button.secondary:hover{background:#f5f8fc;border-color:#cbd9eb}.btn.danger,button.danger{background:var(--hp-danger);color:#fff}.btn.danger:hover,button.danger:hover{background:#c9343a}.btn.small,button.small{min-height:30px;padding:5px 9px;font-size:12px;border-radius:7px}
.flash{border:1px solid transparent;border-radius:10px;padding:11px 13px;margin:0 0 14px;box-shadow:none}.flash.success{background:var(--hp-success-bg);border-color:#bfe8cb;color:#176d34}.flash.error{background:var(--hp-danger-bg);border-color:#f0c4c7;color:#a72c32}.flash.warning{background:var(--hp-warning-bg);border-color:#f1d69c;color:#8a5a00}
.table-wrap{border:1px solid var(--hp-border);border-radius:12px;background:#fff;box-shadow:var(--hp-shadow-sm);overflow:auto}table{background:#fff}th{background:#f7f9fd;color:#52678f;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.035em;border-bottom:1px solid var(--hp-border);padding:10px 11px}td{border-bottom:1px solid #edf2f8;padding:10px 11px;color:#263d68}tbody tr:hover td{background:#f8fbff}tbody tr:last-child td{border-bottom:0}
.badge{border-radius:999px;padding:4px 8px;font-size:11px;font-weight:800;line-height:1.2}.badge.ok,.badge.success{background:var(--hp-success-bg);color:#16733a}.badge.warning{background:var(--hp-warning-bg);color:#8f6100}.badge.bad,.badge.danger{background:var(--hp-danger-bg);color:#ae3035}.badge.info{background:var(--hp-info-bg);color:#2056c7}
.help,.muted,.field-help{color:var(--hp-text-muted)}.help{background:#f7faff;border-color:#dce7f7}.required{color:var(--hp-danger)}.warning-text{color:#9a6400}.calendar-input-invalid{border-color:var(--hp-danger)!important;background:#fff7f7!important}
.date-picker-button{height:var(--hp-control-h);border:1px solid var(--hp-border-strong);background:#f7f9fc;color:var(--hp-text);box-shadow:none}.date-picker-button:hover{background:#edf4ff}.date-picker-popover{border-color:var(--hp-border);border-radius:12px;box-shadow:var(--hp-shadow-md)}.date-picker-grid button[aria-current="date"]{background:var(--hp-brand-gradient)}
.back-link,.report-btn{transition:background .15s ease,border-color .15s ease,color .15s ease}.metric{position:relative;overflow:hidden}.metric .value{color:var(--hp-text);font-variant-numeric:tabular-nums;letter-spacing:-.02em}.metric:before{content:"";position:absolute;inset:0 0 auto;height:3px;background:linear-gradient(90deg,var(--hp-blue-600),var(--hp-violet-600),var(--hp-cyan-500));opacity:.8}
.money-value,.ref-value,.rtl-value{font-variant-numeric:tabular-nums}.money-value{font-weight:700}
.empty-state{padding:34px 20px;border:1px dashed #cddbef;border-radius:12px;background:#fbfdff;color:var(--hp-text-muted)}.empty-state:before{content:"";display:block;width:42px;height:42px;margin:0 auto 10px;border-radius:13px;background:linear-gradient(135deg,#e8e5ff,#e6f5ff);box-shadow:inset 0 0 0 1px #d7e4f7}.loading-state{display:flex;align-items:center;justify-content:center;gap:9px;padding:24px;color:var(--hp-text-muted)}.hp-spinner{width:20px;height:20px;border:2px solid #d7e3f3;border-top-color:var(--hp-blue-600);border-radius:50%;animation:hp-spin .8s linear infinite}@keyframes hp-spin{to{transform:rotate(360deg)}}
.pos-modal{backdrop-filter:blur(3px)}.pos-modal-card{border:1px solid var(--hp-border);border-radius:18px;box-shadow:var(--hp-shadow-lg)}
::selection{background:#cfe5ff;color:#0b2c68}
@media (prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}

/* UI Batch 1 REV2 — wide-table readability */
th{white-space:nowrap}
.report-table{width:max-content;min-width:100%}
.report-table th,.report-table td{white-space:nowrap;vertical-align:top}
.report-table th{min-width:92px}
.report-table th:first-child,.report-table td:first-child{min-width:92px}
.report-table th:nth-child(2),.report-table td:nth-child(2){min-width:96px}
.report-table th:nth-child(4),.report-table td:nth-child(4),
.report-table th:nth-child(5),.report-table td:nth-child(5){min-width:110px}
.report-table th:nth-child(6),.report-table td:nth-child(6),
.report-table th:nth-child(7),.report-table td:nth-child(7),
.report-table th:nth-child(8),.report-table td:nth-child(8){min-width:118px}
.table-wrap{scrollbar-gutter:auto}
.metric .value{font-size:clamp(24px,2.1vw,30px);line-height:1.15}

/* UI/UX Batch 8 — global table readability standard */
:root{
  --hp-table-row-odd:#ffffff;
  --hp-table-row-even:#dceeff;
  --hp-table-row-hover:#c7e3ff;
}
.table-wrap table tbody tr:not(.hp-semantic-row):nth-child(odd)>td{background:var(--hp-table-row-odd)}
.table-wrap table tbody tr:not(.hp-semantic-row):nth-child(even)>td{background:var(--hp-table-row-even)}
.table-wrap table tbody tr:not(.hp-semantic-row):hover>td{background:var(--hp-table-row-hover)}
.table-wrap table tbody tr[aria-selected="true"]>td,.table-wrap table tbody tr.is-selected>td{background:#cfe6ff!important}
.hp-master-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.hp-master-search{width:min(360px,100%);margin:0}
body[data-page-path="inventory"] .dashboard-grid:nth-child(2)>.card{border:0;box-shadow:0 10px 26px rgba(21,87,160,.10)}
body[data-page-path="inventory"] .dashboard-grid:nth-child(2)>.card:nth-child(1){background:linear-gradient(135deg,#eaf5ff,#eef0ff)}
body[data-page-path="inventory"] .dashboard-grid:nth-child(2)>.card:nth-child(2){background:linear-gradient(135deg,#eefaf4,#e8f6ff)}
body[data-page-path="inventory"] .dashboard-grid:nth-child(2)>.card:nth-child(3){background:linear-gradient(135deg,#fff6e7,#fff0f2)}
body[data-page-path="inventory"] .dashboard-grid:nth-child(2)>.card h3{font-size:20px;font-weight:900;line-height:1.2;margin-bottom:10px}
body[data-page-path="inventory"] .dashboard-grid:nth-child(2)>.card .metric.value{font-size:38px;font-weight:950;line-height:1.08;color:#123b73}
body[data-page-path="sales"] .page-head{display:none}
body[data-page-path="sales"] main{padding-top:10px}
body[data-page-path="dashboard"] .dashboard-kpi-card h3,body[data-page-path=""] .dashboard-kpi-card h3{font-size:14px}
.hp-health-detail-table td,.hp-health-detail-table th{font-variant-numeric:tabular-nums}

/* UI/UX Batch 8 REV6 — dashboard-style colorful operational KPI cards */
.hp-color-kpi-grid{gap:12px}
.hp-color-kpi-grid>.hp-color-kpi{--kpi-a:#0878f9;--kpi-b:#16b8f3;position:relative;isolation:isolate;overflow:hidden;min-height:145px;margin:0;padding:18px 20px;border:1px solid rgba(255,255,255,.58)!important;border-radius:17px;background:linear-gradient(135deg,var(--kpi-a),var(--kpi-b))!important;color:#fff!important;box-shadow:0 13px 28px color-mix(in srgb,var(--kpi-a) 22%,transparent)!important}
.hp-color-kpi-grid>.hp-color-kpi:after{content:"";position:absolute;z-index:-1;right:-30px;bottom:-54px;width:145px;height:145px;border-radius:50%;background:rgba(255,255,255,.16)}
.hp-color-kpi-grid>.hp-color-kpi.tone-blue{--kpi-a:#0878f9;--kpi-b:#16b8f3}
.hp-color-kpi-grid>.hp-color-kpi.tone-green{--kpi-a:#0aa46f;--kpi-b:#1ac994}
.hp-color-kpi-grid>.hp-color-kpi.tone-violet{--kpi-a:#7c3aed;--kpi-b:#4f46e5}
.hp-color-kpi-grid>.hp-color-kpi.tone-orange{--kpi-a:#f59e0b;--kpi-b:#f2672b}
.hp-color-kpi-grid>.hp-color-kpi h3{margin:0 0 12px!important;color:#fff!important;font-size:19px!important;font-weight:900!important;line-height:1.15!important;text-shadow:0 1px 1px rgba(0,0,0,.08)}
.hp-color-kpi-grid>.hp-color-kpi .metric.value{margin:0 0 8px;color:#fff!important;font-size:clamp(30px,2.8vw,42px)!important;font-weight:950!important;line-height:1.02!important;letter-spacing:-.035em;text-shadow:0 1px 2px rgba(0,0,0,.10)}
.hp-color-kpi-grid>.hp-color-kpi .metric.value small{color:rgba(255,255,255,.95)!important;font-size:.42em!important;font-weight:900!important;letter-spacing:0}
.hp-color-kpi-grid>.hp-color-kpi p,.hp-color-kpi-grid>.hp-color-kpi .muted{margin:4px 0 0;color:rgba(255,255,255,.88)!important;font-size:12px;line-height:1.35;font-weight:650}
body[data-page-path="inventory/opening"] .hp-opening-kpis{grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 12px}
@media(max-width:900px){.hp-color-kpi-grid,.hp-opening-kpis{grid-template-columns:1fr!important}}

/* UI/UX Batch 8 REV8 — Inventory Accounting reconciliation KPIs */
.hp-color-kpi-grid>.hp-color-kpi.tone-red{--kpi-a:#e93855;--kpi-b:#f97373}
body[data-page-path="inventory/reconciliation"] .hp-accounting-kpis{grid-template-columns:repeat(3,minmax(0,1fr));margin:14px 0 12px}
body[data-page-path="inventory/reconciliation"] .hp-accounting-kpis>.hp-color-kpi{min-height:150px}
body[data-page-path="inventory/reconciliation"] .hp-accounting-kpis .metric.value{font-size:clamp(27px,2.35vw,38px)!important;font-variant-numeric:tabular-nums;letter-spacing:-.025em}
@media(max-width:900px){body[data-page-path="inventory/reconciliation"] .hp-accounting-kpis{grid-template-columns:1fr!important}}


/* UI/UX Batch 8 REV9 — preserve colorful KPI treatment across the entire Inventory Health page */
.hp-color-kpi-grid>.hp-color-kpi.tone-cyan{--kpi-a:#0891b2;--kpi-b:#22d3ee}
body[data-page-path="inventory/reconciliation"] .hp-health-kpi-grid{grid-template-columns:repeat(5,minmax(0,1fr));margin:0 0 16px}
body[data-page-path="inventory/reconciliation"] .hp-health-kpi{min-height:158px}
body[data-page-path="inventory/reconciliation"] .hp-health-kpi h3{font-size:18px!important}
body[data-page-path="inventory/reconciliation"] .hp-health-kpi .metric.value{font-size:clamp(34px,3vw,46px)!important}
body[data-page-path="inventory/reconciliation"] .hp-health-kpi p{font-size:12px!important;font-weight:750!important}
@media(max-width:1200px){body[data-page-path="inventory/reconciliation"] .hp-health-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:800px){body[data-page-path="inventory/reconciliation"] .hp-health-kpi-grid{grid-template-columns:1fr!important}}

/* UI Batch 8 REV13 — compact Currency Management policy matrix */
.section-heading-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
.currency-policy-card .help{margin-bottom:0}
.currency-policy-legend{display:flex;align-items:center;gap:14px;flex-wrap:wrap;font-size:.82rem;color:var(--hp-muted,#61749a)}
.currency-policy-legend span{display:inline-flex;align-items:center;gap:6px}
.legend-dot{width:9px;height:9px;border-radius:999px;display:inline-block;background:#c9d5e7}
.legend-dot.legend-on{background:#18b779;box-shadow:0 0 0 3px rgba(24,183,121,.12)}
.currency-policy-table-wrap{overflow-x:auto}
.currency-policy-table{min-width:980px;table-layout:auto}
.currency-policy-table th,.currency-policy-table td{vertical-align:middle}
.currency-policy-table thead tr:first-child th{white-space:nowrap}
.currency-policy-table .operation-group-heading{text-align:center;background:linear-gradient(90deg,rgba(26,124,242,.09),rgba(64,196,255,.12));color:var(--hp-text,#10254c);letter-spacing:.02em}
.currency-policy-table .currency-policy-subhead th{text-align:center;font-size:.78rem;padding-top:7px;padding-bottom:7px;color:var(--hp-muted,#61749a);background:rgba(242,247,255,.92)}
.currency-policy-table .currency-policy-subhead th:nth-child(-n+4){background:transparent;border-top-color:transparent}
.currency-policy-row{height:64px}
.currency-policy-row td{padding-top:10px!important;padding-bottom:10px!important}
.currency-code-cell{white-space:nowrap;font-weight:800}
.currency-symbol-cell{font-size:1.12rem;font-weight:750}
.base-currency-badge{margin-inline-start:6px;padding:3px 8px;border-radius:999px;background:#e9f4ff;color:#145ca8;border:1px solid #c9e4ff;font-size:.72rem}
.policy-toggle-cell{text-align:center;min-width:92px}
.hp-policy-switch{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;cursor:pointer;user-select:none;margin:0!important;font-weight:650;color:var(--hp-muted,#61749a)}
.hp-policy-switch input{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px}
.hp-policy-switch>span{display:block;position:relative;width:38px;height:22px;border-radius:999px;background:#cbd7e8;border:1px solid #b9c8dc;transition:.16s ease;box-shadow:inset 0 1px 2px rgba(21,48,89,.08)}
.hp-policy-switch>span::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(18,42,77,.25);transition:.16s ease}
.hp-policy-switch input:checked+span{background:linear-gradient(135deg,#1478f2,#1db4ef);border-color:#1478f2}
.hp-policy-switch input:checked+span::after{transform:translateX(16px)}
.hp-policy-switch input:focus-visible+span{outline:3px solid rgba(20,120,242,.2);outline-offset:2px}
.hp-policy-switch input:disabled+span{background:linear-gradient(135deg,#7caeea,#78d6ee);opacity:.72;cursor:not-allowed}
.hp-policy-switch small{font-size:.73rem;line-height:1;color:inherit}
.currency-policy-actions{text-align:center;white-space:nowrap}
.currency-policy-actions .small{min-width:62px}
html[dir=rtl] .hp-policy-switch>span::after{left:auto;right:2px}
html[dir=rtl] .hp-policy-switch input:checked+span::after{transform:translateX(-16px)}
@media(max-width:900px){.currency-policy-table{min-width:900px}.currency-policy-legend{width:100%}}

/* Day 9 Batch 4 scalability correction: server-side master-list pagination */
.hp-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:10px 0}.hp-pagination>span{font-size:.9rem;color:var(--muted,#667085)}.hp-pagination .row-actions{align-items:center}.hp-pagination .row-actions>span{font-size:.9rem;font-weight:700;white-space:nowrap}

/* Day 9 Batch 4 REV4 — scalable live master lists */
.hp-live-search{display:flex;align-items:center;gap:8px;min-width:min(460px,100%)}
.hp-live-search .hp-master-search{width:min(460px,100%);margin:0}
.hp-live-search-state{min-width:70px;font-size:12px;color:var(--muted,#6b7a99)}
.hp-pagebar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:10px 0 12px}
.hp-pagebar-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-left:auto}
.hp-size-buttons{display:inline-flex;align-items:center;gap:6px}
.hp-size-buttons button{appearance:none;border:0;background:transparent;padding:2px 5px;color:var(--muted,#61708f);font:inherit;font-weight:700;cursor:pointer;border-radius:6px}
.hp-size-buttons button:hover,.hp-size-buttons button.active{color:var(--primary,#1677ff);background:rgba(22,119,255,.08)}
.hp-size-buttons span{color:var(--muted,#93a0b8)}
.hp-pagebar button[disabled]{opacity:.45;cursor:not-allowed}
@media(max-width:720px){.hp-live-search{min-width:100%;width:100%}.hp-live-search .hp-master-search{width:100%}.hp-pagebar-right{width:100%;justify-content:flex-end}}
