/* assets/css/app.css */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Inter:wght@300;400;500;600&display=swap');

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

:root {
  --rosa: #C2185B;
  --rosa-light: #FCE4EC;
  --roxo: #6A1B9A;
  --roxo-light: #F3E5F5;
  --dourado: #FFB300;
  --creme: #FFF8F0;
  --texto: #1A0A2E;
  --suave: #6B5C7A;
  --borda: #EDE0F0;
  --branco: #FFFFFF;
  --verde: #2E7D32;
  --sidebar: 240px;
  --header: 60px;
  --radius: 16px;
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--creme); color: var(--texto); min-height: 100vh; }

/* ---- SIDEBAR ---- */
.sidebar {
  position: fixed; top: 0; left: 0; width: var(--sidebar); height: 100vh;
  background: linear-gradient(180deg, var(--roxo) 0%, #4A148C 100%);
  display: flex; flex-direction: column; z-index: 100; padding: 1.5rem 0;
  transition: transform .3s;
}
.sidebar-logo {
  font-family: 'Playfair Display', serif; font-size: 1.6rem; color: #fff;
  padding: 0 1.5rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,.15);
}
.sidebar-logo span { color: var(--dourado); font-style: italic; }
.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: .75rem; padding: .75rem 1.5rem;
  color: rgba(255,255,255,.7); text-decoration: none; font-size: .9rem;
  transition: background .2s, color .2s; border-left: 3px solid transparent;
}
.nav-item:hover, .nav-item.active {
  background: rgba(255,255,255,.1); color: #fff; border-left-color: var(--dourado);
}
.nav-item .icon { font-size: 1.1rem; width: 24px; text-align: center; }
.sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid rgba(255,255,255,.15); }
.sidebar-user { display: flex; align-items: center; gap: .75rem; }
.sidebar-user img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.3); }
.sidebar-user-info { flex: 1; overflow: hidden; }
.sidebar-user-name { color: #fff; font-size: .85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { color: rgba(255,255,255,.5); font-size: .75rem; }

/* ---- MAIN ---- */
.main { margin-left: var(--sidebar); min-height: 100vh; }
.topbar {
  height: var(--header); background: var(--branco); border-bottom: 1px solid var(--borda);
  display: flex; align-items: center; padding: 0 2rem; justify-content: space-between; position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--texto); }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.chamas-badge {
  display: flex; align-items: center; gap: .35rem; background: var(--rosa-light);
  color: var(--rosa); padding: .35rem .85rem; border-radius: 50px; font-weight: 600; font-size: .9rem; text-decoration: none;
}
.page { padding: 2rem; max-width: 1000px; }

/* ---- CARDS ---- */
.card {
  background: var(--branco); border-radius: var(--radius); padding: 1.5rem;
  border: 1px solid var(--borda); transition: box-shadow .2s;
}
.card:hover { box-shadow: 0 4px 20px rgba(106,27,154,.08); }
.card-title { font-family: 'Playfair Display', serif; font-size: 1.15rem; margin-bottom: .5rem; }
.card-desc { color: var(--suave); font-size: .9rem; line-height: 1.5; }

/* ---- GRID ---- */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }

/* ---- BOTÕES ---- */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .65rem 1.5rem; border-radius: 50px; font-family: 'Inter', sans-serif; font-size: .9rem; font-weight: 500; cursor: pointer; border: none; text-decoration: none; transition: all .2s; }
.btn-primary { background: linear-gradient(135deg, var(--rosa), var(--roxo)); color: #fff; }
.btn-primary:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 15px rgba(194,24,91,.3); }
.btn-outline { background: transparent; color: var(--rosa); border: 1.5px solid var(--rosa); }
.btn-outline:hover { background: var(--rosa-light); }
.btn-ghost { background: transparent; color: var(--suave); }
.btn-ghost:hover { background: var(--creme); }
.btn-gold { background: var(--dourado); color: var(--texto); font-weight: 600; }
.btn-gold:hover { opacity: .9; }
.btn-sm { padding: .4rem 1rem; font-size: .8rem; }
.btn-full { width: 100%; justify-content: center; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: .4rem; color: var(--texto); }
.form-control {
  width: 100%; padding: .7rem 1rem; border: 1.5px solid var(--borda); border-radius: 10px;
  font-family: 'Inter', sans-serif; font-size: .9rem; color: var(--texto); background: var(--branco);
  transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--rosa); }
