:root {
  --bg: #0f1117;
  --bg-soft: #171a24;
  --surface: #1c2030;
  --surface-2: #232840;
  --border: #2c3350;
  --text: #eef0f8;
  --text-muted: #9aa1bf;
  --objetivo: #f5a623;
  --personagem: #6c8bff;
  --rotina: #37c98e;
  --danger: #ff6b6b;
  --radius: 14px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at 20% -10%, #23284a 0%, var(--bg) 45%);
  color: var(--text);
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Navbar ---------- */
.topnav {
  border-bottom: 1px solid var(--border);
  background: rgba(23, 26, 36, 0.85);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
.brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
}
.topnav-links { display: flex; gap: 6px; }
.topnav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.92rem;
  transition: background .15s, color .15s;
}
.topnav-links a:hover { background: var(--surface-2); color: var(--text); }
.topnav-links a.active { background: var(--surface-2); color: var(--text); font-weight: 600; }
.topnav-user { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: .9rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .1s, opacity .15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, #6c8bff, #37c98e); color: #0f1117; }
.btn-primary:hover { opacity: 0.92; }
.btn-block { width: 100%; }
.btn-small { padding: 6px 12px; font-size: 0.85rem; border-radius: 8px; }
.btn-ghost { background: var(--surface-2); color: var(--text); }

/* ---------- Auth pages ---------- */
.auth-page {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 100vh;
  padding: 24px 16px 0;
  gap: 24px;
  background:
    linear-gradient(135deg, rgba(15, 17, 23, 0.82) 0%, rgba(23, 26, 36, 0.72) 100%),
    url('../img/bg.jpg') center/cover no-repeat fixed;
}
.auth-page > .auth-card {
  align-self: center;
  margin-top: 10px;
}
.auth-page > .social-proof {
  align-self: center;
  margin: 0;
}
.auth-page > .site-footer-auth {
  margin-top: auto;
  margin-left: -16px;
  margin-right: -16px;
  margin-bottom: 0;
}
.auth-page .auth-card {
  backdrop-filter: blur(8px);
  background: rgba(28, 32, 48, 0.82);
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  width: 100%;
  max-width: 380px;
}
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-brand-icon { font-size: 2rem; }
.auth-brand h1 { font-size: 1.3rem; margin: 8px 0 4px; }
.auth-brand p { color: var(--text-muted); margin: 0; font-size: .9rem; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { font-size: .85rem; color: var(--text-muted); display: flex; flex-direction: column; gap: 6px; }
.auth-form input {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 0.95rem;
}
.auth-form input:focus { outline: 2px solid var(--personagem); }
.auth-switch { text-align: center; margin-top: 18px; color: var(--text-muted); font-size: .88rem; }
.auth-switch a { color: var(--personagem); }
.auth-forgot { text-align: right; margin: 4px 0 0; color: var(--text-muted); font-size: .82rem; }
.auth-forgot a { color: var(--personagem); text-decoration: none; }
.auth-forgot a:hover { text-decoration: underline; }

.alert { padding: 10px 14px; border-radius: 10px; font-size: .88rem; margin-bottom: 16px; }
.alert-error { background: rgba(255, 107, 107, 0.12); color: var(--danger); border: 1px solid rgba(255,107,107,0.3); }
.alert-success { background: rgba(55, 201, 142, 0.12); color: var(--rotina); border: 1px solid rgba(55, 201, 142, 0.3); margin-bottom: 18px; }

.reset-link-box {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}
.reset-link-label { display: block; font-size: .8rem; color: var(--text-muted); margin-bottom: 8px; }
.reset-link-row { display: flex; gap: 6px; margin-bottom: 12px; }
.reset-link-row input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--personagem);
  font-size: .8rem;
  font-family: 'Consolas', 'Segoe UI Mono', monospace;
}

