/* =============================================
   MemberStream — Tema Estação Pedrinhas
   Paleta: Azul-noite + Dourado
   ============================================= */

:root {
  --bg-base:     #0d0d1a;
  --bg-card:     #141428;
  --bg-hover:    #1e1e38;
  --bg-modal:    #1a1a30;
  --accent:      #c8a96e;
  --accent-hover:#9a7a40;
  --accent-dim:  rgba(200,169,110,0.12);
  --success:     #4ade80;
  --warning:     #fbbf24;
  --danger:      #f87171;
  --text-1:      #e8e4dc;
  --text-2:      #a89f90;
  --text-3:      #5a5248;
  --border:      rgba(200,169,110,0.12);
  --border-md:   rgba(200,169,110,0.25);
  --radius-sm:   4px;
  --radius-md:   4px;
  --radius-lg:   6px;
  --shadow:      0 8px 40px rgba(0,0,0,0.5);
  --trans:       all 0.35s cubic-bezier(0.4,0,0.2,1);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Crimson Pro', 'Georgia', serif;
  background: var(--bg-base);
  color: var(--text-1);
  line-height: 1.7;
  min-height: 100vh;
}

/* Importar fontes do site da igreja */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Crimson+Pro:wght@300;400;500&family=Montserrat:wght@300;400;500;600&display=swap');

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ---- UTILITÁRIOS ---- */
.text-muted  { color: var(--text-2); }
.text-small  { font-size: 13px; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }  .mt-2 { margin-top: 16px; }  .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .items-center { align-items: center; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }

/* ---- FLASH ---- */
.flash {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Montserrat', sans-serif;
}
.flash-success { background: rgba(74,222,128,0.1);  border: 1px solid rgba(74,222,128,0.3);  color: #4ade80; }
.flash-error   { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3); color: #f87171; }
.flash-warning { background: rgba(251,191,36,0.1);  border: 1px solid rgba(251,191,36,0.3);  color: #fbbf24; }
.flash-info    { background: rgba(200,169,110,0.1); border: 1px solid rgba(200,169,110,0.3); color: var(--accent); }

/* ---- NAVBAR ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,26,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 32px;
  transition: var(--trans);
}
.navbar-logo {
  font-family: 'Playfair Display', serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.navbar-nav { display: flex; gap: 4px; flex: 1; }
.navbar-nav a {
  color: var(--text-2);
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--trans);
  font-weight: 500;
}
.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--accent);
  background: var(--accent-dim);
  text-decoration: none;
}
.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.navbar-avatar-placeholder {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px; font-weight: 700; color: var(--accent);
  cursor: pointer; flex-shrink: 0;
}

/* ---- HERO ---- */
.hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 48px;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.4);
}
.hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(13,13,26,0.9) 40%, transparent),
              linear-gradient(to top, rgba(13,13,26,1) 0%, transparent 30%);
}
.hero-content { position: relative; z-index: 2; max-width: 600px; }
.hero-badge {
  display: inline-block;
  background: transparent;
  border: 1px solid rgba(200,169,110,0.5);
  color: var(--accent);
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  color: var(--text-1);
}
.hero-desc {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 500px;
}
.hero-btns { display: flex; gap: 12px; }

/* ---- BOTÕES ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: var(--trans);
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #0d0d1a;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(200,169,110,0.35); }
.btn-secondary {
  background: rgba(200,169,110,0.1);
  color: var(--accent);
  border: 1px solid rgba(200,169,110,0.35);
}
.btn-secondary:hover { background: rgba(200,169,110,0.18); }
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-md);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-1); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm  { padding: 6px 14px; font-size: 11px; }
.btn-lg  { padding: 14px 32px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

/* ---- SEÇÕES DE CONTEÚDO ---- */
.section { padding: 40px 48px; }
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-1);
}
.section-title a { margin-left: auto; font-size: 13px; color: var(--text-2); font-weight: 400; font-family: 'Montserrat', sans-serif; }

/* ---- GRID DE CARDS ---- */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.content-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--trans);
  cursor: pointer;
  position: relative;
}
.content-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  z-index: 2;
}
.content-card-thumb {
  aspect-ratio: 16/9;
  background: var(--bg-hover);
  position: relative;
  overflow: hidden;
}
.content-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: var(--trans); }
.content-card-thumb .thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #141428, #1e1e38);
  font-size: 36px; color: var(--text-3);
}
.content-card-type {
  position: absolute; top: 8px; left: 8px;
  background: rgba(13,13,26,0.85);
  border-radius: 3px; padding: 2px 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.8px;
}
.content-card-lock {
  position: absolute; inset: 0;
  background: rgba(13,13,26,0.65);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.content-card-body { padding: 12px; }
.content-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 13px; font-weight: 700; line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.content-card-meta {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px; color: var(--text-2);
  display: flex; gap: 8px; letter-spacing: 0.05em;
}
.progress-bar { height: 3px; background: var(--border); border-radius: 2px; margin-top: 8px; }
.progress-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 2px; transition: width 0.3s;
}

/* ---- PLAYER ---- */
.player-wrapper {
  background: #000; border-radius: var(--radius-lg);
  overflow: hidden; aspect-ratio: 16/9; position: relative;
}
.player-wrapper video,
.player-wrapper iframe { width: 100%; height: 100%; border: none; }

