:root {
  --charcoal: #3a3a3a; --charcoal-dark: #262626; --charcoal-deep: #1d1d1d; --red: #c1121f; --red-dark: #9c0e19; --orange: #f28c28; --orange-dark: #d9741a; --orange-light: #fdebd9; --gold: #ffc043;
  --green: #1f8a5b; --green-bg: #e3f3ea; --yellow: #a67c00; --yellow-bg: #fff4cc; --amber: #c2410c; --amber-bg: #ffe6d1; --danger: #c1121f; --danger-bg: #fbe1e4; --darkred: #7a0c14; --darkred-bg: #f2d3d6; --grey: #6b7280; --grey-bg: #eceff3;
  --bg: #f4f5f7; --surface: #ffffff; --border: #e1e5eb; --text: #1c1f26; --muted: #5f6772; --muted-light: #8b93a0;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .08);
  --radius: 10px; --sidebar-w: 244px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; font-size: 14px; line-height: 1.45; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; color: var(--charcoal); }
h1 { font-size: 22px; } h2 { font-size: 16px; } h3 { font-size: 14px; }
p { margin: 0 0 8px; }
[hidden] { display: none !important; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .small { font-size: 12px; } .bold { font-weight: 650; } .nowrap { white-space: nowrap; }
.pos { color: var(--green); } .neg { color: var(--danger); } .warn { color: var(--amber); }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; } .mt-sm { margin-top: 8px; } .mb-sm { margin-bottom: 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }

/* ---------- Login ---------- */
.login-view { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(circle at 15% 20%, rgba(242, 140, 40, .28), transparent 42%), radial-gradient(circle at 85% 80%, rgba(193, 18, 31, .35), transparent 45%), linear-gradient(135deg, #1d1d1d, #3a3a3a); }
.login-card { background: var(--surface); border-radius: 16px; padding: 34px 32px 26px; width: 100%; max-width: 420px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.login-logo { max-width: 280px; width: 100%; height: auto; display: block; margin: 0 auto 8px; }
.login-title { text-align: center; color: var(--charcoal); font-weight: 700; letter-spacing: .6px; text-transform: uppercase; font-size: 12px; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 3px solid var(--orange); }
.login-foot { margin-top: 18px; color: var(--muted); font-size: 12px; text-align: center; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--charcoal-dark); color: #e6e6e6; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 30; transition: transform .2s ease; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 10px; background: #fff; }
.sidebar-logo { width: 100%; max-width: 200px; height: auto; display: block; }
.sidebar-app { padding: 8px 18px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); background: var(--charcoal-deep); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.sidebar-close { display: none; margin-left: auto; color: var(--charcoal); }
.nav { flex: 1; overflow-y: auto; padding: 10px 0; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 18px; color: #cfcfcf; font-size: 13.5px; border-left: 3px solid transparent; }
.nav a:hover { background: rgba(255, 255, 255, .06); text-decoration: none; color: #fff; }
.nav a.active { background: rgba(255, 255, 255, .09); color: #fff; border-left-color: var(--orange); }
.nav .nav-group { padding: 12px 18px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #8d8d8d; }
.nav-icon { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; opacity: .9; }
.nav-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.sidebar-foot { padding: 12px 16px; border-top: 1px solid rgba(255, 255, 255, .08); }
.nav-user { font-size: 12px; line-height: 1.3; margin-bottom: 8px; } .nav-user b { color: #fff; display: block; } .nav-user span { color: #a8a8a8; }
.sidebar-foot-actions { display: flex; gap: 6px; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 25; }
.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar-search { flex: 1; max-width: 520px; position: relative; }
.topbar-search input { width: 100%; }
.search-results { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); margin-top: 4px; max-height: 320px; overflow: auto; z-index: 40; }
.search-results a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; color: var(--text); border-bottom: 1px solid var(--border); }
.search-results a:hover { background: #f7f8fa; text-decoration: none; }
.search-results .empty { padding: 10px 12px; color: var(--muted); }
#menu-btn { display: none; }
.alert-bell { margin-left: auto; position: relative; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--charcoal); }
.alert-bell:hover { background: var(--grey-bg); text-decoration: none; }
.bell-icon { width: 20px; height: 20px; display: block; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.7 21a2 2 0 0 1-3.4 0'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.7 21a2 2 0 0 1-3.4 0'/%3E%3C/svg%3E") center / contain no-repeat; }
.alert-count { position: absolute; top: 2px; right: 0; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.topbar-user { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.topbar-user b { color: var(--text); }
.content { padding: 22px 24px; flex: 1; }
.app-foot { padding: 12px 24px; color: var(--muted-light); font-size: 12px; text-align: center; }

/* ---------- Page header ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }

/* ---------- Cards / grids ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head .hint { font-size: 12px; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid > .card { margin-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); border-top: 3px solid var(--charcoal); }
.stat.green { border-top-color: var(--green); } .stat.yellow { border-top-color: var(--gold); } .stat.orange { border-top-color: var(--orange); } .stat.red { border-top-color: var(--red); } .stat.darkred { border-top-color: var(--darkred); } .stat.grey { border-top-color: var(--muted-light); }
.stat .label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.stat .value { font-size: 24px; font-weight: 700; margin-top: 4px; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
a.stat { display: block; color: inherit; } a.stat:hover { text-decoration: none; border-color: var(--orange); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.tbl th { background: #f6f7f9; color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
.tbl tbody tr:hover { background: #fafbfc; }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tfoot td { font-weight: 700; background: #f6f7f9; }
.tbl .empty { text-align: center; color: var(--muted); padding: 22px; }
.tbl td.actions-cell { white-space: nowrap; text-align: right; }
.tbl .sub { display: block; font-size: 12px; color: var(--muted); }
.vlink { color: var(--text); display: inline-block; min-width: 150px; } .vlink:hover { text-decoration: none; } .vlink:hover .reg { color: var(--red); }
.vlink .sub { white-space: nowrap; }
.reg { font-weight: 700; letter-spacing: .3px; color: var(--charcoal); white-space: nowrap; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; white-space: nowrap; line-height: 1.4; }
.badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.lvl-normal { background: var(--green-bg); color: var(--green); }
.lvl-approaching { background: var(--yellow-bg); color: var(--yellow); }
.lvl-due_soon { background: var(--amber-bg); color: var(--amber); }
.lvl-due { background: var(--danger-bg); color: var(--danger); }
.lvl-overdue { background: var(--darkred); color: #fff; }
.lvl-unknown { background: var(--grey-bg); color: var(--grey); }
.st-active { background: var(--green-bg); color: var(--green); }
.st-inactive { background: var(--grey-bg); color: var(--grey); }
.st-maintenance { background: var(--orange-light); color: var(--orange-dark); }
.badge.plain::before { display: none; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot.lvl-normal { background: var(--green); } .dot.lvl-approaching { background: var(--gold); } .dot.lvl-due_soon { background: var(--orange); } .dot.lvl-due { background: var(--red); } .dot.lvl-overdue { background: var(--darkred); } .dot.lvl-unknown { background: var(--muted-light); }
.text-lvl-normal { color: var(--green); } .text-lvl-approaching { color: var(--yellow); } .text-lvl-due_soon { color: var(--amber); } .text-lvl-due { color: var(--danger); } .text-lvl-overdue { color: var(--darkred); } .text-lvl-unknown { color: var(--grey); }

/* ---------- Attention list / banners ---------- */
.attention { list-style: none; margin: 0; padding: 0; }
.attention li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.attention li:last-child { border-bottom: 0; }
.attention .who { flex: 1; min-width: 0; }
.attention .who .name { font-weight: 650; color: var(--charcoal); }
.attention .who .msg { font-size: 12.5px; color: var(--muted); }
.attention .msg.strong { color: var(--text); font-weight: 600; }
.attention .rem { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.banner { border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; display: flex; gap: 14px; align-items: center; border: 1px solid transparent; }
.banner .headline { font-weight: 800; letter-spacing: .5px; font-size: 15px; }
.banner .detail { font-size: 13px; opacity: .9; }
.banner.lvl-normal { background: var(--green-bg); color: var(--green); border-color: #bfe3cf; }
.banner.lvl-approaching { background: var(--yellow-bg); color: #6b5300; border-color: #f3dd8a; }
.banner.lvl-due_soon { background: var(--amber-bg); color: #8a2e0a; border-color: #f7c49a; }
.banner.lvl-due { background: var(--danger-bg); color: var(--danger); border-color: #f0b3b9; }
.banner.lvl-overdue { background: var(--darkred); color: #fff; border-color: var(--darkred); }
.banner.lvl-unknown { background: var(--grey-bg); color: var(--charcoal); border-color: #d5d9e0; }
.banner .banner-actions { margin-left: auto; }
.banner .dot { width: 14px; height: 14px; }
.banner.lvl-overdue .dot { background: #fff; }

/* ---------- Progress ---------- */
.progress { position: relative; height: 12px; background: var(--grey-bg); border-radius: 999px; overflow: hidden; }
.progress .fill { height: 100%; border-radius: 999px; background: var(--green); transition: width .3s ease; }
.progress .fill.lvl-approaching { background: var(--gold); } .progress .fill.lvl-due_soon { background: var(--orange); } .progress .fill.lvl-due { background: var(--red); } .progress .fill.lvl-overdue { background: var(--darkred); }
.progress-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 5px; }
.progress.mini { height: 6px; width: 90px; }
.status-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--grey-bg); margin: 8px 0 12px; }
.status-bar span { display: block; height: 100%; border-radius: 0; }
.status-bar .lvl-overdue { background: var(--darkred); } .status-bar .lvl-due { background: var(--red); } .status-bar .lvl-due_soon { background: var(--orange); } .status-bar .lvl-approaching { background: var(--gold); } .status-bar .lvl-normal { background: var(--green); } .status-bar .lvl-unknown { background: var(--muted-light); }
.attention .who .name .muted { font-weight: 500; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12.5px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Timeline chart ---------- */
.timeline { width: 100%; height: auto; display: block; font-family: inherit; }
.timeline .grid-line { stroke: var(--border); stroke-width: 1; }
.timeline .axis-label { fill: var(--muted); font-size: 11px; }
.timeline .reading-line { fill: none; stroke: var(--charcoal); stroke-width: 2.2; stroke-linejoin: round; }
.timeline .reading-dot { fill: #fff; stroke: var(--charcoal); stroke-width: 1.8; }
.timeline .reading-dot.service { fill: var(--orange); stroke: var(--orange-dark); }
.timeline .service-line { stroke: var(--orange); stroke-width: 1.5; stroke-dasharray: 4 3; }
.timeline .service-label { fill: var(--orange-dark); font-size: 11px; font-weight: 700; }
.timeline .next-line { stroke: var(--red); stroke-width: 1.6; stroke-dasharray: 6 4; }
.timeline .next-label { fill: var(--red); font-size: 11.5px; font-weight: 700; }
.timeline .last-line { stroke: var(--green); stroke-width: 1.2; stroke-dasharray: 3 3; }
.timeline .last-label { fill: var(--green); font-size: 11px; font-weight: 600; }
.timeline .overdue-zone { fill: rgba(193, 18, 31, .07); }
.timeline .area { fill: rgba(58, 58, 58, .06); }

/* ---------- Key/value ---------- */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.notes-box { white-space: pre-wrap; font-size: 13px; color: var(--text); background: #fafbfc; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.big-reg { font-size: 26px; font-weight: 800; letter-spacing: 1px; color: var(--charcoal); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 9px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button.active { color: var(--red); border-bottom-color: var(--red); }
.tabs button:hover { color: var(--charcoal); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: #f4f6f8; text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; } .btn-primary:hover { background: var(--red-dark); }
.btn-accent { background: var(--orange); border-color: var(--orange); color: #fff; } .btn-accent:hover { background: var(--orange-dark); }
.btn-dark { background: var(--charcoal); border-color: var(--charcoal); color: #fff; } .btn-dark:hover { background: var(--charcoal-dark); }
.btn-danger { background: #fff; border-color: var(--danger); color: var(--danger); } .btn-danger:hover { background: var(--danger-bg); }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .25); color: #ddd; } .btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--red); padding: 2px 4px; font: inherit; cursor: pointer; font-weight: 600; } .btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--danger); }
.icon-btn { background: none; border: 0; font-size: 18px; cursor: pointer; color: var(--charcoal); padding: 4px 8px; border-radius: 6px; } .icon-btn:hover { background: var(--grey-bg); }

/* ---------- Forms ---------- */
input, select, textarea { font: inherit; color: var(--text); background: #fff; border: 1px solid #cdd3dc; border-radius: 8px; padding: 8px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(242, 140, 40, .45); border-color: var(--orange); }
input[type=checkbox] { width: auto; }
textarea { resize: vertical; min-height: 70px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.field > span { color: var(--muted); font-weight: 600; font-size: 12px; }
.field > span.req::after { content: ' *'; color: var(--danger); }
.field .help { font-size: 12px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-section { grid-column: 1 / -1; font-weight: 700; color: var(--charcoal); border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; grid-column: 1 / -1; }
.form-error { grid-column: 1 / -1; background: var(--danger-bg); color: var(--danger); padding: 9px 12px; border-radius: 8px; font-size: 13px; }
.form-info { grid-column: 1 / -1; background: var(--orange-light); color: #7a3f08; padding: 9px 12px; border-radius: 8px; font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.filters .field { min-width: 150px; flex: 1 1 150px; max-width: 260px; }
.filters .field.wide { max-width: 320px; }
.filters .btn { height: 37px; }
.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 16px; align-items: end; }
.inline-form .span-2 { grid-column: span 2; }
.inline-form .actions-col { display: flex; gap: 8px; align-items: flex-end; }
.hint-box { font-size: 12.5px; color: var(--muted); background: #f7f8fa; border: 1px dashed var(--border); border-radius: 8px; padding: 8px 10px; }

/* ---------- Modal / toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(20, 20, 20, .5); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 50; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 720px; box-shadow: 0 25px 60px rgba(0, 0, 0, .35); }
.modal.narrow { max-width: 480px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 20px; }
.toast-root { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: 420px; }
.toast { background: var(--charcoal-dark); color: #fff; padding: 11px 16px; border-radius: 8px; font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); border-left: 4px solid var(--orange); }
.toast.success { border-left-color: var(--green); } .toast.error { border-left-color: var(--danger); } .toast.warn { border-left-color: var(--gold); }

/* ---------- Reports ---------- */
.report-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 16px; }
.report-tab { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; text-align: left; font: inherit; color: var(--text); }
.report-tab b { display: block; color: var(--charcoal); margin-bottom: 2px; }
.report-tab span { font-size: 12px; color: var(--muted); }
.report-tab.active { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(242, 140, 40, .25); }
.report-tab:hover { border-color: var(--orange); }
.report-section { margin-bottom: 22px; }
.report-section h3 { margin-bottom: 8px; color: var(--red); }
.report-meta { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }

/* ---------- Audit ---------- */
.audit-diff { font-family: Consolas, "Courier New", monospace; font-size: 11.5px; white-space: pre-wrap; background: #fafbfc; border: 1px solid var(--border); border-radius: 6px; padding: 8px; max-height: 260px; overflow: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open { display: block; }
  .sidebar-close { display: inline-block; }
  .main { margin-left: 0; }
  #menu-btn { display: inline-block; }
  .topbar { padding: 8px 14px; }
  .content { padding: 16px 14px; }
  .topbar-user { display: none; }
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .inline-form .span-2 { grid-column: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat .value { font-size: 20px; }
  .modal-backdrop { padding: 12px 8px; }
  .modal-body { padding: 14px; }
  .page-head h1 { font-size: 19px; }
  .big-reg { font-size: 22px; }
  .banner { flex-wrap: wrap; } .banner .banner-actions { margin-left: 0; width: 100%; }
  .attention .rem { display: none; }
  .filters .field { max-width: none; }
}
@media print {
  .sidebar, .topbar, .app-foot, .actions, .btn, .filters, .report-tabs { display: none !important; }
  .main { margin-left: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}