/* ---------- Page header ---------- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 32px 0 24px;
}
.page-header h1 { margin: 0 0 4px; font-size: 1.6rem; }
.subtitle { color: var(--text-muted); margin: 0; font-size: .92rem; }

.overall-progress { position: relative; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.overall-progress .ring { width: 64px; height: 64px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 3; }
.ring-fill { fill: none; stroke: var(--rotina); stroke-width: 3; stroke-linecap: round; transition: stroke-dasharray .3s; }
.overall-progress span { position: absolute; font-size: .72rem; color: var(--text-muted); }

/* ---------- Cards grid ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding-bottom: 60px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  border-top: 3px solid transparent;
}
.card-objetivo { border-top-color: var(--objetivo); }
.card-personagem { border-top-color: var(--personagem); }
.card-rotina { border-top-color: var(--rotina); }

.card-head { display: flex; gap: 12px; margin-bottom: 14px; }
.card-icon { font-size: 1.5rem; }
.card-head h2 { margin: 0 0 2px; font-size: 1.05rem; }
.card-desc { margin: 0; color: var(--text-muted); font-size: .82rem; line-height: 1.4; }

.card-progress-bar { height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; margin-bottom: 14px; }
.card-objetivo .card-progress-fill { background: var(--objetivo); }
.card-personagem .card-progress-fill { background: var(--personagem); }
.card-rotina .card-progress-fill { background: var(--rotina); }
.card-progress-fill { height: 100%; transition: width .25s; }

.item-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 40px; }
.item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
}
.item label { display: flex; align-items: center; gap: 9px; flex: 1; cursor: pointer; min-width: 0; }
.item-text { font-size: .9rem; word-break: break-word; }
.item.is-done { opacity: 0.6; }
.item.is-done .item-text { text-decoration: line-through; text-decoration-color: var(--rotina); }
.item-check { width: 17px; height: 17px; accent-color: var(--rotina); cursor: pointer; flex-shrink: 0; }
.item-periodo {
  font-size: .68rem;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--text-muted);
  white-space: nowrap;
}
.item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .85rem;
  padding: 2px 4px;
  border-radius: 6px;
  flex-shrink: 0;
}
.item-remove:hover { color: var(--danger); background: rgba(255,107,107,0.1); }

.add-item-form { display: flex; gap: 6px; margin-top: 14px; }
.add-item-form input {
  flex: 1;
  min-width: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-size: .85rem;
}
.add-item-form select {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: .78rem;
  padding: 0 4px;
}
.add-item-form input:focus, .add-item-form select:focus { outline: 2px solid var(--personagem); }

/* ---------- Floating achievement card (rodapé direito) ---------- */
.float-ach {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 300px;
  max-width: calc(100vw - 40px);
  z-index: 9999;
  pointer-events: none;
}
.float-ach-card {
  background: linear-gradient(135deg, rgba(28, 32, 48, 0.98), rgba(35, 40, 64, 0.98));
  border: 1px solid var(--rotina);
  border-left: 5px solid var(--rotina);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(55, 201, 142, 0.22), 0 4px 12px rgba(0,0,0,0.35);
  padding: 14px 16px 14px 48px;
  position: relative;
  transform: translateX(120%) translateY(10px);
  opacity: 0;
  pointer-events: auto;
  transition: transform .45s cubic-bezier(.2,.9,.3,1.15), opacity .35s ease;
  backdrop-filter: blur(6px);
}
.float-ach-card.show {
  transform: translateX(0) translateY(0);
  opacity: 1;
}
.float-ach-card.hide {
  transform: translateX(120%) translateY(10px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.float-ach-trophy {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff6a8, #f5a623 60%, #b76e00);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #3a2400;
  box-shadow: 0 3px 8px rgba(245,166,35,0.45);
}
.float-ach-kicker {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--rotina);
  font-weight: 700;
  margin-bottom: 4px;
}
.float-ach-user {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.2;
}
.float-ach-text {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.35;
  word-break: break-word;
}
.float-ach-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: .62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(108, 139, 255, 0.15);
  color: var(--personagem);
}
.float-ach-card[data-card="objetivo"] {
  border-color: var(--objetivo);
  border-left-color: var(--objetivo);
  box-shadow: 0 12px 36px rgba(245, 166, 35, 0.22), 0 4px 12px rgba(0,0,0,0.35);
}
.float-ach-card[data-card="personagem"] {
  border-color: var(--personagem);
  border-left-color: var(--personagem);
  box-shadow: 0 12px 36px rgba(108, 139, 255, 0.22), 0 4px 12px rgba(0,0,0,0.35);
}
.float-ach-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .82rem;
  padding: 2px 6px;
  border-radius: 6px;
  line-height: 1;
}
.float-ach-close:hover { background: var(--surface-2); color: var(--text); }

