/* =========================================================
   Manifestador de Objetivos — style.css
   Identidade visual herdada do site Método Grabovoi
   ========================================================= */

:root{
  --navy:#0F2744;
  --navy-deep:#081625;
  --petrol:#123B47;
  --gold:#C7A34A;
  --gold-light:#E4C878;
  --white:#FFFFFF;
  --mist:#F7F6F2;
  --ink:#1C2430;
  --ink-soft:#5B6472;
  --line: rgba(199,163,74,.28);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(8,22,37,.10);
  --shadow-lg: 0 20px 50px rgba(8,22,37,.18);

  --success:#1FAF52;
  --success-bg: rgba(31,175,82,.12);
  --warn:#C7893A;
  --warn-bg: rgba(199,137,58,.12);
  --danger:#B5442E;
  --danger-bg: rgba(181,68,46,.12);

  --font-serif:'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:'Poppins', 'Segoe UI', Arial, sans-serif;
  --font-body:'Inter', 'Segoe UI', Arial, sans-serif;
  --font-italic:'Cormorant Garamond', Georgia, serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*{box-sizing:border-box; margin:0; padding:0;}
html{-webkit-text-size-adjust:100%;}
body{
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--mist);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
  padding-bottom: calc(76px + var(--safe-bottom));
  min-height:100dvh;
}
img{max-width:100%; height:auto; display:block;}
button{font:inherit; cursor:pointer;}
input, select, textarea{font:inherit;}
a{color:inherit;}
ul{list-style:none;}

h1,h2,h3,h4{font-family: var(--font-serif); font-weight:700; color:var(--navy); letter-spacing:.2px;}

::selection{ background: var(--gold-light); color: var(--navy-deep); }

/* Scrollbar discreta */
::-webkit-scrollbar{width:8px; height:8px;}
::-webkit-scrollbar-thumb{background: var(--line); border-radius:8px;}

/* ---------- Layout base ---------- */
.app{
  max-width:560px;
  margin:0 auto;
  min-height:100dvh;
  position:relative;
  background: var(--mist);
}

.topbar{
  position:sticky; top:0; z-index:40;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  padding: calc(16px + var(--safe-top)) 20px 16px;
  display:flex; align-items:center; justify-content:space-between;
  box-shadow: var(--shadow);
}
.topbar .brand{
  display:flex; align-items:center; gap:10px;
}
.topbar .brand-mark{
  width:34px; height:34px; border-radius:50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-light), var(--gold) 70%);
  display:flex; align-items:center; justify-content:center;
  color: var(--navy-deep); font-family: var(--font-serif); font-weight:700; font-size:1rem;
  box-shadow: 0 2px 10px rgba(199,163,74,.5);
}
.topbar h1{
  font-size:1.05rem; color:var(--white); letter-spacing:.02em;
}
.topbar .sub{
  font-family: var(--font-sans); font-size:.66rem; color: var(--gold-light);
  letter-spacing:.16em; text-transform:uppercase; display:block; margin-top:1px;
}
.icon-btn{
  width:38px; height:38px; border-radius:50%;
  background: rgba(255,255,255,.08);
  border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center;
  color: var(--gold-light);
  transition: background .2s ease, transform .2s ease;
}
.icon-btn:active{ transform: scale(.94); }
.icon-btn svg{ width:18px; height:18px; }

/* ---------- Views ---------- */
.view{
  display:none;
  padding: 18px 18px calc(24px + var(--safe-bottom));
  animation: fadeUp .32s ease;
}
.view.active{ display:block; }

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

.eyebrow{
  font-family: var(--font-sans);
  font-size:.68rem;
  letter-spacing:.2em;
  text-transform:uppercase;
  color: var(--gold);
  font-weight:600;
  display:block;
  margin-bottom:6px;
}

.section-title{ margin-bottom:16px; }
.section-title h2{ font-size:1.35rem; }
.section-title p{ color: var(--ink-soft); font-size:.86rem; margin-top:4px; }

/* ---------- Cards ---------- */
.card{
  background: var(--white);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:18px;
  box-shadow: var(--shadow);
}
.card + .card{ margin-top:14px; }

