/* =========================================================================
   LifeDropConnect Admin — styles taken from the approved UI design
   (canvas boards A1–A13). Brand font: Verdana everywhere, dialogs included.
   Drop-in replacement for assets/admin.css — no markup changes needed.
   ========================================================================= */
:root {
  /* Brand */
  --red: #B3101C;        --red-dark: #8E0C16;   --red-ink: #9F0E19;
  --red-soft: #FDECEE;   --red-line: #F3C6CB;
  /* Neutrals */
  --ink: #18181B;        --ink-2: #3F3F46;      --ink-3: #27272A;
  --muted: #57575F;      --placeholder: #8A8A92;
  --side-text: #D4D4D8;  --side-muted: #A1A1AA;
  --line: #E7E5E4;       --line-soft: #F1EFEE;
  --bg: #F5F4F3;         --head: #FAFAF9;       --card: #FFFFFF;
  /* Status */
  --ok: #1F6B44;         --ok-soft: #E3F3EA;    --ok-strong: #1F7A4D;
  --warn: #7A4100;       --warn-soft: #FDE7C8;  --warn-strong: #B45309; --warn-line: #F5D3A0;
  --bad: #9F0E19;        --bad-soft: #FDECEE;
  --info: #1E3A8A;       --info-soft: #DBEAFE;
  /* Shape */
  --r-sm: 9px; --r: 10px; --r-md: 12px; --r-lg: 16px; --r-xl: 18px;
}