/* ---- PDF VIEWER ---- */
.pdf-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.pdf-wrapper iframe { width: 100%; height: 700px; border: none; }

/* ---- FORMULÁRIOS ---- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
  font-weight: 600;
}
.form-control {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-md);
  color: var(--text-1);
  padding: 10px 14px;
  font-family: 'Crimson Pro', serif;
  font-size: 15px;
  transition: var(--trans);
  outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,169,110,0.08); }
.form-control::placeholder { color: var(--text-3); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ---- AUTH PAGES ---- */
.auth-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 16px;
  background:
    radial-gradient(ellipse at top, rgba(200,169,110,0.08) 0%, transparent 60%),
    linear-gradient(180deg, var(--noite) 0%, var(--bg-base) 100%);
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-lg);
  border-top: 3px solid var(--accent);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  margin-bottom: 8px;
}
.auth-subtitle {
  text-align: center;
  color: var(--text-2);
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  margin-bottom: 32px;
}
.auth-divider {
  text-align: center; color: var(--text-3); font-size: 13px;
  margin: 20px 0; position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%;
  width: calc(50% - 24px); height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* ---- ADMIN LAYOUT ---- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.admin-sidebar-logo {
  font-family: 'Playfair Display', serif;
  font-size: 16px; font-weight: 700; color: var(--accent);
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.admin-sidebar-logo span {
  color: var(--text-2); font-weight: 400; font-size: 10px;
  font-family: 'Montserrat', sans-serif; display: block;
  letter-spacing: 0.15em; text-transform: uppercase; margin-top: 2px;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-2);
  transition: var(--trans);
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-left-color: var(--accent);
  text-decoration: none;
}
.sidebar-section {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-3);
  padding: 16px 20px 4px;
}
.admin-main { flex: 1; padding: 32px; overflow: auto; }
.admin-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 28px;
}
.admin-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700; color: var(--text-1);
}

/* ---- MÉTRICAS ---- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px; position: relative; overflow: hidden;
}
.metric-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(to bottom, var(--accent), var(--accent-hover));
  border-radius: 2px 0 0 2px;
}
.metric-card.green::before { background: linear-gradient(to bottom, #4ade80, #16a34a); }
.metric-card.yellow::before { background: linear-gradient(to bottom, #fbbf24, #d97706); }
.metric-card.red::before { background: var(--danger); }
.metric-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-2); margin-bottom: 6px; font-weight: 600;
}
.metric-value {
  font-family: 'Playfair Display', serif;
  font-size: 28px; font-weight: 700; line-height: 1;
  color: var(--text-1);
}
.metric-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; font-family: 'Montserrat', sans-serif; }

/* ---- TABELAS ADMIN ---- */
.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  padding: 12px 16px; text-align: left;
  font-family: 'Montserrat', sans-serif;
  font-size: 9px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 1.2px;
  background: rgba(200,169,110,0.05);
  border-bottom: 1px solid var(--border);
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }

/* ---- BADGES ---- */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 3px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
}
.badge-success { background: rgba(74,222,128,0.12);  color: #4ade80;  border: 1px solid rgba(74,222,128,0.25); }
.badge-warning { background: rgba(251,191,36,0.12);  color: #fbbf24;  border: 1px solid rgba(251,191,36,0.25); }
.badge-danger  { background: rgba(248,113,113,0.12); color: #f87171;  border: 1px solid rgba(248,113,113,0.25); }
.badge-info    { background: rgba(200,169,110,0.12); color: var(--accent); border: 1px solid rgba(200,169,110,0.25); }
.badge-gray    { background: rgba(255,255,255,0.06); color: var(--text-2); border: 1px solid var(--border); }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--bg-modal);
  border: 1px solid var(--border-md);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 32px; width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
}
.modal-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 24px;
}
.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px; font-weight: 700; color: var(--text-1);
}
.modal-close {
  background: none; border: none; color: var(--text-2);
  font-size: 20px; cursor: pointer; padding: 4px;
}

/* ---- PLANOS ---- */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px; padding: 40px;
}
.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px; text-align: center;
  transition: var(--trans);
}
.plan-card.featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(200,169,110,0.07), var(--bg-card));
}
.plan-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text-2); margin-bottom: 8px;
}
.plan-price {
  font-family: 'Playfair Display', serif;
  font-size: 40px; font-weight: 700; line-height: 1; margin-bottom: 4px;
  color: var(--text-1);
}
.plan-price sup { font-size: 18px; font-weight: 600; vertical-align: top; margin-top: 6px; display: inline-block; }
.plan-period { font-size: 13px; color: var(--text-2); margin-bottom: 24px; font-family: 'Montserrat', sans-serif; }
.plan-features { list-style: none; text-align: left; margin-bottom: 24px; }
.plan-features li {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 14px; padding: 5px 0; color: var(--text-2);
}
.plan-features li::before { content: '✦'; color: var(--accent); font-weight: 700; flex-shrink: 0; font-size: 10px; margin-top: 3px; }

/* ---- RESPONSIVO ---- */
@media (max-width: 768px) {
  .navbar { padding: 0 16px; }
  .section { padding: 24px 16px; }
  .hero { height: 360px; padding: 24px; }
  .hero-title { font-size: 28px; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: relative; }
  .admin-main { padding: 20px 16px; }
  .content-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
