/* Copper Leaf design tokens (from the Copper Leaf Media Design System) */
:root {
  --orange: #ff7800; --crimson: #f22a5c; --purple: #8900b5; --navy: #192341; --grey: #787878;
  --grad: linear-gradient(135deg, #f22a5b 0%, #ff7713 100%);
  --bg: #f5f6f8; --surface: #ffffff; --text: #192341; --muted: #5f6573;
  --border-subtle: #e3e5ea; --border: #cfd3db;
  --ok: #1f8a4c; --warn: #b86a00; --bad: #c21f48;
  --r-card: 12px; --r-pill: 999px;
  --shadow: 0 1px 2px rgba(25,35,65,.06), 0 4px 16px rgba(25,35,65,.06);
  --shadow-hover: 0 2px 4px rgba(25,35,65,.08), 0 8px 24px rgba(25,35,65,.10);
  --ease: cubic-bezier(.4,0,.2,1);
  --f-head: 'Montserrat', system-ui, sans-serif;
  --f-body: 'Roboto', system-ui, sans-serif;
  --f-mono: 'Roboto Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--f-body); color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.5; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--f-head); text-transform: lowercase; margin: 0 0 8px; line-height: 1.2; }
h1 { font-size: 32px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; margin-top: 20px; }
p { margin: 0 0 12px; }
a { color: var(--purple); }
.eyebrow { font-family: var(--f-head); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--grey); margin: 0 0 8px; }
.pill-bar { display: block; width: 48px; height: 4px; border-radius: var(--r-pill); background: var(--grad); margin: 4px 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
:focus-visible { outline: 2px solid var(--crimson); outline-offset: 2px; }

/* buttons: lowercase, pill */
.btn { font-family: var(--f-head); font-weight: 600; font-size: 14px; text-transform: lowercase; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--surface); color: var(--navy); border-radius: var(--r-pill); padding: 9px 18px;
  cursor: pointer; text-decoration: none; transition: transform 140ms var(--ease), box-shadow 140ms var(--ease), background 140ms var(--ease); }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--grad); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn[disabled] { opacity: .5; cursor: progress; transform: none; box-shadow: none; }
.link { background: none; border: 0; padding: 0; color: rgba(255,255,255,.75); font: inherit; font-size: 13px; cursor: pointer; text-transform: lowercase; }
.link:hover { color: #fff; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.row.end { justify-content: flex-end; }

/* sign-in */
.signin { min-height: 100%; display: grid; place-items: center; padding: 24px; background: var(--navy); }
.signin-card { background: var(--surface); border-radius: var(--r-card); padding: 40px; max-width: 420px; width: 100%; box-shadow: var(--shadow); }
.signin-leaf { width: 40px; height: 40px; margin-bottom: 16px; }

/* shell */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100%; }
.sidebar { background: var(--navy); color: #fff; display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-head); font-weight: 700; font-size: 20px; padding: 4px 8px 20px; }
.brand img { width: 28px; height: 28px; }
nav { display: flex; flex-direction: column; gap: 2px; }
.nav { text-align: left; background: none; border: 0; color: rgba(255,255,255,.8); font-family: var(--f-head); font-weight: 500; font-size: 14px;
  padding: 9px 12px; border-radius: 8px; cursor: pointer; text-transform: lowercase; transition: background 140ms var(--ease); }
.nav:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav.on { background: rgba(255,255,255,.14); color: #fff; }
.side-foot { margin-top: auto; padding: 12px 8px 0; align-items: flex-start; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; gap: 6px; }
.me { font-size: 13px; color: rgba(255,255,255,.9); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ver { font-family: var(--f-mono); font-size: 11px; color: rgba(255,255,255,.5); }
.main { padding: 40px 48px; max-width: 1040px; }

/* cards: accents only on the top edge */
.card { background: var(--surface); border-radius: var(--r-card); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; position: relative; overflow: hidden; }
.card.top-accent::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--grad); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.chip { font-family: var(--f-head); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: var(--r-pill); background: #eceef2; color: var(--muted); text-transform: lowercase; white-space: nowrap; }
.chip.ok { background: #e3f4ea; color: var(--ok); }
.chip.warn { background: #fdf0dc; color: var(--warn); }
.chip.bad { background: #fde6ec; color: var(--bad); }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 6px 16px; margin: 8px 0 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.mono { font-family: var(--f-mono); font-size: 13px; }
.out { margin-top: 14px; padding: 12px 14px; border-radius: 8px; background: #f1f2f5; font-size: 14px; }
.out.bad { background: #fde6ec; color: var(--bad); }
.out ul { margin: 6px 0 0; padding-left: 18px; }

/* tables: 2px navy under headers, 1px subtle between rows */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.tbl th { text-align: left; font-family: var(--f-head); font-weight: 600; font-size: 12px; text-transform: lowercase; padding: 8px 10px; border-bottom: 2px solid var(--navy); }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
.tbl select { font: inherit; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--border); background: #fff; }

/* modal + toast */
.modal { position: fixed; inset: 0; background: rgba(25,35,65,.45); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal-card { background: var(--surface); border-radius: var(--r-card); padding: 28px; max-width: 440px; width: 100%; box-shadow: var(--shadow-hover); }
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-hover); z-index: 60; font-size: 14px; }

/* plain notice pages (errors during sign-in) */
body.plain { display: grid; place-items: center; min-height: 100%; padding: 24px; }
.notice { background: var(--surface); padding: 32px; border-radius: var(--r-card); box-shadow: var(--shadow); max-width: 520px; }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .main { padding: 24px 16px; }
  .kv { grid-template-columns: 1fr; }
}