* { box-sizing: border-box; }
html, body, button, input, select, textarea, dialog, table, optgroup { font-family: Verdana, Geneva, sans-serif; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); text-decoration: underline; }
h1 { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.25; }
h2 { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
p  { margin: 0 0 10px; }
hr { border: 0; border-top: 1px solid var(--line-soft); }
code, .mono { font-family: Verdana, Geneva, sans-serif; background: var(--line-soft); color: var(--ink); padding: 2px 7px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ---------------------------------------------------------------- Layout */
.shell { display: flex; min-height: 100vh; }

/* Dark sidebar */
.side {
  width: 232px; flex-shrink: 0; background: var(--ink); color: #FFFFFF;
  padding: 24px 14px; display: flex; flex-direction: column; gap: 24px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side::-webkit-scrollbar { width: 6px; }
.side::-webkit-scrollbar-thumb { background: var(--ink-2); border-radius: 3px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-size: 14px; font-weight: 700; color: #FFFFFF; }
.brand .drop {
  width: 36px; height: 36px; border-radius: var(--r); background: var(--red); color: #FFFFFF;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 17px;
}
.side .brand span:last-child::after { content: "Admin console"; display: block; font-size: 12px; font-weight: 400; color: var(--side-muted); margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  min-height: 42px; padding: 0 12px; border-radius: var(--r); display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--side-text); text-decoration: none; margin: 0;
}
.nav a:hover { background: var(--ink-3); color: #FFFFFF; text-decoration: none; }
.nav a.on { background: var(--ink-2); color: #FFFFFF; font-weight: 700; }
.nav .ico { width: 18px; text-align: center; font-size: 16px; flex-shrink: 0; opacity: .95; }
.nav .badge { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--red); color: #FFFFFF; font-size: 12px; font-weight: 700; }
.nav a[href$="appeals"] .badge { background: var(--ink-2); }
.nav a.on[href$="appeals"] .badge { background: var(--ink); }
/* Help center link: outlined, pushed to the bottom */
.side .help { margin-top: auto; }
.side .help a { min-height: 40px; font-size: 13px; border: 1px solid var(--ink-2); }
.side .help a.on { background: var(--ink-2); border-color: var(--ink-2); }
/* Signed-in admin card */
.me { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: var(--r-md); background: var(--ink-3); margin: 0; border: 0; }
.me > div { color: #FFFFFF; }
.me a { color: #FFFFFF; }
.me .small, .me .muted { color: var(--side-muted); }
.me .small a { color: #FCA5A5; }
.avatar {
  width: 34px; height: 34px; border-radius: 17px; background: var(--ink-2); color: #FFFFFF;
  font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Top bar */
.top {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  padding: 16px 32px; background: #FFFFFF; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.top form { flex: 1 1 280px; max-width: 460px; }
.top input[type=search] {
  width: 100%; height: 42px; padding: 0 14px 0 40px; border: 0; border-radius: var(--r-md);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2357575F' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 14px center;
  font-size: 14px;
}
.top input[type=search]:focus { outline: 2px solid var(--red-line); background-color: #FFFFFF; }
.env { margin-left: auto; padding: 6px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 700; }
.env.staging { background: var(--warn-soft); color: var(--warn); }

.content { max-width: none; width: 100%; padding: 28px 32px 40px; display: flex; flex-direction: column; gap: 22px; }
.content > * { margin-bottom: 0; }
.content > .card, .content > .grid, .content > .split, .content > .help-wrap { margin-bottom: 0; }

/* Page heading */
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin: 0; }
.page-head > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.page-head .sub { font-size: 14px; color: var(--muted); margin: 0; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Date-range segmented control (Dashboard / Analytics) */
.page-head .actions.chips, .page-head .actions .chips {
  gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--line); margin: 0;
}
.page-head .chips .chip {
  height: 34px; padding: 0 14px; border-radius: var(--r-sm); border: 0; background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 700;
}
.page-head .chips .chip.on { background: #FFFFFF; color: var(--ink); }

/* ---------------------------------------------------------------- Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px; margin-bottom: 16px; }
.content > .card { margin-bottom: 0; }
.card.tight { padding: 0; overflow: hidden; }
.card.tight > .card-head { padding: 18px 20px 6px !important; }
.card .card-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card .card-head h2 { margin: 0; }
.card .card-head .actions { margin-left: auto; }
.card.empty, .empty { padding: 28px; text-align: center; color: var(--muted); font-size: 13px; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.g6 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.grid > .card { margin-bottom: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.split > div > .card + .card, .split > div > .card + .grid, .split > div > .grid + .card { margin-top: 16px; }
.split > div > .card { margin-bottom: 16px; }

/* KPI tiles */
.kpi { padding: 16px; border-radius: var(--r-lg); background: #FFFFFF; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.kpi:hover { text-decoration: none; color: var(--ink); border-color: #D6D3D1; }
.kpi .label { font-size: 13px; color: var(--muted); }
.kpi .value { font-size: 26px; font-weight: 700; margin: 0; line-height: 1.2; }
.kpi .hint { font-size: 12px; font-weight: 700; color: var(--muted); margin: 0; }
.kpi.alert { border-color: var(--red-line); }
.kpi.alert .hint { color: var(--bad); }

/* ---------------------------------------------------------------- Tables */
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t thead tr { background: var(--head); }
table.t th { text-align: left; font-weight: 700; color: var(--muted); font-size: 13px; padding: 12px 8px; white-space: nowrap; border: 0; }
table.t td { padding: 12px 8px; border: 0; border-top: 1px solid var(--line-soft); vertical-align: top; color: var(--ink); }
table.t th:first-child, table.t td:first-child { padding-left: 16px; }
table.t th:last-child,  table.t td:last-child  { padding-right: 16px; }
.card:not(.tight) table.t th:first-child, .card:not(.tight) table.t td:first-child { padding-left: 0; }
.card:not(.tight) table.t th:last-child,  .card:not(.tight) table.t td:last-child  { padding-right: 0; }
.card:not(.tight) table.t thead tr { background: transparent; }
table.t tbody tr:first-child td { border-top: 1px solid var(--line); }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #FCFBFB; }
table.t tr.sel td { background: var(--red-soft); }
table.t td strong { font-weight: 700; }

/* ---------------------------------------------------------------- Pills, chips, tabs */
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--line-soft); color: var(--ink-2); line-height: 1.3; }
.pill.ok   { background: var(--ok-soft);   color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad  { background: var(--bad-soft);  color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.red  { background: var(--red); color: #FFFFFF; }

/* Filter chips (Users, Volunteers, Requests queues) */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #FFFFFF; color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap;
}
.chip:hover { text-decoration: none; color: var(--ink); border-color: #D6D3D1; }
.chip.on { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.chip .n { font-weight: 400; opacity: .75; }

/* Section tabs (Email sections, Security, Volunteers, Appeals …) */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0; overflow-x: auto; }
.tabs a {
  padding: 12px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent;
  font-size: 14px; color: var(--muted); white-space: nowrap; text-decoration: none;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--red); }

.signal { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 12px; font-weight: 700; margin: 0 4px 6px 0; }

/* ---------------------------------------------------------------- Forms */
label { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search],
input[type=datetime-local], input[type=date], input[type=time], select, textarea {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r);
  background: #FFFFFF; font-size: 13px; color: var(--ink);
}
select { padding-right: 32px; appearance: none;
  background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2357575F' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
textarea { height: auto; min-height: 96px; padding: 12px; line-height: 1.6; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(179, 16, 28, .12); }
input[disabled], select[disabled], textarea[disabled], input[readonly] { background: var(--head); color: var(--muted); }
.field { margin-bottom: 14px; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.row > .field { flex: 1; min-width: 160px; }
.inline { display: inline; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 400; font-size: 13px; margin-bottom: 10px; color: var(--ink); }
.check input { width: 18px; height: 18px; accent-color: var(--red); flex-shrink: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 14px;
  border-radius: var(--r); border: 1px solid var(--line); background: #FFFFFF; color: var(--ink);
  font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { text-decoration: none; color: var(--ink); background: var(--head); border-color: #D6D3D1; }
.btn.primary { height: 42px; padding: 0 18px; border: 0; background: var(--red); color: #FFFFFF; }
.btn.primary:hover { background: var(--red-dark); color: #FFFFFF; }
.btn.dark { border: 0; background: var(--ink); color: #FFFFFF; }
.btn.dark:hover { background: var(--ink-2); color: #FFFFFF; }
.btn.danger { border-color: var(--red-line); color: var(--red-ink); background: #FFFFFF; }
.btn.danger:hover { background: var(--red-soft); color: var(--red-ink); }
.btn.success { border: 0; background: var(--ok-strong); color: #FFFFFF; }
.btn.small { height: 34px; padding: 0 12px; font-size: 12px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- Notices */
.flash { padding: 12px 14px; border-radius: var(--r-md); font-size: 14px; font-weight: 700; margin: 0; }
.flash.ok    { background: var(--ok-soft);  color: var(--ok); }
.flash.error { background: var(--bad-soft); color: var(--bad); }
.note { padding: 12px 14px; border-radius: var(--r-md); background: var(--info-soft); color: var(--info); font-size: 13px; line-height: 1.5; margin-bottom: 12px; }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note.bad  { background: var(--bad-soft);  color: var(--bad); }
.content > .note { margin-bottom: 0; }
.content > form .field, .content > form.row .field { margin-bottom: 0; }
.content > form.row > div:last-child { align-self: flex-end; }

dl.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 12px; margin: 0; font-size: 13px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-weight: 700; }

/* ---------------------------------------------------------------- Lists & charts */
/* Needs attention / Live activity */
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.feed li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; line-height: 1.5; }
.feed li:last-child { border-bottom: 0; }
.feed .when { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; flex-shrink: 0; }
/* Dashboard "Needs attention" rows become coloured blocks like the design */
.feed li:not(:has(.when)):has(> .pill.bad), .feed li:not(:has(.when)):has(> .pill.warn) { padding: 12px; border-radius: var(--r-md); border: 0; margin-bottom: 10px; align-items: center; }
.feed li:not(:has(.when)):has(> .pill.bad)  { background: var(--red-soft); }
.feed li:not(:has(.when)):has(> .pill.warn) { background: var(--warn-soft); }
.feed li:not(:has(.when)):has(> .pill) a { color: var(--ink); font-weight: 700; font-size: 14px; }

.bars { display: flex; flex-direction: column; gap: 10px; }
.bar { display: grid; grid-template-columns: 70px minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 13px; }
.bar > span:first-child { font-weight: 700; }
.bar > span:last-child { font-weight: 700; }
.bar .track { height: 12px; border-radius: 6px; background: var(--line-soft); overflow: hidden; }
.bar .fill { display: block; height: 100%; border-radius: 6px; background: var(--red); }
.bar .fill.dark { background: var(--ink); }
.bar .fill.drop { background: #EF4444; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 110px; }
.spark span { flex: 1; border-radius: 4px 4px 0 0; min-height: 2px; background: var(--red); }

/* Chat transcript (reported chats) */
.msg { max-width: 75%; padding: 10px 12px; border-radius: 14px 14px 14px 4px; margin-bottom: 8px; background: var(--line-soft); font-size: 13px; line-height: 1.5; }
.msg.owner { margin-left: auto; border-radius: 14px 14px 4px 14px; background: var(--red-soft); }
.msg.held { outline: 2px dashed var(--warn-strong); }
.msg .meta { font-size: 11px; color: var(--muted); margin-top: 4px; }

.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 16px; font-size: 13px; border-top: 1px solid var(--line-soft); }

/* ---------------------------------------------------------------- Dialog (Verdana, never the browser's) */
dialog.ldc { border: 0; border-radius: var(--r-xl); padding: 0; width: 440px; max-width: calc(100vw - 32px); box-shadow: 0 24px 64px rgba(24, 24, 27, .28); color: var(--ink); }
dialog.ldc::backdrop { background: rgba(24, 24, 27, .5); }
dialog.ldc .dbody { padding: 22px 22px 6px; }
dialog.ldc h3 { font-size: 20px; margin-bottom: 8px; }
dialog.ldc p { font-size: 14px; color: var(--muted); }
dialog.ldc .dfoot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px 20px; }
dialog.ldc .dfoot .btn { height: 42px; padding: 0 18px; }

/* ---------------------------------------------------------------- Help center & template list */
.help-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.help-wrap > .card:first-child { padding: 12px; position: sticky; top: 92px; }
.help-menu { display: flex; flex-direction: column; gap: 2px; }
.help-menu a { min-height: 40px; padding: 8px 10px; border-radius: var(--r); display: flex; gap: 10px; align-items: center; color: var(--ink); font-size: 13px; text-decoration: none; }
.help-menu a:hover { background: var(--bg); text-decoration: none; color: var(--ink); }
.help-menu a.on { background: var(--red-soft); font-weight: 700; }
.help-menu .num { width: 22px; height: 22px; border-radius: 11px; background: var(--line-soft); color: var(--ink-2); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.help-menu a.on .num { background: var(--red); color: #FFFFFF; }
/* Marked-up screen sketch */
.shot { position: relative; height: 380px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--bg); overflow: hidden; }
.shot .s-side { position: absolute; left: 0; top: 0; bottom: 0; width: 15%; background: var(--ink); }
.shot .s-top  { position: absolute; left: 15%; right: 0; top: 0; height: 9%; background: #FFFFFF; border-bottom: 1px solid var(--line); }
.shot .region { position: absolute; border: 2px solid var(--red); border-radius: var(--r); background: rgba(179, 16, 28, .07); font-size: 12px; font-weight: 700; color: var(--red-ink); padding: 6px 8px; cursor: pointer; }
.shot .region:hover { background: rgba(179, 16, 28, .14); }
.shot .region b { position: absolute; top: -11px; left: -11px; width: 24px; height: 24px; border-radius: 12px; background: var(--red); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-size: 12px; }
ol.steps { padding-left: 20px; margin: 0; }
ol.steps li { margin-bottom: 8px; font-size: 13px; line-height: 1.6; }

/* ---------------------------------------------------------------- Email templates */
.preview-frame { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); }
.var-chip { display: inline-block; margin: 0 6px 6px 0; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: #FFFFFF; font-size: 12px; font-weight: 700; cursor: pointer; }
.var-chip:hover { border-color: #D6D3D1; background: var(--head); }
.var-chip.req { border-color: var(--red-line); background: var(--red-soft); color: var(--red-ink); }

/* Admin team permission grid */
.perm-grid select { height: 36px; min-width: 100px; font-size: 13px; }
.custom { color: var(--warn); font-size: 11px; font-weight: 700; margin-left: 6px; text-transform: lowercase; }

/* ---------------------------------------------------------------- Sign-in pages */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.auth .box { width: 420px; max-width: 100%; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 32px; }
.auth .brand { padding: 0 0 22px; color: var(--ink); font-size: 16px; }
.auth h1 { font-size: 24px; }
.auth .btn.primary { width: 100%; height: 44px; }
.secret { font-size: 16px; font-weight: 700; letter-spacing: 2px; word-break: break-all; background: var(--bg); padding: 12px; border-radius: var(--r); text-align: center; }

/* ---------------------------------------------------------------- Responsive */
@media (min-width: 1800px) { .g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } .split { grid-template-columns: minmax(0, 1fr) 460px; } }
@media (max-width: 1200px) { .split { grid-template-columns: 1fr; } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; padding: 16px 12px; gap: 12px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav a { min-height: 36px; }
  .side .help { margin-top: 0; }
  .top { padding: 12px 16px; }
  .content { padding: 20px 16px 32px; }
  .g3, .help-wrap { grid-template-columns: 1fr; }
  .help-wrap > .card:first-child { position: static; }
}
@media (prefers-reduced-motion: no-preference) { .btn, .chip, .nav a, .kpi { transition: background-color .15s, border-color .15s, color .15s; } }
input[type=file] { width: 100%; padding: 10px; border: 1px dashed #D6D3D1; border-radius: var(--r); background: var(--head); font-size: 13px; }

/* =========================================================================
   v2 — lifedropconnect_db backend: logo in the sidebar, SVG icons, brand-red
   active item, Verdana one step larger (base 14px).
   ========================================================================= */
.side { width: 252px; }
.brand { gap: 12px; }
.brand .logo { width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; background: #FFFFFF; padding: 4px; display: flex; align-items: center; justify-content: center; }
.brand .logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand .name { line-height: 1.3; }
.brand .name small { display: block; font-size: 12px; font-weight: 400; color: var(--side-muted); }
.side .brand span:last-child::after { content: none; }
.nav a { gap: 12px; }
.nav a svg { flex-shrink: 0; opacity: .9; }
.nav a.on { background: var(--red); color: #FFFFFF; }
.nav a.on svg { opacity: 1; }
.nav a.on .badge, .nav a.on[href$="appeals"] .badge { background: #FFFFFF; color: var(--red); }
.nav .group { margin: 14px 12px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--side-muted); font-weight: 700; }
.top .bell { position: relative; width: 40px; height: 40px; border-radius: var(--r); border: 1px solid var(--line); background: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.top .bell .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.top .who { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 1.3; color: var(--ink); }
.top .who .avatar { background: var(--ink); color: #FFFFFF; }
.top .who:hover { text-decoration: none; color: var(--ink); }
.bg { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 30px; padding: 0 7px; border-radius: 8px; background: var(--red-soft); color: var(--red); font-size: 13px; font-weight: 700; }
.code { display: inline-block; background: var(--line-soft); padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; word-break: break-word; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; }
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 999px; background: #D4D4D8; position: relative; cursor: pointer; flex-shrink: 0; margin: 0; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #FFFFFF; transition: left .15s; }
.switch input:checked { background: var(--red); }
.switch input:checked::after { left: 21px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.mono { font-family: "Courier New", monospace; font-size: 13px; }
details.more summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--red); }
.auth .brand .logo { background: transparent; padding: 0; width: 48px; height: 48px; }
@media (max-width: 960px) { .side { width: 100%; } .kv { grid-template-columns: 1fr; } }
.nav a { min-height: 38px; }
.side { gap: 18px; }
