:root {
  color-scheme: light;
  --ink: #192330;
  --muted: #788493;
  --line: #e8ebef;
  --paper: #fff;
  --canvas: #f5f6f8;
  --navy: #111a26;
  --navy-soft: #1b2735;
  --brand-red: #ed1c24;
  --brand-red-dark: #c8101e;
  --brand-red-soft: #fff0f0;
  --brand-yellow: #ffd51a;
  --green: #2f9b72;
  --red: #ed1c24;
  --shadow: 0 12px 35px rgba(27, 39, 53, .07);
  font-family: "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.login-screen { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.login-card { display: grid; width: min(100%, 420px); gap: 12px; padding: 30px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.login-card img { width: min(100%, 250px); height: auto; margin: 0 auto 10px; }
.login-card h1 { margin: 0; text-align: center; }
.login-card > p:not(.login-error) { margin: 0 0 8px; color: var(--muted); text-align: center; font-size: 13px; }
.login-card label { margin-top: 4px; font-size: 12px; font-weight: 600; }
.login-card input { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; }
.login-card .button { min-height: 42px; margin-top: 4px; }
.login-error { min-height: 18px; margin: 0; color: #b42318; font-size: 12px; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; width: 252px; padding: 27px 16px 20px; color: #e9edf1; background: var(--navy); }
.brand { display: block; padding: 0 0 24px; color: inherit; text-decoration: none; }
.brand-logo { display: block; width: 100%; height: auto; }
.workspace-label { padding: 0 12px 10px; color: #758190; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.navigation { display: grid; gap: 5px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: #aab4bf; text-align: left; font-size: 13px; transition: background .15s, color .15s; }
.nav-item:hover { background: #1b2735; color: #fff; }
.nav-item.active { background: #283542; color: #fff; font-weight: 600; }
.nav-item.active::before { position: absolute; left: 0; width: 3px; height: 27px; border-radius: 0 3px 3px 0; background: var(--brand-red); content: ""; }
.nav-icon { display: inline-grid; width: 18px; place-items: center; color: #8d99a7; font-size: 16px; }
.nav-item.active .nav-icon { color: var(--brand-yellow); }
.nav-count { margin-left: auto; color: #a2adba; font-size: 11px; }
.sidebar-bottom { margin-top: auto; }
.local-card { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid #293544; border-radius: 9px; background: #182330; }
.local-indicator { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #55c391; box-shadow: 0 0 0 4px rgba(85, 195, 145, .12); }
.local-card div { display: grid; gap: 3px; }
.local-card strong { font-size: 11px; font-weight: 600; }
.local-card small { color: #8995a2; font-size: 10px; }
.sidebar-foot { padding: 19px 4px 0; color: #65717f; font-size: 8px; letter-spacing: .1em; }
.sidebar-foot span { color: var(--brand-red); }
.main-panel { min-height: 100vh; margin-left: 252px; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; height: 68px; align-items: center; justify-content: space-between; padding: 0 38px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.breadcrumb { display: flex; align-items: center; gap: 11px; color: #97a0aa; font-size: 12px; }
.breadcrumb i { color: #c4cbd2; font-style: normal; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.today-label { color: #7a8591; font-size: 11px; }
.avatar-button { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 50%; background: var(--brand-red); color: #fff; font-size: 13px; font-weight: 700; }
.profile-switcher { display: flex; align-items: center; gap: 7px; color: #7a8591; font-size: 10px; }
.profile-switcher select { max-width: 190px; height: 34px; padding: 0 26px 0 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font-size: 10px; }
.menu-button { display: none; border: 0; background: transparent; color: var(--ink); font-size: 20px; }
.page-content { max-width: 1440px; min-height: calc(100vh - 117px); margin: 0 auto; padding: 32px 38px 38px; }
.footer { display: flex; justify-content: space-between; padding: 16px 38px; border-top: 1px solid var(--line); color: #929ba5; font-size: 10px; }
.footer b { color: var(--brand-red); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.eyebrow { margin: 0 0 7px; color: #929ca7; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-family: Manrope, sans-serif; font-size: 25px; letter-spacing: -.04em; }
.subtitle { margin: 0; color: var(--muted); font-size: 12px; }
.button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid transparent; border-radius: 7px; background: var(--brand-red); color: #fff; font-size: 11px; font-weight: 700; transition: filter .15s, transform .15s; }
.button:hover { filter: brightness(.96); transform: translateY(-1px); }
.button.secondary { border-color: var(--line); background: #fff; color: #45515e; }
.button.small { min-height: 30px; padding: 0 10px; font-size: 10px; }
.button.danger { background: #fff1ef; color: #bb514d; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 20px; }
.stat-card { display: flex; min-height: 114px; align-items: flex-start; justify-content: space-between; padding: 17px 18px; border: 1px solid #edf0f2; border-radius: 10px; background: var(--paper); box-shadow: 0 3px 12px rgba(24, 35, 48, .025); }
.stat-label { margin-bottom: 12px; color: #88939f; font-size: 10px; font-weight: 600; letter-spacing: .02em; }
.stat-value { font-family: "Segoe UI", Arial, sans-serif; font-size: 24px; font-weight: 700; letter-spacing: -.04em; }
.stat-note { margin-top: 5px; color: #98a1aa; font-size: 9px; }
.stat-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--brand-red-soft); color: var(--brand-red-dark); font-size: 15px; }
.stat-icon.green { background: #e8f6f0; color: var(--green); }
.stat-icon.blue { background: #eaf1fa; color: #6288bd; }
.stat-icon.purple { background: #f2edfc; color: #9272c7; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .9fr); gap: 17px; }
.panel { overflow: hidden; border: 1px solid #edf0f2; border-radius: 10px; background: #fff; box-shadow: 0 3px 12px rgba(24, 35, 48, .025); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px; border-bottom: 1px solid #eff1f3; }
.panel-head h2 { margin: 0; font-family: "Segoe UI", Arial, sans-serif; font-size: 13px; font-weight: 700; }
.text-link { padding: 4px 0; border: 0; background: transparent; color: var(--brand-red-dark); font-size: 10px; font-weight: 700; }
.job-list { display: grid; }
.job-row { display: grid; grid-template-columns: 39px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 13px 18px; border-bottom: 1px solid #f1f2f4; }
.job-row:last-child { border-bottom: 0; }
.job-mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 9px; background: #f4f6f8; color: #687889; font-size: 15px; }
.job-main { min-width: 0; }
.job-main strong, .job-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-main strong { margin-bottom: 4px; font-size: 11px; font-weight: 600; }
.job-main small { color: #8b96a1; font-size: 9px; }
.job-meta { display: grid; justify-items: end; gap: 6px; }
.job-meta small { color: #9aa3ac; font-size: 9px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 20px; background: #f1f3f5; color: #6f7a86; font-size: 9px; font-weight: 600; white-space: nowrap; }
.badge::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.badge.progress { background: var(--brand-red-soft); color: var(--brand-red-dark); }
.badge.ready, .badge.paid, .badge.confirmed { background: #eaf6ef; color: #348b61; }
.badge.open, .badge.scheduled { background: #edf2fb; color: #6381b2; }
.badge.cancelled, .badge.overdue { background: #fff0ef; color: #c6605c; }
.side-stack { display: grid; align-content: start; gap: 17px; }
.schedule-list { display: grid; padding: 2px 17px 8px; }
.schedule-item { display: grid; grid-template-columns: 42px 1fr; gap: 10px; padding: 13px 0; border-bottom: 1px solid #f1f2f4; }
.schedule-item:last-child { border: 0; }
.schedule-time { padding-top: 2px; color: var(--brand-red-dark); font-size: 10px; font-weight: 700; }
.schedule-item strong, .schedule-item small { display: block; }
.schedule-item strong { margin-bottom: 4px; font-size: 10px; font-weight: 600; }
.schedule-item small { color: #919ba5; font-size: 9px; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px 17px 17px; }
.quick-action { display: flex; min-height: 66px; flex-direction: column; justify-content: center; gap: 5px; padding: 10px; border: 1px solid #edf0f2; border-radius: 8px; background: #fff; color: #495562; text-align: left; font-size: 10px; font-weight: 600; }
.quick-action span { color: var(--brand-red); font-size: 15px; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.search-box { position: relative; flex: 1; max-width: 360px; }
.search-box input { width: 100%; height: 38px; padding: 0 12px 0 34px; border: 1px solid #e6eaee; border-radius: 7px; outline: none; background: #fff; color: var(--ink); font-size: 11px; }
.search-box input:focus, .form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--brand-red); box-shadow: 0 0 0 3px rgba(237, 28, 36, .1); }
.search-icon { position: absolute; top: 10px; left: 12px; color: #8c97a2; font-size: 14px; }
.filter-select { height: 38px; padding: 0 30px 0 11px; border: 1px solid #e6eaee; border-radius: 7px; background: #fff; color: #65717e; font-size: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { padding: 12px 16px; border-bottom: 1px solid #edf0f2; background: #fafbfc; color: #8c97a2; font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
td { padding: 14px 16px; border-bottom: 1px solid #f0f2f4; color: #56616d; font-size: 10px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfcfd; }
.primary-cell { color: #293542; font-weight: 600; }
.muted-cell { color: #909aa4; }
.customer-inspection-date { display: flex; flex-wrap: wrap; gap: 3px 8px; padding: 2px 0; white-space: normal; }
.customer-inspection-date + .customer-inspection-date { border-top: 1px solid #f0f2f4; }
.customer-inspection-date span { color: #788493; }
.customer-inspection-date strong { color: #293542; font-weight: 600; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.icon-button { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid #e9edf0; border-radius: 6px; background: #fff; color: #687684; font-size: 12px; }
.icon-button:hover { border-color: #ef9a9e; color: var(--brand-red-dark); }
.icon-button.danger:hover { border-color: #e7aaa5; color: var(--red); }
.empty-state { padding: 48px 20px; color: #8b96a2; text-align: center; font-size: 11px; }
.empty-state strong { display: block; margin-bottom: 5px; color: #485460; font-size: 13px; }
.inventory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 16px; }
.inventory-card { padding: 16px; border: 1px solid #edf0f2; border-radius: 9px; background: #fff; }
.inventory-card span { color: #8c97a2; font-size: 10px; }
.inventory-card strong { display: block; margin-top: 8px; font-family: Manrope, sans-serif; font-size: 20px; }
.inventory-card.low strong { color: var(--red); }
.accounting-period { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 15px; padding: 14px; border: 1px solid #edf0f2; border-radius: 9px; background: #fff; }
.accounting-period label { display: grid; gap: 6px; color: #63707d; font-size: 10px; font-weight: 600; }
.accounting-period .filter-select { min-width: 150px; }
.accounting-period strong { flex: 1; align-self: center; color: var(--ink); font-size: 12px; }
.accounting-period .button { flex: 0 0 auto; }
.accounting-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 16px; }
.accounting-amount { font-weight: 700; }
.accounting-amount.income { color: #258257; }
.accounting-amount.expense { color: #c53b3b; }
.attachment-link { display: block; max-width: 150px; overflow: hidden; color: var(--brand-red-dark); text-overflow: ellipsis; }
.modal-backdrop { position: fixed; inset: 0; z-index: 40; display: grid; overflow-y: auto; place-items: center; padding: 20px; background: rgba(15, 23, 33, .54); }
.modal { width: min(100%, 520px); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 12px; background: #fff; box-shadow: 0 20px 70px rgba(7, 13, 20, .25); }
.modal-wide { width: min(100%, 760px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 21px; border-bottom: 1px solid #edf0f2; }
.modal-head h2 { margin: 0; font-family: "Segoe UI", Arial, sans-serif; font-size: 15px; }
.modal-close { width: 30px; height: 30px; border: 0; border-radius: 6px; background: #f4f5f6; color: #707c88; font-size: 18px; }
.modal-form { padding: 18px 21px 21px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-field { display: grid; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: #63707d; font-size: 10px; font-weight: 600; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 37px; padding: 8px 10px; border: 1px solid #e3e8ec; border-radius: 6px; outline: 0; background: #fff; color: #35414d; font-size: 11px; }
.form-field textarea { min-height: 68px; resize: vertical; }
.form-help { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 10px; }
.vehicle-identity { display: flex; align-items: center; gap: 9px; min-width: 150px; }
.vehicle-photo-thumb, .vehicle-photo-placeholder { display: grid; width: 48px; height: 38px; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 6px; background: #f0f2f4; color: #788493; object-fit: cover; }
.photo-upload-field { gap: 9px; }
.photo-file-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.photo-file-button { width: fit-content; }
.photo-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.upload-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 130px)); gap: 8px; }
.upload-photo-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #f5f6f8; }
.upload-photo-card img { display: block; width: 100%; height: 88px; object-fit: cover; }
.upload-photo-card small { display: block; overflow: hidden; padding: 5px; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.upload-photo-card button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(17, 26, 38, .82); color: #fff; font-size: 14px; }
.line-items-editor { gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; }
.line-items-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.line-items-heading div { display: grid; gap: 4px; }
.line-items-heading strong { font-size: 11px; }
.line-items-heading small { color: var(--muted); font-size: 9px; }
.line-item-list { display: grid; gap: 8px; }
.line-item-row { display: grid; grid-template-columns: minmax(120px, 2fr) minmax(85px, 1fr) minmax(55px, .7fr) minmax(70px, 1fr) minmax(90px, 1.2fr) 28px; align-items: end; gap: 7px; }
.line-item-article { grid-column: 1 / -1; }
.line-item-description { grid-column: 1 / 2; }
.line-item-row label { display: grid; min-width: 0; gap: 5px; }
.line-item-row label span { color: #63707d; font-size: 9px; font-weight: 600; }
.line-item-row input { width: 100%; min-width: 0; height: 35px; padding: 7px; border: 1px solid #e3e8ec; border-radius: 6px; background: #fff; color: #35414d; font-size: 10px; }
.line-item-remove { margin-bottom: 2px; }
.line-items-total { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 9px; border-top: 1px solid var(--line); color: #63707d; font-size: 10px; }
.line-items-total strong { color: var(--ink); font-size: 13px; }
.settings-form { display: grid; gap: 14px; }
.settings-section { padding-bottom: 18px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; padding: 18px; }
.settings-grid .form-field.full { grid-column: 1 / -1; }
.settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings-actions .form-help { max-width: 600px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 19px; }
.document-tabs { display: flex; gap: 7px; margin: -7px 0 16px; border-bottom: 1px solid var(--line); }
.document-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #65717e; font-size: 11px; font-weight: 600; }
.document-tab span { display: inline-grid; min-width: 19px; height: 19px; place-items: center; border-radius: 10px; background: #f1f3f5; color: #687684; font-size: 9px; }
.document-tab.active { border-bottom-color: var(--brand-red); color: var(--brand-red-dark); }
.document-tab.active span { background: var(--brand-red-soft); color: var(--brand-red-dark); }
.damage-panel { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; }
.damage-panel h3 { margin: 0 0 5px; font-size: 12px; }
.damage-panel p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.damage-map { display: block; width: 100%; max-height: 300px; margin: 8px auto 0; overflow: visible; touch-action: manipulation; }
.damage-car-shell { fill: #fff; stroke: #aeb5ba; stroke-width: 2; }
.damage-car-glass { fill: #aaa; stroke: #858b90; stroke-width: 2; }
.damage-car-detail { fill: none; stroke: #8e9ba8; stroke-width: 1.5; }
.damage-car-roof { fill: #aeb4b8; stroke: #858b90; stroke-width: 1.5; }
.damage-car-light { fill: #f5f5f2; stroke: #c6c9ca; stroke-width: 1; }
.damage-car-mirror { fill: #60666a; stroke: #555b60; stroke-width: 1; }
.damage-tire rect { fill: #74797c; stroke: #5b6063; stroke-width: 1; }
.damage-tire .damage-tread { fill: url(#tread); stroke: none; }
.damage-map-label { fill: #758190; font: 9px "Segoe UI", Arial, sans-serif; text-anchor: middle; }
.damage-map .map-click-layer { fill: transparent; cursor: crosshair; }
.damage-marker { cursor: pointer; }
.damage-marker circle { fill: var(--brand-red); stroke: #fff; stroke-width: 3; }
.damage-marker text { fill: #fff; font: bold 11px "Segoe UI", Arial, sans-serif; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.damage-list { display: grid; align-content: start; gap: 7px; }
.damage-list-empty { padding: 10px; border: 1px dashed #d9dfe4; border-radius: 7px; color: #788493; font-size: 10px; line-height: 1.5; }
.damage-list-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.damage-list-item button { flex: 0 0 auto; border: 0; background: transparent; color: var(--brand-red-dark); font-size: 10px; font-weight: 600; }
.damage-list-item strong, .damage-list-item small { display: block; }
.damage-list-item strong { margin-bottom: 3px; color: var(--ink); font-size: 10px; }
.damage-list-item small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.damage-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.damage-photo-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #f5f6f8; }
.damage-photo-card img { display: block; width: 100%; height: 74px; object-fit: cover; }
.damage-photo-card small { display: block; overflow: hidden; padding: 5px; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.damage-photo-card button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(17, 26, 38, .82); color: #fff; font-size: 14px; }
.damage-modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; overflow-y: auto; place-items: center; padding: 20px; background: rgba(15, 23, 33, .62); }
.damage-modal { width: min(100%, 520px); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 12px; background: #fff; box-shadow: 0 20px 70px rgba(7, 13, 20, .3); }
.damage-modal .modal-actions { justify-content: space-between; }
.damage-map-print { max-width: 460px; margin: 14px auto; border: 1px solid #dfe3e7; border-radius: 8px; }
.damage-report-list { display: grid; gap: 15px; }
.damage-report-item { break-inside: avoid; padding: 12px; border: 1px solid #dfe3e7; border-radius: 7px; }
.damage-report-item h3 { margin: 0 0 6px; font-size: 13px; }
.damage-report-item p { margin: 5px 0; line-height: 1.5; }
.damage-report-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 9px; }
.damage-report-photos img { width: 100%; max-height: 220px; object-fit: contain; border: 1px solid #ddd; }
.notice-card { margin-bottom: 15px; padding: 13px 15px; border-left: 3px solid var(--brand-yellow); border-radius: 6px; background: #fffbea; color: #60605a; font-size: 11px; }
.inspection-reminders { margin-bottom: 18px; overflow: hidden; border: 1px solid #f1d9a8; border-radius: 10px; background: #fffdf8; }
.inspection-reminders-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid #f3ead7; }
.inspection-reminders-head h2 { margin: 0 0 4px; font-size: 13px; }
.inspection-reminders-head p { margin: 0; color: var(--muted); font-size: 10px; }
.inspection-reminder-list { display: grid; }
.inspection-reminder { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; align-items: center; gap: 11px; padding: 12px 18px; border-bottom: 1px solid #f3f1eb; }
.inspection-reminder:last-child { border-bottom: 0; }
.inspection-reminder.overdue { background: #fff8f7; }
.inspection-reminder-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #fff0d4; color: #9a6818; font-size: 14px; font-weight: 700; }
.inspection-reminder.overdue .inspection-reminder-icon { background: #fde7e5; color: #bb514d; }
.inspection-reminder-main { min-width: 0; }
.inspection-reminder-main strong, .inspection-reminder-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inspection-reminder-main strong { margin-bottom: 4px; font-size: 11px; }
.inspection-reminder-main small { color: var(--muted); font-size: 9px; }
.inspection-reminder-status { color: #97650f; font-size: 10px; font-weight: 700; white-space: nowrap; }
.inspection-reminder.overdue .inspection-reminder-status { color: #bb514d; }
.inspection-contact { text-decoration: none; }
.inspection-contact-missing { color: var(--muted); font-size: 9px; white-space: nowrap; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; padding: 12px 16px; border-radius: 8px; background: #202c39; box-shadow: var(--shadow); color: #fff; font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.mobile-scrim { display: none; }

@media (max-width: 1050px) {
  .sidebar { width: 220px; }
  .main-panel { margin-left: 220px; }
  .page-content { padding-right: 25px; padding-left: 25px; }
  .topbar { padding-right: 25px; padding-left: 25px; }
  .footer { padding-right: 25px; padding-left: 25px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .sidebar { width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .mobile-scrim.visible { position: fixed; inset: 0; z-index: 15; display: block; background: rgba(15,23,33,.45); }
  .main-panel { margin-left: 0; }
  .topbar { height: 60px; padding: 0 17px; }
  .menu-button { display: block; }
  .breadcrumb { margin-right: auto; margin-left: 13px; font-size: 11px; }
  .today-label { display: none; }
  .profile-switcher span { display: none; }
  .profile-switcher select { max-width: 125px; }
  .page-content { min-height: calc(100vh - 109px); padding: 23px 17px 28px; }
  .footer { gap: 10px; padding: 13px 17px; font-size: 9px; }
  .footer span:last-child { text-align: right; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .inspection-reminder { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .inspection-contact, .inspection-contact-missing { grid-column: 2 / -1; justify-self: start; }
  .page-heading { align-items: flex-start; }
  .page-heading .button { flex: 0 0 auto; }
}
@media (max-width: 520px) {
  .page-heading { flex-direction: column; align-items: stretch; }
  .page-heading .button { align-self: flex-start; }
  h1 { font-size: 22px; }
  .stat-grid { gap: 9px; }
  .stat-card { min-height: 103px; padding: 13px; }
  .stat-value { font-size: 21px; }
  .stat-label { margin-bottom: 9px; font-size: 9px; }
  .stat-icon { width: 30px; height: 30px; }
  .toolbar { flex-wrap: wrap; }
  .search-box { min-width: 100%; max-width: none; }
  .filter-select { flex: 1; }
  .document-tabs { overflow-x: auto; }
  .document-tab { flex: 0 0 auto; padding-right: 7px; padding-left: 7px; font-size: 10px; }
  .damage-panel { grid-template-columns: 1fr; }
  .damage-report-photos { grid-template-columns: repeat(2, 1fr); }
  .inventory-grid { grid-template-columns: 1fr 1fr; }
  .accounting-summary { grid-template-columns: 1fr; }
  .accounting-period { align-items: stretch; }
  .accounting-period label { flex: 1 1 140px; }
  .accounting-period strong { flex: 1 1 100%; }
  .job-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; padding: 12px; }
  .job-mark { width: 32px; height: 32px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .line-item-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 28px; }
  .line-item-article, .line-item-description { grid-column: 1 / -1; }
  .line-item-row .line-item-remove { grid-column: 3; grid-row: 3 / 5; }
  .line-item-row label:nth-child(6) { grid-column: 1 / 3; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-actions { align-items: flex-start; flex-direction: column; }
}
