/* Modern WinMEAT visual layer. Workflow intentionally follows the recorded legacy sequence. */
:root{--wm-blue:#0b5cab;--wm-blue2:#0f73d8;--wm-navy:#08253e;--wm-bg:#f4f7fb;--wm-card:#fff;--wm-line:#d9e3ec;--wm-text:#183247;--wm-muted:#6f8394;--wm-warn:#fff6df;--wm-warnline:#efbd52}
body.modern-winmeat{background:var(--wm-bg);color:var(--wm-text);font-family:Inter,"Segoe UI",Arial,sans-serif}
/* login: retain the old required first step, but present it as a modern sign-in */
.legacy-login-overlay{position:fixed;inset:0;background:linear-gradient(135deg,#071f34dd,#0b5cabbb);z-index:1000;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(3px)}
.legacy-login-window{width:520px;max-width:92vw;background:#fff;border:1px solid #ffffff80;border-radius:16px;box-shadow:0 26px 80px #00152d66;overflow:hidden}
.legacy-window-caption{background:linear-gradient(135deg,#08253e,#0b5cab);color:#fff;padding:18px 24px;font-size:18px;font-weight:800}
.legacy-login-content{padding:32px 44px 38px;text-align:left}.legacy-login-company{color:var(--wm-blue);font-weight:900;font-size:19px;margin-bottom:6px}.legacy-login-system{font-size:12px;letter-spacing:2.5px;color:var(--wm-muted);margin-bottom:28px}.legacy-login-prompt{font-weight:700;margin-bottom:14px}.legacy-login-content label{display:block;margin:12px 0}.legacy-login-content input{margin-top:6px}.legacy-ok{width:100%;margin-top:12px;border:0;border-radius:8px;background:var(--wm-blue2);color:#fff;padding:11px 16px;font-weight:800;cursor:pointer}.legacy-login-foot{margin-top:22px;color:var(--wm-muted);font-size:11px;text-align:center}
/* Invoice page */
.invoice-page-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;margin-bottom:16px}.invoice-page-head h1{margin:0;font-size:30px}.eyebrow{font-size:11px;font-weight:900;letter-spacing:1.7px;color:var(--wm-blue2);margin-bottom:3px}.invoice-steps{display:flex;gap:7px;flex-wrap:wrap}.step{display:flex;align-items:center;gap:6px;background:#eaf1f7;color:#607789;border-radius:999px;padding:7px 11px;font-size:11px;font-weight:800}.step b{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#cbd9e5;color:#52697b}.step.active{background:#e7f2ff;color:#0a5ba8}.step.active b{background:var(--wm-blue2);color:#fff}.modern-tabs{margin-bottom:14px}.invoice-workspace{max-width:1280px;margin:0 auto}.invoice-workspace .panel{padding:16px 18px}.section-title-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.section-title-row>div{display:flex;align-items:center;gap:9px}.section-title-row h2{margin:0}.section-number{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:#e7f2ff;color:var(--wm-blue);font-weight:900}.keyhint{font-size:11px;color:var(--wm-muted)}.status-pill{font-size:10px;font-weight:900;letter-spacing:.7px;color:#756000;background:#fff4c8;border:1px solid #f2d36f;border-radius:999px;padding:5px 9px}
.customer-search-row{display:grid;grid-template-columns:1.7fr auto 1fr;gap:9px;align-items:end}.invoice-search{font-size:16px!important;padding:11px 13px!important;border:2px solid #a9ccec!important}.customer-summary{margin-top:12px;padding:13px 14px;border:1px solid var(--wm-line);border-radius:9px;background:#f9fbfd;display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:10px}.customer-summary.empty-state{display:block;color:var(--wm-muted)}.customer-summary .summary-main strong{display:block;font-size:16px;color:#102d46;margin-bottom:3px}.customer-summary small{color:var(--wm-muted)}.summary-stat span{display:block;color:var(--wm-muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.4px}.summary-stat b{display:block;font-size:14px;margin-top:3px}.credit-warning{margin-top:10px;background:var(--wm-warn);border:1px solid var(--wm-warnline);border-left:4px solid #e29c13;border-radius:8px;padding:10px 12px;color:#755100;font-size:12px;font-weight:700}
.invoice-header-grid{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:10px}.hold-check{display:flex;align-items:center;justify-content:center;gap:7px;background:#f8fafc;border:1px solid var(--wm-line);border-radius:7px;padding:8px}.hold-check .check{margin:0}.invoice-line-table-wrap{border:1px solid var(--wm-line);border-radius:8px;overflow:auto;background:#fff;min-height:128px}.invoice-line-table{margin:0}.invoice-line-table th{background:#edf4fa;color:#425c70;font-size:10px;text-transform:uppercase;letter-spacing:.4px}.invoice-line-table td{padding:8px 7px}.invoice-entry-row{display:grid;grid-template-columns:2fr .55fr .65fr .55fr .65fr .7fr 1fr auto;gap:7px;align-items:end;margin-top:11px;padding:11px;background:#f6f9fc;border:1px solid var(--wm-line);border-radius:8px}.invoice-entry-row label{margin:0}.add-line{margin:0;height:38px}.product-info-panel{margin-top:10px;border:1px solid #cbdcec;border-radius:8px;background:linear-gradient(180deg,#f9fcff,#f1f7fc);padding:12px}.product-info-empty{color:var(--wm-muted);font-size:12px}.product-info-grid{display:grid;grid-template-columns:1.6fr repeat(6,1fr);gap:8px}.product-info-grid>div{padding:7px 8px;border-right:1px solid #d7e3ed}.product-info-grid>div:last-child{border-right:0}.product-info-grid span{display:block;color:var(--wm-muted);font-size:9px;text-transform:uppercase;font-weight:800;letter-spacing:.4px}.product-info-grid b{display:block;margin-top:3px;color:#103b5e}.product-info-grid .product-name b{font-size:13px}.invoice-bottom-bar{position:sticky;bottom:0;z-index:3;background:#fff;border:1px solid var(--wm-line);box-shadow:0 -7px 22px #072a4912;border-radius:10px;padding:10px 14px;display:grid;grid-template-columns:170px 1fr auto;gap:14px;align-items:center}.invoice-bottom-bar strong{display:block;font-size:24px;color:#0b5cab}.invoice-bottom-bar .msg{margin:0;padding:7px 10px}.save-invoice{margin:0;padding:11px 18px}.save-invoice kbd{background:#ffffff2e;border:1px solid #ffffff66;border-radius:4px;padding:2px 5px;margin-left:5px}
@media(max-width:1100px){.invoice-header-grid{grid-template-columns:repeat(3,1fr)}.customer-search-row{grid-template-columns:1fr auto}.customer-search-row select{grid-column:1/-1}.customer-summary{grid-template-columns:1fr 1fr}.invoice-entry-row{grid-template-columns:1.5fr repeat(3,1fr)}.invoice-steps{display:none}.product-info-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.invoice-page-head{display:block}.invoice-header-grid,.customer-search-row,.customer-summary,.invoice-entry-row,.product-info-grid{grid-template-columns:1fr}.invoice-bottom-bar{grid-template-columns:1fr;position:static}}

/* v8.5.3 invoice customer lookup: separate legacy-style code and name searches */
.customer-lookup-grid{display:grid;grid-template-columns:1fr 1.55fr;gap:14px;align-items:start}
.customer-picker{position:relative}.customer-picker label{display:block;font-weight:800;color:#203b53}.customer-picker .invoice-search{width:100%;margin-top:5px}
.customer-lookup-panel{position:absolute;z-index:4500;left:0;right:0;top:100%;margin-top:5px;background:#fff;border:1px solid #afc2d4;border-radius:10px;box-shadow:0 16px 38px rgba(24,45,65,.20);overflow:hidden;min-width:430px}
.customer-lookup-head,.customer-lookup-row{display:grid;grid-template-columns:110px minmax(210px,1fr) 120px;gap:10px;align-items:center;text-align:left}
.customer-lookup-head{padding:8px 12px;background:#173b5a;color:#fff;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.35px}
.customer-lookup-row{width:100%;border:0;border-bottom:1px solid #e1e8ee;background:#fff;padding:9px 12px;font:inherit;cursor:pointer;color:#172b3b}
.customer-lookup-row:hover,.customer-lookup-row.active{background:#e8f2fa;outline:2px solid #6da8d2;outline-offset:-2px}
.customer-lookup-empty{padding:14px;color:#667b8c}.customer-lookup-footer{padding:8px 12px;background:#f5f8fa;color:#526b7d;font-size:11px;border-top:1px solid #dce5ec}
@media(max-width:900px){.customer-lookup-grid{grid-template-columns:1fr}.customer-lookup-panel{min-width:0}.customer-lookup-head,.customer-lookup-row{grid-template-columns:95px 1fr 90px}}
