/* Accident Book */
:root {
  --brand: #bc2336;
  --ink: #1b1e24;
  --ink-2: #4a505c;
  --muted: #737a87;
  --line: #e2e4e9;
  --bg: #f4f5f7;
  --card: #ffffff;
  --ok: #1d7a4a;
  --warn: #a15c00;
  --bad: #b3261e;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 24, 32, .06), 0 1px 0 rgba(20, 24, 32, .03);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
h3 { font-size: .95rem; margin: 1rem 0 .35rem; color: var(--ink-2); }
code { font-family: Consolas, "SF Mono", monospace; background: #eef0f3; padding: 1px 5px; border-radius: 4px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 1rem; }
.inline { display: inline; }

/* ---------- Top bar ---------- */
.topbar { background: #1d2028; color: #fff; position: sticky; top: 0; z-index: 10; }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 14px; min-height: 56px; }
.brand { color: #fff; font-weight: 700; display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-sep { width: 1px; height: 22px; background: rgba(255,255,255,.25); }
.brand-app { font-weight: 600; font-size: 1rem; letter-spacing: -.01em; }
.brand-mark {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 20px; line-height: 1;
}
.brand-mark.big { width: 48px; height: 48px; font-size: 34px; border-radius: 12px; }
.switch { display: flex; background: rgba(255,255,255,.08); border-radius: 8px; padding: 3px; gap: 3px; }
.switch-btn {
  border: 0; background: transparent; color: rgba(255,255,255,.75); font: 600 .85rem/1 inherit;
  padding: 7px 12px; border-radius: 6px; cursor: pointer; letter-spacing: .03em;
}
.switch-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.switch-btn.active { background: var(--c); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.company-pill { font-size: .85rem; color: rgba(255,255,255,.8); }
.mainnav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.mainnav a, .mainnav .linkbtn { color: rgba(255,255,255,.8); padding: 8px 10px; border-radius: 6px; font-size: .92rem; }
.mainnav a:hover, .mainnav .linkbtn:hover { color: #fff; background: rgba(255,255,255,.07); text-decoration: none; }
.mainnav a.on { color: #fff; background: rgba(255,255,255,.12); }
.menu-toggle { display: none; margin-left: auto; background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; }
.company-band { background: var(--brand); color: #fff; font-size: .85rem; }
.company-band .topbar-inner { min-height: 30px; gap: 6px; }
.muted-light { opacity: .8; }

/* ---------- Layout ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 22px 16px 60px; }
.page-narrow { max-width: 560px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 8px; }
.head-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; font-size: .88rem; }
.back { font-size: .88rem; display: inline-block; margin-bottom: 4px; }
.count { font-size: 1rem; color: var(--muted); font-weight: 500; }
.ref { font-family: Consolas, "SF Mono", monospace; letter-spacing: -.01em; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; }
.card-warn { border-left: 4px solid var(--warn); }
.card-review { border-left: 4px solid var(--brand); }
.card-muted { background: #fafbfc; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.grid4 { display: grid; grid-template-columns: 1.2fr 1.4fr 1.2fr auto; gap: 0 12px; align-items: end; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  display: flex; flex-direction: column; color: var(--ink); box-shadow: var(--shadow);
}
.stat:hover { text-decoration: none; border-color: #c9ccd3; }
.stat-n { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.stat-l { color: var(--muted); font-size: .88rem; }
.stat-alert .stat-n { color: var(--brand); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; margin-bottom: 14px; min-width: 0; }
.lbl { font-weight: 600; font-size: .9rem; margin-bottom: 5px; color: var(--ink-2); }
.req { color: var(--bad); font-style: normal; }
.hint { color: var(--muted); font-size: .82rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number],
input[type=date], input[type=time], input[type=search], select, textarea {
  font: inherit; color: inherit; width: 100%; padding: 9px 11px; border: 1px solid #cdd1d8;
  border-radius: 7px; background: #fff; min-height: 40px;
}
input[type=color] { width: 100%; height: 40px; padding: 2px; border: 1px solid #cdd1d8; border-radius: 7px; background: #fff; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
input[type=file] { font: inherit; padding: 8px; border: 1px dashed #cdd1d8; border-radius: 7px; background: #fafbfc; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 .92rem/1 inherit;
  padding: 10px 16px; border-radius: 7px; border: 1px solid #cdd1d8; background: #fff; color: var(--ink);
  cursor: pointer; white-space: nowrap; min-height: 40px;
}
.btn:hover { background: #f4f5f7; text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn-subtle { background: transparent; }
.btn-hse { background: #ffdd00; border-color: #e6c700; color: #1a1a1a; font-weight: 700; }
.btn-hse:hover { background: #f0cf00; }
.card > .btn-hse { margin-top: 12px; }
.hint-top { display: block; margin-bottom: 6px; }
.btn-big { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-small { padding: 5px 10px; min-height: 0; font-size: .82rem; }
.btn:disabled { opacity: .6; cursor: wait; }
.linkbtn { background: none; border: 0; font: inherit; color: var(--brand); cursor: pointer; padding: 0 4px; }
.linkbtn.danger, .danger { color: var(--bad); }
.form-actions { margin: 8px 0 30px; }
.field-btn { margin-bottom: 14px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.card-title { display: flex; align-items: center; gap: 10px; }
.step {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: .82rem; font-weight: 700; flex: none;
}
.type-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.type-option { cursor: pointer; }
.type-option input { position: absolute; opacity: 0; pointer-events: none; }
.type-box {
  display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 12px 14px;
  border: 2px solid var(--line); border-radius: 9px; background: #fff; transition: border-color .12s, background .12s;
}
.type-box small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.type-option:hover .type-box { border-color: #c3c7cf; }
.type-option input:checked + .type-box { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, #fff); }
.type-option input:focus-visible + .type-box { outline: 2px solid var(--brand); outline-offset: 2px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 14px; }
.filters input[type=search] { flex: 1 1 240px; width: auto; }
.filters select { width: auto; flex: 0 1 auto; }
.inline-lbl { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.inline-lbl input { width: auto; }
.clear { font-size: .88rem; }

/* ---------- Flash ---------- */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; }
.flash ul { margin: 6px 0 0; padding-left: 20px; }
.flash-success { background: #eaf6ef; border-color: #b8e0c8; color: #14532d; }
.flash-error { background: #fdecea; border-color: #f4c3bd; color: #7f1d1d; }
.flash-info { background: #eef4fd; border-color: #c7d9f5; color: #1e3a6b; }
.pw-box .pw { font-size: 1.1rem; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid #eef0f3; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.th-link a { color: inherit; display: inline-flex; align-items: center; gap: 4px; }
.th-link a:hover { color: var(--brand); text-decoration: none; }
.th-sort { cursor: pointer; user-select: none; }
.th-sort:hover { color: var(--brand); }
.arrow { font-size: .7em; color: var(--brand); }
.add-type { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.add-type input { max-width: 260px; }
.add-type select { width: auto; }
.table-click tbody tr { cursor: pointer; }
.table-click tbody tr:hover { background: #f8f9fb; }
.table td a { font-weight: 600; font-family: Consolas, "SF Mono", monospace; font-size: .88rem; }
.nowrap { white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table tr.inactive td { color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 24px 0; margin: 0; }
.pager { display: flex; gap: 16px; justify-content: center; padding-top: 14px; font-size: .9rem; }

.chip, .tchip, .tag, .riddor-flag {
  display: inline-block; font-size: .76rem; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; font-family: inherit;
}
.chip-new { background: #fdecea; color: #9b1c1c; }
.chip-in_review { background: #fff3dc; color: #8a4b00; }
.chip-closed { background: #e7f5ec; color: #166534; }
.tchip { background: #eef0f3; color: var(--ink-2); }
.tchip-injury { background: #fde8e8; color: #8f1d1d; }
.tchip-near_miss { background: #fff4d6; color: #7a5200; }
.tchip-damage { background: #e6efff; color: #1e3f86; }
.tchip-basic { background: #e7e9ee; color: #444d5c; }
.tchip-dangerous { background: #f1e6fb; color: #5b2386; }
.riddor-flag { background: #1d2028; color: #fff; letter-spacing: .04em; }
.tag { background: #eef0f3; color: var(--ink-2); font-size: .72rem; }
.tag-off { background: #fdecea; color: #9b1c1c; }
.overdue { color: var(--bad); font-weight: 700; }

/* ---------- Detail view ---------- */
.dl { margin: 0; }
.dl-row { display: grid; grid-template-columns: 140px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid #f0f1f4; }
.dl-row:last-child { border-bottom: 0; }
.dl dt { color: var(--muted); font-size: .88rem; }
.dl dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.prose { white-space: pre-wrap; margin: 0 0 .5rem; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.thumb { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; color: var(--ink); }
.thumb:hover { text-decoration: none; border-color: #c3c7cf; }
.thumb img { width: 100%; height: 110px; object-fit: cover; background: #f0f1f4; }
.thumb-doc { height: 110px; display: grid; place-items: center; background: #f0f1f4; font-weight: 700; color: var(--muted); }
.thumb-name { font-size: .76rem; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history { list-style: none; margin: 0; padding: 0; font-size: .86rem; }
.history li { padding: 7px 0; border-bottom: 1px solid #f0f1f4; display: flex; flex-direction: column; }
.h-when { color: var(--muted); font-size: .78rem; }
.h-detail { color: var(--ink-2); }
.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #f0f1f4; }

/* ---------- Settings ---------- */
.copy-row { display: flex; gap: 8px; }
.copy-row input { font-family: Consolas, "SF Mono", monospace; font-size: .85rem; }
.lists-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.list-box { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; }
.list-box h3 { margin-top: 0; }
.list-box ul { list-style: none; margin: 0 0 10px; padding: 0; max-height: 300px; overflow: auto; flex: 1; }
.list-box li { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; font-size: .88rem; border-bottom: 1px solid #f4f5f7; }
.x { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; padding: 0 4px; }
.x:hover { color: var(--bad); }
.add-row { display: flex; gap: 6px; }
.add-row .btn { min-height: 36px; padding: 6px 12px; }
.add-row input { min-height: 36px; padding: 6px 9px; }

/* ---------- Login ---------- */
.login-card { margin-top: 8vh; padding: 28px; }
.login-head { text-align: center; margin-bottom: 18px; }
.login-logo { height: 60px; width: auto; display: block; margin: 0 auto 14px; }
.login-head h1 { margin-top: 0; }

/* ---------- Public report form ---------- */
.public-head { background: var(--brand); color: #fff; }
.public-inner { max-width: 820px; margin: 0 auto; padding: 0 16px; }
.public-head .public-inner { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.public-head .brand-mark { background: #fff; color: var(--brand); }
.public-logo { height: 38px; width: auto; display: block; }
.public-company { font-weight: 700; font-size: 1.1rem; }
.public-sub { opacity: .85; font-size: .85rem; }
.public-main { padding-top: 22px; padding-bottom: 60px; }
.public-title { font-size: 1.5rem; }
.lead { color: var(--ink-2); margin-bottom: 18px; }
.thanks { text-align: center; padding: 36px 24px; }
.tick { width: 60px; height: 60px; border-radius: 50%; background: #e7f5ec; color: var(--ok); font-size: 32px; display: grid; place-items: center; margin: 0 auto 12px; }
.big-ref { font: 700 1.8rem/1.2 Consolas, "SF Mono", monospace; letter-spacing: .02em; margin: 4px 0 8px; color: var(--brand); }

/* ---------- Actions ---------- */
.action-list { list-style: none; margin: 0 0 14px; padding: 0; }
.action { display: flex; gap: 12px; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #eef0f3; }
.action:last-child { border-bottom: 0; }
.action-done .action-title, .action-cancelled .action-title { color: var(--muted); text-decoration: line-through; }
.action-main { min-width: 0; flex: 1; }
.action-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.action-title { font-weight: 600; }
.action-detail { margin: 4px 0; color: var(--ink-2); white-space: pre-wrap; }
.action-notes { margin: 4px 0; color: var(--muted); font-style: italic; }
.action-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .84rem; color: var(--muted); margin-top: 4px; }
.action-buttons { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex: none; }
.pri { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.pri-high { background: #fde8e8; color: #8f1d1d; }
.pri-low { background: #eef0f3; color: var(--muted); }
.inline-form summary { display: inline-flex; list-style: none; cursor: pointer; }
.inline-form summary::-webkit-details-marker { display: none; }
.inline-form[open] > summary { margin-bottom: 8px; }
.done-form, .edit-form { background: #fafbfc; border: 1px solid var(--line); border-radius: 8px; padding: 10px; max-width: 460px; }
.done-form textarea { width: 100%; margin-bottom: 8px; }
.done-row { display: flex; gap: 8px; }
.add-action { margin-top: 10px; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 7px 7px 0 0; color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.tabs a:hover { background: #eceef1; text-decoration: none; }
.tabs a.on { background: var(--card); border: 1px solid var(--line); border-bottom-color: var(--card); color: var(--brand); }
.small { font-size: .82rem; }

/* ---------- Quick-view modal ---------- */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20, 24, 32, .5); }
.modal-box { position: relative; background: #fff; border-radius: 12px; max-width: 560px; width: 100%;
  max-height: 88vh; overflow: auto; box-shadow: 0 16px 48px rgba(0,0,0,.28); padding: 22px 24px; }
.modal-x { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 26px;
  line-height: 1; color: var(--muted); cursor: pointer; }
.modal-x:hover { color: var(--ink); }
.modal-loading { color: var(--muted); padding: 24px 0; text-align: center; }
.quick-head { margin-bottom: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-right: 24px; }
.quick-head .ref { font-family: Consolas, monospace; font-weight: 700; font-size: 1.1rem; }
.quick-dl { margin: 0 0 12px; }
.quick-dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 5px 0; border-bottom: 1px solid #f0f1f4; }
.quick-dl dt { color: var(--muted); font-size: .88rem; margin: 0; }
.quick-dl dd { margin: 0; }
.quick-desc { white-space: pre-wrap; background: #fafbfc; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 12px; max-height: 180px; overflow: auto; }
.quick-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pilltag { font-size: .78rem; background: #eef0f3; color: var(--ink-2); padding: 3px 10px; border-radius: 99px; }
.quick-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Dashboard analytics ---------- */
.analytics .card-head { align-items: center; margin-bottom: 14px; }
.scope-form select { width: auto; min-height: 36px; padding: 6px 10px; }
.overview-tools { display: flex; gap: 8px; align-items: center; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { background: #fafbfc; border: 1px solid var(--line); border-radius: 9px; padding: 14px 16px; text-align: center; }
.kpi-n { display: block; font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.kpi-l { color: var(--muted); font-size: .84rem; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.chart { min-width: 0; }
.chart-wide { grid-column: 1 / -1; }
.chart h3 { margin: 0 0 10px; font-size: .9rem; color: var(--ink-2); }

.vbars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 18px; }
.vbar { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.vbar-track { width: 100%; max-width: 46px; flex: 1; display: flex; align-items: flex-end; background: #f4f5f7; border-radius: 5px 5px 0 0; }
.vbar-fill { width: 100%; background: var(--brand); border-radius: 5px 5px 0 0; min-height: 2px; transition: height .2s; }
.vbar-n { font-size: .72rem; color: var(--ink-2); height: 14px; }
.vbar-l { font-size: .72rem; color: var(--muted); margin-top: 5px; white-space: nowrap; }

.doughnut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.doughnut { width: 128px; height: 128px; flex: none; }
.dough-n { font: 700 20px 'Segoe UI', sans-serif; fill: var(--ink); }
.dough-l { font: 400 10px 'Segoe UI', sans-serif; fill: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.legend li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.legend .dot { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.legend strong { margin-left: auto; padding-left: 10px; }

.hbars { display: flex; flex-direction: column; gap: 7px; }
.hbar { display: grid; grid-template-columns: 110px 1fr 28px; align-items: center; gap: 8px; font-size: .85rem; }
.hbar-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.hbar-track { background: #f4f5f7; border-radius: 5px; height: 16px; overflow: hidden; }
.hbar-fill { height: 100%; background: var(--brand); border-radius: 5px; min-width: 2px; }
.hbar-n { text-align: right; font-weight: 600; color: var(--ink-2); }

@media (max-width: 760px) {
  .charts { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr 1fr; }
  .hbar { grid-template-columns: 90px 1fr 24px; }
}

/* ---------- Email template ---------- */
textarea.mono { font-family: Consolas, "SF Mono", monospace; font-size: .9rem; line-height: 1.5; }
.token-help { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 14px; }
.token { background: #eef0f3; color: var(--ink-2); font-family: Consolas, monospace; font-size: .8rem; padding: 2px 7px; border-radius: 5px; cursor: help; }
.form-row { display: flex; gap: 8px; }
.email-meta { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: .9rem; display: flex; flex-direction: column; gap: 4px; }
.email-frame-wrap { background: #f4f5f7; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.email-frame { width: 100%; height: 540px; border: 0; background: #f4f5f7; border-radius: 6px; }
.email-text { white-space: pre-wrap; font-family: Consolas, monospace; font-size: .85rem; background: #fafbfc; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 10px 0 0; overflow: auto; }

/* ---------- Licensing ---------- */
.licence-bar { font-size: .88rem; color: #fff; }
.licence-bar .topbar-inner { min-height: 34px; gap: 10px; }
.licence-bar a { color: #fff; text-decoration: underline; font-weight: 600; }
.licence-expiring { background: #8a4b00; }
.licence-expired { background: #8f1d1d; }
.lic-status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 10px; }
.lic-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); display: inline-block; }
.lic-active .lic-dot { background: var(--ok); }
.lic-expiring .lic-dot { background: var(--warn); }
.lic-expired .lic-dot { background: var(--bad); }
.code-input { font-family: Consolas, "SF Mono", monospace; letter-spacing: .08em; text-transform: uppercase; font-size: 1.05rem; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .lists-grid { grid-template-columns: 1fr 1fr; }
  .type-picker { grid-template-columns: 1fr 1fr; }
  .grid4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .menu-toggle { display: block; }
  .mainnav { display: none; position: absolute; top: 56px; right: 0; left: 0; background: #1d2028; flex-direction: column; align-items: stretch; padding: 8px; z-index: 20; }
  .mainnav.open { display: flex; }
  .grid2, .grid3, .grid4, .lists-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hide-sm { display: none; }
  .card { padding: 16px; }
  .dl-row { grid-template-columns: 110px 1fr; }
  .copy-row { flex-wrap: wrap; }
  .btn-big { width: 100%; }
  .filters select, .inline-lbl { flex: 1 1 45%; }
}

/* 2-step sign-in */
.setup-steps { padding-left: 20px; line-height: 1.55; }
.setup-steps li { margin-bottom: 10px; }
.qr-box { margin: 10px 0; }
.qr-box svg { max-width: 100%; height: auto; border: 1px solid #e2e4e9; border-radius: 6px; }
.setup-key { display: inline-block; padding: 6px 10px; background: #f4f5f7; border-radius: 6px; font-size: 1rem; letter-spacing: .05em; word-break: break-all; }
.backup-codes { columns: 2; list-style: none; padding: 0; margin: 12px 0; font-size: 1.05rem; }
.backup-codes li { padding: 4px 0; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
details.small { font-size: .92rem; margin-top: 12px; }
@media print { .btn-row, .topbar { display: none !important; } }
