/* ============================================================
   Duelo do Casal — Stylesheet
   Mobile-first, warm & gamified
   ============================================================ */

/* ── Custom Properties ────────────────────────────────────── */
:root {
  --cream:        #FFF8F0;
  --cream-dark:   #F5EDE0;
  --gold:         #F5C518;
  --gold-dark:    #D4A017;
  --gold-glow:    rgba(245,197,24,0.35);
  --coral:        #FF6B6B;
  --coral-dark:   #E05555;
  --orange:       #FF8C42;
  --orange-soft:  #FFB347;
  --red-burnt:    #C0392B;
  --green:        #27AE60;
  --green-soft:   #2ECC71;
  --green-light:  rgba(46,204,113,0.15);
  --red-light:    rgba(192,57,43,0.12);
  --teal:         #1A2B3C;
  --teal-mid:     #2C4A6E;
  --white:        #FFFFFF;
  --gray-100:     #F9F5F0;
  --gray-200:     #EDE8E0;
  --gray-400:     #B0A898;
  --gray-600:     #7A7068;
  --text:         #2C3E50;
  --text-mid:     #556070;
  --text-light:   #8A9BB0;

  --shadow-xs: 0 1px 4px rgba(0,0,0,.07);
  --shadow-sm: 0 2px 10px rgba(0,0,0,.09);
  --shadow-md: 0 4px 20px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.16);
  --shadow-xl: 0 16px 56px rgba(0,0,0,.20);

  --r-sm:   8px;
  --r-md:   16px;
  --r-lg:   24px;
  --r-xl:   32px;
  --r-full: 9999px;

  --nav-h: 68px;
  --header-h: 60px;
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + 16px);
}
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ── Typography ───────────────────────────────────────────── */
h1 { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.05rem; font-weight: 600; }
h4 { font-size: .9rem; font-weight: 600; }
p  { font-size: .9rem; line-height: 1.6; color: var(--text-mid); }
small { font-size: .78rem; color: var(--text-light); }

/* ── Layout ───────────────────────────────────────────────── */
.container { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px; }

/* ── Header ───────────────────────────────────────────────── */
.app-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--cream-dark);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
}
.app-header .logo {
  display: flex; align-items: center; gap: 10px;
}
.app-header .logo-icon {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--gold), var(--orange));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; box-shadow: 0 2px 8px var(--gold-glow);
}
.app-header .logo-text { font-size: .85rem; font-weight: 700; color: var(--teal); line-height: 1.2; }
.app-header .logo-text span { display: block; font-size: .7rem; font-weight: 400; color: var(--text-light); }
.app-header .header-month {
  background: var(--cream); border: 1px solid var(--gold); border-radius: var(--r-full);
  padding: 4px 12px; font-size: .75rem; font-weight: 600; color: var(--gold-dark);
  cursor: pointer; transition: var(--transition);
}
.app-header .header-month:hover { background: var(--gold); color: var(--white); }

/* ── Bottom Navigation ────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  background: var(--white);
  border-top: 1px solid var(--cream-dark);
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  display: flex; align-items: center; justify-content: space-around;
  padding: 0 8px 4px;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 8px 4px; border-radius: var(--r-sm);
  transition: var(--transition); position: relative;
  color: var(--gray-400);
}
.nav-item .nav-icon { font-size: 1.35rem; transition: var(--transition); }
.nav-item .nav-label { font-size: .62rem; font-weight: 500; transition: var(--transition); }
.nav-item.active { color: var(--coral); }
.nav-item.active .nav-icon { transform: translateY(-2px) scale(1.1); }
.nav-item .nav-dot {
  position: absolute; top: 6px; right: 14px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--coral); border: 2px solid var(--white); display: none;
}
.nav-item .nav-dot.show { display: block; }

/* ── Sections ─────────────────────────────────────────────── */
.section { display: none; padding: 20px 0 8px; animation: fadeUp .3s ease; }
.section.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.card-title {
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-light); margin-bottom: 14px; display: flex; align-items: center; gap: 6px;
}
.card-title .ct-icon { font-size: 1rem; }

