/* A&F Sprinklers - Enquiry Sales Log
   Palette: A&F red (#bc2336) for the brand, header and main actions; steel greys for text and lines. */
:root {
  --ink: #18212d;
  --ink-2: #3c4a5a;
  --steel: #66768a;
  --line: #d9e0e7;
  --line-2: #e9eef2;
  --bg: #f3f5f7;
  --panel: #ffffff;
  --brand: #bc2336;
  --brand-2: #9c1c2d;
  --brand-3: #7d1624;
  --red: #bc2336;
  --red-ink: #8f1a29;
  --red-tint: #fbeceb;
  --amber: #a86a12;
  --amber-tint: #fdf3e2;
  --green: #22744a;
  --green-tint: #e6f3ec;
  --blue: #2c5d8f;
  --blue-tint: #e7eff8;
  --grey-tint: #eef1f4;
  --radius: 6px;
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-cond: "Barlow Semi Condensed", "Arial Narrow", var(--font);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 14px/1.5 var(--font); font-variant-numeric: tabular-nums;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #f0b429; outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--font-cond); font-weight: 600; letter-spacing: .005em; margin: 0; line-height: 1.15; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 .75em; }
.muted { color: var(--steel); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.num { text-align: right; white-space: nowrap; }

/* ----- Top bar ---------------------------------------------------------- */
.topbar { background: var(--brand); color: #fff; border-bottom: 4px solid var(--brand-3); }
.topbar-inner { max-width: 1480px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 28px; min-height: 58px; }
.brand { display: flex; flex-direction: column; color: #fff; line-height: 1.1; }
.brand:hover { text-decoration: none; }
.brand-name { font-family: var(--font-cond); font-weight: 700; font-size: 20px; }
.brand-co { font-size: 11.5px; color: rgba(255,255,255,.78); }
.nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.nav a { color: rgba(255,255,255,.88); padding: 8px 12px; border-radius: 4px; font-weight: 500; }
.nav a:hover { background: var(--brand-2); color: #fff; text-decoration: none; }
.nav a.active { color: #fff; background: var(--brand-2); box-shadow: inset 0 -2px 0 #fff; }
.userbox { display: flex; align-items: center; gap: 12px; font-size: 13px; color: rgba(255,255,255,.85); }
.userbox .who { text-align: right; line-height: 1.2; }
.userbox .who strong { color: #fff; font-weight: 600; display: block; }
.linkbtn { background: none; border: 0; color: rgba(255,255,255,.88); cursor: pointer; font: inherit; padding: 6px 8px; border-radius: 4px; }
.linkbtn:hover { background: var(--brand-2); color: #fff; }
.menu-toggle { display: none; }

/* ----- Page ------------------------------------------------------------- */
.page { max-width: 1480px; margin: 0 auto; padding: 24px 20px 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--steel); margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 18px 10px; }
.panel-body { padding: 4px 18px 18px; }
.panel + .panel { margin-top: 18px; }

/* ----- Buttons & forms -------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 5px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font: 500 14px var(--font);
  cursor: pointer; white-space: nowrap; line-height: 1.3;
}
.btn:hover { border-color: #b9c4cf; background: #f8fafb; text-decoration: none; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-ink); border-color: var(--red-ink); }
.btn-dark { background: #2c3138; border-color: #2c3138; color: #fff; }
.btn-dark:hover { background: #41474f; border-color: #41474f; }
.btn-danger { color: var(--red); border-color: #e7c3c0; }
.btn-danger:hover { background: var(--red-tint); }
.btn-sm { padding: 4px 9px; font-size: 13px; }

label { display: block; font-weight: 600; font-size: 13px; color: var(--ink-2); margin-bottom: 5px; }
label .req { color: var(--red); }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=search], input[type=time],
input:not([type]), select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #c6d0da; border-radius: 5px; background: #fff;
  font: 14px var(--font); color: var(--ink);
}
textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(44,93,143,.15); }
.field { margin-bottom: 16px; }
.hint { font-size: 12.5px; color: var(--steel); margin-top: 4px; }
.input-affix { position: relative; }
.input-affix span { position: absolute; top: 50%; transform: translateY(-50%); color: var(--steel); pointer-events: none; }
.input-affix .pre { left: 10px; }
.input-affix .post { right: 10px; }
.input-affix input.has-pre { padding-left: 24px; }
.input-affix input.has-post { padding-right: 26px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 3px; }

.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 18px; }
.c-12 { grid-column: span 12; } .c-8 { grid-column: span 8; } .c-6 { grid-column: span 6; }
.c-4 { grid-column: span 4; } .c-3 { grid-column: span 3; }
.form-section { padding: 18px 20px 6px; border-bottom: 1px solid var(--line-2); }
.form-section:last-of-type { border-bottom: 0; }
.form-section h3 { margin-bottom: 14px; color: var(--ink-2); }
.form-foot { display: flex; justify-content: space-between; gap: 10px; padding: 14px 20px; background: #f8fafb; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }

/* ----- Flash ------------------------------------------------------------ */
.flashes { margin-bottom: 16px; display: grid; gap: 8px; }
.flash { padding: 10px 14px; border-radius: 5px; border: 1px solid; font-weight: 500; }
.flash-success { background: var(--green-tint); border-color: #b9dcc8; color: #17573a; }
.flash-error { background: var(--red-tint); border-color: #eac3c0; color: var(--red-ink); }
.flash-info { background: var(--blue-tint); border-color: #c4d6ea; color: #1f466e; }

/* ----- Filter bar ------------------------------------------------------- */
.filters { display: grid; grid-template-columns: 2.2fr repeat(4, 1fr) auto; gap: 10px; align-items: end; padding: 14px 16px; }
.filters label { font-size: 12px; margin-bottom: 3px; }
.filters .more { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.views { display: flex; gap: 4px; padding: 0 16px 12px; flex-wrap: wrap; }
.views a { padding: 4px 11px; border-radius: 99px; color: var(--ink-2); border: 1px solid var(--line); font-size: 13px; background: #fff; }
.views a:hover { text-decoration: none; border-color: #b9c4cf; }
.views a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.views a.alert { color: var(--red); border-color: #eac3c0; }
.views a.alert.on { background: var(--red); color: #fff; border-color: var(--red); }

/* ----- Tables ----------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.data th { font-size: 12px; font-weight: 600; color: var(--steel); background: #f8fafb; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
table.data th a { color: var(--steel); }
table.data th a.sorted { color: var(--ink); }
table.data tbody tr:hover { background: #f8fafc; }
table.data tr.clickable { cursor: pointer; }
table.data td.num, table.data th.num { text-align: right; }
table.data tfoot td { font-weight: 700; background: #f8fafb; border-top: 2px solid var(--line); }
table.compact th, table.compact td { padding: 6px 10px; }
.enq-no { font-family: var(--font-cond); font-weight: 600; font-size: 15px; color: var(--ink); white-space: nowrap; }
.clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overdue-date { color: var(--red); font-weight: 600; }
.empty { padding: 48px 20px; text-align: center; color: var(--steel); }
.empty strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--steel); font-size: 13px; }
.pager .actions a, .pager .actions span { padding: 4px 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.pager .actions span.cur { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ----- Status pills ----------------------------------------------------- */
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.pill-open { background: var(--blue-tint); color: var(--blue); border-color: #cddcec; }
.pill-sent { background: var(--amber-tint); color: var(--amber); border-color: #f0dbb5; }
.pill-won { background: var(--green-tint); color: var(--green); border-color: #c3e0cf; }
.pill-lost { background: var(--red-tint); color: var(--red); border-color: #efcdca; }
.pill-closed { background: var(--grey-tint); color: var(--steel); border-color: var(--line); }
.pill-overdue { background: var(--red); color: #fff; }
.role { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 4px; background: var(--grey-tint); color: var(--ink-2); }
.role-admin { background: #ebe7f6; color: #4b3a8a; }
.role-manager { background: var(--red-tint); color: var(--red-ink); }
.role-estimator { background: var(--amber-tint); color: var(--amber); }
.role-sales { background: var(--blue-tint); color: var(--blue); }

/* ----- Enquiry detail --------------------------------------------------- */
.job-tag { display: inline-flex; align-items: stretch; border: 2px solid var(--brand); border-radius: 5px; overflow: hidden; margin-bottom: 10px; }
.job-tag .k { background: var(--brand); color: #fff; font: 600 11.5px var(--font); padding: 6px 8px; writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; }
.job-tag .v { font-family: var(--font-cond); font-weight: 700; font-size: 34px; padding: 2px 14px; line-height: 1.2; letter-spacing: .02em; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
dl.facts { display: grid; grid-template-columns: 150px 1fr; margin: 0; }
dl.facts dt { color: var(--steel); font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
dl.facts dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-weight: 500; }
dl.facts dt:last-of-type, dl.facts dd:last-of-type { border-bottom: 0; }
.prose { white-space: pre-wrap; }
.money-block { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-2); }
.money-block > div { padding: 14px 18px; border-right: 1px solid var(--line-2); }
.money-block > div:last-child { border-right: 0; }
.money-block .lbl { font-size: 12.5px; color: var(--steel); }
.money-block .val { font-family: var(--font-cond); font-size: 24px; font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 0 10px 16px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--steel); }
.timeline li.created::before { background: var(--green); }
.timeline li.deleted::before { background: var(--red); }
.timeline .when { font-size: 12px; color: var(--steel); }
.timeline .chg { font-size: 13px; margin-top: 3px; }
.timeline .chg s { color: var(--steel); }

/* ----- Dashboard -------------------------------------------------------- */
.period { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.period a { padding: 6px 12px; border-radius: 4px; color: var(--ink-2); font-weight: 500; border: 1px solid transparent; }
.period a.on { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); }
.period form { display: flex; gap: 6px; align-items: center; margin-left: 8px; }
.period form input { width: 140px; padding: 5px 8px; }

.kpis { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; }
.kpi { padding: 16px 20px; border-right: 1px solid var(--line-2); }
.kpi:last-child { border-right: 0; }
.kpi .lbl { color: var(--steel); font-size: 13px; }
.kpi .val { font-family: var(--font-cond); font-weight: 600; font-size: 32px; line-height: 1.15; margin: 2px 0; }
.kpi .sub { font-size: 12.5px; color: var(--steel); }
.kpi.lead { background: var(--brand); color: #fff; border-radius: var(--radius) 0 0 var(--radius); }
.kpi.lead .lbl, .kpi.lead .sub { color: rgba(255,255,255,.82); }
.kpi.lead .val { font-size: 40px; }
.kpi .val.red { color: var(--red); }

.dash-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; align-items: start; }
.dash-grid > .panel + .panel { margin-top: 0; }
.span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; } .span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; } .span-12 { grid-column: span 12; }

/* Column chart */
.cols { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; align-items: end; height: 190px; padding-top: 14px; }
.col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.col .bar { width: 100%; max-width: 38px; background: #c7d3df; border-radius: 3px 3px 0 0; position: relative; min-height: 2px; }
.col .bar .won { position: absolute; left: 0; right: 0; bottom: 0; background: var(--green); border-radius: 0; }
.col .bar.v { background: #4a525c; }
.col .n { font-size: 11.5px; color: var(--ink-2); margin-bottom: 3px; font-weight: 600; }
.col-labels { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.col-labels span { text-align: center; font-size: 11.5px; color: var(--steel); }
.col-labels span.yr { color: var(--ink); font-weight: 600; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--steel); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* Horizontal bars */
.hbars { display: grid; gap: 9px; }
.hbar { display: grid; grid-template-columns: 130px 1fr 70px; gap: 10px; align-items: center; font-size: 13px; }
.hbar .track { height: 14px; background: var(--line-2); border-radius: 3px; overflow: hidden; display: flex; }
.hbar .fill { height: 100%; }
.hbar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fill-open { background: var(--blue); } .fill-sent { background: #d09a3a; } .fill-won { background: var(--green); }
.fill-lost { background: var(--red); } .fill-closed { background: #a7b3bf; } .fill-navy { background: #4a525c; }

.rate { display: inline-block; min-width: 46px; }
.ratebar { display: inline-block; width: 60px; height: 6px; background: var(--line-2); border-radius: 3px; vertical-align: middle; margin-left: 6px; overflow: hidden; }
.ratebar b { display: block; height: 100%; background: var(--green); }

/* ----- Reports ---------------------------------------------------------- */
.report-layout { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: start; }
.report-nav { padding: 8px; }
.report-nav a { display: block; padding: 8px 10px; border-radius: 4px; color: var(--ink-2); }
.report-nav a:hover { background: var(--bg); text-decoration: none; }
.report-nav a.on { background: var(--brand); color: #fff; }
.report-nav .grp { font-size: 12px; color: var(--steel); padding: 10px 10px 4px; font-weight: 600; }
.report-filters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.report-filters label { font-size: 12px; margin-bottom: 3px; }
.report-filters .btns { grid-column: 1 / -1; display: flex; gap: 8px; }
.print-only { display: none; }

/* ----- Auth pages ------------------------------------------------------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--brand); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; border-right: 6px solid var(--brand-3); }
.auth-side .big { font-family: var(--font-cond); font-weight: 700; font-size: 52px; line-height: 1; }
.auth-side p { color: rgba(255,255,255,.85); max-width: 380px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card .sub { color: var(--steel); margin-bottom: 22px; }

.foot { max-width: 1480px; margin: 0 auto; padding: 0 20px 24px; display: flex; justify-content: space-between; color: var(--steel); font-size: 12px; }
.foot a.ver { color: var(--steel); }
.foot a.ver:hover { text-decoration: none; color: var(--steel); }
.licence-warn { background: var(--amber-tint); color: var(--amber); border-bottom: 1px solid #f0dbb5; padding: 6px 20px; text-align: center; font-size: 13px; font-weight: 500; }

/* ----- Responsive ------------------------------------------------------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi.lead { grid-column: span 2; border-radius: var(--radius) var(--radius) 0 0; }
  .kpi { border-bottom: 1px solid var(--line-2); }
  .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; }
  .detail-grid, .report-layout { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .more { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .topbar-inner { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .menu-toggle { display: inline-block; margin-left: auto; background: var(--brand-3); color: #fff; border: 0; padding: 7px 12px; border-radius: 4px; font: 500 14px var(--font); }
  .nav, .userbox { display: none; width: 100%; }
  .topbar.open .nav { display: flex; flex-direction: column; }
  .topbar.open .userbox { display: flex; justify-content: space-between; padding-bottom: 8px; }
  .page { padding: 18px 16px 40px; }
  .form-grid > * { grid-column: span 12; }
  .filters, .filters .more, .report-filters { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { padding: 28px 20px; border-right: 0; border-bottom: 6px solid var(--brand-3); }
  .auth-side .big { font-size: 36px; }
  .money-block { grid-template-columns: 1fr; }
  .money-block > div { border-right: 0; border-bottom: 1px solid var(--line-2); }
  dl.facts { grid-template-columns: 120px 1fr; }
  .hbar { grid-template-columns: 90px 1fr 60px; }
  .kpis { grid-template-columns: 1fr; }
  .kpi.lead { grid-column: span 1; }
  .cols, .col-labels { gap: 3px; }
  .col .n { font-size: 10px; }
}

/* ----- Print (reports) -------------------------------------------------- */
@media print {
  body { background: #fff; font-size: 11px; }
  .topbar, .foot, .no-print, .report-nav, .report-filters, .flashes, .licence-warn { display: none !important; }
  .print-only { display: block; }
  .page { padding: 0; max-width: none; }
  .report-layout { grid-template-columns: 1fr; }
  .panel { border: 0; }
  table.data th { position: static; }
  table.data th, table.data td { padding: 4px 6px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ----- v1.1: logo, ASAP, calculated price ------------------------------- */
.brand { flex-direction: row; align-items: center; gap: 12px; }
.brand-logo { height: 34px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.4); }
.auth-logo { width: 220px; max-width: 70%; height: auto; display: block; margin-bottom: 40px; }
.pill-asap { background: #fff1e0; color: #9a4a00; border-color: #f3cf9f; }
.date-asap { display: flex; gap: 8px; align-items: center; }
.date-asap input[type=date] { flex: 1; min-width: 0; }
.asap-toggle { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 7px 10px; border: 1px solid #c6d0da;
  border-radius: 5px; background: #fff; font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.asap-toggle:has(input:checked) { background: #fff1e0; border-color: #e7b26b; color: #9a4a00; }
input.calculated { background: #f3f5f7; color: var(--ink); font-weight: 600; cursor: default; }
@media (max-width: 760px) { .brand-logo { height: 28px; } }
@media print { .print-logo { display: block; height: 40px; margin-bottom: 8px; filter: invert(1); } }
.role-viewer { background: #e3f1f1; color: #1d5f61; }

/* ----- v1.3: clickable dashboard tiles, filter summary ------------------ */
a.kpi { color: inherit; text-decoration: none; display: block; position: relative; transition: background-color .12s; }
a.kpi:hover { background: #fbf3f4; text-decoration: none; }
a.kpi.lead:hover { background: var(--brand-2); }
a.kpi .go { position: absolute; top: 14px; right: 16px; font-size: 12px; color: var(--steel); opacity: 0; transition: opacity .12s; }
a.kpi.lead .go { color: rgba(255,255,255,.85); }
a.kpi:hover .go, a.kpi:focus-visible .go { opacity: 1; }
a.kpi:focus-visible { outline-offset: -3px; }
.filter-summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 16px; margin: 0 16px 12px; border-radius: 5px; background: #fbf3f4; border: 1px solid #efd3d7; font-size: 13px; }
.filter-summary strong { color: var(--brand-3); }
input.caps, textarea.caps { text-transform: uppercase; }
input.caps::placeholder, textarea.caps::placeholder { text-transform: none; }
.pill-won_other { background: #eef6f1; color: #2d6a4a; border: 1px dashed #9cc9ae; }
.link-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; font-size: 11.5px; font-weight: 600; color: var(--steel); background: var(--grey-tint); vertical-align: 1px; }
tr.delete-row td { padding-top: 0 !important; border-top: 0; }
tr.delete-row summary { cursor: pointer; font-size: 12.5px; color: var(--red); }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ----- v1.5: 2-step sign-in --------------------------------------------- */
.setup-steps { padding-left: 20px; margin: 0 0 18px; }
.setup-steps li { margin-bottom: 12px; }
.qr-box { margin: 12px 0 6px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 6px; display: table; line-height: 0; }
.qr-box svg { width: 200px; height: 200px; }
.setup-key { display: block; font: 600 15px ui-monospace, Consolas, monospace; letter-spacing: .04em; background: var(--grey-tint); padding: 8px 10px; border-radius: 4px; word-break: break-all; }
.code-input { font: 600 22px ui-monospace, Consolas, monospace !important; letter-spacing: .25em; text-align: center; }
.backup-codes { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.backup-codes code { font: 600 16px ui-monospace, Consolas, monospace; letter-spacing: .05em; }
.auth-card { max-width: 420px; }

/* ----- v1.6: notes log --------------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.note-add { margin-bottom: 16px; }
.note-add textarea { min-height: 72px; }
.note-add-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; }
.notes-log { list-style: none; margin: 0; padding: 0; }
.notes-log > li { padding: 12px 0 12px 14px; border-left: 3px solid var(--line); margin-bottom: 4px; }
.notes-log > li:first-child { border-left-color: var(--brand); }
.note-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13px; margin-bottom: 4px; }
.note-meta time { color: var(--steel); }
.note-tag { font-size: 11.5px; padding: 1px 7px; border-radius: 4px; background: var(--grey-tint); color: var(--ink-2); }
.note-edit-link { font-size: 12.5px; margin-left: auto; }
.note-body { line-height: 1.5; }
.note-orig { margin-top: 6px; font-size: 13px; }
.note-orig summary { cursor: pointer; color: var(--steel); }
.note-orig .prose { margin-top: 4px; padding: 6px 10px; background: #f8fafb; border-radius: 4px; }
