/* AE Client Dashboard theme: near-black, white text, glass cards, black and white only. */
:root {
  --bg: #0a0a0a;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.12);
  --glass: rgba(255, 255, 255, 0.045);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: var(--font); line-height: 1.5; -webkit-font-smoothing: antialiased;
  /* faint white radial glow so the glass has something to blur */
  background-image: radial-gradient(900px 500px at 15% -10%, rgba(255,255,255,0.07), transparent 60%),
                    radial-gradient(700px 400px at 100% 0%, rgba(255,255,255,0.04), transparent 60%);
  background-attachment: fixed;
}
a { color: var(--text); text-underline-offset: 3px; }
h1 { font-size: 1.5rem; font-weight: 600; margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; font-weight: 600; margin: 2.2rem 0 0.9rem; letter-spacing: -0.01em; }
code { background: var(--glass-strong); padding: 0.1em 0.4em; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.brand { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0; }

.glass {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.pad { padding: 1.5rem; }

/* ---- Buttons and forms ---- */
.btn {
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 999px; padding: 0.7rem 1.4rem;
  background: var(--text); color: var(--bg); border: 1px solid var(--text);
}
.btn:hover { background: rgba(255,255,255,0.85); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); padding: 0.45rem 1rem; font-weight: 500; }
.btn--ghost:hover { background: var(--glass-strong); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: 0.4rem; font-size: 0.9rem; color: var(--muted); }
.form input {
  font: inherit; color: var(--text); background: rgba(0,0,0,0.4); border: 1px solid var(--line);
  border-radius: 10px; padding: 0.7rem 0.85rem;
}
.form input:focus { outline: none; border-color: var(--text); }
.error, .notice { border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.9rem; margin: 0 0 1rem; font-size: 0.92rem; }
.error { border-color: rgba(255,255,255,0.5); }
.error::before { content: "! "; font-weight: 700; }

/* ---- Auth pages ---- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.auth__card { width: min(420px, 100%); padding: 2rem; }
.auth__card .brand { margin-bottom: 1.2rem; }

/* ---- Dashboard ---- */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1rem clamp(1rem, 4vw, 2.5rem); border-bottom: 1px solid var(--line);
}
.topbar__name { margin-left: 1rem; font-weight: 600; }
.wrap { width: min(1100px, 100%); margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 2.5rem) 4rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.card { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.card__name { font-size: 1.05rem; font-weight: 600; margin: 0; }
.card__plan { color: var(--muted); font-size: 0.82rem; margin: 0.1rem 0 0; }
.card__update { margin: 0; }
.card__when { color: var(--muted); font-size: 0.82rem; display: block; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.stats li { background: var(--glass-strong); border-radius: 10px; padding: 0.55rem 0.7rem; }
.stats strong { display: block; font-size: 1.4rem; line-height: 1.2; }
.stats span { color: var(--muted); font-size: 0.78rem; }
.calls { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; border-top: 1px solid var(--line); padding-top: 0.75rem; }
.calls li { font-size: 0.88rem; }
.calls .card__when { display: block; }

/* Status pills: black and white only. Shape and fill carry the meaning, not colour. */
.pill { white-space: nowrap; font-size: 0.76rem; font-weight: 600; border-radius: 999px; padding: 0.22rem 0.7rem; border: 1px solid var(--text); }
.pill::before { content: ""; display: inline-block; width: 0.5em; height: 0.5em; border-radius: 50%; margin-right: 0.45em; background: currentColor; }
.pill--active { background: transparent; color: var(--text); }
.pill--setting_up { border-style: dashed; color: var(--text); }
.pill--setting_up::before { background: transparent; border: 1px solid currentColor; }
.pill--attention { background: var(--text); color: var(--bg); }
.pill--paused { border-color: var(--line); color: var(--muted); }
.pill--ended { border-color: var(--line); color: var(--muted); text-decoration: line-through; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 0.25rem 1rem; padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed__meta { display: grid; gap: 0.3rem; align-content: start; font-size: 0.8rem; color: var(--muted); }
.tag { justify-self: start; border: 1px solid var(--line); border-radius: 999px; padding: 0.05rem 0.55rem; color: var(--text); font-size: 0.72rem; }
.feed__title { margin: 0; font-weight: 600; }
.feed__detail { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.9rem; }
.empty { padding: 1.5rem; color: var(--muted); }
@media (max-width: 560px) { .feed li { grid-template-columns: 1fr; } }