textarea.form-control { min-height: 120px; resize: vertical; }
.form-check { display: flex; align-items: center; gap: .5rem; font-size: .9rem; cursor: pointer; }
.form-check input { width: 16px; height: 16px; accent-color: var(--rosa); }

/* ---- ALERTS ---- */
.alert { padding: .85rem 1.25rem; border-radius: 10px; font-size: .9rem; margin-bottom: 1rem; }
.alert-erro { background: #FFEBEE; color: #B71C1C; border-left: 4px solid #F44336; }
.alert-sucesso { background: #E8F5E9; color: #1B5E20; border-left: 4px solid #4CAF50; }
.alert-info { background: var(--roxo-light); color: var(--roxo); border-left: 4px solid var(--roxo); }

/* ---- BADGE ---- */
.badge { display: inline-block; padding: .25rem .75rem; border-radius: 50px; font-size: .75rem; font-weight: 600; }
.badge-rosa { background: var(--rosa-light); color: var(--rosa); }
.badge-roxo { background: var(--roxo-light); color: var(--roxo); }
.badge-verde { background: #E8F5E9; color: var(--verde); }
.badge-dourado { background: #FFF8E1; color: #F57F17; }

/* ---- STREAK ---- */
.streak-card { background: linear-gradient(135deg, var(--rosa), var(--roxo)); color: #fff; border-radius: var(--radius); padding: 1.5rem; }
.streak-numero { font-size: 3rem; font-weight: 700; line-height: 1; }
.streak-label { font-size: .85rem; opacity: .8; margin-top: .25rem; }

/* ---- PROGRESS BAR ---- */
.progress { background: var(--borda); border-radius: 50px; height: 8px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--rosa), var(--roxo)); border-radius: 50px; transition: width .5s; }

/* ---- AUTH PAGES ---- */
.auth-wrapper { min-height: 100vh; display: flex; background: linear-gradient(135deg, var(--roxo), var(--rosa)); }
.auth-left { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-box { background: var(--branco); border-radius: 24px; padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,.15); }
.auth-logo { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--texto); margin-bottom: .25rem; }
.auth-logo span { color: var(--rosa); font-style: italic; }
.auth-subtitle { color: var(--suave); font-size: .9rem; margin-bottom: 2rem; }
.auth-link { color: var(--rosa); text-decoration: none; font-weight: 500; }
.auth-link:hover { text-decoration: underline; }

/* ---- CONTEUDO CARD ---- */
.conteudo-card { position: relative; overflow: hidden; }
.conteudo-card .tipo-badge { position: absolute; top: 1rem; right: 1rem; }
.conteudo-card .custo { display: flex; align-items: center; gap: .35rem; color: var(--rosa); font-weight: 600; font-size: .9rem; margin-top: .75rem; }
.conteudo-card.locked { opacity: .85; }
.lock-overlay { position: absolute; inset: 0; background: rgba(255,255,255,.5); display: flex; align-items: center; justify-content: center; border-radius: var(--radius); }

/* ---- DESAFIO ---- */
.desafio-pergunta { font-family: 'Playfair Display', serif; font-size: 1.4rem; line-height: 1.4; color: var(--texto); margin: 1.5rem 0; }
.resposta-box { background: var(--creme); border-radius: var(--radius); padding: 1.5rem; margin-top: 1rem; }
.resposta-parceiro { background: var(--roxo-light); border-left: 4px solid var(--roxo); }
.revelacao-banner { background: linear-gradient(135deg, var(--rosa-light), var(--roxo-light)); border-radius: var(--radius); padding: 1rem 1.5rem; text-align: center; margin: 1rem 0; font-size: .9rem; color: var(--suave); }

/* ---- ADMIN ---- */
.admin-sidebar { background: linear-gradient(180deg, #1A0A2E, #2D1B69); }
.stat-card { text-align: center; padding: 1.5rem; }
.stat-card .numero { font-size: 2.5rem; font-weight: 700; color: var(--rosa); font-family: 'Playfair Display', serif; }
.stat-card .label { color: var(--suave); font-size: .85rem; margin-top: .25rem; }
table { width: 100%; border-collapse: collapse; }
table th { padding: .75rem 1rem; text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--suave); border-bottom: 2px solid var(--borda); }
table td { padding: .85rem 1rem; border-bottom: 1px solid var(--borda); font-size: .9rem; }
table tr:hover td { background: var(--creme); }

/* ---- MOBILE ---- */
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: .5rem; }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-toggle { display: block; }
  .page { padding: 1rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .topbar { padding: 0 1rem; }
}
