/* ===== BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: #1a1a2e; display: flex; align-items: center; justify-content: center; font-family: 'Poppins', sans-serif; }

/* ===== PHONE SHELL ===== */
.app, .splash {
  width: 390px;
  height: 844px;
  background: #fff;
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 3px #333, inset 0 0 0 2px #555;
  display: flex;
  flex-direction: column;
}
@media (max-height: 900px) {
  .app, .splash { width: 360px; height: 780px; border-radius: 38px; }
}
@media (max-width: 420px) {
  .app, .splash { width: 100vw; height: 100dvh; border-radius: 0; box-shadow: none; }
}

/* ===== SPLASH ===== */
.splash {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  background: linear-gradient(160deg, #FFD6E7 0%, #E8D5F5 50%, #C8EAF5 100%);
  align-items: center; justify-content: center;
}
.splash-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,0.7) 0%, transparent 70%);
}
.splash-content { position: relative; z-index: 2; text-align: center; }
.splash-logo { margin-bottom: 16px; filter: drop-shadow(0 6px 16px rgba(255,90,122,0.3)); }
.splash-title { display: flex; flex-direction: column; line-height: 1; margin-bottom: 10px; }
.ela { font-family: 'Pacifico', cursive; font-size: 3rem; color: #FF5A7A; }
.organiza { font-family: 'Pacifico', cursive; font-size: 3rem; color: #4DB6AC; }
.splash-slogan { color: #888; font-size: 0.95rem; font-weight: 300; margin-bottom: 32px; }
.splash-loader { width: 160px; height: 4px; background: rgba(255,255,255,0.5); border-radius: 10px; overflow: hidden; margin: 0 auto; }
.loader-bar { height: 100%; width: 0; background: linear-gradient(90deg, #FF5A7A, #4DB6AC); border-radius: 10px; animation: load 2s ease forwards; }
@keyframes load { to { width: 100%; } }
.sparkles { position: absolute; inset: 0; pointer-events: none; }
.sparkles span { position: absolute; color: rgba(255,90,122,0.4); font-size: 1.2rem; animation: twinkle 3s infinite; }
@keyframes twinkle { 0%,100%{opacity:0.2;transform:scale(1)} 50%{opacity:1;transform:scale(1.5)} }

/* ===== STATUS BAR ===== */
.status-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 20px 4px;
  font-size: 0.75rem; font-weight: 600; color: #333;
  background: white; flex-shrink: 0;
}

/* ===== APP LAYOUT ===== */
.app { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.hidden { display: none !important; }
.screens { flex: 1; overflow: hidden; position: relative; }
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: #FFF5F8;
  opacity: 0; pointer-events: none;
  transform: translateX(30px);
  transition: opacity 0.25s, transform 0.25s;
}
.screen.active { opacity: 1; pointer-events: all; transform: translateX(0); }
.screen-body { flex: 1; overflow-y: auto; padding: 16px; }
.screen-body.scroll { -webkit-overflow-scrolling: touch; }

/* ===== TOPBAR ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px; flex-shrink: 0;
}
.topbar.gradient { background: linear-gradient(135deg, #FF8FAB, #F48FB1); }
.topbar.white { background: white; border-bottom: 1px solid #F0F0F0; }
.topbar-title { font-size: 1.05rem; font-weight: 700; color: white; }
.topbar-title.dark { color: #333; }
.topbar-sub { font-size: 0.75rem; color: rgba(255,255,255,0.85); margin-top: 2px; }
.back-btn { background: none; border: none; font-size: 1.3rem; color: #FF5A7A; cursor: pointer; padding: 0 4px; }
.icon-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; }

/* ===== PROGRESS CARD ===== */
.progress-card {
  background: white; border-radius: 18px; padding: 18px;
  box-shadow: 0 4px 16px rgba(244,143,177,0.15); margin-bottom: 18px;
}
.progress-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.progress-label-big { font-weight: 600; color: #555; font-size: 0.9rem; }
.progress-pct { font-size: 1.4rem; font-weight: 700; color: #FF5A7A; }
.progress-bar-big { background: #F0F0F0; border-radius: 10px; height: 10px; overflow: hidden; margin-bottom: 8px; }
.progress-fill-big { height: 100%; background: linear-gradient(90deg, #FF8FAB, #4DB6AC); border-radius: 10px; transition: width 0.6s ease; }
.progress-detail { font-size: 0.78rem; color: #aaa; }

/* ===== SECTION LABEL ===== */
.section-label { font-weight: 700; color: #555; font-size: 0.85rem; margin-bottom: 10px; }

/* ===== TASK ITEMS ===== */
.task-item {
  display: flex; align-items: center; gap: 10px;
  background: white; border-radius: 14px; padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-left: 4px solid #F48FB1;
  transition: opacity 0.3s, transform 0.2s;
  cursor: pointer;
}
.task-item.done { border-left-color: #4DB6AC; opacity: 0.75; }
.task-item.done .task-name { text-decoration: line-through; color: #aaa; }
.task-emoji { font-size: 1.3rem; flex-shrink: 0; }
.task-info { flex: 1; }
.task-name { font-weight: 600; color: #333; font-size: 0.88rem; }
.task-meta { font-size: 0.72rem; color: #aaa; margin-top: 2px; }
.task-check {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid #E0E0E0; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; flex-shrink: 0; transition: all 0.2s;
}
.task-item.done .task-check { background: #4DB6AC; border-color: #4DB6AC; color: white; }
.prio-alta .task-check { border-color: #FF5A7A; }
.prio-media .task-check { border-color: #FFB74D; }
.prio-baixa .task-check { border-color: #4DB6AC; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 40px 20px; color: #ccc; }
.empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.9rem; line-height: 1.6; }

/* ===== FAB ===== */
.fab {
  position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%);
  padding: 13px 32px;
  background: linear-gradient(135deg, #FF5A7A, #FF8FAB);
  color: white; border: none; border-radius: 30px;
  font-size: 0.95rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 20px rgba(255,90,122,0.4);
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
  transition: transform 0.2s;
}
.fab:hover { transform: translateX(-50%) translateY(-2px); }

/* ===== FORM ===== */
.form-card { background: white; border-radius: 18px; padding: 20px; box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: #666; margin-bottom: 6px; }
.form-group input, .form-group select {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid #E8E8E8; border-radius: 12px;
  font-size: 0.9rem; color: #333; outline: none;
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.2s;
  background: #FAFAFA;
}
.form-group input:focus, .form-group select:focus { border-color: #F48FB1; background: white; }
.row-group { display: flex; align-items: center; justify-content: space-between; }
.row-group label { margin: 0; }

/* Priority */
.priority-group { display: flex; gap: 8px; }
.prio-btn {
  flex: 1; padding: 9px 6px; border-radius: 10px; border: 2px solid #E8E8E8;
  font-size: 0.78rem; font-weight: 600; cursor: pointer; background: white;
  font-family: 'Poppins', sans-serif; transition: all 0.2s;
}
.prio-btn.active.alta { background: #FFE0E8; border-color: #FF5A7A; color: #FF5A7A; }
.prio-btn.active.media { background: #FFF3E0; border-color: #FFB74D; color: #E65100; }
.prio-btn.active.baixa { background: #E0F5F0; border-color: #4DB6AC; color: #00796B; }

/* Toggle */
.toggle {
  width: 46px; height: 26px; border-radius: 13px; background: #E0E0E0;
  position: relative; cursor: pointer; transition: background 0.3s; flex-shrink: 0;
}
.toggle.on { background: #4DB6AC; }
.toggle-knob {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: left 0.3s;
}
.toggle.on .toggle-knob { left: 23px; }

/* Buttons */
.btn-primary {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #FF5A7A, #FF8FAB);
  color: white; border: none; border-radius: 14px;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 4px 14px rgba(255,90,122,0.35);
  transition: transform 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); }

/* ===== WEEK NAV ===== */
.week-nav { margin-bottom: 16px; }
.week-days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.week-days::-webkit-scrollbar { display: none; }
.day-chip {
  display: flex; flex-direction: column; align-items: center;
  min-width: 46px; padding: 8px 6px; border-radius: 14px;
  cursor: pointer; transition: all 0.2s; flex-shrink: 0;
  border: 2px solid transparent;
}
.day-chip .day-name { font-size: 0.65rem; font-weight: 600; color: #aaa; text-transform: uppercase; }
.day-chip .day-num { font-size: 1.1rem; font-weight: 700; color: #555; margin-top: 2px; }
.day-chip.active { background: linear-gradient(135deg, #FF5A7A, #FF8FAB); border-color: transparent; }
.day-chip.active .day-name, .day-chip.active .day-num { color: white; }
.day-chip:not(.active):hover { border-color: #F48FB1; }

/* ===== RELATÓRIO ===== */
.relatorio-hero {
  background: linear-gradient(135deg, #FF8FAB, #4DB6AC);
  border-radius: 20px; padding: 28px; text-align: center;
  color: white; margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(244,143,177,0.3);
}
.rel-pct { font-size: 3.5rem; font-weight: 700; line-height: 1; }
.rel-label { font-size: 0.9rem; opacity: 0.9; margin: 8px 0; }
.rel-stars { font-size: 1.4rem; }

.rel-dia-row {
  background: white; border-radius: 14px; padding: 12px 14px;
  margin-bottom: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.rel-dia-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.rel-dia-name { font-weight: 600; font-size: 0.85rem; color: #444; text-transform: capitalize; }
.rel-dia-pct { font-size: 0.8rem; font-weight: 700; color: #FF5A7A; }
.rel-dia-bar { background: #F0F0F0; border-radius: 6px; height: 6px; overflow: hidden; }
.rel-dia-fill { height: 100%; background: linear-gradient(90deg, #FF8FAB, #4DB6AC); border-radius: 6px; transition: width 0.6s; }

/* Sugestões */
.sugestao-card {
  background: white; border-radius: 14px; padding: 14px;
  margin-bottom: 8px; border-left: 4px solid #4DB6AC;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  font-size: 0.85rem; color: #555; line-height: 1.5;
}

/* ===== CONFIGURAÇÕES ===== */
.config-section-label {
  font-size: 0.72rem; font-weight: 700; color: #aaa;
  text-transform: uppercase; letter-spacing: 1px;
  margin: 16px 0 8px;
}
.config-item {
  display: flex; align-items: center; gap: 12px;
  background: white; border-radius: 14px; padding: 14px;
  margin-bottom: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  cursor: pointer;
}
.config-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.pink-bg { background: #FFE0EA; }
.teal-bg { background: #D0F0EE; }
.purple-bg { background: #EDE0FF; }
.green-bg { background: #D8F5E0; }
.config-info { flex: 1; }
.config-info strong { display: block; font-size: 0.88rem; color: #333; }
.config-info span { font-size: 0.75rem; color: #aaa; }
.cfg-arrow { color: #ccc; font-size: 1.1rem; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  display: flex; background: white;
  border-top: 1px solid #F0F0F0;
  padding: 8px 0 12px; flex-shrink: 0;
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  font-size: 0.65rem; color: #bbb; font-family: 'Poppins', sans-serif;
  transition: color 0.2s;
}
.nav-btn span:first-child { font-size: 1.3rem; }
.nav-btn.active { color: #FF5A7A; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  background: #333; color: white; padding: 12px 24px;
  border-radius: 30px; font-size: 0.85rem; font-weight: 500;
  z-index: 999; white-space: nowrap;
  animation: fadeInUp 0.3s ease;
}
@keyframes fadeInUp { from { opacity:0; transform: translateX(-50%) translateY(10px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }

/* ===== MODAL ===== */
.modal-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 50; padding: 20px;
}
.modal {
  background: white; border-radius: 24px; padding: 28px 24px;
  text-align: center; width: 100%; max-width: 300px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.modal-icon { font-size: 2.5rem; margin-bottom: 10px; }
.modal-title { font-size: 1.1rem; font-weight: 700; color: #333; margin-bottom: 8px; }
.modal-body { font-size: 0.9rem; color: #666; line-height: 1.6; margin-bottom: 20px; }