@media (max-width: 640px) {
  .float-ach { right: 14px; bottom: 14px; }
}

/* ---------- Achievements ---------- */
.achievements-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; padding-bottom: 60px; }
.achievement-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.achievement-badge { font-size: .7rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: .03em; }
.badge-objetivo { background: rgba(245, 166, 35, 0.15); color: var(--objetivo); }
.badge-personagem { background: rgba(108, 139, 255, 0.15); color: var(--personagem); }
.badge-rotina { background: rgba(55, 201, 142, 0.15); color: var(--rotina); }
.achievement-text { flex: 1; text-decoration: line-through; text-decoration-color: var(--rotina); }
.achievement-date { color: var(--text-muted); font-size: .8rem; white-space: nowrap; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 2.4rem; display: block; margin-bottom: 12px; }
.empty-state p { margin-bottom: 20px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: .88rem;
  z-index: 50;
}

/* ---------- FAQ Card ---------- */
.faq-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 8px;
  margin-bottom: 60px;
  border-top: 3px solid var(--personagem);
}
.faq-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px; }
.faq-icon { font-size: 1.6rem; line-height: 1; }
.faq-title { margin: 0 0 4px; font-size: 1.1rem; }
.faq-subtitle { margin: 0; color: var(--text-muted); font-size: .88rem; line-height: 1.4; }

.accordion { display: flex; flex-direction: column; gap: 8px; }
.accordion-item {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .2s;
}
.accordion-item[open] { border-color: var(--personagem); }
.accordion-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  font-size: .92rem;
  user-select: none;
  transition: background .15s;
}
.accordion-item > summary::-webkit-details-marker { display: none; }
.accordion-item > summary:hover { background: var(--surface-2); }
.accordion-chevron {
  color: var(--text-muted);
  font-size: .9rem;
  transition: transform .25s ease;
  flex-shrink: 0;
}
.accordion-item[open] .accordion-chevron {
  transform: rotate(180deg);
  color: var(--personagem);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 56px;
  padding: 24px 20px;
  background: rgba(28, 32, 48, 0.85);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(4px);
}
.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.site-footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.site-footer-links a {
  color: var(--text-muted);
  font-size: .85rem;
  text-decoration: none;
  transition: color .18s ease;
}
.site-footer-links a:hover { color: var(--personagem); text-decoration: underline; }
.site-footer-sep {
  color: var(--border);
  font-size: .75rem;
}
.site-footer-copy {
  color: var(--text-muted);
  font-size: .78rem;
}
.site-footer-copy strong { color: var(--text); font-weight: 700; }

.site-footer-auth {
  margin-top: 48px;
  background: rgba(14, 17, 28, 0.72);
}

