/* Inter (SIL Open Font License, see /fonts/LICENSE-Inter.txt) – self-hosted, no Google Fonts request */
@font-face {
  font-family: Inter; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: Inter; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --bg: #0b0b0f;
  --bg-2: #121219;
  --card: #17171f;
  --card-2: #1e1e29;
  --line: #2a2a37;
  --line-2: #3a3a4a;
  --text: #f1f1f5;
  --muted: #9a9aae;
  --faint: #6b6b7e;
  --accent: #ff4f7b;
  --accent-2: #ffb547;
  --ok: #3ddc97;
  --info: #5aa9ff;
  --warn: #ffb547;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background: radial-gradient(1100px 560px at 85% -10%, #2a1022 0%, transparent 60%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
h1, h2, h3 { letter-spacing: -0.02em; }

/* --- Buttons & inputs --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-2); background: var(--card-2); color: var(--text);
  padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover { background: #262634; border-color: #4a4a5c; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #ff3a6c; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--card); }
.btn.danger:hover { color: #ff8aa5; border-color: #6a2a3b; }
.btn.small { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 500; }
.input, textarea.input, select.input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; outline: none; transition: border-color .15s;
}
.input:focus { border-color: var(--accent); }
textarea.input { resize: vertical; min-height: 80px; line-height: 1.45; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.error-msg { color: #ff9cb3; font-size: 13px; min-height: 18px; margin: 4px 0 10px; }

/* --- Brand --- */
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 500; white-space: nowrap; }
.brand strong { color: var(--accent); font-weight: 800; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 14px;
}

/* --- Status pills --- */
.status {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.sent { color: var(--faint); border-color: var(--line); }
.status.opened { color: var(--info); background: #5aa9ff14; }
.status.listened { color: var(--warn); background: #ffb54714; }
.status.downloaded { color: var(--ok); background: #3ddc9714; }
.status.followup { color: var(--accent); background: #ff4f7b14; }

/* --- Misc --- */
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.loading { display: grid; place-items: center; padding: 80px 0; color: var(--muted); }
.spinner { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
