
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  :root {
    --rosa: #F97B6B; --rosa-soft: #FDE8E5; --rosa-dark: #E05A4A;
    --lilás: #C4A8E0; --lilás-soft: #F0E8F8;
    --verde: #6DC9A0; --verde-soft: #E0F5EC;
    --azul: #78B8F0; --azul-soft: #E5F1FC;
    --amber: #F5C97A; --amber-soft: #FDF3DF;
    --branco: #FFFFFF; --bg: #FDF8F6; --bg2: #F5EEE9;
    --text: #2D1F1A; --text2: #7A6560; --text3: #B5A09B;
    --border: rgba(45,31,26,0.1);
    --shadow-lg: 0 8px 40px rgba(249,123,107,0.2);
    --r-sm: 12px; --r-md: 18px; --r-lg: 24px; --r-xl: 32px; --r-full: 999px;
  }
  html, body { height: 100%; overflow: hidden; background: var(--bg); font-family: 'Nunito', sans-serif; color: var(--text); -webkit-tap-highlight-color: transparent; user-select: none; }
  #app { height: 100%; display: flex; flex-direction: column; max-width: 430px; margin: 0 auto; background: var(--bg); position: relative; overflow: hidden; }

  /* Safe area para iPhones com notch */
  #app { padding-top: env(safe-area-inset-top); }
  .bottom-nav { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }

.page-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 90px;
}

  /* HEADER */
  .header { background: var(--branco); padding: 16px 20px 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); flex-shrink: 0; z-index: 10; }
  .header-title { font-family: 'Lora', serif; font-size: 22px; font-weight: 700; }
  .header-title span { color: var(--rosa); }
  .header-right { display: flex; align-items: center; gap: 8px; }
  .header-btn { width: 40px; height: 40px; border-radius: var(--r-full); background: var(--bg2); border: none; display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; transition: all 0.15s; }
  .header-btn:active { transform: scale(0.92); }

  /* STATUS BARS */
  .offline-banner { background: #FFF3CD; padding: 8px 16px; font-size: 13px; font-weight: 700; color: #8A5500; display: none; align-items: center; gap: 6px; justify-content: center; flex-shrink: 0; }
  .offline-banner.show { display: flex; }
  .sync-bar { background: var(--amber-soft); padding: 6px 16px; font-size: 12px; font-weight: 700; color: #8A5500; display: none; align-items: center; gap: 6px; justify-content: center; flex-shrink: 0; }
  .sync-bar.show { display: flex; }
  .sync-bar.error { background: #FFEBEB; color: #E24B4A; }
  .sync-bar.ok { background: var(--verde-soft); color: #2A7A50; }

  /* INSTALL BANNER */
  .install-banner {
  background: linear-gradient(135deg, var(--lilás-soft), var(--rosa-soft));
  padding: 12px 16px;
  display: none;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin: 8px 92px 8px 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  overflow: hidden;
}
  .install-banner.show { display: flex; }
  .install-banner-text { flex: 1; font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.4; }
  .install-banner-btn { background: var(--rosa); color: white; border: none; border-radius: var(--r-full); padding: 8px 14px; font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap; }
  .install-banner-close { background: none; border: none; color: var(--text3); font-size: 20px; cursor: pointer; padding: 4px; }



/* SIDE NAV */
.bottom-nav {
  position: fixed;
	right: calc((100% - min(100%, 430px)) / 2 + 8px);
width: 72px;
  top: 74px;
  bottom: 86px;

  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(45,31,26,0.08);
  border-radius: 34px;

  display: flex;
  flex-direction: column;
  align-items: center;

  padding: 10px 6px;
  gap: 7px;

  z-index: 100;
  box-shadow: 0 14px 35px rgba(45,31,26,0.12);

  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.bottom-nav::-webkit-scrollbar {
  display: none;
}

.nav-item {
  width: 52px;
  min-height: 56px;
  flex: 0 0 56px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 3px;
  padding: 6px 3px;

  border-radius: 20px;
  cursor: pointer;
  transition: all 0.18s ease;
  border: none;
  background: transparent;
}

.nav-item:active {
  transform: scale(0.94);
}

.nav-item.dragging {
  opacity: 0.45;
  transform: scale(1.06);
  box-shadow: 0 10px 24px rgba(45,31,26,0.22);
}

.bottom-nav.drag-active {
  overflow: hidden;
}

.bottom-nav.drag-active .nav-item {
  touch-action: none;
}

.nav-icon {
  font-size: 21px;
  line-height: 1;
}

.nav-label {
  width: 48px;
  font-size: 8px;
  font-weight: 900;
  color: var(--text3);
  transition: color 0.18s ease;
  line-height: 1.05;
  text-align: center;
  white-space: normal;
  overflow: hidden;
}

.nav-item.active {
  background: linear-gradient(135deg, var(--rosa-soft), #fff);
  box-shadow: inset 0 0 0 1px rgba(249,123,107,0.16);
}

.nav-item.active .nav-label {
  color: var(--rosa);
}

.nav-add {
  position: fixed;
right: calc((100% - min(100%, 430px)) / 2 + 13px);
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--rosa), var(--rosa-dark));
  border: none;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 28px;
  color: white;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(249,123,107,0.42);
  transition: all 0.15s;
  z-index: 120;
}

.nav-add:active {
  transform: scale(0.9);
}

  /* CARDS */
.card {
  background: var(--branco);
  border-radius: var(--r-lg);

  padding: 16px;

  margin: 8px 92px 8px 16px;

  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  cursor: pointer;
  overflow: hidden;
}
  .card:active { transform: scale(0.98); }
  .card.work-done {
  opacity: 0.58;
  filter: grayscale(0.25);
}

.card.work-done .card-title {
  text-decoration: line-through;
  color: var(--text3);
}

.card.work-late {
  background: linear-gradient(135deg, #FFE1E1, #FFF6F6);
  border: 2px solid #E24B4A;
  box-shadow: 0 4px 18px rgba(226,75,74,0.26);
}

.card.work-late .card-title {
  color: #B3261E;
  font-weight: 900;
}

  .card-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--r-full); font-size: 12px; font-weight: 700; margin-bottom: 8px; }

.card-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

  .card-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .card-meta-item { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text2); font-weight: 600; }

.card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.card-action-btn {
  min-width: 0;
  padding: 8px 8px;
  border-radius: var(--r-sm);
  border: none;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

  .card-action-btn:active { transform: scale(0.95); }
  .btn-ghost { background: var(--bg2); color: var(--text2); }
  .btn-share { background: var(--verde-soft); color: #2A8A60; }
  .btn-nav { background: var(--azul-soft); color: #1A6AAD; }
	.btn-archive {
  background: var(--amber-soft);
  color: #854F0B;
}

.btn-delete {
  background: #FFEBEB;
  color: #C62828;
}

.btn-done {
  background: var(--verde-soft);
  color: #0F6E56;
}

  /* SECTION */
.section-header {
  padding: 20px 92px 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
  .section-title { font-size: 13px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.08em; }
  .section-link { font-size: 13px; font-weight: 700; color: var(--rosa); cursor: pointer; }

  /* TODAY BANNER */
.today-banner {
  margin: 16px 86px 16px 16px;
  background: linear-gradient(135deg, var(--rosa), #F05A7E);
  border-radius: var(--r-xl);
  padding: 20px;
  color: white;
  position: relative;
  overflow: hidden;
}
  .today-banner::before { content: ''; position: absolute; right: -20px; top: -20px; width: 120px; height: 120px; background: rgba(255,255,255,0.12); border-radius: 50%; }
  .today-banner-label { font-size: 12px; font-weight: 700; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
  .today-banner-date { font-family: 'Lora', serif; font-size: 26px; font-weight: 700; margin-bottom: 12px; }
  .today-banner-count { font-size: 14px; font-weight: 700; opacity: 0.95; }
  .today-banner-btn { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.25); color: white; border: none; border-radius: var(--r-full); padding: 8px 16px; font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer; }

  /* STATS */

.quick-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 86px 8px 16px;
  overflow: visible;
}

  .quick-stats::-webkit-scrollbar { display: none; }
.stat-chip {

  min-width: 0;

  background: var(--branco);

  border-radius: var(--r-lg);

  padding: 12px 10px;

  display: flex;

  align-items: center;

  gap: 8px;

  box-shadow: 0 2px 12px rgba(0,0,0,0.06);

}

.stat-today-click {
  cursor: pointer;
}

.stat-today-click:active {
  transform: scale(0.96);
}
  .stat-icon { width: 40px; height: 40px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
  .stat-value { font-size: 20px; font-weight: 800; line-height: 1; }
  .stat-label { font-size: 11px; font-weight: 600; color: var(--text3); margin-top: 2px; }

  /* VOICE */
.voice-btn-wrapper {
  display: flex;
  justify-content: center;
  padding: 16px 86px 16px 16px;
}
.voice-btn {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #7C6BEE, var(--lilás));
  color: white;
  border: none;
  border-radius: var(--r-full);
  padding: 16px 20px;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(124,107,238,0.4);
  justify-content: center;
}
  .voice-btn:active { transform: scale(0.95); }
  .voice-pulse { width: 12px; height: 12px; background: rgba(255,255,255,0.8); border-radius: 50%; animation: pulse 1.4s ease-in-out infinite; }
  @keyframes pulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.5);opacity:0.5} }

  /* MODAL */
  .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; display: flex; flex-direction: column; justify-content: flex-end; animation: fadeIn 0.2s ease; }
  @keyframes fadeIn { from{opacity:0} to{opacity:1} }
  .modal-sheet { background: var(--branco); border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 90vh; overflow-y: auto; -webkit-overflow-scrolling: touch; animation: slideUp 0.3s cubic-bezier(0.32,0.72,0,1); padding-bottom: calc(30px + env(safe-area-inset-bottom)); }
  @keyframes slideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }
  .modal-handle { width: 40px; height: 4px; background: var(--border); border-radius: var(--r-full); margin: 12px auto 20px; }
  .modal-header { padding: 0 20px 16px; display: flex; align-items: center; justify-content: space-between; }
  .modal-title { font-family: 'Lora', serif; font-size: 22px; font-weight: 700; }
  .modal-close { width: 36px; height: 36px; border-radius: var(--r-full); background: var(--bg2); border: none; font-size: 20px; cursor: pointer; color: var(--text2); display:flex;align-items:center;justify-content:center; }

  /* FORM */
.form-section { padding: 0 20px 20px; }
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 2px solid var(--border);
  background: var(--bg);
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: var(--rosa);
}

.form-input::placeholder {
  color: var(--text3);
  font-weight: 500;
}

textarea.form-input {
  resize: none;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* SETA NOS SELECTS */

select.form-input{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;

  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 20 20'%3E%3Cpath fill='%23B5A09B' d='M5 7l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
  background-size:18px;

  padding-right:42px;
  cursor:pointer;
}

/* SETA VISÍVEL NOS SELECTS */

.select-wrap{
  position:relative;
}

.select-wrap .form-input{
  padding-right:48px;
}

.select-arrow{
  position:absolute;
  right:16px;
  top:50%;
  transform:translateY(-52%);
  pointer-events:none;
  color:var(--text2);
  font-size:24px;
  font-weight:900;
  line-height:1;
}

/* VER PASSWORD */

.password-wrap{
  position:relative;
}

.password-wrap .form-input{
  padding-right:52px;
}

.password-toggle{
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  border:none;
  background:none;
  cursor:pointer;
  font-size:20px;
  line-height:1;
  padding:4px;
  color:var(--text2);
}

.password-toggle:active{
  transform:translateY(-50%) scale(0.92);
}

  /* CATEGORY */
  .category-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
  .cat-btn { padding: 10px 8px; border-radius: var(--r-md); border: 2px solid var(--border); background: var(--bg); font-family: 'Nunito', sans-serif; font-size: 12px; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
  .cat-btn:active { transform: scale(0.95); }
  .cat-btn.selected { border-color: var(--rosa); background: var(--rosa-soft); color: var(--rosa-dark); }
  .cat-icon { font-size: 22px; }

  /* SAVE BTN */
  .save-btn { margin: 16px 20px; width: calc(100% - 40px); padding: 18px; background: linear-gradient(135deg, var(--rosa), var(--rosa-dark)); color: white; border: none; border-radius: var(--r-xl); font-family: 'Nunito', sans-serif; font-size: 18px; font-weight: 800; cursor: pointer; box-shadow: var(--shadow-lg); display: flex; align-items: center; justify-content: center; gap: 8px; }
  .save-btn:active { transform: scale(0.97); }
  .save-btn:disabled { opacity: 0.6; }

  /* EMPTY */
.empty-state {
  text-align: center;
  padding: 60px 92px 60px 16px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
  .empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-title {
  font-family: 'Lora', serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align:center;
}
.empty-sub {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.5;
  text-align:center;
  max-width:260px;
}


  /* VOICE MODAL */
  .voice-modal-content { text-align: center; padding: 20px 20px 10px; }
  .voice-circle { width: 100px; height: 100px; border-radius: 50%; background: linear-gradient(135deg, #7C6BEE, var(--lilás)); display: flex; align-items: center; justify-content: center; font-size: 44px; margin: 0 auto 16px; box-shadow: 0 4px 30px rgba(124,107,238,0.4); position: relative; }
  .voice-circle.listening::after { content:''; position:absolute; inset:-8px; border-radius:50%; border:3px solid rgba(124,107,238,0.3); animation:sonar 1.5s ease-out infinite; }
  @keyframes sonar { 0%{transform:scale(1);opacity:1} 100%{transform:scale(1.4);opacity:0} }
  .voice-examples { text-align: left; background: var(--bg2); border-radius: var(--r-lg); padding: 14px 16px; margin: 0 0 16px; }
  .voice-example-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text3); margin-bottom: 8px; }
  .voice-example-item { font-size: 13px; font-weight: 600; color: var(--text2); padding: 3px 0; }
  .voice-example-item::before { content: '💬 '; }
  .voice-input-field { width: 100%; padding: 14px 16px; border-radius: var(--r-md); border: 2px solid var(--lilás); background: var(--lilás-soft); font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 600; color: var(--text); outline: none; margin-bottom: 12px; min-height: 70px; resize: none; }
  .voice-interpret-btn { width: 100%; padding: 16px; background: linear-gradient(135deg, #7C6BEE, var(--lilás)); color: white; border: none; border-radius: var(--r-xl); font-family: 'Nunito', sans-serif; font-size: 17px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }

  /* SHARE */
  .share-options { padding: 0 20px; display: flex; flex-direction: column; gap: 10px; }
  .share-option-btn { width: 100%; padding: 16px; border-radius: var(--r-lg); border: 2px solid var(--border); background: var(--branco); font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 12px; color: var(--text); }
  .share-option-btn:active { transform: scale(0.97); }
  .share-option-btn.whatsapp { background: #25D366; color: white; border-color: #25D366; }

  /* CALENDAR */
  .calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; padding: 0 16px; }
  .cal-day-header { text-align: center; font-size: 11px; font-weight: 700; color: var(--text3); padding: 6px 0; text-transform: uppercase; }
  .cal-day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; cursor: pointer; position: relative; }
  .cal-day:active { transform: scale(0.9); }
  .cal-day.other-month { color: var(--text3); }
  .cal-day.today { background: var(--rosa); color: white; font-weight: 800; }
  .cal-day.has-events::after { content:''; width:5px; height:5px; border-radius:50%; background:var(--day-dot, var(--rosa)); position:absolute; bottom:3px; }
  .cal-day.today.has-events::after { background: white; }
  .cal-day.selected { background: var(--rosa-soft); color: var(--rosa-dark); font-weight: 800; }

  /* DETAIL */
  .detail-section { background: var(--branco); margin: 12px 16px; border-radius: var(--r-lg); overflow: hidden; }
  .detail-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .detail-row:last-child { border-bottom: none; }
  .detail-row-icon { width: 38px; height: 38px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
  .detail-row-label { font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
  .detail-row-value { font-size: 15px; font-weight: 600; }

  /* SEARCH */
.search-bar {
  margin: 12px 92px 12px 16px;
  position: relative;
}
  .search-input { width: 100%; padding: 14px 44px; border-radius: var(--r-xl); border: 2px solid var(--border); background: var(--branco); font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 600; color: var(--text); outline: none; -webkit-appearance: none; }
  .search-input:focus { border-color: var(--rosa); }
  .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 18px; pointer-events: none; }

/* ===== BOTÃO VOLTAR - LISTA COMPLETA DE EVENTOS ===== */

.events-back-sticky{
  position:sticky;
  top:8px;
  z-index:50;
  padding:8px 92px 4px 16px;
  pointer-events:none;
}

.events-back-btn{
  pointer-events:auto;
  border:1px solid var(--border);
  background:rgba(255,255,255,.82);
  color:var(--text2);
  backdrop-filter:blur(10px);
  border-radius:999px;
  padding:7px 12px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 4px 14px rgba(0,0,0,.08);
}

.events-back-btn:active{
  transform:scale(.96);
}

  /* FILTERS */
.filter-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 92px 12px 16px;
  overflow: visible;
}
  .filter-chips::-webkit-scrollbar { display: none; }

.filter-chip {
  min-width: 0;
  width: 100%;
  padding: 9px 8px;
  border-radius: var(--r-lg);
  border: 2px solid var(--border);
  background: var(--branco);
  font-family: 'Nunito', sans-serif;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  color: var(--text2);
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  overflow: hidden;
  text-overflow: ellipsis;
}

  .filter-chip.active { background: var(--rosa); border-color: var(--rosa); color: white; }

  /* SETTINGS */
.settings-section {
  background: var(--branco);
  margin: 12px 92px 12px 16px;
  border-radius: var(--r-lg);
  overflow: hidden;
}
  .settings-row { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
  .settings-row:last-child { border-bottom: none; }
  .settings-row:active { background: var(--bg2); }
  .settings-icon { width: 40px; height: 40px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
  .settings-info { flex: 1; }
  .settings-label { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
  .settings-sub { font-size: 13px; color: var(--text2); }
  .toggle { width: 50px; height: 28px; border-radius: var(--r-full); background: var(--border); position: relative; cursor: pointer; transition: background 0.2s; flex-shrink: 0; }
  .toggle.on { background: var(--rosa); }
  .toggle::after { content:''; position:absolute; left:3px; top:3px; width:22px; height:22px; border-radius:50%; background:white; box-shadow:0 1px 4px rgba(0,0,0,0.2); transition:transform 0.2s; }
  .toggle.on::after { transform: translateX(22px); }

  /* PREVIEW */
  .preview-card { margin: 0 20px 16px; background: var(--bg2); border-radius: var(--r-lg); padding: 16px; border-left: 4px solid var(--rosa); }
  .preview-field { display: flex; gap: 8px; margin-bottom: 6px; font-size: 14px; }
  .preview-field-label { color: var(--text3); font-weight: 600; min-width: 70px; }
  .preview-field-val { color: var(--text); font-weight: 700; }

  /* MED TIMES */
  .med-times { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
  .med-time-chip { padding: 6px 12px; background: var(--amber-soft); border-radius: var(--r-full); font-size: 13px; font-weight: 700; color: #8A5500; display: flex; align-items: center; gap: 6px; }

/* BIRTHDAY */
.bday-card {
  background: linear-gradient(135deg, var(--lilás-soft), var(--rosa-soft));
  border-radius: var(--r-lg);
  padding: 14px 16px;
  margin: 8px 92px 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--lilás);
  cursor: pointer;
  overflow: hidden;
}

  /* REMINDER BADGE */
  .reminder-badge { position: absolute; top: -4px; right: -4px; width: 18px; height: 18px; background: var(--rosa); border-radius: 50%; font-size: 11px; font-weight: 800; color: white; display: flex; align-items: center; justify-content: center; }

  /* SPINNER */
  .spinner { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }
  @keyframes spin { to{transform:rotate(360deg)} }

  /* TOAST */
  .toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 1000; background: var(--text); color: var(--branco); padding: 12px 20px; border-radius: var(--r-full); font-size: 14px; font-weight: 700; max-width: 300px; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,0.25); animation: toastIn 0.3s cubic-bezier(0.32,0.72,0,1); }
  @keyframes toastIn { from{opacity:0;transform:translateX(-50%) translateY(-20px)} to{opacity:1;transform:translateX(-50%) translateY(0)} }

  .fade-in { animation: fadeInUp 0.3s ease; }
  @keyframes fadeInUp { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }
.invoice-loading-dots {
  display: inline-block;
  animation: invoicePulse 1s infinite ease-in-out;
}

@keyframes invoicePulse {
  0% { opacity: .25; transform: scale(.96); }
  50% { opacity: 1; transform: scale(1.04); }
  100% { opacity: .25; transform: scale(.96); }
}
/* REMINDER BANNER - igual aos blocos de baixo, sem ficar atrás do menu */
.reminder-banner {
  display: none;
  margin: 0 92px 0 16px;
  background: linear-gradient(135deg,#FFF3CD,#FDE8E5);
  border-radius: var(--r-lg);
  border: 1px solid rgba(45,31,26,0.08);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
}

.reminder-banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.reminder-banner-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.reminder-banner-text {
  flex: 1;
  min-width: 0;
}

#reminderBannerTitle {
  font-size: 13px;
  font-weight: 800;
  color: #8A5500;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

#reminderBannerSub {
  font-size: 12px;
  font-weight: 600;
  color: #A06000;
  margin-top: 2px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.reminder-banner-close {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 18px;
  color: #A06000;
  cursor: pointer;
  padding: 4px;
}



body.layout-bottom .bottom-nav {
  left: 12px;
  right: 12px;
  top: auto;
  bottom: calc(10px + env(safe-area-inset-bottom));
  width: auto;
  height: 72px;
  border-radius: 28px;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  padding: 8px 76px 8px 8px;

  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

body.layout-bottom .install-banner {
  margin-right: 16px;
}

body.layout-bottom .nav-item {
  flex: 0 0 58px;
  scroll-snap-align: center;
}

body.layout-bottom .bottom-nav::-webkit-scrollbar {
  display: none;
}

body.layout-bottom .nav-add {
  right: 18px;
  bottom: calc(92px + env(safe-area-inset-bottom));
}

body.layout-bottom .card,
body.layout-bottom .bday-card,
body.layout-bottom .today-banner,
body.layout-bottom .reminder-banner,
body.layout-bottom .settings-section,
body.layout-bottom .search-bar {
  margin-right: 16px;
}

body.layout-bottom .section-header,
body.layout-bottom .quick-stats,
body.layout-bottom .filter-chips,
body.layout-bottom .voice-btn-wrapper,
body.layout-bottom .empty-state {
  padding-right: 16px;
}

body.layout-bottom .page-safe-area {
  width: 100%;
  padding-right: 16px;
}

body.layout-compact .card {
  padding: 12px;
  border-radius: var(--r-md);
}

body.layout-compact .today-banner {
  padding: 16px;
  border-radius: var(--r-lg);
}

body.layout-compact .stat-chip {
  padding: 9px;
}

body.layout-comfort .card {
  padding: 20px;
  border-radius: var(--r-xl);
}

body.layout-comfort .card-title {
  font-size: 19px;
}

body.layout-comfort .stat-chip {
  padding: 16px 12px;
}



.appearance-option {
  border: 2px solid var(--border);
  background: var(--bg);
  border-radius: var(--r-lg);
  padding: 12px;
  cursor: pointer;
}

.appearance-option.active {
  border-color: var(--rosa);
  background: var(--rosa-soft);
}

.appearance-option-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
}

.appearance-option-sub {
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  margin-top: 4px;
}

.appearance-photo-preview {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: var(--bg2);
  border: 3px solid var(--rosa-soft);
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  overflow: hidden;
}

/* Área segura para páginas com menu lateral */
.page-safe-area{
  width:calc(100% - 92px);
  padding-right:92px;
  box-sizing:border-box;
}

/* ===== FOLGAS: impedir conteúdo atrás do menu lateral ===== */
#page-folgas .section-header {
  padding-right: 88px;
}

#page-folgas > .card {
  margin-right: 88px;
}

#page-folgas .folgas-summary-wrap {
  margin: 8px 88px 8px 16px !important;
}

#folgasCalendar {
  gap: 4px !important;
}

#page-folgas .cat-btn {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ===== COR GLOBAL DA PESSOA NOS CARDS ===== */
.card.person-card {
  border-left: 6px solid var(--person-color, var(--rosa));
  box-shadow:
    inset 0 0 0 999px color-mix(in srgb, var(--person-color, var(--rosa)) 6%, transparent),
    0 2px 12px rgba(0,0,0,0.06);
}

.person-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--person-color, var(--rosa));
  display: inline-block;
  flex-shrink: 0;
}

/* AVATARES DOS HORÁRIOS ESCOLARES */
.school-avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.school-avatar-option {
  border: 2px solid var(--border);
  background: var(--bg);
  border-radius: var(--r-lg);
  padding: 10px 6px;
  font-size: 28px;
  cursor: pointer;
}

.school-avatar-option.selected {
  border-color: var(--rosa);
  background: var(--rosa-soft);
}

.school-schedule-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.school-schedule-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--azul-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}

.school-schedule-info {
  flex: 1;
  min-width: 0;
}

.school-schedule-arrow {
  font-size: 26px;
  color: var(--text3);
}

.school-schedule-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.school-avatar-option img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.school-avatar-option {
  background: white;
  padding: 8px;
}