/* ── Score Cards (Dashboard) ──────────────────────────────── */
.score-grid {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center;
  margin-bottom: 16px;
}
.score-card {
  background: var(--white); border-radius: var(--r-lg);
  padding: 20px 16px; text-align: center;
  box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
  transition: var(--transition);
}
.score-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--coral), var(--orange));
}
.score-card.leader::before {
  background: linear-gradient(90deg, var(--gold), var(--orange-soft));
  height: 5px;
}
.score-card.leader {
  box-shadow: var(--shadow-md), 0 0 0 2px var(--gold), 0 0 20px var(--gold-glow);
}
.score-card .player-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--orange));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin: 0 auto 10px;
  box-shadow: var(--shadow-sm);
}
.score-card.player-2 .player-avatar {
  background: linear-gradient(135deg, var(--teal-mid), var(--coral));
}
.score-card .player-name { font-size: .8rem; font-weight: 600; color: var(--text-mid); margin-bottom: 6px; }
.score-card .score-number {
  font-size: 2.4rem; font-weight: 800; color: var(--teal);
  line-height: 1; letter-spacing: -.02em;
}
.score-card.leader .score-number { color: var(--gold-dark); }
.score-card .score-label { font-size: .65rem; color: var(--text-light); margin-top: 4px; }
.score-card .leader-badge {
  position: absolute; top: 10px; right: 10px;
  background: linear-gradient(135deg, var(--gold), var(--orange-soft));
  color: var(--white); font-size: .6rem; font-weight: 700;
  padding: 3px 8px; border-radius: var(--r-full);
  text-transform: uppercase; letter-spacing: .05em;
  box-shadow: 0 2px 8px var(--gold-glow);
}
.score-vs {
  text-align: center;
}
.score-vs .vs-text {
  font-size: .7rem; font-weight: 800; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: .1em;
  display: block;
}
.score-vs .vs-diff {
  font-size: 1.1rem; font-weight: 700; color: var(--coral);
  display: block; margin-top: 4px;
}

/* ── Progress Bar ─────────────────────────────────────────── */
.progress-wrap { margin-bottom: 16px; }
.progress-label {
  display: flex; justify-content: space-between;
  font-size: .75rem; color: var(--text-mid); margin-bottom: 6px;
}
.progress-bar {
  height: 10px; background: var(--gray-200); border-radius: var(--r-full); overflow: hidden;
}
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--gold), var(--orange));
  border-radius: var(--r-full); transition: width .8s ease;
  position: relative;
}
.progress-fill::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 20px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4));
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0%   { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; }
}

/* ── Quick Stats ──────────────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px;
}
.stat-card {
  background: var(--white); border-radius: var(--r-md); padding: 14px 10px; text-align: center;
  box-shadow: var(--shadow-xs);
}
.stat-icon  { font-size: 1.4rem; margin-bottom: 4px; }
.stat-value { font-size: 1.2rem; font-weight: 700; color: var(--teal); }
.stat-label { font-size: .62rem; color: var(--text-light); margin-top: 2px; }

/* ── Achievement Badges ───────────────────────────────────── */
.achievements-row {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: none;
}
.achievements-row::-webkit-scrollbar { display: none; }
.achievement-badge {
  flex-shrink: 0; background: var(--white); border-radius: var(--r-md);
  padding: 12px 14px; text-align: center; min-width: 100px;
  box-shadow: var(--shadow-xs); border: 1px solid var(--cream-dark);
  transition: var(--transition);
}
.achievement-badge .badge-icon { font-size: 1.6rem; margin-bottom: 4px; }
.achievement-badge .badge-title { font-size: .65rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.achievement-badge .badge-desc  { font-size: .58rem; color: var(--text-light); margin-top: 2px; }
.achievement-badge.unlocked {
  border-color: var(--gold); background: linear-gradient(135deg, #FFFAE8, var(--white));
  box-shadow: var(--shadow-sm), 0 0 12px var(--gold-glow);
}
.empty-achievements {
  color: var(--text-light); font-size: .82rem; padding: 12px 0; font-style: italic;
}

/* ── Today Button ─────────────────────────────────────────── */
.btn-today {
  width: 100%; padding: 16px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--coral), var(--orange));
  color: var(--white); font-size: 1rem; font-weight: 700;
  box-shadow: var(--shadow-md), 0 4px 16px rgba(255,107,107,.35);
  transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 16px;
}
.btn-today:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), 0 8px 24px rgba(255,107,107,.4); }
.btn-today:active { transform: translateY(0); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--r-md); font-size: .875rem; font-weight: 600;
  transition: var(--transition); cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--coral), var(--orange));
  color: var(--white); box-shadow: 0 4px 14px rgba(255,107,107,.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,107,107,.45); }