/* ---------- Home / Hero ---------- */
.hero{
  background: linear-gradient(150deg, var(--navy) 0%, var(--petrol) 55%, var(--navy-deep) 100%);
  border-radius: var(--radius);
  padding:28px 22px;
  color: var(--white);
  position:relative;
  overflow:hidden;
  box-shadow: var(--shadow-lg);
}
.hero::before{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(circle at 85% -10%, rgba(228,200,120,.25), transparent 55%),
    radial-gradient(circle at -10% 110%, rgba(228,200,120,.12), transparent 50%);
  pointer-events:none;
}
.hero-content{ position:relative; z-index:1; }
.hero .eyebrow{ color: var(--gold-light); }
.hero h2{ color:var(--white); font-size:1.5rem; line-height:1.25; }
.hero-quote{
  margin-top:14px;
  font-family: var(--font-italic);
  font-style:italic;
  font-size:1.05rem;
  color: var(--gold-light);
  border-left:2px solid var(--gold);
  padding-left:12px;
}
.hero-stats{
  display:grid; grid-template-columns:repeat(3,1fr); gap:10px;
  margin-top:20px;
}
.hero-stat{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(228,200,120,.25);
  border-radius: var(--radius-sm);
  padding:12px 8px;
  text-align:center;
}
.hero-stat .num{ font-family: var(--font-serif); font-size:1.4rem; color: var(--gold-light); display:block; }
.hero-stat .label{ font-family: var(--font-sans); font-size:.62rem; letter-spacing:.06em; text-transform:uppercase; color:#CBD6E0; }

/* Quick actions grid */
.quick-actions{
  display:grid; grid-template-columns:repeat(2,1fr); gap:12px;
  margin-top:18px;
}
.quick-action{
  background: var(--white);
  border:1px solid var(--line);
  border-radius: var(--radius-sm);
  padding:16px 14px;
  display:flex; flex-direction:column; gap:8px;
  text-align:left;
  transition: transform .18s ease, box-shadow .18s ease;
}
.quick-action:active{ transform: scale(.97); }
.quick-action .qa-icon{
  width:36px; height:36px; border-radius:10px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  display:flex; align-items:center; justify-content:center; color: var(--navy-deep);
}
.quick-action .qa-icon svg{ width:18px; height:18px; }
.quick-action strong{ font-family: var(--font-sans); font-size:.86rem; color: var(--navy); font-weight:600; }
.quick-action span.desc{ font-size:.74rem; color: var(--ink-soft); }

/* Section wrapper title within home */
.home-section{ margin-top:26px; }
.home-section .head{
  display:flex; align-items:center; justify-content:space-between; margin-bottom:12px;
}
.home-section .head h3{ font-size:1.05rem; }
.link-more{ font-family: var(--font-sans); font-size:.74rem; color: var(--gold); font-weight:600; }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border-radius: 999px;
  padding:13px 22px;
  font-family: var(--font-sans);
  font-weight:600;
  font-size:.86rem;
  letter-spacing:.02em;
  border:1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  width:100%;
}
.btn:active{ transform: scale(.98); }
.btn-primary{
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy-deep);
  box-shadow: 0 8px 20px rgba(199,163,74,.35);
}
.btn-secondary{
  background: var(--white);
  color: var(--navy);
  border-color: var(--line);
}
.btn-ghost{
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}
.btn-outline-light{
  background: rgba(255,255,255,.06);
  color: var(--gold-light);
  border-color: rgba(228,200,120,.4);
}
.btn-danger{
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(181,68,46,.3);
}
.btn-sm{ padding:9px 16px; font-size:.78rem; width:auto; }
.btn[disabled]{ opacity:.5; pointer-events:none; }

.fab{
  position:fixed;
  right:calc(50% - 260px + 18px);
  bottom: calc(84px + var(--safe-bottom));
  width:56px; height:56px; border-radius:50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy-deep);
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 10px 26px rgba(199,163,74,.45);
  z-index:45;
}
.fab svg{ width:24px; height:24px; }
@media (max-width:596px){
  .fab{ right:18px; }
}

