:root {
  color-scheme: light;
  --navy: #222931;
  --navy-deep: #171d24;
  --navy-soft: #303a44;
  --blue: #185b94;
  --red: #dc3040;
  --red-soft: #fff1f2;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --line: #dce3ea;
  --text: #17283a;
  --muted: #627184;
  --good: #12795a;
  --warning: #9e6b16;
  --shadow: 0 12px 35px rgba(13, 34, 58, .055);
  font-family: "Segoe UI", Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #5ca3e0; outline-offset: 3px; }
.muted { color: var(--muted); }
.eyebrow { margin: 0; color: var(--red); font-size: .68rem; font-weight: 800; letter-spacing: .18em; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--navy); }
.brand-mark { position: relative; display: inline-block; width: 35px; height: 35px; border: 7px solid currentColor; border-right-color: transparent; border-bottom-color: var(--red); transform: skew(-9deg); }
.brand-mark span { position: absolute; width: 19px; height: 7px; left: 2px; top: 8px; background: var(--red); }
.brand-word { display: flex; flex-direction: column; font-size: 1.43rem; font-weight: 900; line-height: .88; letter-spacing: .045em; }
.brand-word small { padding-top: 5px; color: var(--red); font-size: .49rem; letter-spacing: .34em; }
.brand-light { color: #fff; }
.brand-logo { display: block; object-fit: contain; object-position: left center; }
.brand-logo-auth { width: 142px; height: 125px; }
.brand-logo-sidebar { width: 105px; height: 90px; }
.brand-logo-official { width: 160px; height: 82px; }
.topbar-logo { display: block; width: 105px; height: 50px; object-fit: contain; }

.auth-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 48%) minmax(440px, 52%); }
.auth-intro { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(30px, 5vw, 74px); color: #fff; background: radial-gradient(circle at 15% 80%, #37434e 0, transparent 36%), linear-gradient(145deg, #252c34, #151a20 76%); }
.auth-intro::before { content: ""; position: absolute; width: 560px; height: 560px; right: -240px; top: 12%; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 80px rgba(255,255,255,.025), 0 0 0 160px rgba(255,255,255,.025); }
.auth-intro::after { content: ""; position: absolute; width: 14px; height: 160px; right: 16%; bottom: 0; background: var(--red); transform: skew(-27deg); }
.auth-intro > * { position: relative; z-index: 1; }
.auth-intro-copy { max-width: 540px; margin: 50px 0; }
.auth-intro-copy h1 { margin: 19px 0 20px; max-width: 500px; font-size: clamp(2.45rem, 4.6vw, 4.45rem); line-height: 1.06; letter-spacing: -.055em; }
.auth-intro-copy > p:last-child { max-width: 425px; color: #b9cbe0; font-size: 1.05rem; line-height: 1.65; }
.auth-intro-foot { display: flex; align-items: center; gap: 12px; color: #a5bdd5; font-size: .64rem; font-weight: 800; letter-spacing: .13em; }
.accent-line { width: 34px; height: 2px; background: var(--red); }
.auth-panel { display: grid; place-items: center; padding: 32px; background: #f7f9fb; }
.auth-card { width: min(100%, 430px); }
.auth-card h2 { margin: 10px 0 8px; color: var(--navy); font-size: 2.15rem; letter-spacing: -.04em; }
.auth-card > .muted { margin: 0 0 32px; line-height: 1.55; }
.auth-mobile-brand { display: none; margin-bottom: 45px; }
.stack-form { display: grid; gap: 18px; }
.stack-form label, .field { display: grid; gap: 8px; color: #3d5165; font-size: .82rem; font-weight: 700; }
.stack-form label small { color: var(--muted); font-weight: 400; }
.stack-form input, .stack-form select, .field input, .field select, .field textarea, .search-input, .select-input, .table-input {
  width: 100%; min-height: 45px; border: 1px solid #cdd7e1; border-radius: 8px; padding: 10px 13px;
  color: var(--text); background: #fff; outline: none; transition: border-color .2s, box-shadow .2s;
}
.stack-form input:focus, .stack-form select:focus, .field input:focus, .field select:focus, .field textarea:focus, .search-input:focus, .select-input:focus, .table-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(24,91,148,.12); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 9px 16px; border: 1px solid transparent; border-radius: 8px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.button-primary { color: #fff; background: var(--red); }
.button-primary:not(:disabled):hover { background: #b92538; }
.button-blue { color: #fff; background: var(--blue); }
.button-blue:not(:disabled):hover { background: #104a7a; }
.button-outline { color: var(--navy); border-color: #c8d4df; background: #fff; }
.button-outline:not(:disabled):hover { border-color: var(--blue); color: var(--blue); }
.button-ghost { color: var(--blue); background: #edf4fa; }
.button-danger { color: #aa2536; background: var(--red-soft); }
.button-small { min-height: 33px; padding: 6px 10px; font-size: .78rem; }
.button-full { width: 100%; margin-top: 4px; justify-content: space-between; padding-left: 19px; padding-right: 19px; }
.text-button { border: 0; padding: 0; color: var(--blue); font-weight: 700; background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.auth-toggle { margin-top: 26px; }
.dev-demo-access { margin-top: 22px; padding: 17px; border: 1px solid #f0bcaa; border-radius: 9px; background: #fff6f1; }
.dev-demo-access h3 { margin: 0 0 5px; color: #8e3026; font-size: .88rem; }
.dev-demo-access p { margin: 0 0 12px; color: #77564d; font-size: .75rem; line-height: 1.45; }
.dev-demo-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.dev-demo-actions .button { min-width: 0; white-space: normal; line-height: 1.25; text-align: center; }
.auth-note { margin-top: 35px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; line-height: 1.6; }
.alert { margin: 0 0 20px; padding: 12px 14px; border-radius: 8px; color: #9c2937; background: var(--red-soft); border: 1px solid #f2ccd1; font-size: .88rem; line-height: 1.5; }
.alert.info { color: #235178; background: #ebf4fb; border-color: #cfe5f5; }
.alert.good { color: var(--good); background: #eaf7f0; border-color: #cce9db; }

.workspace { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; color: #d3e0ec; background: var(--navy-deep); }
.sidebar-top { padding: 29px 25px 25px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-top .brand-word { font-size: 1.25rem; }
.portal-label { margin: 31px 0 0; color: #738fa9; font-size: .61rem; font-weight: 800; letter-spacing: .18em; }
.main-nav { display: grid; align-content: start; gap: 5px; padding: 20px 13px; overflow-y: auto; }
.nav-link { display: flex; align-items: center; gap: 13px; width: 100%; padding: 12px 13px; border: 0; border-radius: 8px; color: #b8cbdc; background: transparent; font-size: .84rem; font-weight: 650; text-align: left; text-decoration: none; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-link.active { color: #fff; background: #1c3959; box-shadow: inset 3px 0 0 var(--red); }
.nav-icon { display: inline-grid; place-items: center; width: 18px; font-size: 1.05rem; font-weight: 400; }
.nav-count { margin-left: auto; padding: 2px 7px; border-radius: 99px; color: #fff; background: var(--red); font-size: .68rem; }
.sidebar-bottom { margin-top: auto; padding: 19px 20px 24px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-account { display: grid; gap: 3px; margin-bottom: 16px; }
.sidebar-account strong { color: #fff; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account span { color: #8fa7bc; font-size: .71rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-logout { display: flex; justify-content: space-between; width: 100%; padding: 9px 0; border: 0; color: #c9d8e6; background: transparent; font-size: .78rem; font-weight: 700; text-align: left; }
.sidebar-logout:hover { color: #fff; }
.main-shell { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; min-height: 109px; padding: 21px clamp(22px, 3.2vw, 52px); background: #fff; border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 4px 0 0; color: var(--navy); font-size: clamp(1.5rem, 2.15vw, 2rem); letter-spacing: -.04em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.role-pill { padding: 8px 11px; color: #2c567c; background: #edf4fa; border: 1px solid #d5e5f3; border-radius: 99px; font-size: .72rem; font-weight: 800; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.mobile-menu-button { display: none; }
.view { width: min(100%, 1650px); flex: 1; margin: 0 auto; padding: 30px clamp(20px, 3.2vw, 52px) 50px; outline: none; }
.app-footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px clamp(22px, 3.2vw, 52px); border-top: 1px solid var(--line); color: #91a0ad; font-size: .7rem; }
.app-footer span:first-child { font-weight: 900; letter-spacing: .13em; }

.page-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-bottom: 22px; }
.page-heading h2 { margin: 0 0 6px; color: var(--navy); font-size: 1.3rem; letter-spacing: -.03em; }
.page-heading p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.page-actions-right { justify-content: flex-end; }
.surface { border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.surface-pad { padding: 22px; }
.surface h3 { margin: 0 0 12px; color: var(--navy); font-size: 1rem; }
.lead-card { position: relative; overflow: hidden; padding: 34px; color: #fff; background: linear-gradient(125deg, #153655, #0c2138 82%); }
.lead-card::after { content: ""; position: absolute; right: -54px; top: -70px; width: 290px; height: 290px; border-radius: 50%; border: 36px solid rgba(255,255,255,.035); box-shadow: 0 0 0 58px rgba(255,255,255,.028); }
.lead-card > * { position: relative; z-index: 1; }
.lead-card .eyebrow { color: #ff8e9b; }
.lead-card h2 { margin: 9px 0; max-width: 550px; color: #fff; font-size: clamp(1.55rem, 2.5vw, 2.5rem); letter-spacing: -.04em; }
.lead-card p { max-width: 560px; color: #c2d3e2; line-height: 1.6; }
.lead-card .button { margin-top: 8px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.stat-card { padding: 21px; }
.stat-card .stat-label { color: var(--muted); font-size: .74rem; font-weight: 750; }
.stat-card strong { display: block; margin: 12px 0 4px; color: var(--navy); font-size: 1.6rem; letter-spacing: -.04em; }
.stat-card small { color: var(--muted); font-size: .72rem; }
.content-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr); gap: 18px; margin-top: 18px; }
.content-grid > * { min-width: 0; }
.section-link { color: var(--blue); font-size: .78rem; font-weight: 750; text-decoration: none; }
.list-rows { display: grid; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid #edf1f5; }
.list-row:first-child { border-top: 0; }
.list-row strong { display: block; font-size: .83rem; }
.list-row small { display: block; margin-top: 4px; color: var(--muted); font-size: .72rem; }
.list-row .amount { font-size: .85rem; }
.info-list { display: grid; gap: 12px; margin: 0; }
.info-list div { display: flex; justify-content: space-between; gap: 16px; font-size: .8rem; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; font-weight: 700; text-align: right; }

.toolbar { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin-bottom: 15px; }
.workspace[data-route="catalog"] .topbar { min-height: 75px; padding-top: 12px; padding-bottom: 12px; }
.catalog-hero { display: grid; place-content: center; min-height: 150px; margin: -30px calc(0px - clamp(20px, 3.2vw, 52px)) 13px; padding: 18px; color: #fff; background: #b90d15; text-align: center; }
.catalog-hero h2 { margin: 0 0 10px; color: #fff; font-size: clamp(2rem, 3.4vw, 3.35rem); letter-spacing: -.045em; }
.catalog-breadcrumb { color: var(--muted); font-size: .83rem; }
.catalog-hero .catalog-breadcrumb { color: #fff; }
.catalog-breadcrumb span { padding: 0 8px; opacity: .7; }
.catalog-intro-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.catalog-intro-row p { margin: 0; color: var(--muted); font-size: .76rem; }
.catalog-intro-row .button { min-height: 35px; padding-top: 6px; padding-bottom: 6px; }
.catalog-demo-note { margin: 0 0 8px; padding: 7px 11px; border-left: 3px solid #b90d15; color: #80342c; background: #fff8f4; font-size: .73rem; line-height: 1.35; }
.catalog-filter-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 9px; padding: 11px 14px; }
.catalog-filter-panel .field { min-width: 0; }
.catalog-filter-panel .select-input { width: 100%; min-width: 0; min-height: 38px; padding-top: 7px; padding-bottom: 7px; }
.catalog-toolbar { margin-bottom: 5px; }
.catalog-toolbar .search-input, .catalog-toolbar .segmented button { min-height: 38px; }
.catalog-meta { margin-top: 5px; margin-bottom: 8px; }
.catalog-group { margin: 14px 0 30px; }
.catalog-group-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 9px; padding-bottom: 6px; border-bottom: 2px solid #bd1018; }
.catalog-group-heading h3 { margin: 0; color: #a00b14; font-size: 1.25rem; }
.catalog-group-heading span { color: var(--muted); font-size: .76rem; }
.catalog-group .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.catalog-group .product-card { min-width: 0; padding: 14px; border: 0; border-radius: 16px; box-shadow: 0 12px 32px rgba(19, 36, 55, .09); }
.catalog-group .product-image { height: 225px; border: 0; border-radius: 9px; background: #eaf5f8; }
.catalog-group .product-image img { max-height: 196px; }
.catalog-card-photo { display: block; text-decoration: none; }
.catalog-card-photo .product-image img { transition: transform .2s ease; }
.catalog-card-photo:hover .product-image img, .catalog-card-photo:focus-visible .product-image img { transform: scale(1.04); }
.catalog-group .product-image figcaption { background: rgba(234, 245, 248, .92); }
.catalog-group .product-code, .catalog-table .code a { display: inline-block; color: #b90d15; font-weight: 800; text-decoration: none; }
.catalog-group .product-code:hover, .catalog-table .code a:hover { text-decoration: underline; }
.product-card-info { display: grid; gap: 6px; }
.product-card-info h3 { min-height: 0; color: #5c6974; font-size: .93rem; font-weight: 600; }
.product-card-info small { color: var(--muted); font-size: .69rem; }
.catalog-group .product-category { color: var(--muted); font-size: .7rem; }
.catalog-group .product-price { margin-top: auto; }
.catalog-visuals { display: flex; align-items: center; gap: 8px; min-width: 60px; }
.catalog-visual-header { min-width: 145px; }
.catalog-drawing-toggle { display: flex; align-items: center; gap: 6px; margin-top: 7px; color: var(--blue); font-size: .65rem; font-weight: 700; letter-spacing: 0; text-transform: none; cursor: pointer; }
.catalog-drawing-toggle input { margin: 0; }
.drawing-unavailable { display: inline-flex; align-items: center; max-width: 90px; min-height: 50px; color: var(--muted); font-size: .65rem; line-height: 1.25; }
.product-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.product-detail-grid .product-image { height: 260px; }
.product-detail-grid .product-image img { max-height: 220px; }
.product-detail-grid .drawing-unavailable { display: grid; place-items: center; max-width: none; min-height: 260px; border: 1px dashed var(--line); border-radius: 8px; background: #f8fafb; font-size: .85rem; text-align: center; }
.product-detail-buy { display: grid; gap: 15px; }
.product-detail-buy .product-price { display: grid; gap: 5px; }
.product-detail-buy .button { width: 100%; }
.toolbar .search-wrap { position: relative; flex: 1; min-width: 220px; }
.search-input { padding-left: 37px; }
.search-icon { position: absolute; left: 13px; top: 12px; color: #8292a1; pointer-events: none; }
.select-input { width: auto; min-width: 155px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.segmented button { min-height: 42px; padding: 8px 12px; border: 0; border-right: 1px solid var(--line); color: var(--muted); background: #fff; font-size: .78rem; font-weight: 700; }
.segmented button:last-child { border-right: 0; }
.segmented button.active { color: var(--blue); background: #edf4fa; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .82rem; text-align: left; }
.data-table th { padding: 14px 16px; color: #6d7d8c; background: #f8fafc; border-bottom: 1px solid var(--line); font-size: .69rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid #edf1f5; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcfd; }
.data-table .code { color: var(--blue); font-weight: 800; white-space: nowrap; }
.data-table .product-name { min-width: 180px; font-weight: 700; }
.data-table .product-name small { display: block; margin-top: 4px; color: var(--muted); font-weight: 400; }
.price-source-detail { margin-top: 5px; color: var(--muted); font-size: .69rem; font-weight: 400; }
.price-source-detail summary { width: fit-content; cursor: pointer; color: var(--blue); font-weight: 700; }
.price-source-detail span { display: block; max-width: 330px; margin-top: 5px; overflow-wrap: anywhere; }
.data-table td small { display: block; margin-top: 4px; color: var(--muted); font-size: .72rem; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right !important; }
.nowrap { white-space: nowrap; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 14px; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.product-detail-layout { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 24px; align-items: start; }
.product-detail-layout .product-image { height: 220px; }
.product-detail-layout .product-image img { max-height: 185px; }
.product-detail-layout h3 { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 20px; }
.spec-grid div { padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #fafbfd; }
.spec-grid dt { color: var(--muted); font-size: .72rem; }
.spec-grid dd { margin: 5px 0 0; color: var(--navy); font-size: .9rem; font-weight: 750; }
.product-card { display: flex; flex-direction: column; gap: 12px; min-height: 230px; padding: 20px; }
.product-image { position: relative; display: grid; place-items: center; width: 100%; height: 170px; margin: 0; overflow: hidden; border: 1px solid #e7ebef; border-radius: 8px; background: #f9fafb; }
.product-image img { display: block; max-width: 100%; max-height: 143px; object-fit: contain; }
.product-image figcaption { position: absolute; right: 0; bottom: 0; left: 0; padding: 4px 7px; color: #617384; background: rgba(249,250,251,.94); font-size: .58rem; font-weight: 650; text-align: right; }
.product-image-empty { color: #c6d0d8; font-size: 3rem; font-weight: 900; }
.product-thumb { display: block; width: 54px; height: 54px; object-fit: contain; border: 1px solid #e6ebf0; border-radius: 6px; background: #fff; }
.product-thumb-empty { display: grid; place-items: center; color: #bdc9d4; background: #f7f9fa; font-size: 1.5rem; font-weight: 900; }
.table-image-cell { display: grid; justify-items: center; gap: 2px; width: 54px; }
.table-image-cell small { margin: 0 !important; color: #788795; font-size: .58rem !important; font-weight: 700; }
.product-card h3 { margin: 0; min-height: 42px; font-size: 1.03rem; line-height: 1.35; }
.product-card .product-code { color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: .05em; }
.product-card .product-category { color: var(--muted); font-size: .75rem; }
.product-card .product-price { margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); }
.product-price del { display: block; color: #8b99a5; font-size: .73rem; }
.product-price strong { display: block; margin-top: 4px; color: var(--navy); font-size: 1.05rem; }
.product-card .button { width: 100%; }
.badge { display: inline-block; padding: 5px 8px; border-radius: 99px; color: #5a6674; background: #eef1f4; font-size: .67rem; font-weight: 800; white-space: nowrap; }
.badge-good { color: var(--good); background: #e8f5ef; }
.badge-warning { color: var(--warning); background: #fff5df; }
.badge-danger { color: #a22938; background: #ffecef; }
.badge-blue { color: var(--blue); background: #eaf3fa; }
.badge-demo { color: #982f28; background: #ffe8de; border: 1px solid #f3b8a6; font-size: .63rem; letter-spacing: .04em; }
.demo-alert { color: #8e3026; background: #fff0e9; border-color: #f0bcaa; }
.excel-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 15px; }
.excel-step { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.excel-step > div { min-width: 0; }
.excel-step strong { color: var(--navy); }
.excel-step p { margin: 9px 0 13px; color: var(--muted); font-size: .78rem; line-height: 1.5; overflow-wrap: anywhere; }
.excel-step input[type="file"] { max-width: 100%; font-size: .75rem; }
.excel-step .button { white-space: normal; }
.excel-step-number { flex: 0 0 auto; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; background: var(--blue); font-size: .77rem; font-weight: 800; }
.catalog-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 14px; color: var(--muted); font-size: .75rem; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 16px; color: var(--muted); font-size: .78rem; }
.pager > div { display: flex; align-items: center; gap: 10px; }

.cart-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(290px, .9fr); gap: 18px; align-items: start; }
.cart-layout > * { min-width: 0; }
.proposal-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(290px, .9fr); gap: 18px; align-items: start; }
.proposal-layout > * { min-width: 0; }
.proposal-summary { position: sticky; top: 20px; }
.proposal-summary .field { margin-bottom: 10px; }
.proposal-summary .button { width: 100%; }
.proposal-summary .small-copy { margin: 12px 0; }
.proposal-layout input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 3px rgba(220,48,64,.12); }
.cart-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.cart-qty button { width: 29px; height: 33px; border: 0; background: #f7f9fb; }
.cart-qty span { display: inline-grid; place-items: center; min-width: 31px; height: 33px; font-weight: 750; font-variant-numeric: tabular-nums; }
.cart-summary { position: sticky; top: 20px; padding: 22px; }
.cart-summary h3 { margin: 0 0 19px; }
.total-rows { display: grid; gap: 11px; margin: 18px 0; }
.total-row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .84rem; }
.total-row strong { color: var(--text); font-variant-numeric: tabular-nums; }
.total-row.grand { padding-top: 16px; border-top: 1px solid var(--line); color: var(--navy); font-size: .95rem; font-weight: 850; }
.total-row.grand strong { color: var(--navy); font-size: 1.15rem; }
.cart-summary .field { margin-bottom: 18px; }
.cart-summary .button { width: 100%; margin-top: 8px; }
.cart-summary .alert { margin-top: 15px; margin-bottom: 0; }
.empty-state { display: grid; justify-items: center; padding: 52px 22px; text-align: center; }
.empty-symbol { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 18px; color: var(--blue); background: #eaf3fa; font-size: 1.7rem; }
.empty-state h3 { margin: 20px 0 6px; font-size: 1.1rem; }
.empty-state p { max-width: 400px; margin: 0 0 20px; color: var(--muted); line-height: 1.55; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.account-grid .surface { padding: 22px; }
.account-grid h3 { margin-bottom: 20px; }
.account-grid .info-list { gap: 16px; }
.account-grid .info-list div { border-bottom: 1px solid #edf1f5; padding-bottom: 13px; }
.account-grid .info-list div:last-child { border-bottom: 0; padding-bottom: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid .full-span { grid-column: 1 / -1; }
.table-input { min-width: 110px; min-height: 36px; padding: 7px 9px; }
.table-input.narrow { min-width: 82px; width: 82px; }
.table-input.medium { min-width: 130px; width: 130px; }
.inline-form { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.inline-form .field { flex: 1; min-width: 140px; }
.discount-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap: 15px; }
.discount-field { display: flex; align-items: center; gap: 6px; }
.draft-status { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin: 14px 0; padding: 15px; border: 1px solid #f0d7a5; border-radius: 8px; background: #fff9ec; }
.draft-status strong, .draft-status small { display: block; }
.draft-status small { margin-top: 4px; color: var(--muted); }
.checkbox-line { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 3px; color: var(--text); font-size: .82rem; line-height: 1.5; }
.checkbox-line input { margin-top: 3px; }
.section-gap { margin-top: 20px; }
.small-copy { color: var(--muted); font-size: .75rem; line-height: 1.5; }
.order-details { margin-top: 10px; }
.order-details-cell { padding-top: 0 !important; }
.order-details summary { cursor: pointer; color: var(--blue); font-size: .74rem; font-weight: 750; }
.order-lines { padding: 10px 0 0; }
.order-line { display: flex; justify-content: space-between; gap: 15px; padding: 5px 0; font-size: .74rem; color: var(--muted); }
.order-line strong { color: var(--text); }
.status-select { min-width: 125px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; max-width: min(380px, calc(100vw - 40px)); padding: 13px 17px; border-radius: 9px; color: #fff; background: var(--navy); box-shadow: 0 15px 45px rgba(7,24,42,.3); font-size: .85rem; }
.toast-error { background: #a62c3d; }
.toast-good { background: #117353; }
#printSheet { display: none; }

@media (max-width: 1180px) {
  .catalog-group .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace { grid-template-columns: 212px minmax(0,1fr); }
  .sidebar-top { padding-left: 19px; }
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .excel-steps { grid-template-columns: 1fr; }
  .auth-screen { grid-template-columns: 40% 60%; }
  .auth-intro { padding: 30px; }
  .auth-intro-copy h1 { font-size: 2.7rem; }
  .workspace { grid-template-columns: minmax(0,1fr); }
  .sidebar { position: fixed; z-index: 40; top: 0; left: 0; width: 252px; transform: translateX(-100%); transition: transform .23s; box-shadow: none; }
  .workspace.menu-open .sidebar { transform: translateX(0); box-shadow: 10px 0 30px rgba(8,25,44,.2); }
  .mobile-menu-button { display: grid; }
  .topbar { min-height: 86px; }
  .cart-layout, .proposal-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .proposal-summary { position: static; }
}
@media (max-width: 640px) {
  .catalog-hero { min-height: 160px; margin: -22px -16px 20px; }
  .catalog-intro-row { align-items: flex-start; flex-direction: column; }
  .catalog-filter-panel, .catalog-group .product-grid, .product-detail-grid { grid-template-columns: 1fr; }
  .auth-screen { display: block; }
  .auth-intro { display: none; }
  .auth-panel { min-height: 100vh; padding: 24px; }
  .auth-mobile-brand { display: inline-flex; }
  .auth-card h2 { font-size: 1.85rem; }
  .dev-demo-actions { grid-template-columns: 1fr; }
  .topbar { padding: 18px 20px; }
  .topbar h1 { font-size: 1.45rem; }
  .role-pill { display: none; }
  .topbar-logo { width: 90px; height: 42px; }
  .view { padding: 22px 16px 40px; }
  .dashboard-grid, .account-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full-span { grid-column: auto; }
  .surface-pad, .lead-card { padding: 20px; }
  .page-actions { width: 100%; }
  .page-actions .button { flex: 1; }
  .toolbar .search-wrap, .toolbar .select-input { min-width: 100%; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .product-detail-layout { grid-template-columns: 1fr; }
  .table-actions { flex-direction: column; }
  .app-footer { flex-direction: column; gap: 6px; padding: 18px 20px; }
  .pager { align-items: flex-start; flex-direction: column; }
}
@media print {
  @page { size: A4; margin: 16mm; }
  body { background: #fff; color: #000; }
  #authScreen, #workspace, #toast { display: none !important; }
  #printSheet { display: block; font-family: Arial, sans-serif; font-size: 10pt; }
  #printSheet header { display: flex; justify-content: space-between; align-items: end; border-bottom: 2px solid #152f4c; padding-bottom: 12px; }
  #printSheet .print-logo { display: block; width: 145px; height: 68px; object-fit: contain; object-position: left center; }
  #printSheet h1 { margin: 0; font-size: 20pt; color: #152f4c; }
  #printSheet h2 { font-size: 13pt; }
  #printSheet .print-meta { display: flex; justify-content: space-between; gap: 15px; margin: 20px 0; }
  #printSheet table { width: 100%; border-collapse: collapse; margin-top: 20px; }
  #printSheet th, #printSheet td { padding: 8px; border-bottom: 1px solid #c7c7c7; text-align: left; }
  #printSheet th:last-child, #printSheet td:last-child { text-align: right; }
  #printSheet .print-total { margin-top: 20px; text-align: right; font-size: 12pt; font-weight: bold; }
  #printSheet .print-demo-label { margin: 14px 0; padding: 9px 12px; border: 2px solid #b4362b; color: #a52d23; background: #fff0e9; font-size: 10pt; font-weight: 900; letter-spacing: .04em; text-align: center; }
  #printSheet footer { margin-top: 35px; border-top: 1px solid #aaa; padding-top: 8px; font-size: 8pt; color: #555; }
  #printSheet .customer-proposal-print header strong { color: #1f2c39; font-size: 12pt; }
  #printSheet .customer-proposal-print header small { color: #5c6874; }
  #printSheet .customer-proposal-print .print-meta { line-height: 1.65; overflow-wrap: anywhere; }
  #printSheet .proposal-print-terms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0 20px; }
  #printSheet .proposal-print-terms div { display: grid; gap: 4px; border-top: 1px solid #bfc8d0; padding-top: 7px; }
  #printSheet .proposal-print-terms span { color: #647180; font-size: 8pt; text-transform: uppercase; }
  #printSheet .proposal-print-terms strong { font-size: 9pt; }
  #printSheet .proposal-print-product { display: flex; align-items: center; gap: 9px; }
  #printSheet .proposal-print-product small { display: block; margin-top: 3px; color: #647180; font-size: 8pt; }
  #printSheet .proposal-print-image { width: 68px; height: 45px; object-fit: contain; }
  #printSheet .proposal-print-note { margin-top: 22px; padding: 10px 12px; border: 1px solid #ccd5dd; font-size: 9pt; }
  #printSheet .proposal-print-note p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
  #printSheet .proposal-print-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 50px; }
  #printSheet .proposal-print-signatures div { padding-top: 7px; border-top: 1px solid #677786; text-align: center; font-size: 9pt; }
  #printSheet .customer-proposal-print tr { break-inside: avoid; }
}
