:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #697386;
  --line: #dfe3ea;
  --paper: #ffffff;
  --canvas: #f5f7fa;
  --accent: #6644ee;
  --accent-soft: #eeeaff;
  --sidebar: #111827;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 15px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; }
button, input { font: inherit; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar { background: var(--sidebar); color: white; padding: 34px 24px; display: flex; flex-direction: column; }
.brand { font-size: 25px; font-weight: 800; letter-spacing: .12em; }
.caption { color: #9ca3af; font-size: 12px; margin: 2px 0 44px; text-transform: uppercase; letter-spacing: .1em; }
nav a { display: block; color: #cbd5e1; padding: 11px 13px; text-decoration: none; border-radius: 7px; }
nav a.active { background: rgba(255,255,255,.1); color: white; font-weight: 700; }
.quiet { margin-top: auto; color: #cbd5e1; background: transparent; border: 0; padding: 10px; text-align: left; cursor: pointer; }
.login-panel { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(17,24,39,.96); }
.login-panel[hidden] { display: none; }
.login-card { width: min(430px, 100%); display: grid; gap: 10px; padding: 32px; border-radius: 9px; background: white; box-shadow: 0 28px 80px rgba(0,0,0,.3); }
.login-card h1 { font-size: 29px; }
.login-card p { margin: 0 0 8px; }
.login-card label { margin-top: 5px; }
.login-card input { width: 100%; }
main { width: min(1050px, calc(100% - 64px)); margin: 0 auto; padding: 54px 0 80px; }
header, .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
h1 { font-size: 38px; margin: 0; letter-spacing: -.03em; }
h2 { font-size: 22px; margin: 0 0 7px; }
p { color: var(--muted); }
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.lede { margin: 7px 0 38px; }
.status { background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 7px 12px; font-size: 12px; font-weight: 750; }
.card, .metric { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.form-card { padding: 25px; margin-bottom: 38px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 36px; }
label { display: block; font-size: 13px; font-weight: 750; margin-bottom: 7px; }
.field-row { display: flex; gap: 10px; }
input { min-width: 0; flex: 1; border: 1px solid #c8ced8; border-radius: 6px; padding: 11px 12px; }
button { border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: white; padding: 10px 15px; font-weight: 750; cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
.secondary { background: white; color: var(--accent); }
.message { min-height: 22px; margin: 9px 0 0; font-size: 13px; }
.message.success { color: #147a4a; }
.message.error { color: #b42318; }
.section-heading { align-items: center; margin-bottom: 15px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.metric { padding: 21px; min-height: 116px; display: flex; flex-direction: column; justify-content: space-between; }
.metric span { color: var(--muted); font-size: 13px; }
.metric strong { font-size: 28px; }
.note { font-size: 13px; }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; padding: 22px; }
  .caption { margin-bottom: 16px; }
  .quiet { display: none; }
  main { width: min(100% - 32px, 680px); padding-top: 32px; }
  .form-card { grid-template-columns: 1fr; gap: 16px; }
  .field-row { flex-direction: column; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
}

.contact-counts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; border-top: 1px solid var(--line); padding-top: 20px; }
.contact-counts > div { display: flex; flex-direction: column; gap: 8px; }
.contact-counts span { color: var(--muted); font-size: 13px; }
.contact-counts strong { font-size: 26px; }
.contact-list { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 20px; }
.bulk-import { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 8px; }
.bulk-import code { font-family: inherit; }
.list-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.list-heading h3 { margin: 0; font-size: 17px; }
.list-heading span { color: var(--muted); font-size: 12px; }
.contact-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(100px, 1fr)) auto; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding: 12px 0; font-size: 13px; }
.contact-row span { color: var(--muted); }
.contact-row .email { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.contact-row button { padding: 6px 10px; font-size: 12px; background: white; color: #b42318; border-color: #e1aaa4; }
@media (max-width: 700px) { .contact-row { grid-template-columns: 1fr 1fr; } .contact-row button { justify-self: start; } }
@media (max-width: 700px) { .contact-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