.btn-secondary {
  background: var(--white); color: var(--text); border: 2px solid var(--cream-dark);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { border-color: var(--coral); color: var(--coral); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--orange-soft));
  color: var(--teal); font-weight: 700;
  box-shadow: 0 4px 14px var(--gold-glow);
}
.btn-gold:hover { transform: translateY(-1px); }
.btn-danger { background: var(--red-light); color: var(--red-burnt); border: 1px solid var(--red-burnt); }
.btn-danger:hover { background: var(--red-burnt); color: var(--white); }
.btn-success { background: var(--green-light); color: var(--green); border: 1px solid var(--green); }
.btn-success:hover { background: var(--green); color: var(--white); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .78rem; border-radius: var(--r-sm); }
.btn-lg { padding: 16px 28px; font-size: 1rem; border-radius: var(--r-lg); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--r-sm); }

/* ── Daily Log ────────────────────────────────────────────── */
.date-selector {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.date-selector input[type=date] {
  flex: 1; padding: 12px 16px; border-radius: var(--r-md);
  border: 2px solid var(--cream-dark); background: var(--white);
  font-size: .9rem; color: var(--text); outline: none;
  transition: var(--transition);
}
.date-selector input[type=date]:focus { border-color: var(--coral); }

.player-log-card {
  background: var(--white); border-radius: var(--r-lg); padding: 18px;
  margin-bottom: 16px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.player-log-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.player-log-card.card-luiz::before   { background: linear-gradient(90deg, var(--coral), var(--orange)); }
.player-log-card.card-thalita::before { background: linear-gradient(90deg, var(--teal-mid), var(--coral)); }

.player-log-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.player-log-header .ph-left { display: flex; align-items: center; gap: 10px; }
.player-log-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--orange));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; box-shadow: var(--shadow-xs);
}
.card-thalita .player-log-avatar { background: linear-gradient(135deg, var(--teal-mid), var(--coral)); }
.player-log-name { font-size: 1rem; font-weight: 700; color: var(--teal); }
.player-log-pts {
  font-size: 1.5rem; font-weight: 800; color: var(--green);
  transition: var(--transition);
}
.player-log-pts.negative { color: var(--coral); }

.actions-group { margin-bottom: 14px; }
.actions-group-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.actions-group-label.positive { color: var(--green); }
.actions-group-label.negative { color: var(--coral); }

.actions-grid {
  display: flex; flex-wrap: wrap; gap: 7px;
}
.action-btn {
  padding: 8px 12px; border-radius: var(--r-full); font-size: .75rem; font-weight: 500;
  border: 2px solid var(--cream-dark); background: var(--white); color: var(--text-mid);
  transition: var(--transition); cursor: pointer; user-select: none;
}
.action-btn:hover { border-color: var(--gray-400); }
.action-btn.selected-positive {
  background: var(--green-light); border-color: var(--green); color: var(--green);
  font-weight: 700;
}
.action-btn.selected-negative {
  background: var(--red-light); border-color: var(--coral); color: var(--coral);
  font-weight: 700;
}

