:root {
  --green: #3d9c43;
  --green-dark: #176a31;
  --green-pale: #edf8ed;
  --ink: #223029;
  --muted: #718077;
  --line: #dfe8e1;
  --canvas: #f7f9f7;
  --card: #ffffff;
  --amber: #9b6818;
  --amber-pale: #fff8e8;
  --red: #b84343;
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); }
button, input, select { font: inherit; }
button { cursor: pointer; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid #d7e2d9; border-radius: 9px; padding: 9px 10px; background: #fff; color: var(--ink); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(61,156,67,.12); }
textarea { resize: vertical; font: inherit; }
input:disabled { color: #95a198; background: #f3f6f3; cursor: not-allowed; }
label { display: grid; gap: 6px; color: #526158; font-size: 11px; font-weight: 750; }

.logo-original { display: block; object-fit: contain; }
.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .95fr) minmax(440px, 1.05fr); background: #fff; }
.login-brand-panel { display: grid; align-content: center; justify-items: center; gap: 34px; padding: 70px clamp(42px, 9vw, 140px); border-right: 1px solid #e5ece6; background: linear-gradient(150deg, #f1f9f2, #ffffff 75%); text-align: center; }
.login-logo { width: min(310px, 78%); mix-blend-mode: multiply; }
.login-brand-panel h1 { margin: 7px 0 10px; letter-spacing: -.05em; font-size: 43px; }
.login-brand-panel p:not(.eyebrow) { margin: 0; max-width: 410px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.login-card-wrap { display: grid; place-items: center; padding: 42px; }
.login-card { width: min(410px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 18px 45px rgba(36,78,43,.08); }
.compact-logo { width: 122px; height: 90px; object-position: center; margin: -12px auto 4px; mix-blend-mode: multiply; }
.login-card h2 { margin: 7px 0; font-size: 29px; letter-spacing: -.04em; }
.eyebrow { margin: 0; color: var(--green-dark); font-size: 10px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.muted { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.stack-form { display: grid; gap: 14px; margin-top: 26px; }
.button { border: 0; border-radius: 9px; padding: 10px 13px; background: var(--green-pale); color: var(--green-dark); font-size: 12px; font-weight: 800; transition: transform .15s, box-shadow .15s, background .15s; }
.button:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(23,106,49,.12); }
.button.primary { background: var(--green); color: #fff; }
.button.secondary { background: #edf2ee; color: #496457; }
.button.text { padding: 7px 10px; color: #597065; background: transparent; }
.button.full { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 5px; }
.button.small { padding: 7px 10px; font-size: 11px; }
.form-error { margin: 0; padding: 10px; border-radius: 9px; background: #fff0f0; color: var(--red); font-size: 12px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 245px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 22px 14px 16px; border-right: 1px solid var(--line); background: #fff; }
.sidebar-logo { padding: 3px 12px 22px; border-bottom: 1px solid #eaf0eb; }
.sidebar-logo-image { width: 142px; height: 91px; object-position: center; mix-blend-mode: multiply; }
.nav-caption { margin: 20px 12px 8px; color: #92a097; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nav { display: grid; gap: 4px; }
.nav button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 11px; border: 0; border-radius: 9px; background: transparent; color: #5e6f65; font-size: 12px; font-weight: 700; text-align: left; }
.nav button:hover { background: #f3f8f3; color: var(--green-dark); }
.nav button.active { background: var(--green-pale); color: var(--green-dark); }
.nav-square { width: 7px; height: 7px; border-radius: 2px; background: #c0d4c3; }
.nav button.active .nav-square { background: var(--green); }
.sidebar-foot { display: grid; gap: 4px; margin-top: auto; padding: 13px 12px 4px; border-top: 1px solid #eaf0eb; color: #75837a; font-size: 11px; }
.sidebar-foot small { color: #9aa69e; }
.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding: 13px 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(12px); }
.topbar > div:first-child { display: grid; gap: 2px; }
.topbar strong { font-size: 14px; }
.topbar small { color: var(--muted); font-size: 11px; }
.top-user { display: flex; align-items: center; gap: 9px; }
.top-user > div { display: grid; gap: 1px; }
.avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: var(--green-dark); background: var(--green-pale); font-size: 11px; font-weight: 850; }
.content { max-width: 1460px; margin: 0 auto; padding: 32px 34px 64px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 23px; }
.page-heading h2 { margin: 6px 0 5px; font-size: 29px; letter-spacing: -.05em; }
.page-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; }
.action-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.report-actions { display: inline-flex; align-items: center; gap: 7px; margin-left: 2px; padding-left: 9px; border-left: 1px solid #dfe8e1; }
.owner-print-header { display: none; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.dashboard-kpis { grid-template-columns: repeat(3, minmax(0,1fr)); }
.kpi-card { display: grid; gap: 7px; min-height: 120px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.kpi-card span { color: #728278; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.kpi-card strong { color: var(--green-dark); font-size: 25px; letter-spacing: -.05em; }
.kpi-card small { color: var(--muted); font-size: 11px; }
.info-band { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 16px 0; padding: 19px 21px; border: 1px solid #d7ead9; border-radius: var(--radius); background: var(--green-pale); }
.info-band h3, .card h3 { margin: 0 0 5px; font-size: 16px; letter-spacing: -.02em; }
.info-band p, .card p { margin: 0; color: #607168; font-size: 12px; line-height: 1.55; }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-quote { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: 0 6px 25px rgba(36,78,43,.035); }
.card.pad { padding: 19px; }
.section-title { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.section-title h3 { margin: 0 0 4px; }
.section-title p { margin: 0; }
.space { height: 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 700px; border-collapse: collapse; }
th { padding: 9px 10px; border-bottom: 1px solid var(--line); color: #87958c; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid #edf2ee; color: #34433a; font-size: 12px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td input, td select { min-width: 78px; padding: 7px 8px; font-size: 11px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.code { display: block; margin-top: 3px; color: #92a097; font-size: 9px; letter-spacing: .06em; }
.hint { margin-top: 12px !important; color: #7c8a81 !important; font-size: 11px !important; }
.catalog-list { display: grid; }
.catalog-list > div, .metric-list > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid #edf2ee; font-size: 12px; }
.catalog-list > div:last-child, .metric-list > div:last-child { border-bottom: 0; }
.catalog-list strong, .metric-list strong { font-variant-numeric: tabular-nums; }
.formula-summary { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; margin-top: 14px; }
.formula-summary > div, .formula-summary > label { display: grid; gap: 5px; padding: 10px; border-radius: 10px; background: #f7faf7; color: #708078; font-size: 10px; }
.formula-summary strong { color: var(--green-dark); font-size: 14px; }
.formula-summary .emphasis { background: var(--green-pale); }
.kit-manager { border-color: #cfe3d1; background: linear-gradient(145deg, #fff, #f8fcf8); }
.kit-cards { display: grid; gap: 14px; }
.kit-card { padding: 16px; border: 1px solid #dfe9e1; border-radius: 13px; background: #fff; }
.kit-card .section-title h3 { margin-top: 7px; font-size: 17px; }
.kit-fields { display: grid; grid-template-columns: minmax(220px,1.4fr) minmax(150px,.7fr) auto; gap: 10px; align-items: end; margin-bottom: 13px; }
.check-field { display: flex; align-items: center; gap: 8px; min-height: 39px; padding: 9px 10px; border: 1px solid #d7e2d9; border-radius: 9px; background: #fbfdfb; }
.check-field input { width: 16px; height: 16px; }
.check-field span { white-space: nowrap; }
.kit-adder { grid-template-columns: minmax(220px,.75fr) auto; justify-content: start; }
.kit-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
.line-adder { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; margin-bottom: 13px; }
.icon-button { width: 25px; height: 25px; border: 0; border-radius: 7px; color: #8f504c; background: #fff1f0; font-size: 17px; line-height: 1; }
.quote-summary { align-self: start; }
.unit-price-summary { display: grid; gap: 0; margin-top: 16px; padding-top: 13px; border-top: 1px solid #edf2ee; }
.unit-price-summary h4 { margin: 0 0 4px; color: #45634d; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.unit-price-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 9px 0; border-bottom: 1px solid #edf2ee; color: #697b70; font-size: 11px; }
.unit-price-summary > div:last-child { border-bottom: 0; }
.unit-price-summary strong { color: #1d3925; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.unit-price-summary > div.kit-total { margin-top: 5px; padding: 12px 10px; border: 0; border-radius: 9px; color: var(--green-dark); background: var(--green-pale); font-size: 12px; font-weight: 850; }
.unit-price-summary > div.kit-total strong { color: var(--green-dark); font-size: 14px; }
.badge { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; background: var(--green-pale); color: var(--green-dark); font-size: 10px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.badge.amber { color: var(--amber); background: var(--amber-pale); }
.metric-list > div.result { margin-top: 2px; padding: 12px 10px; border: 0; border-radius: 9px; color: var(--green-dark); background: var(--green-pale); font-size: 13px; font-weight: 850; }
.notice { display: grid; gap: 4px; margin-top: 15px; padding: 11px 12px; border-left: 3px solid var(--green); color: #5b6e62; background: #f7faf7; font-size: 11px; line-height: 1.45; }
.form-area { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.form-section { margin-top: 14px; padding: 14px; border: 1px solid #e8efea; border-radius: 12px; background: #fbfdfb; }
.form-section h4 { margin: 0 0 12px; color: #65766c; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.rental-page input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.rental-page input[type="number"]::-webkit-inner-spin-button,
.rental-page input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.rental-inputs { align-self: start; }
.rental-inputs > .form-section { margin-top: 16px; }
.rental-rules { border-color: #cfe3d1; background: linear-gradient(145deg, #fbfefb, #f3faf4); }
.rental-rules .check-field { align-self: end; }
.rental-trigger { margin-top: 13px; }
.recurring-costs { border-color: #d9e8db; }
.rental-summary .metric-list > div { padding-block: 9px; }
.rental-summary .metric-list > div.featured { background: #dff3e1; box-shadow: inset 0 0 0 1px #c5e5c8; }
.rental-summary .metric-list > div.featured strong { font-size: 18px; }
.rental-summary .metric-list > div.rental-point-average { background: var(--green-dark); color: #fff; box-shadow: none; }
.rental-point-average span { display: grid; gap: 3px; }
.rental-point-average small { color: #d7ead9; font-size: 10px; font-weight: 650; }
.formula-note { display: grid; gap: 5px; margin-top: 15px; padding: 12px; border-radius: 10px; color: #5f7165; background: #f3f7f4; font-size: 10px; line-height: 1.5; }
.formula-note strong { color: #31563a; font-size: 11px; }
.client-save-panel { margin-bottom: 16px; border-color: #cfe3d1; background: linear-gradient(145deg, #fff, #f7fbf7); }
.client-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.client-notes { grid-column: 1 / -1; }
.panel-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 15px; }
.panel-actions.split { justify-content: space-between; }
.button.danger { color: var(--red); }
.commercial-kpis { margin-bottom: 16px; }
.commercial-layout { display: grid; grid-template-columns: minmax(285px,.72fr) minmax(0,1.55fr); gap: 16px; align-items: start; }
.commercial-list { position: sticky; top: 84px; }
.commercial-filters { display: grid; grid-template-columns: minmax(0,1fr) 145px 145px; gap: 8px; margin-bottom: 12px; }
.commercial-records { display: grid; gap: 8px; max-height: 68vh; overflow: auto; padding-right: 3px; }
.commercial-record { display: grid; gap: 6px; width: 100%; padding: 13px; border: 1px solid #e0e9e2; border-radius: 11px; color: #5e6f65; background: #fff; text-align: left; }
.commercial-record:hover { border-color: #b9d6bd; background: #fbfefb; }
.commercial-record.active { border-color: var(--green); background: var(--green-pale); box-shadow: 0 0 0 2px rgba(61,156,67,.08); }
.commercial-record > span:not(.record-top) { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.commercial-record > b { color: var(--green-dark); font-size: 16px; letter-spacing: -.03em; }
.record-top { display: flex; align-items: start; justify-content: space-between; gap: 8px; color: var(--ink); font-size: 12px; }
.commercial-detail .section-title h3 { margin-top: 5px; font-size: 22px; }
.status-select { width: auto; min-width: 165px; color: var(--green-dark); background: var(--green-pale); font-size: 11px; font-weight: 800; }
.quote-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; }
.quote-meta span { padding: 5px 8px; border-radius: 7px; color: #6b7c71; background: #f3f7f4; font-size: 10px; }
.detail-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid #e7eee8; }
.detail-section h4 { margin: 0 0 11px; color: #45634d; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.applied-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.applied-grid > div { display: grid; gap: 5px; padding: 10px; border-radius: 9px; background: #f7faf7; }
.applied-grid span { color: #738279; font-size: 9px; text-transform: uppercase; }
.applied-grid strong { color: #23442b; font-size: 12px; }
.commercial-notes { margin-top: 17px; padding: 13px; border-left: 3px solid #aacfae; border-radius: 0 9px 9px 0; background: #f7faf7; }
.commercial-notes strong { font-size: 11px; }
.commercial-notes p { margin-top: 5px; white-space: pre-wrap; }
.empty-state { padding: 24px; border: 1px dashed #cfddcf; border-radius: 12px; color: #7c8a81; text-align: center; font-size: 12px; }
.check-list { display: grid; gap: 9px; }
.check { display: flex; align-items: start; gap: 9px; padding: 10px; border: 1px solid #e6eee7; border-radius: 10px; background: #fafdfb; }
.check b { display: grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; background: #dcf3df; color: var(--green-dark); font-size: 12px; }
.check.warn b { background: #fff0ca; color: var(--amber); }
.check strong, .check span { display: block; }
.check strong { margin-bottom: 3px; font-size: 12px; }
.check span { color: var(--muted); font-size: 11px; line-height: 1.45; }

.representative-shell { min-height: 100vh; background: #fbfdfb; }
.rep-page { min-height: 100vh; display: flex; flex-direction: column; }
.rep-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px clamp(22px, 5vw, 80px); border-bottom: 1px solid #e1ebe3; background: #fff; }
.rep-logo { width: 132px; height: 83px; object-position: center; mix-blend-mode: multiply; }
.rep-header > div { display: flex; align-items: center; gap: 8px; }
.rep-main { width: min(900px, calc(100% - 40px)); margin: 0 auto; padding: 66px 0 46px; }
.rep-main h1 { margin: 7px 0 10px; font-size: clamp(31px, 5vw, 48px); letter-spacing: -.06em; }
.rep-intro { max-width: 570px; margin: 0 0 25px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.rep-card { padding: 22px; border: 1px solid #dbe7dc; border-radius: 16px; background: #fff; }
.rep-card table { min-width: 520px; }
.rep-actions { margin-top: 15px; text-align: right; }
.rep-result { display: grid; gap: 5px; margin-top: 16px; padding: 22px; border-radius: 16px; background: #174f2b; color: #fff; }
.rep-result span { color: #a8d5ad; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.rep-result strong { font-size: 32px; letter-spacing: -.06em; }
.rep-result small { color: #c9e5ce; font-size: 11px; line-height: 1.5; }
.rep-offer { margin-top: 28px; }
.rep-offer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.rep-offer-toolbar h2 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.03em; }
.rep-offer-toolbar p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.rep-offer-sheet { padding: 34px; border: 1px solid #d9e5db; border-radius: 16px; background: #fff; box-shadow: 0 12px 34px rgba(31,78,40,.06); }
.rep-offer-letterhead { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-bottom: 19px; }
.rep-offer-letterhead > div { text-align: right; }
.rep-offer-letterhead h2 { margin: 5px 0 3px; color: #1d4f2a; font-size: 28px; letter-spacing: -.045em; }
.rep-offer-letterhead p:not(.eyebrow) { margin: 0; color: #63736a; font-size: 11px; }
.rep-offer-logo { width: 146px; height: 94px; object-position: center; mix-blend-mode: multiply; }
.rep-offer-company { display: grid; gap: 4px; padding: 11px 0; border-top: 2px solid #4e9f50; border-bottom: 1px solid #dfe8e1; color: #66766d; font-size: 10px; line-height: 1.45; }
.rep-offer-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 22px; }
.rep-offer-wide { grid-column: 1 / -1; }
.rep-offer-prices { margin-top: 25px; }
.rep-offer-prices h3 { margin: 0 0 9px; color: #315c3b; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.rep-offer-prices table { min-width: 600px; }
.rep-offer-prices tfoot td { padding-top: 13px; border-top: 2px solid #b9d5bd; border-bottom: 0; color: #174f2b; background: #f1f8f2; font-size: 13px; font-weight: 850; }
.rep-offer-composition { display: block; margin-top: 5px; color: #78877e; font-size: 9px; font-weight: 500; line-height: 1.45; }
.rep-offer-terms { margin-top: 20px; padding: 15px 17px; border-left: 4px solid #4e9f50; border-radius: 0 10px 10px 0; color: #395841; background: #f1f8f2; }
.rep-offer-terms h3 { margin: 0 0 6px; color: #246134; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.rep-offer-terms p { margin: 0; font-size: 11px; font-weight: 650; line-height: 1.55; }
.rep-offer-notes { margin-top: 20px; }
.rep-offer-signature { display: flex; align-items: end; justify-content: space-between; gap: 36px; margin-top: 38px; padding-top: 16px; border-top: 1px solid #dfe8e1; }
.rep-offer-signature > div:first-child { display: grid; gap: 4px; color: #31563a; font-size: 11px; font-weight: 800; }
.rep-offer-signature small { color: #78877e; font-size: 9px; font-weight: 500; }
.rep-offer-sign-line { width: min(260px, 42%); padding-top: 8px; border-top: 1px solid #819087; color: #738279; font-size: 9px; text-align: center; }
.rep-footer { display: flex; justify-content: space-between; gap: 15px; flex-wrap: wrap; margin-top: auto; padding: 18px clamp(22px, 5vw, 80px); border-top: 1px solid #e1ebe3; color: #7d8b82; font-size: 11px; }

.toast { position: fixed; top: 20px; right: 20px; z-index: 20; padding: 11px 13px; border: 1px solid #d4e6d6; border-radius: 9px; color: var(--green-dark); background: #f1fbf2; box-shadow: 0 12px 28px rgba(25,75,39,.12); font-size: 12px; opacity: 0; transform: translateY(-12px); pointer-events: none; transition: .18s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: #f0d0d0; color: var(--red); background: #fff2f2; }

@media (max-width: 1080px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-brand-panel { min-height: 340px; padding: 44px 28px; border-right: 0; border-bottom: 1px solid #e5ece6; }
  .login-logo { width: 190px; }
  .app-shell { grid-template-columns: 205px minmax(0, 1fr); }
  .sidebar-logo-image { width: 120px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-kpis { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .grid-quote { grid-template-columns: 1fr; }
  .commercial-layout { grid-template-columns: 1fr; }
  .commercial-list { position: static; }
  .client-form-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .kit-fields { grid-template-columns: 1fr 1fr; }
  .kit-fields .check-field { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .login-brand-panel { min-height: 280px; gap: 16px; }
  .login-brand-panel h1 { font-size: 33px; }
  .login-card-wrap { padding: 28px 18px; }
  .login-card { padding: 26px 21px; }
  .app-shell { grid-template-columns: 61px minmax(0,1fr); }
  .sidebar { align-items: center; padding: 14px 7px; }
  .sidebar-logo { padding: 0 0 16px; }
  .sidebar-logo-image { width: 42px; height: 52px; }
  .nav-caption, .nav button:not(.active)::after, .nav button { font-size: 0; }
  .nav { width: 100%; }
  .nav button { justify-content: center; padding: 11px; }
  .nav-square { width: 10px; height: 10px; }
  .sidebar-foot { display: none; }
  .topbar { padding: 12px 16px; }
  .top-user > div { display: none; }
  .content { padding: 24px 16px 45px; }
  .page-heading { align-items: start; display: grid; }
  .page-heading h2 { font-size: 25px; }
  .action-row { justify-content: flex-start; }
  .report-actions { width: 100%; margin: 2px 0 0; padding: 8px 0 0; border-top: 1px solid #dfe8e1; border-left: 0; }
  .kpi-grid, .dashboard-kpis, .grid-two, .form-area, .formula-summary { grid-template-columns: 1fr; }
  .client-form-grid, .applied-grid, .commercial-filters, .kit-fields, .kit-summary { grid-template-columns: 1fr; }
  .kit-fields .check-field { grid-column: auto; }
  .info-band { align-items: start; display: grid; }
  .rep-main { width: min(100% - 30px, 900px); padding-top: 45px; }
  .rep-header { padding: 10px 15px; }
  .rep-logo { width: 108px; height: 70px; }
  .line-adder { grid-template-columns: 1fr; }
  .rep-offer-toolbar, .rep-offer-letterhead { align-items: start; display: grid; }
  .rep-offer-letterhead > div { text-align: left; }
  .rep-offer-sheet { padding: 22px 17px; }
  .rep-offer-fields { grid-template-columns: 1fr; }
  .rep-offer-wide { grid-column: auto; }
  .rep-offer-signature { align-items: start; display: grid; }
  .rep-offer-sign-line { width: 100%; }
}

@media print {
  @page representative-offer { size: A4 portrait; margin: 11mm; }
  @page owner-report { size: A4 landscape; margin: 10mm; }
  body { background: #fff; }
  body:not(.owner-printing) * { visibility: hidden !important; }
  body:not(.owner-printing) .rep-offer-sheet, body:not(.owner-printing) .rep-offer-sheet * { visibility: visible !important; }
  .rep-offer-sheet { page: representative-offer; position: absolute; top: 0; left: 0; width: 100%; padding: 0; border: 0; border-radius: 0; box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .rep-offer-sheet input, .rep-offer-sheet textarea { padding: 6px 2px; border: 0; border-bottom: 1px solid #a9b5ac; border-radius: 0; box-shadow: none; }
  .rep-offer-sheet textarea { min-height: 58px; }
  .rep-offer-terms { break-inside: avoid; }
  .rep-offer-prices .table-wrap { overflow: visible; }
  .rep-offer-prices table { min-width: 0; }
  .rep-offer-signature { break-inside: avoid; }

  body.owner-printing .sidebar, body.owner-printing .topbar, body.owner-printing .toast { display: none !important; }
  body.owner-printing .app-shell, body.owner-printing .workspace { display: block !important; min-height: 0; }
  body.owner-printing #content { page: owner-report; max-width: none; margin: 0; padding: 0; color: #17251c; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  body.owner-printing .owner-print-header { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid #4e9f50; }
  body.owner-printing .owner-print-header > div { text-align: right; }
  body.owner-printing .owner-print-header p { margin: 0; color: #397641; font-size: 8px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
  body.owner-printing .owner-print-header h1 { margin: 3px 0; color: #1d4f2a; font-size: 21px; letter-spacing: -.035em; }
  body.owner-printing .owner-print-header span { color: #748178; font-size: 8px; }
  body.owner-printing .owner-print-logo { width: 95px; height: 60px; object-position: center; mix-blend-mode: multiply; }
  body.owner-printing .page-heading { margin-bottom: 12px; }
  body.owner-printing .page-heading .eyebrow, body.owner-printing .page-heading .action-row { display: none !important; }
  body.owner-printing .page-heading h2 { margin-top: 0; font-size: 20px; }
  body.owner-printing .button, body.owner-printing .icon-button, body.owner-printing .line-adder, body.owner-printing .kit-adder, body.owner-printing .commercial-filters, body.owner-printing .panel-actions, body.owner-printing .client-save-panel { display: none !important; }
  body.owner-printing .grid-two, body.owner-printing .grid-quote, body.owner-printing .commercial-layout { display: block; }
  body.owner-printing .card, body.owner-printing .info-band { margin-bottom: 10px; border-color: #cfd8d1; box-shadow: none; }
  body.owner-printing .card.pad { padding: 11px; }
  body.owner-printing .commercial-list { position: static; }
  body.owner-printing .commercial-records { max-height: none; overflow: visible; }
  body.owner-printing .table-wrap { overflow: visible; }
  body.owner-printing table { min-width: 0; table-layout: auto; }
  body.owner-printing th { padding: 5px 6px; font-size: 7px; white-space: normal; }
  body.owner-printing td { padding: 5px 6px; font-size: 8px; }
  body.owner-printing input, body.owner-printing select, body.owner-printing textarea { padding: 3px 0; border: 0; border-bottom: 1px solid #b9c4bc; border-radius: 0; color: #17251c; background: transparent; box-shadow: none; }
  body.owner-printing .kpi-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
  body.owner-printing .kpi-card { min-height: 76px; padding: 10px; border-color: #cfd8d1; box-shadow: none; }
  body.owner-printing .kpi-card strong { font-size: 18px; }
  body.owner-printing .formula-summary, body.owner-printing .applied-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  body.owner-printing section, body.owner-printing article, body.owner-printing table { break-inside: auto; }
  body.owner-printing tr, body.owner-printing .kpi-card, body.owner-printing .metric-list > div { break-inside: avoid; }
}
