*{box-sizing:border-box}body{margin:0;background:#f4f6f8;color:#1e293b;font:15px/1.5 system-ui,-apple-system,Segoe UI,sans-serif}header{background:#132238;color:white;padding:14px max(20px,calc((100% - 1180px)/2));display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{font-weight:750;font-size:18px}.brand span{color:#a8bfd8;font-weight:500;margin-left:7px}nav{display:flex;gap:18px}nav a{color:#e7eff8;text-decoration:none}main{max-width:1180px;margin:28px auto;padding:0 18px;min-height:75vh}h1{font-size:27px;margin:0 0 5px}h2{font-size:19px;margin:28px 0 12px}p{margin:0 0 14px}.muted,.pagehead p{color:#64748b}.pagehead{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:20px 0}.stat,.panel{background:white;border:1px solid #e2e8f0;border-radius:12px;padding:17px}.stat small{display:block;color:#64748b}.stat strong{font-size:26px}.red{color:#c0392b}.search{display:flex;gap:10px;align-items:center;margin:18px 0}.search>input{max-width:390px;flex:1}.check{display:flex;align-items:center;gap:7px;white-space:nowrap}input,select{font:inherit;padding:9px 10px;border:1px solid #cbd5e1;border-radius:7px;min-width:0;background:white}button{border:0;border-radius:7px;background:#1769aa;color:white;font:600 14px system-ui;padding:10px 15px;cursor:pointer}button:hover{background:#12558b}.secondary{background:#e8eef5;color:#1e293b}.small{padding:7px 10px;font-size:12px}.tablewrap{padding:0;overflow-x:auto}table{width:100%;border-collapse:collapse;white-space:nowrap}th,td{text-align:left;padding:11px 13px;border-bottom:1px solid #edf0f3}th{background:#f8fafc;color:#526174;font-size:12px;text-transform:uppercase;letter-spacing:.03em}tr:last-child td{border-bottom:0}tr.under{background:#fff8f5}td a{color:#1769aa;text-decoration:none}.inline{display:flex;gap:6px}.inline input{width:90px;padding:6px}.empty{text-align:center;color:#64748b;padding:25px}.flash{padding:11px 14px;border-radius:8px;margin:12px 0}.flash.error{background:#fff0ed;color:#9d2b1e}.flash.success{background:#eaf7ef;color:#176b39}.narrow{max-width:420px;margin:70px auto}.narrow label,.settingsgrid label{display:flex;flex-direction:column;gap:6px;margin:12px 0}.narrow input{width:100%}.settingsgrid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.settingsgrid .wide{grid-column:1/-1}.actions{margin-top:10px}.test{border-top:1px solid #edf0f3;padding-top:15px;margin-top:15px}footer{text-align:center;color:#8190a3;padding:20px;font-size:12px}@media(max-width:700px){.stats{grid-template-columns:1fr}.pagehead{align-items:flex-start;flex-direction:column}.search{align-items:stretch;flex-wrap:wrap}.search>input{max-width:none;flex-basis:100%}.settingsgrid{grid-template-columns:1fr}.settingsgrid .wide{grid-column:auto}header{align-items:flex-start;flex-direction:column}nav{gap:14px}}

/* Doypacky 2.4.3: compact inventory editor, nonwrapping SKU and sticky save bar. */
.stock-save-toolbar { position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:11px 15px; background:#f0f5fa; border:1px solid #d5e2ed; border-radius:10px; margin:14px 0 10px; box-shadow:0 3px 10px rgba(19,34,56,.08); }
.stock-save-status { font-size:13px; color:#475569; font-weight:600; }
.stock-save-toolbar button { white-space:nowrap; }
.stock-save-toolbar button:disabled { opacity:.45; cursor:default; }
.stock-table { width:100%; table-layout:auto; white-space:normal; }
.stock-table th,.stock-table td { padding:9px 12px; }
.stock-table .stock-code { white-space:nowrap; overflow-wrap:normal; font-size:13px; }
.stock-table .stock-name { min-width:300px; }
.stock-table .stock-count { white-space:nowrap; }
.stock-table .stock-min-input { width:94px; max-width:100%; padding:6px 8px; }
.stock-table .stock-input-dirty { border-color:#1769aa; background:#f1f8ff; }
.stock-table-wrap { overflow-x:auto; }
@media(max-width:800px) { .stock-table { min-width:750px; } .stock-save-toolbar { top:0; } }
@media(max-width:480px) { .stock-save-toolbar { gap:8px; padding:9px; } .stock-save-toolbar button { padding:9px; font-size:12px; } }

/* 2.4.4: keep SKUs intact and allow horizontal scrolling for new sales columns */
.stock-table { min-width: 1120px; }
.stock-table th { white-space: nowrap; }
.stock-table .stock-sales { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; min-width:105px; }
.stock-table .stock-code { white-space:nowrap; }

/* 2.4.4.3: visual refresh; scoped to dashboard to protect other pages */
.dashboard-page{background:#fbfcfe;color:#111d35}
.dashboard-page header{position:fixed;top:0;bottom:0;left:0;width:248px;padding:24px 12px;background:#f8fafb;color:#132238;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:36px;border-right:1px solid #e4e9ef;z-index:30}
.dashboard-page .brand{display:flex;gap:12px;align-items:center;padding:4px 10px;font-size:23px;color:#111d35}
.dashboard-page .brand-icon{display:grid;place-items:center;width:38px;height:44px;border:3px solid #078b80;border-radius:4px;color:#078b80;font-size:32px;line-height:1}
.dashboard-page .brand-title{display:block;line-height:1.15}
.dashboard-page .brand-title small{display:block;font-size:13px;color:#586678;font-weight:500;margin-top:5px}
.dashboard-page nav{display:flex;flex-direction:column;gap:5px}
.dashboard-page nav a{color:#1c2b42;padding:11px 12px;border-radius:7px;text-decoration:none;display:flex;align-items:center;gap:8px;font-weight:540}
.dashboard-page nav a span{font-size:14px}
.dashboard-page nav .nav-overview{background:#dff2ed;color:#006f63;border-left:4px solid #078b80;font-weight:750}
.dashboard-page main{max-width:none;margin:0 0 0 248px;padding:32px 28px;min-height:100vh}
.dashboard-page footer{margin-left:248px}
.dashboard-page .pagehead{align-items:flex-start;margin-bottom:24px}
.dashboard-page .pagehead h1{font-size:33px;letter-spacing:-.03em;margin:0 0 3px}
.dashboard-page .pagehead p{color:#69788d;font-size:13px}
.dashboard-page .pagehead form{display:flex;align-items:center;gap:8px}
.dashboard-page .pagehead button,.dashboard-page .import-button{background:#00877e;color:#fff;border:0;border-radius:9px;padding:11px 15px;font-weight:700;text-decoration:none;white-space:nowrap}
.dashboard-page .pagehead .refresh-button{background:#e7f2f0;color:#067b73}
.dashboard-page .stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0 24px}
.dashboard-page .stat{display:flex;align-items:center;gap:14px;padding:17px 16px;border-radius:10px;min-width:0}
.dashboard-page .stat-symbol{font-size:27px;color:#526073;min-width:32px;text-align:center}
.dashboard-page .stat strong{font-size:25px;line-height:1.2;display:block;white-space:nowrap}
.dashboard-page .stat small{font-size:13px;white-space:nowrap}
.dashboard-page .stat-alert{background:#fff8f8;border-color:#f2dddd}
.dashboard-page .stat-alert .stat-symbol{color:#cc3434}
.dashboard-page .stat-sync{background:#effbf3;border-color:#d8eddd}
.dashboard-page .stat-sync strong,.dashboard-page .stat-sync .stat-symbol{color:#087d3e}
.dashboard-page .stat-sync strong{font-size:17px}
.dashboard-page .search{gap:10px;margin:0 0 18px}
.dashboard-page .search>input{max-width:460px;width:100%;padding:12px 14px}
.dashboard-page .search button{padding:11px 15px}
.dashboard-page .column-menu{position:relative;margin-left:auto}
.dashboard-page .columns-options{position:absolute;right:0;top:calc(100% + 5px);width:180px;padding:10px;background:#fff;border:1px solid #dce4ea;border-radius:9px;box-shadow:0 12px 24px #10203024;z-index:35}
.dashboard-page .columns-options[hidden]{display:none}
.dashboard-page .columns-options label{display:flex;align-items:center;gap:8px;padding:5px;font-size:13px}
.dashboard-page .stock-save-toolbar{top:8px;background:#e9f7f1;border-color:#d1eadd;padding:12px 16px;margin:0 0 18px}
.dashboard-page .stock-save-toolbar button{background:#00877e}
.dashboard-page .stock-save-status{color:#123c32;font-weight:700}
.dashboard-page .stock-table-wrap{border-radius:12px;overflow-x:auto}
.dashboard-page .stock-table{min-width:1020px}
.dashboard-page .stock-table th{background:#f3f6f9;color:#243047;font-size:11px;padding:14px 12px}
.dashboard-page .stock-table td{padding:12px 12px;font-size:14px}
.dashboard-page .stock-table tbody tr:hover{background:#f5faf9}
.dashboard-page .stock-table .stock-name{min-width:280px;white-space:normal}
.dashboard-page .stock-table .stock-name a{color:#162a43}
.dashboard-page .stock-table .stock-count{text-align:right;font-variant-numeric:tabular-nums}
.dashboard-page .stock-table .stock-sales{min-width:85px}
.dashboard-page .stock-table .stock-code{font-weight:700}
.dashboard-page .stock-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:#16a34a;margin-right:9px}
.dashboard-page .stock-dot.is-low{background:#dc3030}
.dashboard-page .stock-table .stock-min-input{width:100px}
.dashboard-page .stock-table .sales-head{text-align:center;padding:6px 0 0;min-width:255px}
.dashboard-page .sales-subheads{display:flex;justify-content:space-around;gap:0;border-top:1px solid #dce3ea;margin-top:5px;padding:7px 0}
.dashboard-page .sales-subheads span{flex:1}
.dashboard-page .sales-subheads span[hidden],.dashboard-page .stock-table td[hidden],.dashboard-page .stock-table th[hidden]{display:none}
@media(max-width:1250px){.dashboard-page .stats{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-page .search{flex-wrap:wrap}}
@media(max-width:760px){.dashboard-page header{position:static;width:auto;gap:12px}.dashboard-page nav{flex-direction:row;flex-wrap:wrap}.dashboard-page main{margin:0;padding:20px 12px}.dashboard-page footer{margin:0}.dashboard-page .pagehead{flex-direction:column}.dashboard-page .stats{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-page .stat{padding:12px}.dashboard-page .stat strong{font-size:19px}.dashboard-page .stat small{white-space:normal}.dashboard-page .column-menu{margin-left:0}}

/* 2.4.4.4: keep the entire two-line table heading in view while scrolling. */
.dashboard-page .stock-table-wrap { overflow:visible; }
.dashboard-page .stock-table thead { position:sticky; top:0; z-index:8; }
.dashboard-page .stock-table thead th { background:#f3f6f9; box-shadow:0 1px 0 #dce3ea; }
.detail-back{margin-bottom:20px}.detail-back a{color:#087f76;text-decoration:none;font-weight:650}
.detail-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:16px 0 22px}
.detail-metrics .panel{padding:16px}.detail-metrics small{display:block;color:#65748a;margin-bottom:5px}.detail-metrics strong{display:block;font-size:22px;color:#132238}
.detail-visibility form{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.detail-visibility label{flex:1}.detail-visibility label small{display:block;color:#65748a}
@media(max-width:1100px){.detail-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.dashboard-page .stock-table-wrap{overflow-x:auto}.dashboard-page .stock-table thead{position:sticky;top:0}}
@media(max-width:700px){.detail-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* 2.4.4.5: Safari-compatible sticky table cells, not sticky thead. */
.dashboard-page .stock-table-wrap { overflow:visible !important; }
.dashboard-page .stock-table { border-collapse:separate; border-spacing:0; }
.dashboard-page .stock-table thead { position:static; }
.dashboard-page .stock-table thead th { position:sticky; top:0; z-index:25; background:#f3f6f9; box-shadow:0 2px 3px #13223820; }
.dashboard-page .stock-code a { color:inherit; text-decoration:none; }
.dashboard-page .stock-code a:hover,.dashboard-page .stock-name a:hover { color:#00877e; text-decoration:underline; }
.dashboard-page .detail-visibility button { background:#00877e; color:#fff; }
.dashboard-page .detail-visibility button:hover { background:#006e66; }
@media(max-width:1100px){ .dashboard-page .stock-table-wrap { overflow:visible !important; } }

/* 2.4.4.6: keep the table headings below the sticky save toolbar. */
.dashboard-page .stock-table thead th { top:0; z-index:19; }
.brand .brand-logo { display:block; width:209px; max-width:100%; height:auto; }
.dashboard-page .brand { padding:4px 4px; }
.dashboard-page .brand .brand-logo { width:209px; }

/* 2.4.4.7: WPJ category selector */
.dashboard-page .category-filter-label{font-size:13px;font-weight:650;color:#526174;white-space:nowrap}
.dashboard-page #category-filter{min-width:190px;max-width:260px;padding:11px 12px}
@media(max-width:700px){.dashboard-page #category-filter{max-width:none;flex:1}}


/* 2.4.4.12 – shared visual language across all authenticated pages. */
.dashboard-page { --brand-teal:#00877e; --brand-teal-dark:#006d65; --line:#e2e9ee; --ink:#17263e; --subtle:#64748b; }
.dashboard-page header { box-shadow:2px 0 14px rgba(21,40,57,.025); }
.dashboard-page nav a { transition:background-color .15s ease,color .15s ease; }
.dashboard-page nav a:hover { background:#edf5f3;color:#006d65; }
.dashboard-page nav a.nav-overview { background:transparent;color:#1c2b42;border-left:4px solid transparent;font-weight:540; }
.dashboard-page nav a.is-active { background:#dff2ed;color:#006f63;border-left:4px solid #078b80;font-weight:750; }
.dashboard-page main > h1 { font-size:33px;letter-spacing:-.03em;margin:0 0 8px;color:var(--ink); }
.dashboard-page main > h1 + p.muted { margin-bottom:24px;max-width:780px; }
.dashboard-page h2 { color:var(--ink);font-size:19px;letter-spacing:-.015em; }
.dashboard-page .panel { border-color:var(--line);border-radius:12px;background:#fff;box-shadow:0 3px 14px rgba(21,40,57,.025);margin-bottom:18px; }
.dashboard-page .panel > h2:first-child { margin-top:0; }
.dashboard-page details.panel { padding:0;overflow:hidden; }
.dashboard-page details.panel > summary { cursor:pointer;padding:16px 19px;font-weight:650;list-style-position:inside; }
.dashboard-page details.panel[open] > summary { background:#f3faf8;border-bottom:1px solid var(--line);margin-bottom:16px; }
.dashboard-page details.panel > :not(summary) { margin-left:19px;margin-right:19px; }
.dashboard-page button, .dashboard-page a.button { display:inline-flex;align-items:center;justify-content:center;gap:6px;background:var(--brand-teal);border:1px solid transparent;color:white;border-radius:9px;padding:10px 15px;font-weight:650;text-decoration:none;line-height:1.4;cursor:pointer; }
.dashboard-page button:hover, .dashboard-page a.button:hover { background:var(--brand-teal-dark);color:#fff; }
.dashboard-page button.secondary, .dashboard-page .secondary { background:#e8f2f1;color:#08786f;border-color:#d7e9e5; }
.dashboard-page button.secondary:hover, .dashboard-page .secondary:hover { background:#d8ebe7;color:#006f63; }
.dashboard-page button:disabled { opacity:.48;cursor:not-allowed; }
.dashboard-page input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .dashboard-page select, .dashboard-page textarea { border:1px solid #cbd9e1;border-radius:8px;background:#fff;color:var(--ink);max-width:100%;font:inherit; }
.dashboard-page input:focus-visible, .dashboard-page select:focus-visible, .dashboard-page textarea:focus-visible, .dashboard-page button:focus-visible, .dashboard-page a:focus-visible { outline:2px solid #00877e;outline-offset:2px; }
.dashboard-page input[type=checkbox],.dashboard-page input[type=radio] { accent-color:var(--brand-teal); }
.dashboard-page .settingsgrid label, .dashboard-page .narrow label { color:#34435b;font-size:13px;font-weight:600; }
.dashboard-page .settingsgrid label input, .dashboard-page .settingsgrid label select { font-size:15px;font-weight:400; }
.dashboard-page .tablewrap { border-radius:12px; }
.dashboard-page table:not(.stock-table) { white-space:normal; }
.dashboard-page table:not(.stock-table) th { background:#f3f6f9;color:#334155;font-size:11px;letter-spacing:.055em;padding:13px 14px; }
.dashboard-page table:not(.stock-table) td { padding:13px 14px;border-bottom:1px solid #e9eef2;vertical-align:middle; }
.dashboard-page table:not(.stock-table) tbody tr:hover { background:#f5faf9; }
.dashboard-page td a, .dashboard-page .panel a:not(.button) { color:#087c73; }
.dashboard-page .flash { border-radius:9px;border:1px solid transparent; }
.dashboard-page .flash.success { background:#effbf4;border-color:#cdebd8;color:#12623c; }
.dashboard-page .flash.error { background:#fff2ef;border-color:#f2d9d3;color:#a32c21; }
.dashboard-page .muted { color:var(--subtle); }
.dashboard-page .test { border-color:var(--line); }
.dashboard-page .narrow { margin:55px auto; }
.dashboard-page .actions { display:flex;gap:10px;flex-wrap:wrap;align-items:center; }
.dashboard-page footer { color:#8290a2; }
@media(max-width:760px) { .dashboard-page header { box-shadow:none; } .dashboard-page nav a { padding:9px 10px; } .dashboard-page main > h1 { font-size:27px; } .dashboard-page .panel { padding:14px; } .dashboard-page table:not(.stock-table) { min-width:580px; } }