/* ── Commitments Section ──────────────────────────────────── */
.commitment-item {
  background: var(--white); border-radius: var(--r-md); padding: 16px;
  margin-bottom: 10px; box-shadow: var(--shadow-xs);
  border-left: 4px solid var(--gray-200);
  display: flex; align-items: flex-start; gap: 12px;
  transition: var(--transition);
}
.commitment-item.status-completed { border-left-color: var(--green); }
.commitment-item.status-failed    { border-left-color: var(--coral); }
.commitment-item.status-pending   { border-left-color: var(--gold); }
.commitment-check { flex-shrink: 0; margin-top: 2px; }
.commitment-info  { flex: 1; }
.commitment-title { font-size: .9rem; font-weight: 600; color: var(--teal); margin-bottom: 4px; }
.commitment-desc  { font-size: .78rem; color: var(--text-mid); margin-bottom: 8px; }
.commitment-meta  { display: flex; flex-wrap: wrap; gap: 6px; }
.commitment-tag {
  padding: 3px 8px; border-radius: var(--r-full); font-size: .65rem; font-weight: 600;
}
.tag-responsible { background: var(--cream); color: var(--text-mid); border: 1px solid var(--cream-dark); }
.tag-type-weekly  { background: #E8F4FD; color: #1A73E8; }
.tag-type-monthly { background: #FFF3E0; color: var(--orange); }
.tag-points { background: var(--green-light); color: var(--green); }
.status-badge {
  padding: 3px 10px; border-radius: var(--r-full); font-size: .65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
}
.status-pending   { background: #FFF8E1; color: var(--gold-dark); }
.status-completed { background: var(--green-light); color: var(--green); }
.status-failed    { background: var(--red-light); color: var(--red-burnt); }
.commitment-actions { flex-shrink: 0; display: flex; gap: 6px; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: .8rem; font-weight: 600; color: var(--text-mid);
  margin-bottom: 6px;
}
.form-control {
  width: 100%; padding: 12px 16px; border-radius: var(--r-md);
  border: 2px solid var(--cream-dark); background: var(--white);
  font-size: .9rem; color: var(--text); outline: none; transition: var(--transition);
}
.form-control:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255,107,107,.12); }
.form-control::placeholder { color: var(--gray-400); }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A9BB0' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-hint { font-size: .72rem; color: var(--text-light); margin-top: 4px; }

/* ── History List ─────────────────────────────────────────── */
.history-item {
  background: var(--white); border-radius: var(--r-lg); padding: 16px 18px;
  margin-bottom: 12px; box-shadow: var(--shadow-xs);
  display: flex; gap: 14px; align-items: flex-start;
  transition: var(--transition);
}
.history-item:hover { box-shadow: var(--shadow-sm); }
.history-date {
  flex-shrink: 0; text-align: center; min-width: 44px;
  background: var(--cream); border-radius: var(--r-sm); padding: 6px 8px;
}
.history-date .hd-day  { font-size: 1.3rem; font-weight: 800; color: var(--teal); line-height: 1; }
.history-date .hd-month { font-size: .62rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; }
.history-content { flex: 1; }
.history-scores {
  display: flex; gap: 12px; margin-bottom: 6px;
}
.history-score-item {
  display: flex; align-items: center; gap: 5px; font-size: .78rem;
}
.history-score-item .hs-name { color: var(--text-mid); font-weight: 500; }
.history-score-item .hs-pts  {
  font-weight: 700; padding: 2px 7px; border-radius: var(--r-full); font-size: .72rem;
}
.hs-pts.positive { background: var(--green-light); color: var(--green); }
.hs-pts.negative { background: var(--red-light); color: var(--coral); }
.hs-pts.zero     { background: var(--gray-200); color: var(--gray-600); }
.history-notes { font-size: .78rem; color: var(--text-mid); font-style: italic; margin-top: 4px; }
.history-actions { flex-shrink: 0; display: flex; flex-direction: column; gap: 5px; }

/* ── Analytics ────────────────────────────────────────────── */
.analytics-bar-wrap { margin-bottom: 16px; }
.analytics-bar-label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .8rem; margin-bottom: 5px;
}
.analytics-bar-label .abl-name { font-weight: 600; color: var(--teal); }
.analytics-bar-label .abl-val  { font-weight: 700; color: var(--text-mid); }
.analytics-bar { height: 12px; background: var(--gray-200); border-radius: var(--r-full); overflow: hidden; }
.analytics-fill {
  height: 100%; border-radius: var(--r-full); transition: width 1s ease;
}
.fill-luiz    { background: linear-gradient(90deg, var(--coral), var(--orange)); }
.fill-thalita { background: linear-gradient(90deg, var(--teal-mid), var(--coral)); }
.fill-positive { background: linear-gradient(90deg, var(--green), var(--green-soft)); }
.fill-negative { background: linear-gradient(90deg, var(--coral), var(--red-burnt)); }