/* ---------- Forms ---------- */
.field{ margin-bottom:14px; }
.field label{
  display:block; font-family: var(--font-sans); font-size:.74rem; font-weight:600;
  color: var(--ink-soft); margin-bottom:6px; letter-spacing:.02em;
}
.field input[type=text],
.field input[type=date],
.field input[type=number],
.field select,
.field textarea{
  width:100%;
  border:1px solid var(--line);
  background: var(--mist);
  border-radius: var(--radius-sm);
  padding:12px 14px;
  color: var(--ink);
  font-size:.92rem;
}
.field textarea{ resize:vertical; min-height:90px; }
.field input:focus, .field select:focus, .field textarea:focus{
  outline:none; border-color: var(--gold); background: var(--white);
}
.field-row{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }

.chip-group{ display:flex; flex-wrap:wrap; gap:8px; }
.chip{
  padding:8px 14px; border-radius:999px; border:1px solid var(--line);
  font-family: var(--font-sans); font-size:.76rem; font-weight:600; color: var(--ink-soft);
  background: var(--mist);
}
.chip.active{
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy-deep); border-color: transparent;
}

.priority-dot{ display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; }
.priority-alta{ background: var(--danger); }
.priority-media{ background: var(--warn); }
.priority-baixa{ background: var(--success); }

/* ---------- Search / filters ---------- */
.search-bar{
  display:flex; align-items:center; gap:10px;
  background: var(--white); border:1px solid var(--line); border-radius: 999px;
  padding:10px 16px; margin-bottom:12px;
}
.search-bar svg{ width:16px; height:16px; color: var(--ink-soft); flex-shrink:0; }
.search-bar input{ border:none; background:transparent; width:100%; font-size:.88rem; color:var(--ink); }
.search-bar input:focus{ outline:none; }

.filters-row{ display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; margin-bottom:14px; }
.filters-row::-webkit-scrollbar{ display:none; }
.filter-chip{
  flex-shrink:0; padding:7px 14px; border-radius:999px; border:1px solid var(--line);
  font-family: var(--font-sans); font-size:.72rem; font-weight:600; color: var(--ink-soft); background: var(--white);
  white-space:nowrap;
}
.filter-chip.active{ background: var(--navy); color: var(--gold-light); border-color: var(--navy); }

/* ---------- Goal card ---------- */
.goal-card{
  background: var(--white); border:1px solid var(--line); border-radius: var(--radius);
  padding:16px; box-shadow: var(--shadow); margin-bottom:12px;
}
.goal-card .goal-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.goal-card h4{ font-family: var(--font-sans); font-size:.98rem; color: var(--navy); font-weight:600; }
.goal-card .goal-cat{ font-size:.72rem; color: var(--ink-soft); margin-top:2px; }
.status-badge{
  font-family: var(--font-sans); font-size:.64rem; font-weight:700; letter-spacing:.04em;
  text-transform:uppercase; padding:4px 10px; border-radius:999px; white-space:nowrap;
}
.status-andamento{ background: var(--warn-bg); color: var(--warn); }
.status-concluido{ background: var(--success-bg); color: var(--success); }
.status-pausado{ background: rgba(91,100,114,.12); color: var(--ink-soft); }

.progress-track{
  width:100%; height:8px; border-radius:999px; background: var(--mist); overflow:hidden; margin-top:12px;
  border:1px solid var(--line);
}
.progress-fill{
  height:100%; border-radius:999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width .4s ease;
}
.goal-meta{
  display:flex; justify-content:space-between; align-items:center; margin-top:10px;
  font-size:.72rem; color: var(--ink-soft);
}
.goal-meta .deadline.late{ color: var(--danger); font-weight:600; }
.goal-actions{ display:flex; gap:8px; margin-top:14px; }
.goal-actions .btn{ flex:1; }

/* ---------- Empty state ---------- */
.empty-state{
  text-align:center; padding:40px 20px; color: var(--ink-soft);
}
.empty-state .icon{
  width:64px; height:64px; margin:0 auto 14px; border-radius:50%;
  background: var(--white); border:1px dashed var(--gold);
  display:flex; align-items:center; justify-content:center; color: var(--gold);
}
.empty-state .icon svg{ width:28px; height:28px; }
.empty-state h4{ font-family: var(--font-sans); color: var(--navy); font-size:.95rem; margin-bottom:6px; }
.empty-state p{ font-size:.8rem; max-width:260px; margin:0 auto; }