/* ---------- Login social-proof ---------- */
.social-proof {
  max-width: 560px;
  margin: 36px auto 0;
  width: 100%;
  background: rgba(28, 32, 48, 0.82);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 22px 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  animation: slideUpSoft .5s cubic-bezier(.2,.9,.3,1) both;
}
@keyframes slideUpSoft {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.social-proof-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.social-proof-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff6a8, #f5a623 60%, #b76e00);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 6px 14px rgba(245,166,35,0.35);
}
.social-proof-header h2 {
  margin: 0 0 4px;
  font-size: 1.02rem;
  color: var(--text);
  line-height: 1.25;
}
.social-proof-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: .8rem;
}
.social-proof-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.social-proof-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  animation: fadeInUp .35s ease both;
}
.social-proof-item:nth-child(2) { animation-delay: .05s; }
.social-proof-item:nth-child(3) { animation-delay: .1s; }
.social-proof-item:nth-child(4) { animation-delay: .15s; }
.social-proof-item:nth-child(5) { animation-delay: .2s; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sp-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c8bff, #37c98e);
  color: #0f1117;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
}
.sp-content { min-width: 0; }
.sp-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}
.sp-user {
  color: var(--text);
  font-size: .82rem;
}
.sp-time {
  color: var(--text-muted);
  font-size: .7rem;
}
.sp-text {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-style: italic;
  word-break: break-word;
}
.sp-badge {
  display: inline-block;
  font-size: .6rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-objetivo   { background: rgba(245,166,35,0.14); color: #f5a623; }
.badge-personagem { background: rgba(108,139,255,0.16); color: #8fa3ff; }
.badge-rotina     { background: rgba(55,201,142,0.15); color: #5ce0a6; }

.sp-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(55, 201, 142, 0.15);
  color: #37c98e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.social-proof-empty {
  list-style: none;
  padding: 18px 14px;
  border-radius: 12px;
  background: rgba(108,139,255,0.08);
  border: 1px dashed rgba(108,139,255,0.35);
  color: var(--text-muted);
  font-size: .85rem;
  text-align: center;
}

.social-proof-item.is-loading {
  background: rgba(255,255,255,0.025);
}
.sp-skeleton {
  height: 12px;
  width: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.09), rgba(255,255,255,0.04));
  background-size: 200% 100%;
  animation: skeletonPulse 1.2s ease-in-out infinite;
  margin-bottom: 8px;
}
.sp-skeleton.w-70 { width: 70%; }
.sp-skeleton:last-child { margin-bottom: 0; }
@keyframes skeletonPulse {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}

.social-proof-footer {
  color: var(--text-muted);
  font-size: .78rem;
  padding: 10px 4px 4px;
  border-top: 1px solid var(--border);
}
.social-proof-footer span {
  color: var(--personagem);
  font-weight: 800;
  font-size: .9rem;
  margin-right: 2px;
}

@media (max-width: 520px) {
  .social-proof { margin-top: 26px; padding: 18px 14px 12px; }
  .social-proof-header h2 { font-size: .95rem; }
  .social-proof-item { grid-template-columns: 34px 1fr auto; padding: 10px; }
  .sp-avatar { width: 34px; height: 34px; font-size: .85rem; }
}

/* ---------- Generic modal (Termos / Privacidade) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 20, 0.78);
  backdrop-filter: blur(4px);
  z-index: 110;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}
.modal-overlay[data-open="1"],
.modal-overlay:not([hidden]) { display: flex; }
.modal-card {
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  padding: 28px 30px 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-card h2 {
  margin: 0 0 16px;
  font-size: 1.2rem;
  color: var(--text);
  padding-right: 30px;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  line-height: 1;
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-body {
  overflow-y: auto;
  padding-right: 4px;
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.6;
}
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
.modal-body h3 {
  color: var(--text);
  font-size: .95rem;
  margin: 18px 0 8px;
  font-weight: 700;
}
.modal-body h3:first-child { margin-top: 0; }
.modal-body p { margin: 0 0 12px; }
.modal-body ul { margin: 0 0 12px 22px; padding: 0; }
.modal-body li { margin-bottom: 6px; }
.modal-body a { color: var(--personagem); }
.accordion-content {
  padding: 0 16px 18px;
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.6;
  animation: slideDown .25s ease;
}
.accordion-content p { margin: 0 0 10px; color: var(--text-muted); }
.accordion-content ul { margin: 0 0 10px; padding-left: 18px; }
.accordion-content li { margin: 4px 0; }
.accordion-content strong { color: var(--text); }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Report Page ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 4px solid var(--border);
  transition: transform .15s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card.stat-done { border-left-color: var(--rotina); }
.stat-card.stat-pending { border-left-color: var(--objetivo); }
.stat-card.stat-time { border-left-color: var(--personagem); }
.stat-icon { font-size: 1.6rem; flex-shrink: 0; }
.stat-label { font-size: .78rem; color: var(--text-muted); margin-bottom: 2px; }
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.stat-value-sm { font-size: 1rem; font-weight: 700; line-height: 1.2; }

.report-block { margin-bottom: 24px; }
.report-block-title {
  font-size: 1.05rem;
  margin: 0 0 14px;
  color: var(--text);
}

.periodo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.periodo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  border-top: 3px solid transparent;
}
.periodo-dia { border-top-color: var(--rotina); }
.periodo-mes { border-top-color: var(--personagem); }
.periodo-ano { border-top-color: var(--objetivo); }
.periodo-head { display: flex; align-items: center; gap: 10px; }
.periodo-icon { font-size: 1.5rem; }
.periodo-label { font-weight: 700; font-size: .95rem; }
.periodo-progress { font-size: .75rem; color: var(--text-muted); }
.periodo-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
  color: var(--text-muted);
}
.periodo-stats strong { color: var(--text); }
.periodo-time { font-weight: 600; color: var(--text); font-size: .82rem; }

.periodo-fill-dia { background: var(--rotina); }
.periodo-fill-mes { background: var(--personagem); }
.periodo-fill-ano { background: var(--objetivo); }

.report-block.card { margin-bottom: 22px; }
.report-block .card-head { align-items: center; }

.card-time-badge {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  text-align: right;
  min-width: 130px;
}
.ct-label { display: block; font-size: .7rem; color: var(--text-muted); margin-bottom: 2px; }
.ct-value { display: block; font-size: .85rem; font-weight: 700; color: var(--text); }

.mini-periodos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.mini-periodo {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .82rem;
}
.mini-periodo-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .78rem;
  color: var(--text-muted);
}
.mini-periodo-head strong { color: var(--text); }
.mini-periodo-time { font-size: .75rem; color: var(--text-muted); text-align: center; margin-top: 2px; }

.report-subtitle {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  margin: 18px 0 10px;
  padding: 0;
}

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.timeline-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  position: relative;
}
.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  margin-top: 6px;
}
.timeline-item.done .timeline-dot { background: var(--rotina); box-shadow: 0 0 0 3px rgba(55, 201, 142, 0.18); }
.timeline-item.pending .timeline-dot { background: var(--objetivo); box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.18); }

.timeline-body { flex: 1; min-width: 0; }
.timeline-text { font-size: .9rem; color: var(--text); margin-bottom: 6px; line-height: 1.4; }
.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  font-size: .78rem;
  color: var(--text-muted);
}
.timeline-meta strong { color: var(--text); }
.timeline-duracao { font-weight: 600; color: var(--rotina); }
.timeline-duracao.pending { color: var(--objetivo); }
.timeline-date { color: var(--text-muted); font-size: .75rem; }

/* ---------- Paywall / Pagamento ---------- */
.paywall-locked {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-top: 3px solid var(--objetivo);
  padding: 48px 28px;
  text-align: center;
  max-width: 560px;
  margin: 12px auto 60px;
}
.paywall-locked-icon { font-size: 3.2rem; display: block; margin-bottom: 10px; }
.paywall-locked h2 { margin: 0 0 10px; font-size: 1.35rem; }
.paywall-locked p { color: var(--text-muted); margin: 0 0 20px; line-height: 1.5; }
.paywall-locked-note { margin-top: 18px !important; font-size: .85rem; }

.nav-paywall {
  position: relative;
}
.nav-paywall::after {
  content: '🔒';
  font-size: .7rem;
  margin-left: 2px;
  vertical-align: top;
}

.paywall-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 20, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: fadeIn .2s ease;
}
.paywall-backdrop:not([hidden]),
.paywall-backdrop[data-open="1"] { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.paywall-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 26px 24px 22px;
  position: relative;
  border-top: 4px solid var(--personagem);
  animation: modalIn .25s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes modalIn {
  from { transform: translateY(14px) scale(.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.paywall-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.paywall-close:hover { background: var(--surface-2); color: var(--text); }

.paywall-head { text-align: center; margin-bottom: 14px; }
.paywall-icon { font-size: 2.2rem; display: block; margin-bottom: 4px; }
.paywall-head h2 { margin: 0 0 4px; font-size: 1.2rem; }
.paywall-subtitle { margin: 0; color: var(--text-muted); font-size: .85rem; }

.paywall-price {
  background: linear-gradient(135deg, rgba(108,139,255,0.14), rgba(55,201,142,0.14));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.paywall-price-label { color: var(--text-muted); font-size: .85rem; }
.paywall-price-value {
  font-size: 1.45rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6c8bff, #37c98e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.paywall-qrbox {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  align-items: start;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}
.paywall-qr-img-wrap {
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
}
.paywall-qr-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.paywall-qr-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #333;
  font-size: .82rem;
  font-weight: 600;
  text-align: center;
  gap: 4px;
}
.paywall-qr-fallback small { color: #666; font-weight: 400; font-size: .7rem; }

.paywall-pixdata { display: flex; flex-direction: column; gap: 10px; justify-content: center; min-height: 0; }
.paywall-row { display: flex; flex-direction: column; gap: 4px; }
.paywall-label { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.paywall-value { font-size: .9rem; color: var(--text); font-weight: 500; word-break: break-word; }
.paywall-value-price { color: var(--rotina); font-weight: 700; }
.paywall-copy-row { display: flex; gap: 6px; }
.paywall-copy-row input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--personagem);
  font-family: 'Consolas', 'Segoe UI Mono', monospace;
  font-size: .78rem;
}

.paywall-whatsapp {
  background: rgba(55, 201, 142, 0.08);
  border: 1px solid rgba(55, 201, 142, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: .85rem;
  line-height: 1.45;
}
.paywall-whatsapp p { margin: 0 0 8px; color: var(--text); }
.paywall-whatsapp p strong { color: var(--rotina); }
.paywall-whatsapp-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.paywall-whatsapp-num { font-weight: 700; font-size: .95rem; color: var(--rotina); }

.paywall-code-form label {
  display: block;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.paywall-code-row { display: flex; gap: 8px; flex-wrap: wrap; }
.paywall-code-row input {
  flex: 1;
  min-width: 160px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-align: center;
}
.paywall-code-row input:focus {
  outline: 2px solid var(--personagem);
  background: var(--bg);
}
.paywall-error, .paywall-success {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 500;
}
.paywall-error {
  background: rgba(255, 107, 107, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255,107,107,0.3);
}
.paywall-success {
  background: rgba(55, 201, 142, 0.12);
  color: var(--rotina);
  border: 1px solid rgba(55,201,142,0.3);
}

@media (max-width: 540px) {
  .paywall-modal { padding: 22px 16px 18px; border-radius: 14px; }
  .paywall-qrbox { grid-template-columns: 120px 1fr; gap: 12px; padding: 12px; }
  .paywall-qr-img-wrap { padding: 6px; }
  .paywall-code-row input, .paywall-code-row button { width: 100%; }
}
@media (max-width: 400px) {
  .paywall-qrbox { grid-template-columns: 1fr; }
  .paywall-qr-img-wrap { max-width: 150px; margin: 0 auto; }
}

@media (max-width: 640px) {
  .page-header { flex-wrap: wrap; }
  .add-item-form { flex-wrap: wrap; }
  .faq-card { padding: 18px; }
  .mini-periodos { grid-template-columns: 1fr; }
  .card-time-badge { min-width: auto; width: 100%; text-align: left; margin-top: 6px; }
  .report-block .card-head { flex-wrap: wrap; }
  .stat-value { font-size: 1.2rem; }
}