.analytics-compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px;
}
.analytics-compare-card {
  background: var(--cream); border-radius: var(--r-md); padding: 14px; text-align: center;
}
.acc-value { font-size: 1.6rem; font-weight: 800; color: var(--teal); }
.acc-label { font-size: .7rem; color: var(--text-light); }
.acc-player { font-size: .72rem; font-weight: 600; color: var(--text-mid); margin-top: 2px; }

/* ── Pact ─────────────────────────────────────────────────── */
.pact-display {
  background: linear-gradient(135deg, #FFF8E1, var(--white));
  border: 2px solid var(--gold); border-radius: var(--r-lg); padding: 20px;
  margin-bottom: 16px; position: relative;
}
.pact-display::before {
  content: '🤝'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  font-size: 1.6rem; background: var(--white); padding: 0 6px;
}
.pact-title { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-dark); margin-bottom: 10px; }
.pact-favor { font-size: 1rem; font-weight: 600; color: var(--teal); margin-bottom: 8px; }
.pact-rules { font-size: .82rem; color: var(--text-mid); }
.pact-status-row { margin-top: 12px; display: flex; align-items: center; gap: 10px; }

/* ── Month Closure ────────────────────────────────────────── */
.closure-header {
  text-align: center; padding: 24px 0 20px;
}
.closure-gif-wrap {
  border-radius: var(--r-xl); overflow: hidden; margin: 0 auto 20px;
  max-width: 320px; box-shadow: var(--shadow-xl);
}
.closure-gif-wrap img { width: 100%; display: block; }
.closure-gif-placeholder {
  height: 200px; border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--cream), var(--gold-glow));
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; margin-bottom: 20px; border: 2px dashed var(--gold);
}
.closure-winner-name {
  font-size: 1.8rem; font-weight: 800; margin-bottom: 6px;
  background: linear-gradient(135deg, var(--gold-dark), var(--orange));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.closure-subtitle { font-size: .9rem; color: var(--text-mid); margin-bottom: 20px; }
.closure-scores {
  display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 20px;
}
.cs-score {
  text-align: center;
}
.cs-score .cs-num { font-size: 3rem; font-weight: 900; line-height: 1; color: var(--teal); }
.cs-score .cs-name { font-size: .8rem; font-weight: 600; color: var(--text-mid); }
.cs-score.winner .cs-num { color: var(--gold-dark); }
.cs-vs { font-size: 1rem; font-weight: 700; color: var(--gray-400); }
.closure-message {
  background: var(--cream); border-radius: var(--r-lg); padding: 18px;
  font-size: .88rem; color: var(--text-mid); text-align: center; font-style: italic;
  border-left: 4px solid var(--gold); margin-bottom: 16px; line-height: 1.7;
}
.confetti-area {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 9999; overflow: hidden;
}
.confetti-piece {
  position: absolute; top: -10px; border-radius: 2px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ── Annual History ───────────────────────────────────────── */
.annual-ranking {
  background: linear-gradient(135deg, var(--teal), var(--teal-mid));
  border-radius: var(--r-xl); padding: 24px; margin-bottom: 20px; color: var(--white);
  text-align: center;
}
.ar-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; opacity: .7; margin-bottom: 16px; }
.ar-grid { display: flex; justify-content: center; gap: 24px; }
.ar-item .ar-num  { font-size: 2.5rem; font-weight: 900; line-height: 1; }
.ar-item .ar-label { font-size: .7rem; opacity: .75; }
.ar-item.luiz    .ar-num { color: var(--orange-soft); }
.ar-item.thalita .ar-num { color: var(--coral); }
.ar-item.draw    .ar-num { color: var(--gold); }

.month-closure-card {
  background: var(--white); border-radius: var(--r-lg); padding: 18px;
  margin-bottom: 12px; box-shadow: var(--shadow-xs);
  border-left: 4px solid var(--gray-200);
}
.month-closure-card.winner-luiz    { border-left-color: var(--orange); }
.month-closure-card.winner-thalita { border-left-color: var(--coral); }
.month-closure-card.winner-draw    { border-left-color: var(--gold); }
.mcc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.mcc-month { font-size: 1rem; font-weight: 700; color: var(--teal); }
.mcc-winner-badge {
  padding: 4px 12px; border-radius: var(--r-full); font-size: .72rem; font-weight: 700;
  background: linear-gradient(135deg, var(--gold), var(--orange-soft)); color: var(--white);
}
.mcc-scores { display: flex; gap: 14px; margin-bottom: 8px; }
.mcc-score-item { font-size: .82rem; }
.mcc-score-item strong { color: var(--teal); }
.mcc-favor { font-size: .78rem; color: var(--text-mid); font-style: italic; }
.mcc-pact-status { margin-top: 8px; }

/* ── Settings ─────────────────────────────────────────────── */
.setting-group {
  background: var(--white); border-radius: var(--r-lg); padding: 18px;
  margin-bottom: 14px; box-shadow: var(--shadow-xs);
}
.setting-group-title {
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-light); margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--cream-dark);
}
.action-type-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--cream-dark);
}
.action-type-item:last-child { border-bottom: none; }
.action-type-badge {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .8rem;
}
.badge-positive { background: var(--green-light); }
.badge-negative { background: var(--red-light); }
.action-type-name { flex: 1; font-size: .85rem; color: var(--text); }
.action-type-pts  { font-size: .78rem; font-weight: 700; min-width: 30px; text-align: center; }
.pts-positive { color: var(--green); }
.pts-negative { color: var(--coral); }