/* ---------- Diário ---------- */
.diary-entry{
  background: var(--white); border:1px solid var(--line); border-radius: var(--radius);
  padding:16px; margin-bottom:12px; box-shadow: var(--shadow);
}
.diary-entry .d-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.diary-entry .d-date{ font-family: var(--font-sans); font-size:.72rem; font-weight:600; color: var(--gold); text-transform:uppercase; letter-spacing:.04em; }
.diary-entry .d-type{ font-size:.68rem; color: var(--ink-soft); background: var(--mist); padding:3px 9px; border-radius:999px; }
.diary-entry p{ font-size:.88rem; color: var(--ink); white-space:pre-wrap; }
.diary-entry .d-photos{ display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.diary-entry .d-photos img{ width:64px; height:64px; object-fit:cover; border-radius:10px; border:1px solid var(--line); }

.tab-toggle{
  display:flex; background: var(--white); border:1px solid var(--line); border-radius:999px; padding:4px; margin-bottom:16px;
}
.tab-toggle button{
  flex:1; border:none; background:transparent; padding:9px 0; border-radius:999px;
  font-family: var(--font-sans); font-size:.78rem; font-weight:600; color: var(--ink-soft);
}
.tab-toggle button.active{ background: var(--navy); color: var(--gold-light); }

.photo-input-preview{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.photo-thumb{ position:relative; width:64px; height:64px; border-radius:10px; overflow:hidden; border:1px solid var(--line); }
.photo-thumb img{ width:100%; height:100%; object-fit:cover; }
.photo-thumb .rm{
  position:absolute; top:2px; right:2px; width:18px; height:18px; border-radius:50%;
  background: rgba(8,22,37,.75); color:#fff; display:flex; align-items:center; justify-content:center; font-size:11px;
}
.photo-add-btn{
  width:64px; height:64px; border-radius:10px; border:1px dashed var(--gold);
  display:flex; align-items:center; justify-content:center; color: var(--gold); background: var(--mist);
}

/* ---------- Checklist ---------- */
.checklist-date{ text-align:center; margin-bottom:16px; }
.checklist-date .day-num{ font-family: var(--font-serif); font-size:2rem; color: var(--navy); }
.checklist-date .day-label{ font-family: var(--font-sans); font-size:.72rem; letter-spacing:.1em; text-transform:uppercase; color: var(--ink-soft); }

.checklist-item{
  display:flex; align-items:center; gap:12px;
  background: var(--white); border:1px solid var(--line); border-radius: var(--radius-sm);
  padding:13px 14px; margin-bottom:10px;
}
.checklist-item .cb{
  width:24px; height:24px; border-radius:7px; border:2px solid var(--gold);
  display:flex; align-items:center; justify-content:center; flex-shrink:0; color:#fff;
}
.checklist-item.done .cb{ background: var(--gold); }
.checklist-item.done .cb svg{ display:block; }
.checklist-item .cb svg{ display:none; width:14px; height:14px; }
.checklist-item.done span.txt{ text-decoration:line-through; color: var(--ink-soft); }
.checklist-item span.txt{ flex:1; font-size:.88rem; }
.checklist-item .del{ color: var(--ink-soft); opacity:.6; }
.checklist-item .del svg{ width:16px; height:16px; }

.add-inline{ display:flex; gap:8px; margin-top:6px; margin-bottom:20px; }
.add-inline input{
  flex:1; border:1px solid var(--line); border-radius: var(--radius-sm); padding:12px 14px;
  background: var(--white); font-size:.88rem;
}
.add-inline input:focus{ outline:none; border-color: var(--gold); }
.add-inline button{
  width:46px; border-radius: var(--radius-sm); background: var(--navy); color: var(--gold-light);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}

.checklist-progress-ring{ display:flex; align-items:center; gap:14px; margin-bottom:18px; }
.ring-wrap{ position:relative; width:64px; height:64px; flex-shrink:0; }
.ring-wrap svg{ width:64px; height:64px; transform: rotate(-90deg); }
.ring-wrap .bg{ fill:none; stroke: var(--line); stroke-width:6; }
.ring-wrap .fg{ fill:none; stroke: var(--gold); stroke-width:6; stroke-linecap:round; transition: stroke-dashoffset .4s ease; }
.ring-wrap .pct{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-family: var(--font-sans); font-weight:700; font-size:.78rem; color: var(--navy); }

/* ---------- Calendário ---------- */
.cal-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.cal-header h3{ font-size:1.05rem; }
.cal-nav{ display:flex; gap:8px; }
.cal-nav button{
  width:32px; height:32px; border-radius:50%; background: var(--white); border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center; color: var(--navy);
}
.cal-nav button svg{ width:16px; height:16px; }

.cal-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.cal-dow{ text-align:center; font-family: var(--font-sans); font-size:.62rem; color: var(--ink-soft); font-weight:600; text-transform:uppercase; padding-bottom:4px; }
.cal-day{
  aspect-ratio:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  border-radius:10px; font-size:.8rem; color: var(--ink); position:relative; background: var(--white);
  border:1px solid transparent;
}
.cal-day.empty{ background:transparent; }
.cal-day.has-record{ border-color: var(--gold); font-weight:600; }
.cal-day.today{ background: var(--navy); color: var(--gold-light); }
.cal-day .dot{ width:4px; height:4px; border-radius:50%; background: var(--gold); margin-top:2px; }
.cal-day.today .dot{ background: var(--gold-light); }

.cal-legend{ display:flex; align-items:center; gap:8px; margin-top:14px; font-size:.74rem; color: var(--ink-soft); }
.cal-legend .dot{ width:8px; height:8px; border-radius:50%; background: var(--gold); }

.day-detail{ margin-top:20px; }
.day-detail h4{ font-size:.95rem; margin-bottom:10px; }

/* ---------- Estatísticas ---------- */
.stats-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:12px; margin-bottom:18px; }
.stat-card{
  background: var(--white); border:1px solid var(--line); border-radius: var(--radius);
  padding:16px; text-align:center; box-shadow: var(--shadow);
}
.stat-card .val{ font-family: var(--font-serif); font-size:1.7rem; color: var(--navy); display:block; }
.stat-card .lbl{ font-family: var(--font-sans); font-size:.68rem; color: var(--ink-soft); text-transform:uppercase; letter-spacing:.04em; margin-top:2px; }
.stat-card.highlight{
  background: linear-gradient(150deg, var(--navy), var(--navy-deep));
  border-color: var(--navy);
}
.stat-card.highlight .val{ color: var(--gold-light); }
.stat-card.highlight .lbl{ color:#CBD6E0; }

.bar-chart{ display:flex; align-items:flex-end; gap:8px; height:120px; margin-top:6px; }
.bar-chart .bar{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:6px; }
.bar-chart .bar .col{ width:100%; border-radius:6px 6px 2px 2px; background: linear-gradient(180deg, var(--gold-light), var(--gold)); min-height:4px; }
.bar-chart .bar .lbl{ font-size:.6rem; color: var(--ink-soft); font-family: var(--font-sans); }

.category-breakdown .cb-row{ display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.category-breakdown .cb-row .cb-label{ width:92px; font-size:.76rem; color: var(--ink-soft); flex-shrink:0; }
.category-breakdown .cb-row .cb-track{ flex:1; height:8px; background: var(--mist); border-radius:999px; overflow:hidden; border:1px solid var(--line); }
.category-breakdown .cb-row .cb-fill{ height:100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius:999px; }
.category-breakdown .cb-row .cb-num{ font-size:.74rem; color: var(--navy); font-weight:600; width:22px; text-align:right; flex-shrink:0; }

/* ---------- Frase motivacional ---------- */
.quote-card{
  background: linear-gradient(150deg, var(--navy) 0%, var(--petrol) 100%);
  border-radius: var(--radius); padding:22px; text-align:center; color:#fff; box-shadow: var(--shadow-lg);
  position:relative;
}
.quote-card .quote-mark{ font-family: var(--font-serif); font-size:2.4rem; color: var(--gold); line-height:0.6; display:block; margin-bottom:10px; }
.quote-card p{ font-family: var(--font-italic); font-style:italic; font-size:1.15rem; color: var(--gold-light); line-height:1.5; }
.quote-card .refresh{
  margin-top:16px; display:inline-flex; align-items:center; gap:6px;
  background: rgba(255,255,255,.08); border:1px solid rgba(228,200,120,.35); color: var(--gold-light);
  padding:8px 16px; border-radius:999px; font-family: var(--font-sans); font-size:.72rem; font-weight:600;
}
.quote-card .refresh svg{ width:14px; height:14px; }

/* ---------- Bottom nav ---------- */
.bottom-nav{
  position:fixed; left:0; right:0; bottom:0; z-index:50;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  display:flex; justify-content:space-around; align-items:center;
  padding: 8px 6px calc(8px + var(--safe-bottom));
  box-shadow: 0 -6px 24px rgba(8,22,37,.25);
}
.bottom-nav .nav-item{
  display:flex; flex-direction:column; align-items:center; gap:3px;
  color: #8FA0B0; background:transparent; border:none; padding:6px 8px; flex:1;
}
.bottom-nav .nav-item svg{ width:20px; height:20px; }
.bottom-nav .nav-item span{ font-family: var(--font-sans); font-size:.58rem; font-weight:600; letter-spacing:.01em; }
.bottom-nav .nav-item.active{ color: var(--gold-light); }

/* ---------- Modal ---------- */
.modal-overlay{
  position:fixed; inset:0; background: rgba(8,22,37,.55); backdrop-filter: blur(2px);
  z-index:100; display:none; align-items:flex-end; justify-content:center;
}
.modal-overlay.active{ display:flex; }
.modal-sheet{
  background: var(--mist); width:100%; max-width:560px; border-radius:22px 22px 0 0;
  max-height:88vh; overflow-y:auto; padding:20px 20px calc(24px + var(--safe-bottom));
  animation: slideUp .28s ease;
}
@keyframes slideUp{ from{ transform: translateY(30px); opacity:0; } to{ transform: translateY(0); opacity:1; } }
.modal-handle{ width:40px; height:4px; background: var(--line); border-radius:999px; margin:0 auto 16px; }
.modal-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }
.modal-head h3{ font-size:1.1rem; }
.modal-close{ width:32px; height:32px; border-radius:50%; background: var(--white); border:1px solid var(--line); display:flex; align-items:center; justify-content:center; color: var(--ink-soft); }
.modal-close svg{ width:16px; height:16px; }

/* ---------- Toast ---------- */
.toast{
  position:fixed; bottom: calc(90px + var(--safe-bottom)); left:50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy); color:#fff; padding:12px 20px; border-radius:999px; font-family: var(--font-sans);
  font-size:.8rem; box-shadow: var(--shadow-lg); z-index:200; opacity:0; pointer-events:none; transition: all .25s ease;
  display:flex; align-items:center; gap:8px; white-space:nowrap;
}
.toast.show{ opacity:1; transform: translateX(-50%) translateY(0); }
.toast svg{ width:16px; height:16px; color: var(--gold-light); flex-shrink:0; }

/* ---------- Install banner ---------- */
.install-banner{
  display:none; align-items:center; gap:12px;
  background: var(--white); border:1px solid var(--gold); border-radius: var(--radius);
  padding:14px 16px; margin-bottom:16px; box-shadow: var(--shadow);
}
.install-banner.show{ display:flex; }
.install-banner .ib-icon{
  width:40px; height:40px; border-radius:12px; flex-shrink:0;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  display:flex; align-items:center; justify-content:center; color: var(--navy-deep);
}
.install-banner .ib-icon svg{ width:20px; height:20px; }
.install-banner .ib-text{ flex:1; }
.install-banner strong{ font-family: var(--font-sans); font-size:.82rem; color: var(--navy); display:block; }
.install-banner span{ font-size:.72rem; color: var(--ink-soft); }
.install-banner button.btn{ width:auto; }

/* ---------- Splash (primeira execução) ---------- */
#splash{
  position:fixed; inset:0; z-index:999;
  background: radial-gradient(circle at 50% 30%, var(--petrol) 0%, var(--navy) 45%, var(--navy-deep) 100%);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px;
  transition: opacity .5s ease, visibility .5s ease;
}
#splash.hide{ opacity:0; visibility:hidden; pointer-events:none; }
#splash .splash-mark{
  width:88px; height:88px; border-radius:50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-light), var(--gold) 70%);
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 0 50px rgba(228,200,120,.4);
  animation: pulse 1.8s ease-in-out infinite;
}
#splash .splash-mark svg{ width:42px; height:42px; color: var(--navy-deep); }
@keyframes pulse{ 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.06); } }
#splash h1{ color:#fff; font-size:1.3rem; letter-spacing:.02em; }
#splash p{ font-family: var(--font-italic); font-style:italic; color: var(--gold-light); font-size:.95rem; }
#splash .splash-loader{ width:120px; height:3px; background: rgba(255,255,255,.15); border-radius:999px; overflow:hidden; margin-top:8px; }
#splash .splash-loader::after{
  content:""; display:block; width:40%; height:100%; background: var(--gold-light); border-radius:999px;
  animation: loading 1.1s ease-in-out infinite;
}
@keyframes loading{ 0%{ transform: translateX(-100%); } 100%{ transform: translateX(350%); } }

