/* ChurchLingual shared brand — refined dark UI (Railway/OpenAI-inspired), #64b5f6 accent to match the iOS app. */
:root {
  --bg: #0b0e13;            /* near-black app background */
  --bg-glow: #11203a;       /* subtle blue glow at the very top */
  --panel: #0f131a;         /* sidebar / raised panels */
  --card: #131820;          /* cards */
  --card-2: #1a212b;        /* inputs / secondary buttons */
  --border: #222b36;        /* hairline borders */
  --border-2: #2c3744;      /* hover / stronger borders */
  --accent: #64b5f6;
  --accent-ink: #08233f;
  --accent-soft: #16314e;   /* tinted backgrounds for active nav */
  --text: #e8edf2;
  --muted: #93a1b2;
  --faint: #6b7a8c;
  --danger: #ff7b7b;
  --ok: #5df0a0;
  --warn: #f4b942;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(255,255,255,0.02) inset, 0 8px 30px rgba(0,0,0,0.35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(1200px 480px at 50% -260px, var(--bg-glow) 0%, transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
h1 { font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: 0.01em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; font-weight: 500; }
input, select, textarea {
  width: 100%; padding: 11px 12px; font-size: 15px; background: #0a0d12; color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(100,181,246,0.15); }
input::placeholder, textarea::placeholder { color: var(--faint); }

button { font-family: inherit; cursor: pointer; border: none; border-radius: 10px; font-weight: 600; transition: filter .15s, background .15s; }
button:hover { filter: brightness(1.06); }
.btn-primary { background: var(--accent); color: var(--accent-ink); padding: 12px 16px; font-size: 15px; }
.btn-ghost { background: var(--card-2); color: var(--text); border: 1px solid var(--border); padding: 11px 16px; }
.btn-ghost:hover { border-color: var(--border-2); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid #3a2226; padding: 11px 16px; }
.btn-danger:hover { background: #2a1518; }
.full { width: 100%; }
.err { color: var(--danger); font-size: 14px; min-height: 18px; }
.ok { color: var(--ok); }
.hidden { display: none !important; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid transparent; }
.badge.active { background: rgba(93,240,160,0.10); color: var(--ok); border-color: rgba(93,240,160,0.25); }
.badge.trial  { background: rgba(244,185,66,0.10); color: var(--warn); border-color: rgba(244,185,66,0.25); }
.badge.none   { background: var(--card-2); color: var(--muted); border-color: var(--border); }

/* ───────────── Marketing top nav (public pages) ───────────── */
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 22px; border-bottom: 1px solid var(--border);
  background: rgba(11,14,19,0.72); backdrop-filter: saturate(140%) blur(12px);
  position: sticky; top: 0; z-index: 50; }
.site-nav .brand { font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.site-nav .brand::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.site-nav nav { display: flex; gap: 4px; align-items: center; }
.site-nav nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; padding: 7px 11px; border-radius: 8px; transition: color .15s, background .15s; }
.site-nav nav a:hover { color: var(--text); background: var(--card-2); text-decoration: none; }
.site-nav nav a.active { color: var(--accent); }
.site-nav nav a.cta { background: var(--accent); color: var(--accent-ink); font-weight: 600; margin-left: 4px; }
.site-nav nav a.cta:hover { background: var(--accent); filter: brightness(1.07); }
.site-nav .hamburger { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.site-nav .hamburger:hover { background: var(--card-2); }
.site-nav .hamburger svg { display: block; width: 24px; height: 24px; }
@media (max-width: 860px) {
  .site-nav .hamburger { display: block; }
  .site-nav nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--panel); border-bottom: 1px solid var(--border); padding: 10px 14px; box-shadow: 0 18px 40px rgba(0,0,0,0.4); }
  .site-nav.open nav { display: flex; }
  .site-nav nav a { padding: 12px; font-size: 15px; }
  .site-nav nav a.cta { text-align: center; margin: 6px 0 0; }
}

/* ───────────── Dashboard app shell (logged-in account) ───────────── */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; align-self: start; height: 100vh; display: flex; flex-direction: column;
  background: var(--panel); border-right: 1px solid var(--border); padding: 18px 14px; }
.side .brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; color: var(--text); padding: 6px 8px 16px; letter-spacing: -0.02em; }
.side .brand::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.side .navlist { display: flex; flex-direction: column; gap: 2px; }
.side .navlist button { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  background: transparent; color: var(--muted); padding: 9px 11px; border-radius: 9px; font-size: 14.5px; font-weight: 500; }
.side .navlist button:hover { background: var(--card-2); color: var(--text); filter: none; }
.side .navlist button.on { background: var(--accent-soft); color: var(--accent); }
.side .navlist button .ic { width: 18px; height: 18px; flex: none; opacity: 0.9; }
.side .spacer { flex: 1; }
.side .golive { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 600; padding: 11px; border-radius: 10px; text-decoration: none; font-size: 14.5px; margin: 8px 4px 14px; }
.side .golive:hover { filter: brightness(1.07); text-decoration: none; }
.side .who { border-top: 1px solid var(--border); padding: 12px 8px 2px; }
.side .who .name { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .who .email { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .who button { background: none; color: var(--muted); font-size: 12.5px; padding: 6px 0 0; font-weight: 500; }
.side .who button:hover { color: var(--text); filter: none; }

.main { padding: 38px 44px 80px; max-width: 920px; }
.main .page-head { margin-bottom: 26px; }
.main .page-head h1 { font-size: 26px; margin: 0 0 4px; }
.main .page-head p { color: var(--muted); font-size: 14.5px; margin: 0; }
.panel { display: none; }
.panel.on { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.tile { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.tile .k { font-size: 12px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.tile .v { font-size: 24px; font-weight: 700; margin-top: 6px; letter-spacing: -0.02em; }
.tile .v small { font-size: 14px; color: var(--faint); font-weight: 500; }

/* Section card with header */
.sec { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.sec h3 { margin: 0 0 4px; font-size: 16px; font-weight: 650; }
.sec .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }

@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; border-right: none; border-bottom: 1px solid var(--border); }
  .side .brand { padding: 4px 8px; }
  .side .navlist { flex-direction: row; flex-wrap: wrap; flex: 1 1 100%; order: 3; }
  .side .navlist button { width: auto; }
  .side .spacer { display: none; }
  .side .golive { margin: 0 0 0 auto; order: 2; padding: 9px 14px; }
  .side .who { border-top: none; border-left: 1px solid var(--border); padding: 2px 0 2px 12px; order: 4; }
  .main { padding: 26px 18px 70px; }
}