/* ── Toast ────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 16px); left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--teal); color: var(--white); border-radius: var(--r-lg);
  padding: 14px 22px; font-size: .875rem; font-weight: 500;
  box-shadow: var(--shadow-lg); z-index: 9000;
  opacity: 0; pointer-events: none; white-space: nowrap;
  transition: opacity .3s, transform .3s;
  max-width: calc(100vw - 32px); white-space: normal; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--green); }
.toast.error   { background: var(--coral); }
.toast.warning { background: var(--gold-dark); }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 500;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--white); border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 24px 20px 32px; width: 100%; max-width: 560px;
  transform: translateY(100%); transition: transform .35s cubic-bezier(.4,0,.2,1);
  max-height: 90dvh; overflow-y: auto;
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-handle {
  width: 40px; height: 4px; background: var(--gray-200); border-radius: var(--r-full);
  margin: 0 auto 20px;
}
.modal-title { font-size: 1.1rem; font-weight: 700; color: var(--teal); margin-bottom: 16px; text-align: center; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }

/* ── Loading ──────────────────────────────────────────────── */
.loading-screen {
  position: fixed; inset: 0; background: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 9999; transition: opacity .5s;
}
.loading-screen.hidden { opacity: 0; pointer-events: none; }
.loading-logo { font-size: 3rem; margin-bottom: 16px; animation: pulse 1.5s ease-in-out infinite; }
.loading-text { font-size: 1rem; font-weight: 600; color: var(--teal); margin-bottom: 20px; }
.loading-bar {
  width: 160px; height: 4px; background: var(--cream-dark); border-radius: var(--r-full); overflow: hidden;
}
.loading-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--coral), var(--gold));
  border-radius: var(--r-full); animation: loading-progress 1.5s ease-in-out infinite;
}
@keyframes loading-progress {
  0%   { width: 0%; }
  60%  { width: 80%; }
  100% { width: 100%; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.1); }
}