/* ---------- Onboarding ---------- */
.onboard-slide{ text-align:center; padding: 10px 8px 0; }
.onboard-slide .ob-icon{
  width:90px; height:90px; border-radius:50%; margin:0 auto 22px;
  background: linear-gradient(150deg, var(--navy), var(--petrol));
  display:flex; align-items:center; justify-content:center; box-shadow: var(--shadow-lg);
}
.onboard-slide .ob-icon svg{ width:40px; height:40px; color: var(--gold-light); }
.onboard-slide h2{ font-size:1.3rem; margin-bottom:10px; }
.onboard-slide p{ color: var(--ink-soft); font-size:.9rem; max-width:320px; margin:0 auto; }
.onboard-dots{ display:flex; justify-content:center; gap:6px; margin:24px 0; }
.onboard-dots span{ width:7px; height:7px; border-radius:50%; background: var(--line); }
.onboard-dots span.active{ background: var(--gold); width:20px; border-radius:999px; transition: all .3s ease; }

/* ---------- Print (Exportar PDF) ---------- */
#print-area{ display:none; }
@media print{
  body *{ visibility:hidden; }
  #print-area, #print-area *{ visibility:visible; }
  #print-area{ display:block; position:absolute; left:0; top:0; width:100%; padding:24px; }
  .print-header{ text-align:center; border-bottom:2px solid #C7A34A; padding-bottom:16px; margin-bottom:20px; }
  .print-header h1{ font-family: Georgia, serif; color:#0F2744; font-size:1.6rem; }
  .print-header p{ color:#5B6472; font-size:.85rem; margin-top:4px; }
  .print-goal{ border:1px solid #ddd; border-radius:10px; padding:14px; margin-bottom:12px; break-inside:avoid; }
  .print-goal h3{ font-family: Georgia, serif; color:#0F2744; font-size:1rem; }
  .print-goal .pmeta{ font-size:.78rem; color:#5B6472; margin-top:4px; }
  .print-section-title{ font-family: Georgia, serif; color:#0F2744; font-size:1.1rem; margin:20px 0 10px; border-bottom:1px solid #C7A34A; padding-bottom:6px; }
  .print-entry{ border-bottom:1px dashed #ddd; padding:10px 0; font-size:.82rem; break-inside:avoid; }
  .print-entry .pd-date{ font-weight:700; color:#C7A34A; }
  .print-stats{ display:flex; gap:16px; margin-bottom:10px; }
  .print-stats div{ flex:1; text-align:center; border:1px solid #eee; border-radius:8px; padding:10px; }
  .print-stats .n{ font-size:1.3rem; font-weight:700; color:#0F2744; display:block; }
  .print-stats .l{ font-size:.7rem; color:#5B6472; }
}

/* ---------- Utility ---------- */
.hidden{ display:none !important; }
.mt-8{ margin-top:8px; } .mt-14{ margin-top:14px; } .mt-20{ margin-top:20px; }
.text-center{ text-align:center; }
.flex{ display:flex; } .flex-between{ display:flex; justify-content:space-between; align-items:center; }
.gap-8{ gap:8px; }

/* ---------- Responsive tweak for small phones ---------- */
@media (max-width:340px){
  .stats-grid{ grid-template-columns:1fr 1fr; }
  .hero h2{ font-size:1.3rem; }
}
