/* Niche Content Lab shared app styles
   Palette: black #000, mint #4ade80, purple #9b8cf5, cyan #67e8f9
   Fonts: Playfair Display (display), Inter (body)
*/

:root {
  --bg: #000000;
  --bg-elev: #0a0a0a;
  --bg-card: #0f0f0f;
  --border: #1f1f1f;
  --border-strong: #2a2a2a;
  --text: #f5f5f5;
  --text-dim: #a3a3a3;
  --text-muted: #6b6b6b;
  --mint: #4ade80;
  --mint-dim: rgba(74, 222, 128, 0.12);
  --purple: #9b8cf5;
  --purple-dim: rgba(155, 140, 245, 0.12);
  --cyan: #67e8f9;
  --cyan-dim: rgba(103, 232, 249, 0.12);
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 8px;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body { overflow-x: hidden; }

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: 2rem; line-height: 1.15; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; font-family: 'Inter', sans-serif; font-weight: 600; letter-spacing: -0.005em; }

a { color: var(--mint); text-decoration: none; }
a:hover { opacity: 0.85; }

/* Background atmosphere */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 600px at 12% 0%, rgba(74, 222, 128, 0.07), transparent 60%),
    radial-gradient(700px 500px at 88% 100%, rgba(155, 140, 245, 0.06), transparent 65%);
}

/* ====== LAYOUT: sidebar + main ====== */
.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  padding: 4px 12px 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.sidebar-brand span { color: var(--mint); }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 120ms ease, color 120ms ease;
}
.nav a:hover { background: var(--bg-card); color: var(--text); opacity: 1; }
.nav a.active {
  background: var(--mint-dim);
  color: var(--mint);
}
.nav a .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-foot {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-foot a { color: var(--text-dim); }

.main {
  padding: 32px 40px 64px;
  max-width: 1100px;
  width: 100%;
}

.page-head { margin-bottom: 28px; }
.page-head h1 { margin-bottom: 6px; }
.page-head p { color: var(--text-dim); font-size: 0.98rem; }

/* ====== CARDS ====== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card + .card { margin-top: 16px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.stat .label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.stat .value { font-family: 'Playfair Display', serif; font-size: 2rem; margin-top: 8px; color: var(--text); }
.stat .meta { font-size: 0.82rem; color: var(--text-dim); margin-top: 6px; }
.stat.mint .value { color: var(--mint); }
.stat.purple .value { color: var(--purple); }
.stat.cyan .value { color: var(--cyan); }

/* ====== FORMS ====== */
label.field { display: block; margin-bottom: 16px; }
label.field > span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.input, .select, .textarea {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 11px 14px;
  outline: none;
  transition: border-color 120ms ease, background 120ms ease;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--mint);
  background: #111;
}
.textarea { resize: vertical; min-height: 110px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 80ms ease, background 120ms ease, border-color 120ms ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--mint); color: #001a08; }
.btn-primary:hover { background: #6ee7a0; opacity: 1; }

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: var(--bg-card); }

.btn-block { width: 100%; }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ====== PILLS / BADGES ====== */
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.pill.mint { background: var(--mint-dim); color: var(--mint); }
.pill.purple { background: var(--purple-dim); color: var(--purple); }
.pill.cyan { background: var(--cyan-dim); color: var(--cyan); }
.pill.muted { background: var(--bg-elev); color: var(--text-muted); border: 1px solid var(--border); }

/* ====== EMPTY STATES ====== */
.empty {
  text-align: center;
  padding: 56px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-dim);
}
.empty h3 { color: var(--text); margin-bottom: 8px; }
.empty p { font-size: 0.93rem; margin-bottom: 18px; }

/* ====== AUTH PAGES (no sidebar) ====== */
.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px 32px;
}
.auth-brand {
  text-align: center;
  margin-bottom: 24px;
}
.auth-brand a {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  color: var(--text);
}
.auth-brand a span { color: var(--mint); }
.auth-card h1 {
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 6px;
}
.auth-card .sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 26px;
}
.auth-foot {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-top: 18px;
}

/* ====== UTILITY ====== */
.row { display: flex; gap: 16px; align-items: center; }
.row.between { justify-content: space-between; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.muted { color: var(--text-dim); }
.small { font-size: 0.86rem; }
.hide-on-mobile { }

/* ====== RESPONSIVE ====== */
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    align-items: center;
    padding: 14px 16px;
    overflow-x: auto;
  }
  .sidebar-brand { border: none; padding: 0 14px 0 0; margin: 0; flex-shrink: 0; }
  .nav { flex-direction: row; gap: 6px; }
  .nav a { padding: 8px 12px; white-space: nowrap; }
  .nav a .icon { display: none; }
  .sidebar-foot { display: none; }
  .main { padding: 24px 18px 48px; }
}