/* ── Misc Utilities ───────────────────────────────────────── */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-green   { color: var(--green); }
.text-coral   { color: var(--coral); }
.text-gold    { color: var(--gold-dark); }
.text-muted   { color: var(--text-light); }
.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex  { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.hidden { display: none !important; }
.divider { border: none; border-top: 1px solid var(--cream-dark); margin: 16px 0; }
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--text-light);
}
.empty-state .es-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state .es-text { font-size: .9rem; }

/* ── Section Headers ──────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding: 0 2px;
}
.section-header h2 { color: var(--teal); }
.section-header p  { font-size: .78rem; color: var(--text-light); }

/* ── Checkbox custom ──────────────────────────────────────── */
.check-wrap {
  display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 0;
}
.check-wrap input[type=checkbox] { display: none; }
.check-box {
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid var(--gray-400); background: var(--white);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: var(--transition);
}
.check-wrap input:checked + .check-box {
  background: var(--green); border-color: var(--green); color: var(--white);
}
.check-wrap input:checked + .check-box::after { content: '✓'; font-size: .75rem; font-weight: 700; }
.check-label { font-size: .85rem; color: var(--text); }

/* ── Draw State ───────────────────────────────────────────── */
.draw-banner {
  background: linear-gradient(135deg, #FFF8E1, var(--white));
  border: 2px solid var(--gold); border-radius: var(--r-xl); padding: 28px;
  text-align: center; margin-bottom: 20px;
}
.draw-banner .db-icon { font-size: 3rem; margin-bottom: 12px; }
.draw-banner .db-title { font-size: 1.5rem; font-weight: 800; color: var(--gold-dark); margin-bottom: 8px; }
.draw-banner .db-sub   { font-size: .88rem; color: var(--text-mid); }

/* ── Responsive: Desktop ──────────────────────────────────── */
@media (min-width: 768px) {
  :root { --nav-h: 0px; }
  body { padding-bottom: 0; padding-top: var(--header-h); }
  .bottom-nav { display: none; }

  .app-header { position: fixed; padding: 0 32px; }
  .app-header .desktop-nav { display: flex; gap: 4px; }
  .desktop-nav-item {
    padding: 8px 14px; border-radius: var(--r-sm);
    font-size: .82rem; font-weight: 500; color: var(--text-mid);
    cursor: pointer; transition: var(--transition);
  }
  .desktop-nav-item:hover  { background: var(--cream); color: var(--teal); }
  .desktop-nav-item.active { background: var(--cream); color: var(--coral); font-weight: 600; }

  .container { max-width: 720px; padding: 0 24px; }
  .score-grid { gap: 20px; }
  .score-card .score-number { font-size: 3rem; }
  .form-row { grid-template-columns: 1fr 1fr 1fr; }
  .modal-overlay { align-items: center; }
  .modal-box { border-radius: var(--r-xl); max-width: 480px; }
  .section { padding-top: 32px; }
}

@media (min-width: 1024px) {
  .container { max-width: 900px; }
  .stats-grid { grid-template-columns: repeat(6, 1fr); }
}

/* Hide desktop nav on mobile, show on desktop */
.app-header .desktop-nav { display: none; }
@media (min-width: 768px) {
  .app-header .desktop-nav { display: flex; }
}
