/* Theresa's Back Office — atmosphere first.
   Kitchen-Table Test: serif display + handwritten script + lavender/dusty-rose.
   Not a tech product. The woman with the kettle and the rosary. */

:root {
  --bg: #fbf6f3;
  --bg-warm: #f5ecea;
  --paper: #fffefb;
  --ink: #3a2f3d;
  --ink-soft: #6b5b6e;
  --ink-faint: #9c8e9e;
  --rose: #b97a8a;
  --rose-soft: #d9a8b3;
  --lavender: #9d8ab8;
  --lavender-soft: #cdc1de;
  --gold: #c9a96a;
  --line: #ead9d9;
  --shadow: 0 1px 3px rgba(58, 47, 61, 0.06),
            0 8px 24px rgba(58, 47, 61, 0.05);

  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Dancing Script", "Brush Script MT", cursive;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--lavender); text-decoration: none; }
a:hover { color: var(--rose); }

/* ───────── Flashes ───────── */
.flashes {
  max-width: 520px;
  margin: 1rem auto 0;
  padding: 0 1rem;
}
.flash {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  font-family: var(--serif);
}
.flash--error {
  background: #f7e3e3;
  color: #7a3a3a;
  border: 1px solid #e9c2c2;
}
.flash--info {
  background: #ece5f0;
  color: #4d3d5e;
  border: 1px solid #d4c6dd;
}

/* ═══════════════ LOGIN ═══════════════ */
.page-login {
  background: linear-gradient(165deg, #f7ecea 0%, #ece4f0 100%);
  min-height: 100vh;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-card {
  background: var(--paper);
  border-radius: 14px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.login-hello {
  font-family: var(--script);
  font-size: 1.6rem;
  color: var(--rose);
  margin: 0;
  font-weight: 500;
}

.login-name {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0.25rem 0 0.5rem;
  letter-spacing: -0.01em;
}

.login-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0 0 2rem;
}

.login-form {
  text-align: left;
  margin-bottom: 1.75rem;
}

.login-label {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 0.4rem;
}

.login-input {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}
.login-input:focus {
  outline: none;
  border-color: var(--lavender);
  background: var(--paper);
}

.login-btn {
  margin-top: 1rem;
  width: 100%;
  font-family: var(--serif);
  font-size: 1.1rem;
  padding: 0.7rem 1rem;
  background: var(--lavender);
  color: var(--paper);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.15s, transform 0.1s;
}
.login-btn:hover { background: var(--rose); }
.login-btn:active { transform: translateY(1px); }

.login-blessing {
  font-family: var(--script);
  font-size: 1.25rem;
  color: var(--gold);
  margin: 0;
}

/* ═══════════════ DASHBOARD ═══════════════ */
.page-dashboard { background: var(--bg); }

.topbar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-brand { display: flex; align-items: baseline; gap: 0.5rem; }
.topbar-script {
  font-family: var(--script);
  font-size: 1.5rem;
  color: var(--rose);
}
.topbar-serif {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.topbar-greeting {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.topbar-link {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.topbar-link:hover { color: var(--rose); }

.dash {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.dash-intro { margin-bottom: 2rem; }
.dash-eyebrow {
  font-family: var(--script);
  font-size: 1.3rem;
  color: var(--gold);
  margin: 0;
}
.dash-title {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0.25rem 0 0;
  letter-spacing: -0.01em;
}

/* ── Counters row ── */
.counters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (max-width: 900px) {
  .counters { grid-template-columns: repeat(2, 1fr); }
}
.counter {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}
.counter-label {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0 0 0.4rem;
  letter-spacing: 0.01em;
}
.counter-value {
  font-family: var(--serif);
  font-size: 2.75rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  line-height: 1;
}
.counter-foot {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin: 0.4rem 0 0;
}
.counter--placeholder { background: var(--bg-warm); }
.counter--placeholder .counter-value { color: var(--ink-faint); }

/* ── Card grid ── */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (max-width: 800px) {
  .dash-grid { grid-template-columns: 1fr; }
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
}
.card--wide { grid-column: 1 / -1; }
.card-head { margin-bottom: 1rem; }
.card-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.005em;
}
.card-sub {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0.2rem 0 0;
}
.card-empty {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-faint);
  margin: 0;
}

/* ── Signups list ── */
.signups { list-style: none; padding: 0; margin: 0; }
.signup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
  border-bottom: 1px dashed var(--line);
  gap: 1rem;
}
.signup:last-child { border-bottom: none; }
.signup-main { display: flex; flex-direction: column; min-width: 0; }
.signup-name {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
}
.signup-email {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.signup-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex-shrink: 0;
}
.signup-source {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--lavender);
  text-transform: lowercase;
  letter-spacing: 0.04em;
}
.signup-time {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ── Bar chart ── */
.bars { list-style: none; padding: 0; margin: 0; }
.bar { padding: 0.6rem 0; }
.bar-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}
.bar-label {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
}
.bar-count {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink-soft);
}
.bar-track {
  height: 6px;
  background: var(--bg-warm);
  border-radius: 4px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--lavender) 0%, var(--rose) 100%);
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* ── Status list ── */
.status-list { list-style: none; padding: 0; margin: 0; }
.status-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--line);
}
.status-row:last-child { border-bottom: none; }
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink-faint);
}
.status-dot--active { background: var(--lavender); }
.status-dot--unsubscribed { background: var(--ink-faint); }
.status-dot--bounced { background: #c47878; }
.status-dot--complained { background: #b85a5a; }
.status-dot--suppressed { background: var(--ink-faint); }
.status-dot--new { background: var(--gold); }
.status-label {
  font-family: var(--serif);
  flex: 1;
  color: var(--ink);
}
.status-count {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink-soft);
}

/* ── Placeholder cards ── */
.card--soon {
  background: var(--bg-warm);
  border-style: dashed;
}
.card--soon .card-title { color: var(--ink-soft); }
.card-soon-body {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}
.card-soon-tag {
  font-family: var(--script);
  font-size: 1.1rem;
  color: var(--gold);
  margin: 0;
}

/* ── Footer ── */
.dash-foot {
  margin-top: 3rem;
  text-align: center;
}
.dash-foot-line {
  font-family: var(--script);
  font-size: 1.4rem;
  color: var(--rose);
  margin: 0;
}
.dash-foot-meta {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin: 0.5rem 0 0;
}
.dash-foot-link {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--lavender);
}
