/* ============================================================
   FibroVida — Estilos visuais | Paleta Lilás (cor da fibromialgia)
   Fundo: lilás muito claro | Cards: branco | Primária: #9B59B6
   ============================================================ */

:root {
  --bg:           #faf8fc;
  --bg2:          #ede8f5;
  --card:         #ffffff;
  --border:       #dad4e8;
  --border-light: #e8e2f4;

  --green:        #9B59B6;
  --green-dark:   #7D3C98;
  --green-light:  #C39BD3;
  --green-pale:   #F5EEF8;
  --green-ultra:  #FAF5FC;
  --green-banner: #9B59B6;

  --secondary:    #5A7E9E;
  --secondary-bg: #eaf2f8;
  --accent:       #C98A42;
  --accent-bg:    #fdf3e7;
  --purple:       #9b59b6;
  --purple-bg:    #f5eefa;

  --text:         #2a2a1a;
  --text2:        #5a5a40;
  --text-muted:   #9a9a80;

  --danger:       #c0392b;
  --danger-bg:    #fdf0ef;
  --warning:      #e67e22;
  --warning-bg:   #fef9f0;
  --info:         #2980b9;
  --info-bg:      #eaf4fb;
  --success:      #27ae60;
  --success-bg:   #edfaf3;

  --radius:    10px;
  --radius-sm: 8px;
  --radius-xs: 5px;

  --shadow:    0 1px 4px rgba(0,0,0,0.07);
  --shadow-md: 0 2px 10px rgba(0,0,0,0.10);

  --nav-h:    62px;
  --header-h: 56px;
  --font: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
}

/* ── DARK MODE ─────────────────────────────────────────────── */
body.dark {
  --bg:           #1a1422;
  --bg2:          #1e1630;
  --card:         #1e1a2e;
  --border:       #38285a;
  --border-light: #2a1e48;

  --green:        #BB8FCC;
  --green-dark:   #D7BDE2;
  --green-light:  #9B59B6;
  --green-pale:   #200E30;
  --green-ultra:  #180C26;
  --green-banner: #4A2460;

  --secondary:    #6a9ab8;
  --secondary-bg: #0e1e2e;
  --accent:       #d9a060;
  --accent-bg:    #2a1e0e;
  --purple:       #cc99e0;
  --purple-bg:    #200e30;

  --text:         #ede0f5;
  --text2:        #c4aad8;
  --text-muted:   #8a78a0;

  --danger:       #e05040;
  --danger-bg:    #2a1a18;
  --warning:      #e8902a;
  --warning-bg:   #2a2010;
  --info:         #4a9ad8;
  --info-bg:      #14202e;
  --success:      #48c878;
  --success-bg:   #102818;

  --shadow:    0 1px 4px rgba(0,0,0,0.30);
  --shadow-md: 0 2px 10px rgba(0,0,0,0.40);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-size: 14px;
}

body { transition: background .25s, color .25s; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── APP WRAPPER ── */
#app { min-height: 100vh; display: flex; flex-direction: column; }

.screen { display: none; flex: 1; flex-direction: column; min-height: 100vh; }
.screen.active { display: flex; }

/* ============================================================
   AUTH
   ============================================================ */
/* ── AUTH SCREEN — background image + glass card ── */
#auth-screen {
  /* Fallback: gradiente verde se a foto não carregar */
  background-color: #6C3483;
  /* Foto de casal + overlay escuro */
  background-image:
    linear-gradient(to bottom,
      rgba(0,0,0,0.08) 0%,
      rgba(0,0,0,0.40) 45%,
      rgba(0,0,0,0.80) 100%),
    url('./Images/login-bg.jpg.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  align-items: center;
  justify-content: flex-end;
  padding: 0 16px 72px;
  min-height: 100dvh;
  min-height: 100vh;
  width: 100%;
  box-sizing: border-box;
}

.auth-wrap {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

/* Logo — branco sobre a foto */
.auth-logo {
  text-align: center;
  margin-bottom: 14px;
}

.auth-logo-icon {
  width: 68px; height: 68px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.38);
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.auth-logo h1 {
  font-size: 28px; font-weight: 800; letter-spacing: -0.5px;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.auth-logo p {
  font-size: 13px; color: rgba(255,255,255,0.88);
  margin-top: 3px; text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Frase inspiracional sobre a imagem */
.auth-quote-strip {
  text-align: center;
  margin-bottom: 18px;
  padding: 0 4px;
}

.auth-chip {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  padding: 4px 12px; border-radius: 20px;
  margin-bottom: 8px; display: inline-block;
}

.auth-quote-text {
  font-size: 17px; font-weight: 700; line-height: 1.4;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
  margin: 0;
  font-style: italic;
}

/* Card — glass morphism transparente */
.auth-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-radius: 20px;
  padding: 26px 24px 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.28), 0 1px 0 rgba(255,255,255,0.2) inset;
  border: 1px solid rgba(255,255,255,0.28);
}

.auth-card h2 {
  font-size: 17px; font-weight: 700; margin-bottom: 18px;
  color: #ffffff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

/* Labels do formulário brancos */
.auth-card label,
.auth-card .auth-link,
.auth-card a {
  color: rgba(255,255,255,0.92) !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Inputs semi-opacos para leitura */
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
  background: rgba(255,255,255,0.82) !important;
  border: 1px solid rgba(255,255,255,0.5) !important;
  color: #1a1a1a !important;
}

.auth-panel { display: none; }
.auth-panel.active { display: block; }

/* ── Forms ── */
.fg { margin-bottom: 14px; }

.fg label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text2); margin-bottom: 5px; letter-spacing: .02em;
}

.fg input, .fg select, .fg textarea {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font);
  color: var(--text); background: var(--bg);
  transition: border-color .18s, background .18s;
  outline: none; appearance: none;
}

.fg input:focus, .fg select:focus, .fg textarea:focus {
  border-color: var(--green);
  background: #fff;
}

.fg textarea { resize: vertical; min-height: 78px; }

.fg-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}
.fg input.field-error {
  border-color: #d9534f;
  background: rgba(217,83,79,0.06);
}

.auth-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 0 10px;
  display: block;
}
.auth-back:hover { color: var(--green); }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 42px; }
.pw-toggle {
  position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  font-size: 16px; color: var(--text-muted); line-height: 1;
}
.pw-toggle:hover { color: var(--green); }

.lgpd-row {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--green-ultra);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 14px;
}
.lgpd-row input[type="checkbox"] {
  width: 16px; height: 16px; flex-shrink: 0;
  margin-top: 1px; accent-color: var(--green);
}
.lgpd-row label {
  font-size: 12px; color: var(--text2);
  line-height: 1.5; cursor: pointer; font-weight: 400;
}
.lgpd-row label a { color: var(--green); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: none; font-size: 14px; font-weight: 600;
  font-family: var(--font); cursor: pointer;
  transition: all .18s; text-decoration: none; width: 100%;
}

.btn-primary {
  background: var(--green); color: #fff;
  box-shadow: 0 2px 8px rgba(122,154,80,.25);
}
.btn-primary:hover { background: var(--green-dark); }
.btn-primary:active { transform: scale(.98); }

.btn-secondary {
  background: var(--card); color: var(--green-dark);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--green-ultra); }

.btn-ghost {
  background: transparent; color: var(--green);
  border: none; width: auto; font-size: 13px; padding: 8px 12px;
}
.btn-ghost:hover { background: var(--green-ultra); border-radius: var(--radius-sm); }

.btn-danger-soft {
  background: var(--danger-bg); color: var(--danger);
  border: 1px solid #f0c8c5;
}
.btn-danger-soft:hover { background: #fae0de; }

.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; }

.btn-sm { padding: 7px 14px; font-size: 13px; width: auto; }

.btn-round {
  width: 36px; height: 36px; padding: 0;
  border-radius: 50%; font-size: 16px; width: auto; min-width: 36px;
}

/* FAB + button */
.btn-fab {
  width: 38px; height: 38px;
  border-radius: 50%; border: none;
  background: var(--green); color: #fff;
  font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 2px 8px rgba(122,154,80,.30);
  transition: background .18s, transform .15s; flex-shrink: 0;
}
.btn-fab:hover { background: var(--green-dark); transform: scale(1.08); }

.auth-links {
  display: flex; flex-direction: column; align-items: center;
  margin-top: 10px;
}
.auth-links button {
  background: none; border: none; color: var(--green);
  font-size: 13px; cursor: pointer; font-family: var(--font);
  text-decoration: underline;
  padding: 10px 14px;
  min-height: 40px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(122,154,80,0.25);
  position: relative;
  z-index: 1;
}
.auth-links button:hover,
.auth-links button:focus-visible { color: var(--green-dark); }
.auth-links button:active { transform: scale(.97); }

/* ── 2-button row ── */
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 16px;
  gap: 10px;
}

.header-logo-icon { font-size: 20px; line-height: 1; }

.header-brand { flex: 1; min-width: 0; }
.header-brand .name {
  font-size: 16px; font-weight: 800; color: var(--green-dark); line-height: 1.1;
}
.header-brand .tagline {
  font-size: 11px; color: var(--text-muted); font-weight: 400;
}

.header-actions { display: flex; gap: 6px; }
.hbtn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px; color: var(--text2);
  transition: background .15s;
}
.hbtn:hover { background: var(--green-pale); }

/* ============================================================
   AVISO MÉDICO — fixo acima da nav
   ============================================================ */
.medical-disclaimer {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  z-index: 199;
  background: rgba(120, 155, 87, 0.12);
  border-top: 1px solid rgba(120, 155, 87, 0.3);
  text-align: center;
  font-size: 10.5px;
  color: var(--text-muted, #888);
  padding: 4px 12px;
  line-height: 1.3;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.medical-disclaimer strong {
  color: var(--primary, #9B59B6);
}

/* ============================================================
   BOTTOM NAV — oculta (substituída pelo drawer lateral)
   ============================================================ */
.bottom-nav,
.bottom-nav::-webkit-scrollbar { display: none !important; }

.nav-item {
  flex: 1 1 0;
  min-width: 44px;
  max-width: 90px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; cursor: pointer;
  border: none; background: none;
  font-family: var(--font); padding: 6px 4px;
  position: relative; transition: all .15s;
}

.nav-item .ni { font-size: 19px; line-height: 1; }
.nav-item .nl { font-size: 9px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }

.nav-item.active .nl { color: var(--green); }
.nav-item.active::after {
  content: ''; position: absolute;
  bottom: 0; left: 20%; right: 20%;
  height: 2.5px; background: var(--green);
  border-radius: 2px 2px 0 0;
}

/* ============================================================
   MENU HAMBÚRGUER + DRAWER LATERAL
   ============================================================ */

/* Botão ← Voltar no header */
.btn-voltar {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg2);
  cursor: pointer; font-size: 18px; font-weight: 700;
  color: var(--green-dark); flex-shrink: 0;
  transition: background .15s;
}
.btn-voltar:hover { background: var(--green-pale); }

/* Botão ☰ no header */
.menu-toggle-btn {
  display: flex; flex-direction: column; justify-content: center;
  gap: 5px; width: 36px; height: 36px; padding: 6px;
  border: none; background: none; cursor: pointer;
  border-radius: var(--radius-sm); flex-shrink: 0;
  transition: background .15s;
}
.menu-toggle-btn:hover { background: var(--green-pale); }
.menu-toggle-btn span {
  display: block; height: 2px; border-radius: 2px;
  background: var(--green-dark); transition: all .25s;
}

/* Backdrop escuro */
.drawer-backdrop {
  display: none; position: fixed; inset: 0; z-index: 299;
  background: rgba(0,0,0,.45); backdrop-filter: blur(2px);
}
.drawer-backdrop.open { display: block; }

/* Drawer panel */
.side-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 300;
  width: 280px; max-width: 85vw;
  background: var(--card); border-right: 1px solid var(--border);
  box-shadow: 4px 0 24px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.side-drawer.open { transform: translateX(0); }

/* Cabeçalho do drawer */
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; height: var(--header-h);
  border-bottom: 1px solid var(--border);
  font-size: 15px; font-weight: 800; color: var(--green-dark);
  flex-shrink: 0;
}
.drawer-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg2);
  cursor: pointer; font-size: 13px; color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.drawer-close:hover { background: var(--green-pale); }

/* Lista de itens */
.drawer-items {
  flex: 1; overflow-y: auto; padding: 8px 0;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.drawer-item {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 13px 20px; border: none; background: none;
  font-family: var(--font); font-size: 14px; font-weight: 500;
  color: var(--text2); cursor: pointer; text-align: left;
  transition: background .12s, color .12s;
  border-radius: 0;
}
.drawer-item:hover { background: var(--green-pale); color: var(--green-dark); }
.drawer-item.active { background: var(--green-pale); color: var(--green-dark); font-weight: 700; }
.drawer-item .di { font-size: 20px; line-height: 1; width: 26px; text-align: center; flex-shrink: 0; }

.drawer-divider {
  height: 1px; background: var(--border);
  margin: 8px 16px;
}
.drawer-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 14px 20px 4px; pointer-events: none;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  flex: 1; overflow-y: auto;
  padding: 16px 14px 80px;
  max-width: 640px; width: 100%; margin: 0 auto;
}

/* ── Tab panes ── */
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ============================================================
   PAGE TITLE BAR
   ============================================================ */
.page-title-bar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}

.pt-icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.pt-icon-green  { background: var(--green-pale); }
.pt-icon-red    { background: #fdecea; }
.pt-icon-blue   { background: var(--info-bg); }
.pt-icon-purple { background: #f3eeff; }
.pt-icon-orange { background: var(--warning-bg); }
.pt-icon-teal   { background: #e0f5f5; }

.pt-body { flex: 1; min-width: 0; }
.pt-title { font-size: 17px; font-weight: 800; color: var(--text); }
.pt-sub   { font-size: 12px; color: var(--text-muted); font-weight: 400; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
}

.card-body { padding: 16px; }
.card-pad  { padding: 16px; }

.card-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 12px;
}
.card-title .icon { font-size: 16px; }

/* ── Motivational banner ── */
.motive-banner {
  background: var(--green-banner);
  color: #e8f0d8;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 13px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(90,122,48,0.20);
  letter-spacing: 0.01em;
}

/* ── Greeting card ── */
.greeting-card {
  background: transparent;
  border-radius: 0;
  border: none;
  box-shadow: none;
  padding: 18px 4px 10px;
  margin-bottom: 4px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.g-emoji {
  font-size: 28px;
  line-height: 1;
  margin-top: 2px;
  flex-shrink: 0;
}

.greeting-card .g-hello {
  font-size: 22px; font-weight: 800; color: var(--text);
  margin-bottom: 3px; line-height: 1.15;
}

.greeting-card .g-date {
  font-size: 12px; color: var(--green); font-weight: 600; margin-bottom: 0;
  text-transform: capitalize;
}

/* ── Home 2-col grid ── */
.home-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 12px;
}

.home-grid-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px 12px;
  box-shadow: var(--shadow);
}

.home-grid-card .hgc-title {
  font-size: 12px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 5px;
  margin-bottom: 10px;
}

.home-grid-card .hgc-icon { font-size: 14px; }

.hgc-empty {
  font-size: 12px; color: var(--text-muted);
  text-align: center; padding: 8px 0;
}

.dica-list { list-style: none; padding: 0; }
.dica-list li {
  font-size: 12px; color: var(--text2);
  padding: 3px 0 3px 14px; position: relative; line-height: 1.4;
}
.dica-list li::before {
  content: '•'; position: absolute; left: 0;
  color: var(--green); font-size: 14px; top: 1px;
}

/* ── Ações Rápidas ── */
.acoes-title {
  font-size: 13px; font-weight: 700; color: var(--text2);
  margin-bottom: 10px; padding-left: 2px;
}

.acoes-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 14px;
}

/* Dois primeiros botões com destaque */
.acoes-grid .acao-btn:nth-child(1),
.acoes-grid .acao-btn:nth-child(2) {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 10px;
  gap: 6px;
  border-color: var(--border);
}
.acoes-grid .acao-btn:nth-child(1) .acao-icon,
.acoes-grid .acao-btn:nth-child(2) .acao-icon { font-size: 22px; }
.acoes-grid .acao-btn:nth-child(1) .acao-label,
.acoes-grid .acao-btn:nth-child(2) .acao-label { font-size: 13px; }

/* Demais botões menores */
.acoes-grid .acao-btn:nth-child(n+3) {
  flex-direction: row;
  align-items: center;
  padding: 11px 10px;
  gap: 8px;
}

.acao-btn {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 10px;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-family: var(--font);
  transition: border-color .15s, background .15s, box-shadow .15s;
  box-shadow: var(--shadow);
  text-align: center;
}
.acao-btn:hover {
  border-color: var(--green);
  background: var(--green-ultra);
  box-shadow: 0 3px 12px rgba(90,122,48,0.15);
}
.acao-btn .acao-icon {
  font-size: 18px; line-height: 1; flex-shrink: 0;
  color: var(--green); display: block;
}
.acao-btn .acao-label { font-size: 12px; font-weight: 600; color: var(--text); }

/* Ícones especiais dos 2 primeiros botões */
.acoes-grid .acao-btn:nth-child(1) .acao-icon,
.acoes-grid .acao-btn:nth-child(2) .acao-icon {
  font-size: 26px; color: var(--green);
}

/* Botões novos — destaque com badge "Novo" */
.acao-btn--novo {
  position: relative;
  border-color: var(--green);
  background: var(--green-ultra);
}
.acao-btn--novo::after {
  content: 'Novo';
  position: absolute;
  top: -7px; right: -7px;
  background: var(--green);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .4px;
  padding: 2px 5px;
  border-radius: 20px;
  line-height: 1.4;
  text-transform: uppercase;
}
.acao-btn--novo:hover { box-shadow: 0 4px 16px rgba(90,122,48,0.25); }

/* ── Summary row (3 cols) ── */
.summary-strip {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 8px; margin-bottom: 12px;
}

.summary-cell {
  background: var(--card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 11px 8px; text-align: center;
  box-shadow: var(--shadow);
}

.summary-cell .sc-val {
  font-size: 24px; font-weight: 900; color: var(--green); line-height: 1;
  transition: color .3s;
}
.summary-cell .sc-lbl {
  font-size: 10px; color: var(--text-muted); font-weight: 600;
  margin-top: 3px; letter-spacing: .02em;
}
.summary-cell .sc-unit {
  font-size: 9px; color: var(--text-muted); font-weight: 500; margin-top: 1px;
}

/* ── Evangelho do Dia ── */
.evang-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid #8b6914;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.evang-loading {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted); font-style: italic;
  padding: 8px 0;
}
.evang-loading span { animation: spin .9s linear infinite; display: inline-block; }
.evang-header {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px;
}
.evang-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.evang-title {
  font-size: 13px; font-weight: 800; color: #6b4f10;
  letter-spacing: .01em;
}
body.dark .evang-title { color: #d4a840; }
.evang-ref {
  font-size: 11px; color: var(--text-muted); font-style: italic; margin-top: 1px;
}
.evang-texto {
  font-size: 12.5px; color: var(--text2); line-height: 1.75;
  margin-bottom: 10px; border-left: 2px solid #d4a840;
  padding-left: 10px;
}
.evang-homilia-title {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  margin-bottom: 4px; margin-top: 8px;
}
.evang-homilia-texto {
  font-size: 12px; color: var(--text2); line-height: 1.6;
  font-style: italic; margin-bottom: 10px;
}
.evang-link {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 700; color: #8b6914;
  text-decoration: none; gap: 4px;
}
body.dark .evang-link { color: #d4a840; }
.evang-link:hover { text-decoration: underline; }

/* ── Alerta estoque ── */
.stock-alert-bar {
  display: none;
  background: var(--warning-bg);
  border: 1px solid #f5d9b5;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px; font-weight: 600;
  color: var(--warning);
  margin-bottom: 12px;
}

/* ============================================================
   SAÚDE — sliders e controles
   ============================================================ */
.saude-section { margin-bottom: 16px; }

.saude-section-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 4px;
}
.saude-section-label .si { font-size: 15px; }

.saude-section-sub {
  font-size: 11px; color: var(--text-muted); margin-bottom: 10px;
}

/* Slider */
.slider-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 4px;
}

.slider-track { flex: 1; position: relative; }

input[type=range].fv-range {
  width: 100%;
  -webkit-appearance: none;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  outline: none;
  background: linear-gradient(to right, var(--green) 0%, var(--green) var(--pct,0%), var(--border) var(--pct,0%));
}

input[type=range].fv-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(122,154,80,.35);
  cursor: pointer;
}

input[type=range].fv-range::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid #fff;
  cursor: pointer;
}

.slider-val {
  min-width: 38px; text-align: right;
  font-size: 15px; font-weight: 800; color: var(--green);
}

.slider-hints {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--text-muted); padding: 0 1px;
}

/* Humor dropdown */
.humor-select {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font);
  color: var(--text); background: var(--bg);
  appearance: none; outline: 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='%239a9a80' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
.humor-select:focus { border-color: var(--green); background-color: #fff; }

/* ============================================================
   TAREFAS — seções por período
   ============================================================ */
.period-section { margin-bottom: 12px; }

.period-header {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 13px; font-weight: 700; color: var(--text);
}

.period-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.dot-manha  { background: #f0a030; }
.dot-tarde  { background: #e07030; }
.dot-noite  { background: #5060b0; }

.period-body {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}

.period-empty {
  padding: 20px 16px;
  text-align: center;
  font-size: 12px; color: var(--text-muted);
}

.task-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-light);
}
.task-item:last-child { border-bottom: none; }

.task-item.done .task-title {
  text-decoration: line-through; color: var(--text-muted);
}

.task-cb {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border);
  background: none; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: transparent; transition: all .15s;
}
.task-cb.checked { background: var(--green); border-color: var(--green); color: #fff; }

.task-body { flex: 1; min-width: 0; }
.task-title { font-size: 13px; font-weight: 600; color: var(--text); }
.task-desc  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.task-actions { display: flex; gap: 4px; }

.ia-btn {
  width: 30px; height: 30px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; color: var(--text2);
  transition: all .15s;
}
.ia-btn.edit:hover  { background: var(--info-bg); border-color: var(--info); }
.ia-btn.del:hover   { background: var(--danger-bg); border-color: var(--danger); }

/* ============================================================
   LISTAS GENÉRICAS (profissionais, medicamentos, tratamentos)
   ============================================================ */
.list-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  display: flex; align-items: flex-start; gap: 10px;
}

.lc-body { flex: 1; min-width: 0; }
.lc-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.lc-sub  { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.med-receita-link {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--green);
  margin-top: 4px; text-decoration: none;
}
.med-receita-link:hover { text-decoration: underline; }
.lc-badge {
  display: inline-block; padding: 2px 8px;
  border-radius: 20px; font-size: 11px; font-weight: 600; margin-top: 4px;
}
.badge-active   { background: var(--success-bg); color: var(--success); }
.badge-inactive { background: #f5f5f0; color: var(--text-muted); }
.badge-low      { background: var(--warning-bg); color: var(--warning); }
.badge-ok       { background: var(--success-bg); color: var(--success); }
.badge-out      { background: var(--danger-bg); color: var(--danger); }

.lc-actions { display: flex; gap: 5px; flex-shrink: 0; margin-top: 2px; }

/* ============================================================
   BEM-ESTAR
   ============================================================ */
/* Gratidão */
.grat-field {
  margin-bottom: 10px;
}
.grat-field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text2); margin-bottom: 5px;
}
.grat-field input {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font);
  color: var(--text); background: var(--bg);
  outline: none; transition: border-color .18s;
}
.grat-field input:focus { border-color: var(--green); background: #fff; }

/* Respiração — cards informativos */
.resp-card {
  background: var(--bg2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px;
  margin-bottom: 10px;
}
.resp-card-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 4px;
}
.resp-card-sub {
  font-size: 11px; color: var(--text-muted); margin-bottom: 8px;
}
.resp-steps { list-style: none; padding: 0; }
.resp-steps li {
  font-size: 12px; color: var(--text2); padding: 2px 0 2px 16px;
  position: relative; line-height: 1.5;
}
.resp-steps li::before {
  content: attr(data-n) '.';
  position: absolute; left: 0;
  color: var(--green); font-weight: 700;
}

/* Gratidão histórico */
.grat-hist-item {
  padding: 11px 0;
  border-bottom: 1px solid var(--border-light);
}
.grat-hist-item:last-child { border-bottom: none; }
.grat-hist-date { font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .05em; }
.grat-hist-line { font-size: 12px; color: var(--text2); line-height: 1.5; }

/* ============================================================
   RECEITAS
   ============================================================ */
.search-bar { position: relative; margin-bottom: 12px; }
.search-bar input {
  width: 100%; padding: 10px 12px 10px 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card); font-size: 14px;
  font-family: var(--font); color: var(--text); outline: none;
  transition: border-color .18s;
}
.search-bar input:focus { border-color: var(--green); }
.search-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: 15px;
}

.filter-strip {
  display: flex; gap: 7px; margin-bottom: 14px;
  overflow-x: auto; padding-bottom: 4px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.filter-strip::-webkit-scrollbar { display: none; }

.ftab {
  padding: 6px 14px; border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--card); color: var(--text2);
  font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: all .15s; font-family: var(--font);
}
.ftab.active { background: var(--green); border-color: var(--green); color: #fff; }

/* ── RECEITAS — Grid ── */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.recipe-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow .2s, transform .2s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.recipe-card:active { transform: scale(0.98); }

/* Imagem / Thumb */
.recipe-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  flex-shrink: 0;
}
.recipe-thumb {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .3s;
}
.recipe-card:hover .recipe-thumb { transform: scale(1.04); }
.recipe-thumb-emoji {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--green-pale), var(--bg2));
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
}

/* Badge de categoria sobre a imagem */
.recipe-cat-badge {
  position: absolute;
  bottom: 8px; left: 8px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

/* Botão editar (canto superior direito) */
.recipe-edit-btn {
  position: absolute; top: 7px; right: 7px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.9); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 13px;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  transition: background .15s;
  z-index: 2;
}
.recipe-edit-btn:hover { background: #fff; }

/* Corpo do card */
.recipe-info {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.recipe-name {
  font-size: 12px; font-weight: 800;
  color: var(--text); margin-bottom: 4px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.recipe-desc {
  font-size: 10.5px; color: var(--text-muted);
  line-height: 1.4; margin-bottom: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.recipe-stats {
  display: flex; gap: 5px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.recipe-stats span {
  font-size: 10px; color: var(--text2);
  background: var(--bg); border: 1px solid var(--border-light);
  padding: 2px 7px; border-radius: 8px;
  font-weight: 600; white-space: nowrap;
}
.recipe-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 8px; }
.rtag {
  padding: 2px 7px; border-radius: 10px;
  background: var(--green-pale); color: var(--green-dark);
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .03em; text-transform: lowercase;
}
.recipe-ver-btn {
  display: block; width: 100%;
  background: var(--green-pale);
  color: var(--green-dark);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: var(--font);
  text-align: center; transition: all .15s;
  margin-top: auto;
}
.recipe-ver-btn:hover {
  background: var(--green); color: #fff; border-color: var(--green);
}

/* ============================================================
   RELATÓRIOS
   ============================================================ */
.report-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 12px;
}

.report-cell {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 12px; text-align: center;
  box-shadow: var(--shadow);
}
.report-cell .rc-icon { font-size: 20px; margin-bottom: 4px; }
.report-cell .rc-val  { font-size: 26px; font-weight: 800; color: var(--green); line-height: 1; }
.report-cell .rc-lbl  { font-size: 11px; color: var(--text-muted); font-weight: 600; margin-top: 3px; }

.bar-chart { }
.bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.bar-lbl  { font-size: 11px; color: var(--text2); width: 52px; flex-shrink: 0; }
.bar-track {
  flex: 1; height: 8px;
  background: var(--border); border-radius: 4px; overflow: hidden;
}
.bar-fill { height: 100%; background: var(--green); border-radius: 4px; transition: width .5s ease; }
.bar-val  { font-size: 11px; font-weight: 700; color: var(--green); width: 28px; text-align: right; }

/* ============================================================
   CONFIGURAÇÕES
   ============================================================ */
.settings-user-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow);
}
.user-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; flex-shrink: 0;
}
.user-info h3 { font-size: 15px; font-weight: 700; color: var(--text); }
.user-info p  { font-size: 12px; color: var(--text-muted); }
.admin-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: #7a3800; padding: 2px 9px;
  border-radius: 10px; font-size: 11px; font-weight: 700; margin-top: 4px;
}

.settings-group { margin-bottom: 20px; }
.settings-group-title {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 8px; padding-left: 2px;
}
.settings-rows {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.settings-row {
  display: flex; align-items: center; padding: 13px 14px;
  gap: 12px; border-bottom: 1px solid var(--border-light);
  cursor: pointer; transition: background .15s;
}
.settings-row:last-child { border-bottom: none; }
.settings-row:hover { background: var(--green-ultra); }
.settings-row .sr-icon { font-size: 18px; width: 26px; text-align: center; }
.settings-row .sr-body { flex: 1; }
.settings-row .sr-title { font-size: 14px; font-weight: 600; color: var(--text); }
.settings-row .sr-sub   { font-size: 11px; color: var(--text-muted); }
.settings-row .sr-arrow { color: var(--text-muted); font-size: 16px; }
.settings-row.danger .sr-title { color: var(--danger); }

.admin-banner-strip {
  background: linear-gradient(135deg, #ffd700, #ffa500);
  border-radius: var(--radius-sm); padding: 9px 14px;
  font-size: 12px; font-weight: 700; color: #7a3800;
  text-align: center; margin-bottom: 14px;
}

/* ============================================================
   MODAIS
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.40);
  align-items: flex-end; justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-width: 600px;
  max-height: 92vh; overflow-y: auto;
  padding: 22px 20px 28px;
  animation: slideUp .24s ease;
}

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

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.modal-header h3 { font-size: 16px; font-weight: 700; color: var(--text); }
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; color: var(--text2);
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); }

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
  position: fixed; top: 16px; left: 50%;
  transform: translateX(-50%); z-index: 19999;
  display: flex; flex-direction: column; gap: 7px;
  pointer-events: none; width: 88%; max-width: 360px;
}
.toast {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-md); pointer-events: auto;
  animation: toastIn .24s ease;
}
@keyframes toastIn {
  from { transform: translateY(-16px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.toast-s { background: var(--success-bg); color: #1a5c35; border-left: 3px solid var(--success); }
.toast-e { background: var(--danger-bg);  color: #8c1c1c; border-left: 3px solid var(--danger); }
.toast-i { background: var(--info-bg);    color: #1a3c6c; border-left: 3px solid var(--info); }
.toast-w { background: var(--warning-bg); color: #7a3c00; border-left: 3px solid var(--warning); }

/* ============================================================
   LOADING
   ============================================================ */
.loading-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(240,240,228,.70); z-index: 18000;
  align-items: center; justify-content: center;
}
.loading-overlay.on { display: flex; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   PAINEL ADMIN — ESTATÍSTICAS
   ============================================================ */
.admin-stats-panel {
  background: linear-gradient(135deg, #4a6e32 0%, #5d8a40 60%, #6fa050 100%);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 3px 14px rgba(74,110,50,.4);
  border: 1px solid rgba(168,216,112,.25);
}

.asp-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.asp-title {
  font-size: 13px; font-weight: 700; color: #c8dca8;
}
.asp-live {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; color: #8ab870; font-weight: 600;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #48d060;
  animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.75); }
}

.asp-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-bottom: 10px;
}

.asp-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
}
.asp-val {
  font-size: 28px; font-weight: 900; line-height: 1;
  margin-bottom: 4px;
}
.asp-online  .asp-val { color: #5de08a; }
.asp-today   .asp-val { color: #7ecfff; }
.asp-total   .asp-val { color: #ffd97d; }
.asp-premium .asp-val { color: #ffb347; }

.asp-lbl { font-size: 11px; font-weight: 700; color: #c8dca8; }
.asp-sub { font-size: 9px; color: #8a9a78; margin-top: 1px; }

.asp-footer {
  display: flex; align-items: center;
  justify-content: space-between;
}
#stat-updated { font-size: 10px; color: #6a7a58; }
.asp-refresh-btn {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.15);
  color: #c8dca8; font-size: 11px;
  padding: 4px 10px; border-radius: 20px;
  cursor: pointer; transition: background .15s;
}
.asp-refresh-btn:hover { background: rgba(255,255,255,.20); }

/* ============================================================
   PAYWALL
   ============================================================ */
.paywall-wrap {
  min-height: 100vh;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding: 32px 16px 40px;
  overflow-y: auto;
}

.paywall-logo {
  text-align: center; margin-bottom: 20px;
}
.paywall-logo span { font-size: 40px; display: block; margin-bottom: 6px; }
.paywall-logo h1 { font-size: 24px; font-weight: 900; color: var(--green-dark); }
.paywall-logo p  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.paywall-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 24px 20px;
  width: 100%; max-width: 420px;
  text-align: center;
}

.paywall-icon { font-size: 36px; margin-bottom: 10px; }
.paywall-title { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.paywall-sub {
  font-size: 13px; color: var(--text2); line-height: 1.6;
  margin-bottom: 18px;
}

.paywall-benefits {
  background: var(--green-ultra);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 18px;
  text-align: left;
}
.pb-item {
  font-size: 13px; color: var(--text); padding: 4px 0;
  font-weight: 500;
}

/* ── PLANOS (3 colunas) ── */
/* ── PLANO PIX ── */
/* Dois planos lado a lado */
.pw-planos { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pw-plano-box {
  flex: 1; min-width: 140px;
  background: var(--green-pale); border: 2px solid var(--green);
  border-radius: var(--radius-sm); padding: 14px 10px 10px;
  text-align: center; position: relative;
}
.pw-plano-vita { background: var(--accent-bg); border-color: var(--accent); }
.pw-plano-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: #fff;
  font-size: 9px; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; white-space: nowrap;
}
.pw-plano-titulo { font-size: 11px; font-weight: 700; color: var(--text2); margin-bottom: 6px; }
.pw-code-box {
  background: var(--card); border: 1px dashed var(--border);
  border-radius: 6px; padding: 6px 8px; margin: 8px 0;
  font-size: 10px; display: flex; flex-wrap: wrap;
  align-items: center; gap: 4px; text-align: left;
}
.pw-code-label { color: var(--text-muted); width: 100%; }
.pw-code-val { font-size: 12px; font-weight: 800; color: var(--green-dark); font-family: monospace; flex: 1; }
.pw-code-copy { border: none; background: none; cursor: pointer; font-size: 14px; padding: 0; }

.pw-pix-box {
  background: var(--green-pale);
  border: 2px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 16px 12px 12px;
  text-align: center;
  margin-bottom: 14px;
}
.pw-pix-preco {
  display: flex; align-items: baseline; justify-content: center; gap: 2px;
  line-height: 1;
}
.pw-pix-rs    { font-size: 16px; font-weight: 700; color: var(--green-dark); }
.pw-pix-valor { font-size: 48px; font-weight: 900; color: var(--green-dark); }
.pw-pix-cents { font-size: 18px; font-weight: 700; color: var(--green-dark); }
.pw-pix-label { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* ── DADOS PIX ── */
.pix-dados {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 12px;
  text-align: left;
}
.pix-dados-titulo { font-size: 12px; font-weight: 700; color: var(--text2); margin-bottom: 10px; }
.pix-row { display: flex; justify-content: space-between; margin-bottom: 6px; gap: 8px; }
.pix-row-chave { flex-direction: column; gap: 2px; }
.pix-label { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.pix-val   { font-size: 12px; font-weight: 600; color: var(--text); text-align: right; }
.pix-chave-num { font-size: 15px; font-weight: 700; color: var(--green-dark); letter-spacing: 1px; text-align: left; }
.btn-copiar-pix {
  display: block; width: 100%; margin-top: 10px;
  background: var(--green-pale); border: 1.5px solid var(--green);
  color: var(--green-dark); border-radius: var(--radius-sm);
  padding: 8px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.pix-instrucao {
  font-size: 11px; color: var(--text-muted);
  text-align: center; margin-bottom: 12px; line-height: 1.5;
}
.btn-whatsapp-pix {
  display: block; width: 100%;
  background: #25D366; color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 13px; font-size: 14px; font-weight: 700;
  cursor: pointer; margin-bottom: 10px;
  transition: opacity .15s, transform .1s;
}
.btn-whatsapp-pix:hover { opacity: .9; transform: translateY(-1px); }
.pix-contato-email {
  font-size: 11px; color: var(--text-muted);
  text-align: center; margin-bottom: 16px;
}

/* ── SEGURANÇA (legado, mantido para compatibilidade) ── */
.stripe-secure {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 11px; color: var(--text-muted);
  padding: 10px 0 2px;
}

/* ── ADMIN: GERENCIAR USUÁRIOS ── */
.admin-users-wrap {
  margin-top: 14px;
  background: rgba(255,255,255,.12);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.22);
}
.auw-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; cursor: pointer;
}
.auw-title { font-size: 13px; font-weight: 700; color: #a8d870; }
.auw-toggle-btn {
  background: rgba(168,216,112,.15); border: 1px solid rgba(168,216,112,.3);
  color: #a8d870; font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 20px; cursor: pointer;
  transition: background .15s;
}
.auw-toggle-btn:hover { background: rgba(168,216,112,.3); }

.auw-body { padding: 0 12px 12px; }

.auw-search-row {
  display: flex; gap: 8px; margin-bottom: 10px;
}
.auw-search-row input {
  flex: 1; padding: 8px 12px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px; color: #fff; font-size: 13px; outline: none;
}
.auw-search-row input::placeholder { color: rgba(255,255,255,.4); }
.auw-search-btn {
  padding: 8px 14px; background: rgba(168,216,112,.2);
  border: 1px solid rgba(168,216,112,.4); color: #a8d870;
  border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.auw-search-btn:hover { background: rgba(168,216,112,.35); }

.auw-legend {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
}

/* badges usados tanto na legenda quanto nos cards */
.auw-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; display: inline-block;
}
.auw-badge-admin   { background: #ffd70022; color: #ffd700; border: 1px solid #ffd70055; }
.auw-badge-premium { background: rgba(168,216,112,.2); color: #a8d870; border: 1px solid rgba(168,216,112,.4); }
.auw-badge-courtesy{ background: rgba(255,180,80,.2); color: #ffb450; border: 1px solid rgba(255,180,80,.4); }
.auw-badge-trial   { background: rgba(100,180,255,.2); color: #64b4ff; border: 1px solid rgba(100,180,255,.4); }
.auw-badge-free    { background: rgba(255,255,255,.08); color: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.12); }

.auw-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 360px; overflow-y: auto;
}
.auw-list::-webkit-scrollbar { width: 4px; }
.auw-list::-webkit-scrollbar-track { background: transparent; }
.auw-list::-webkit-scrollbar-thumb { background: rgba(168,216,112,.3); border-radius: 4px; }

.auw-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: 10px 12px;
  transition: background .15s;
}
.auw-card:hover { background: rgba(255,255,255,.1); }
.auw-card-premium { border-color: rgba(168,216,112,.35); }

.auw-card-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
}
.auw-user-name {
  font-size: 13px; font-weight: 700; color: #fff;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-bottom: 2px;
}
.auw-user-email { font-size: 11px; color: rgba(255,255,255,.5); }
.auw-user-meta  { text-align: right; flex-shrink: 0; }
.auw-meta-item  { font-size: 10px; color: rgba(255,255,255,.4); }

.auw-actions {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.auw-btn {
  font-size: 11px; font-weight: 700; padding: 4px 10px;
  border-radius: 20px; cursor: pointer; border: 1px solid;
  transition: all .15s;
}
.auw-btn-premium  { background: rgba(168,216,112,.15); color: #a8d870; border-color: rgba(168,216,112,.4); }
.auw-btn-premium:hover  { background: rgba(168,216,112,.35); }
.auw-btn-courtesy { background: rgba(255,180,80,.15); color: #ffb450; border-color: rgba(255,180,80,.4); }
.auw-btn-courtesy:hover { background: rgba(255,180,80,.35); }
.auw-btn-revoke   { background: rgba(255,80,80,.15); color: #ff8080; border-color: rgba(255,80,80,.35); }
.auw-btn-revoke:hover   { background: rgba(255,80,80,.3); }

.auw-empty, .auw-loading {
  text-align: center; padding: 24px 12px;
  font-size: 13px; color: rgba(255,255,255,.4);
}

.auw-footer {
  margin-top: 8px; text-align: right;
  font-size: 11px; color: rgba(255,255,255,.35);
}

.btn-whatsapp {
  display: block; width: 100%;
  background: #25d366; color: #fff;
  text-align: center; padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700;
  text-decoration: none;
  transition: background .15s;
}
.btn-whatsapp:hover { background: #1ebe5a; }

.btn-paywall-logout {
  width: 100%; margin-top: 12px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); padding: 10px;
  border-radius: var(--radius-sm); font-size: 13px;
  cursor: pointer; transition: all .15s;
}
.btn-paywall-logout:hover { border-color: var(--danger); color: var(--danger); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center; padding: 28px 16px; color: var(--text-muted);
}
.empty-state .ei { font-size: 36px; margin-bottom: 8px; }
.empty-state p   { font-size: 12px; line-height: 1.6; }

/* ============================================================
   FOOTER
   ============================================================ */
.page-footer {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  text-align: center;
  margin-top: 8px;
}
.page-footer p {
  font-size: 11px; color: var(--text-muted); line-height: 1.6;
}
.page-footer strong { color: var(--text2); font-weight: 600; }

/* ============================================================
   UTILITIES
   ============================================================ */
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.text-muted   { color: var(--text-muted); font-size: 12px; }
.text-center  { text-align: center; }
.fw-bold      { font-weight: 700; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ============================================================
   SECTION TITLE BAR
   ============================================================ */
.section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 8px;
  padding: 0 2px;
}
.section-title-bar span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
}

/* ============================================================
   SINAIS VITAIS
   ============================================================ */
.vitals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.vitals-input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.vitals-input-group.span-2 {
  grid-column: 1 / -1;
}
.vitals-input-group > label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  letter-spacing: 0.2px;
}
/* Campos SIS / DIA / PUL */
.bp-field-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; flex: 1;
}
.bp-field-label {
  font-size: 9px; font-weight: 800; color: var(--green-dark);
  text-transform: uppercase; letter-spacing: 0.8px;
}
.bp-field-wrap input {
  width: 100%; text-align: center;
  font-size: 15px; font-weight: 700;
  border: none; background: transparent;
  color: var(--text); outline: none;
}
.bp-field-wrap .vunit {
  font-size: 9px; color: var(--text-muted);
}

.vitals-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  transition: border-color .15s;
}
.vitals-input-row:focus-within {
  border-color: var(--green);
  background: var(--card);
}
.vitals-input-row input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font);
  outline: none;
  width: 100%;
  min-width: 0;
}
.vitals-input-row input::placeholder {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}
.vunit {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Cartão de histórico de vitais */
.vitals-history-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}
.vhc-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.vhc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.vhc-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--bg);
  border-radius: var(--radius-xs);
  padding: 8px 10px;
}
.vhc-item .vi-lbl {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}
.vhc-item .vi-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.vhc-item .vi-val.pressure { color: var(--info); }
.vhc-item .vi-val.glucose  { color: var(--warning); }
.vhc-item .vi-val.weight   { color: var(--green); }
.vhc-item .vi-val.waist    { color: var(--green-dark); }
.vhc-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ============================================================
   DOCUMENTOS DE SAÚDE
   ============================================================ */
.doc-type-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.doc-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.doc-receita    { background: #F5EEF8; color: #7D3C98; }
.doc-solicitacao { background: #eaf4fb; color: #2980b9; }
.doc-resultado  { background: #fef9f0; color: #c07020; }

.doc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.doc-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.doc-icon.receita    { background: #F5EEF8; }
.doc-icon.solicitacao { background: #eaf4fb; }
.doc-icon.resultado  { background: #fef9f0; }
.doc-body { flex: 1; min-width: 0; }
.doc-title { font-size: 13px; font-weight: 700; color: var(--text); }
.doc-meta  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.doc-notes { font-size: 11px; color: var(--text2); margin-top: 3px; }
.doc-actions { display: flex; gap: 4px; flex-shrink: 0; align-self: center; }

/* Upload de arquivo */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  background: var(--bg);
}
.file-upload-area:hover {
  border-color: var(--green);
  background: var(--green-ultra);
}
.fua-icon { font-size: 28px; margin-bottom: 6px; }
.fua-text { font-size: 13px; font-weight: 600; color: var(--text2); }
.fua-sub  { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.file-selected-name {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--green-pale);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green-dark);
}

/* ============================================================
   DIÁRIO DA DOR — Locais de Dor (integrado)
   ============================================================ */
.grade-locais {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.botao-local {
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text2);
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  font-family: var(--font);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.botao-local.ativo {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  box-shadow: 0 2px 6px rgba(122,154,80,0.25);
}

/* ── MAPA CORPORAL SVG ─────────────────────────────────────── */
.body-map-wrap {
  margin-top: 8px;
}
.body-map-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.bmt-btn {
  flex: 1;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font);
}
.bmt-btn.active {
  background: var(--danger, #c0392b);
  color: #fff;
  border-color: var(--danger, #c0392b);
}
.body-map-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 8px;
}
.body-map-svg-wrap {
  display: flex;
  justify-content: center;
}
.body-map-svg-wrap svg {
  width: 100%;
  max-width: 240px;
  height: auto;
  border-radius: 16px;
  background: var(--bg-card);
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.body-map-selected {
  font-size: 11.5px;
  color: var(--danger, #c0392b);
  font-weight: 600;
  text-align: center;
  margin-top: 10px;
  min-height: 18px;
  line-height: 1.4;
}
.dark .body-map-svg-wrap svg { background: #1e1e2e; }
.dark #body-silhouette { fill: #2a2a3e; stroke: #444; }

/* ── Relatórios — Seletor de Período ── */
.selecao-periodo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

.botao-periodo {
  background: var(--bg);
  border: 1.5px solid var(--border);
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  font-family: var(--font);
  color: var(--text2);
  text-align: center;
}

.botao-periodo.ativo {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

/* ── Locais Frequentes — Chips ── */
.local-chip {
  display: inline-block;
  background: var(--green-pale);
  color: var(--green-dark);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  margin: 3px 3px 3px 0;
}

.local-chip .chip-count {
  opacity: 0.65;
  font-weight: 400;
}

/* ── SVG Chart ── */
.svg-chart-wrap {
  width: 100%;
  overflow: hidden;
  margin-top: 4px;
}

.svg-chart-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   CATEGORIA IMPRESSÃO — lista de categorias clicáveis
   ============================================================ */
.cat-print-list { display: flex; flex-direction: column; gap: 6px; }
.cat-print-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  cursor: pointer; text-align: left; width: 100%;
  font-family: var(--font);
  transition: border-color .2s, background .2s;
}
.cat-print-item:hover, .cat-print-item:active {
  border-color: var(--accent); background: var(--card);
}
.cpi-icon  { font-size: 20px; }
.cpi-label { flex: 1; font-size: 13px; font-weight: 600; color: var(--text); }
.cpi-arrow { font-size: 20px; color: var(--text-muted); font-weight: 300; }

/* ============================================================
   MODAL RELATÓRIO — abre histórico da categoria
   ============================================================ */
.relcat-modal {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--bg); overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.relcat-header {
  position: sticky; top: 0; z-index: 1;
  background: #7B5EA7; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; gap: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.relcat-titulo-txt { font-size: 14px; font-weight: 700; flex: 1; }
.relcat-acoes { display: flex; gap: 6px; flex-shrink: 0; }
.relcat-body { padding: 16px; max-width: 900px; margin: 0 auto; }
.relcat-info {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 11px; color: var(--text-muted); margin-bottom: 14px;
  line-height: 1.6;
}
.relcat-table-wrap { overflow-x: auto; }
.relcat-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
  min-width: 400px;
}
.relcat-table th {
  background: #7B5EA7; color: #fff;
  padding: 7px 8px; text-align: left; font-weight: 600;
  white-space: nowrap;
}
.relcat-table td {
  padding: 6px 8px; border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.relcat-table tr:nth-child(even) td { background: var(--card); }
.relcat-vazio {
  text-align: center; padding: 32px; color: var(--text-muted);
  font-size: 13px;
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .bottom-nav, .app-header, .btn-fab, .modal-overlay,
  .toast-container, .loading-overlay, .hbtn, #install-banner { display: none !important; }
  .main-content { padding-bottom: 0 !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 480px) {
  .recipe-grid     { grid-template-columns: repeat(3,1fr); }
}
@media (min-width: 520px) {
  .acoes-grid      { grid-template-columns: repeat(3,1fr); }
  .report-grid     { grid-template-columns: repeat(4,1fr); }
}
@media (min-width: 640px) {
  .home-grid       { grid-template-columns: 1fr 1fr; }
  .recipe-grid     { grid-template-columns: repeat(3,1fr); }
  .modal { border-radius: var(--radius); margin-bottom: 36px; }
}

/* ============================================================
   FIBROVIDA 2.0 — Novos Componentes
   ============================================================ */

/* ── BOTÃO DANGER ── */
.btn-danger {
  background: var(--danger); color: #fff; border: none;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: opacity .15s;
}
.btn-danger:hover { opacity: .88; }

/* ── ÍNDICE FIBROVIDA ── */
.fibro-index-card {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  margin-bottom: 12px; box-shadow: var(--shadow);
}
.fic-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.fic-title { font-size: 14px; font-weight: 800; color: var(--text); }
.fic-date  { font-size: 11px; color: var(--text-muted); }
.fic-bar-row {
  display: grid; grid-template-columns: 70px 1fr 36px;
  align-items: center; gap: 8px; margin-bottom: 10px;
}
.fic-bar-label { font-size: 12px; font-weight: 600; color: var(--text2); }
.fic-bar-track {
  height: 10px; background: var(--bg2); border-radius: 10px; overflow: hidden;
}
.fic-bar {
  height: 100%; border-radius: 10px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
  min-width: 2px;
}
.fic-bar-pain   { background: linear-gradient(90deg,#27ae60,#e67e22,#c0392b); }
.fic-bar-sleep  { background: var(--secondary); }
.fic-bar-energy { background: var(--accent); }
.fic-bar-mood   { background: var(--purple); }
.fic-bar-val { font-size: 11px; font-weight: 700; color: var(--text2); text-align: right; }
.fic-empty  { font-size: 12px; color: var(--text-muted); text-align: center; padding: 8px 0 4px; }
.fic-btn {
  display: block; width: 100%; margin-top: 12px;
  background: var(--green-ultra); border: 1.5px solid var(--green);
  color: var(--green-dark); font-size: 12px; font-weight: 700;
  padding: 8px; border-radius: var(--radius-sm); cursor: pointer;
  transition: background .15s;
}
.fic-btn:hover { background: var(--green-pale); }

/* ── SELETOR DE HUMOR RÁPIDO ── */
.mood-quick-card {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  margin-bottom: 12px; box-shadow: var(--shadow);
}
.mqc-label { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.mqc-emojis { display: flex; gap: 6px; justify-content: space-between; }
.mqc-btn {
  flex: 1; background: var(--bg); border: 2px solid var(--border);
  border-radius: 12px; padding: 8px 4px; font-size: 22px;
  cursor: pointer; transition: all .15s; display: flex;
  flex-direction: column; align-items: center; gap: 2px;
}
.mqc-btn span.mqc-txt { font-size: 9px; font-weight: 600; color: var(--text-muted); }
.mqc-btn:hover { border-color: var(--green); transform: scale(1.08); }
.mqc-btn.mqc-active { border-color: var(--green); background: var(--green-pale); box-shadow: 0 0 0 3px var(--green-pale); }
.mqc-btn.mqc-active.mqc-bad { border-color: var(--danger); background: var(--danger-bg); box-shadow: 0 0 0 3px var(--danger-bg); }
.mqc-btn.mqc-active.mqc-warn { border-color: var(--warning); background: var(--warning-bg); box-shadow: 0 0 0 3px var(--warning-bg); }

/* ── FRASE MOTIVACIONAL ── */
.motive-banner {
  background: linear-gradient(135deg, var(--green-pale), var(--accent-bg));
  border: 1px solid var(--border-light); border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm); padding: 12px 14px;
  font-size: 13px; font-style: italic; color: var(--text2);
  margin-bottom: 12px; line-height: 1.6;
  transition: opacity .4s;
}

/* ── BOTÃO DE CRISE ── */
.crisis-fab {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: #fff; border: none; border-radius: var(--radius);
  padding: 14px 20px; font-size: 15px; font-weight: 800;
  cursor: pointer; margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(192,57,43,.35);
  transition: all .15s; letter-spacing: .3px;
  animation: pulse-red 2.5s infinite;
}
.crisis-fab:hover { opacity: .92; transform: translateY(-1px); }
.crisis-fab:active { transform: translateY(0); animation: none; }
@keyframes pulse-red {
  0%,100% { box-shadow: 0 4px 14px rgba(192,57,43,.35); }
  50%      { box-shadow: 0 4px 22px rgba(192,57,43,.6);  }
}


/* ── FAB FIXO DE CRISE (sempre visível, acima da nav) ── */
.crisis-fab-fixed {
  position: fixed;
  right: 16px;
  bottom: 24px;
  z-index: 300;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: #fff;
  font-size: 22px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(192,57,43,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-red 2.5s infinite;
  transition: transform .15s, opacity .15s;
}
.crisis-fab-fixed:hover  { opacity: .92; transform: scale(1.08); }
.crisis-fab-fixed:active { transform: scale(0.95); animation: none; }
@media print { .crisis-fab-fixed { display: none !important; } }

/* ── MODAL DE CRISE ── */
.crisis-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
.crisis-modal-content {
  background: var(--card); width: 100%; max-width: 480px;
  border-radius: 20px 20px 0 0; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,.3);
}
.crisis-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--card); z-index: 1;
}
.crisis-modal-header span { font-size: 16px; font-weight: 800; color: var(--danger); }
.crisis-modal-header button {
  background: var(--bg2); border: none; width: 30px; height: 30px;
  border-radius: 50%; cursor: pointer; font-size: 14px; color: var(--text2);
}
.crisis-modal-body { padding: 16px 20px; }
.crisis-time { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }
.crisis-modal-footer {
  display: flex; gap: 10px; padding: 14px 20px 24px;
  border-top: 1px solid var(--border);
}
.crisis-modal-footer .btn { flex: 1; }

/* ── GATILHOS / TRIGGERS ── */
.trigger-grid {
  display: grid; grid-template-columns: repeat(2,1fr);
  gap: 6px; margin-top: 6px;
}
.trig-item {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px;
  font-size: 12px; font-weight: 500; color: var(--text2);
  cursor: pointer; transition: all .15s;
}
.trig-item:hover { border-color: var(--accent); }
.trig-item input[type=checkbox] { accent-color: var(--accent); width: 14px; height: 14px; }
.trig-item:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); color: var(--text); font-weight: 700; }

/* ── HISTÓRICO DE CRISES ─────────────────────────────────────── */
.crisis-hist-card {
  background: var(--bg2); border-radius: var(--radius);
  border-left: 4px solid var(--danger); padding: 12px 14px;
  margin-bottom: 8px; display: flex; gap: 10px; align-items: flex-start;
}
.chc-icon { font-size: 22px; flex-shrink: 0; }
.chc-body { flex: 1; min-width: 0; }
.chc-date { font-size: 11px; font-weight: 700; color: var(--text2); margin-bottom: 4px; }
.chc-levels { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.chc-level { font-size: 11px; background: var(--bg); padding: 2px 8px; border-radius: 20px; color: var(--text2); font-weight: 600; }
.chc-triggers { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.chc-trig { font-size: 10px; background: #fdecea; color: var(--danger); padding: 2px 7px; border-radius: 20px; font-weight: 600; }
.chc-notes { font-size: 11px; color: var(--text-muted); margin-top: 4px; font-style: italic; line-height: 1.4; }
.chc-del { background: none; border: none; font-size: 15px; cursor: pointer; color: var(--text-muted); padding: 2px 4px; margin-left: auto; flex-shrink: 0; }
.chc-del:hover { color: var(--danger); }

/* ── FIBROASSISTENTE CHAT ──────────────────────────────────────── */
.chat-quick-btns {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px;
}
.chat-quick-btns button {
  font-size: 12px; background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 6px 12px; cursor: pointer; color: var(--text2);
  font-family: var(--font); transition: all .2s;
}
.chat-quick-btns button:hover {
  background: var(--green-pale); border-color: var(--green); color: var(--green-dark);
}
.chat-wrap {
  min-height: 220px; max-height: 48vh; overflow-y: auto;
  background: var(--bg); border-radius: var(--radius); border: 1.5px solid var(--border);
  padding: 12px; display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 10px; scroll-behavior: smooth;
}
.chat-msg { display: flex; gap: 8px; align-items: flex-end; }
.chat-msg-user { flex-direction: row-reverse; }
.chat-bubble {
  max-width: 80%; padding: 10px 14px; border-radius: 16px;
  font-size: 13px; line-height: 1.55; word-break: break-word;
}
.chat-msg-bot .chat-bubble {
  background: var(--green-pale); color: var(--text); border-bottom-left-radius: 4px;
}
.chat-msg-user .chat-bubble {
  background: var(--green); color: #fff; border-bottom-right-radius: 4px;
}
.chat-avatar {
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 14px; flex-shrink: 0; background: var(--bg2);
  border: 1.5px solid var(--border);
}
.chat-msg-user .chat-avatar { background: var(--green); color: #fff; }
.typing { display: flex; gap: 5px; align-items: center; padding: 4px 2px; }
.typing-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  animation: typing-bounce .9s infinite;
}
.typing-dot:nth-child(2) { animation-delay: .15s; }
.typing-dot:nth-child(3) { animation-delay: .30s; }
@keyframes typing-bounce {
  0%,60%,100% { transform: translateY(0); opacity:.45; }
  30%          { transform: translateY(-6px); opacity:1; }
}
.chat-input-row { display: flex; gap: 8px; align-items: center; }
#chat-input {
  flex: 1; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: 24px; font-size: 13px; font-family: var(--font);
  background: var(--bg); color: var(--text); outline: none;
}
#chat-input:focus { border-color: var(--green); }
.chat-send-btn {
  width: 40px; height: 40px; border-radius: 50%; background: var(--green);
  color: #fff; border: none; font-size: 16px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.chat-send-btn:hover { background: var(--green-dark); }

/* ── GAMIFICAÇÃO / CONQUISTAS ──────────────────────────────────── */
.achievements-grid {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; padding: 4px 0;
}
.achiev-badge {
  background: var(--bg2); border-radius: var(--radius); padding: 10px 12px;
  display: flex; gap: 10px; align-items: center;
  border: 1.5px solid transparent; transition: all .25s;
}
.achiev-badge.unlocked {
  background: linear-gradient(135deg, var(--green-pale), #f0f8e8);
  border-color: var(--green); box-shadow: 0 2px 8px rgba(90,122,48,.15);
}
.achiev-badge.locked { opacity: .5; filter: grayscale(.7); }
.ab-icon { font-size: 24px; flex-shrink: 0; }
.ab-body { min-width: 0; }
.ab-name { font-size: 11px; font-weight: 700; color: var(--text); line-height: 1.2; }
.ab-desc { font-size: 10px; color: var(--text-muted); margin-top: 2px; line-height: 1.3; }
.unlocked .ab-name { color: var(--green-dark); }
.achiev-mini { display: flex; gap: 6px; flex-wrap: wrap; }
.achiev-mini-badge {
  font-size: 22px; cursor: default; transition: transform .2s; display: inline-block;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.15));
}
.achiev-mini-badge:hover { transform: scale(1.25); }

/* ── RELATÓRIO — GATILHOS ──────────────────────────────────────── */
.trig-report-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg2); border-radius: 20px; padding: 4px 10px;
  font-size: 12px; margin: 3px; border: 1px solid var(--border); color: var(--text2);
}
.trig-count { font-weight: 700; color: var(--danger); }

/* ── PWA INSTALL BANNER ───────────────────────────────────────── */
#install-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #6C3483, #9B59B6);
  color: #fff; padding: 10px 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  animation: slide-down .35s ease;
}
@keyframes slide-down {
  from { transform: translateY(-100%); opacity:0; }
  to   { transform: translateY(0);     opacity:1; }
}
.ib-icon { font-size: 22px; flex-shrink: 0; }
.ib-text { flex: 1; min-width: 0; line-height: 1.3; }
.ib-text strong { display: block; font-size: 13px; }
.ib-text span   { font-size: 11px; opacity: .85; }
.ib-btn {
  background: #fff; color: #6C3483; border: none;
  padding: 6px 14px; border-radius: 20px; font-size: 12px;
  font-weight: 700; cursor: pointer; flex-shrink: 0;
  font-family: var(--font); transition: opacity .15s;
}
.ib-btn:hover { opacity: .85; }
.ib-close {
  background: none; border: none; color: rgba(255,255,255,.7);
  font-size: 16px; cursor: pointer; padding: 4px; flex-shrink: 0;
  line-height: 1;
}
.ib-close:hover { color: #fff; }

/* Offset para o app quando o banner está visível */
body.has-install-banner #app { padding-top: 52px; }

/* ── FILTROS MEDICAMENTOS ── */
.med-filter-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 12px;
}
.med-filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.mft-btn {
  font-size: 12px; font-weight: 600; padding: 5px 12px;
  border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--card); color: var(--text2); cursor: pointer;
  transition: all .2s;
}
.mft-btn.active {
  background: var(--green); color: #fff; border-color: var(--green);
}
.mft-btn:hover:not(.active) { border-color: var(--green); color: var(--green); }
.med-extra-card { border-left: 3px solid var(--accent) !important; }

/* Toggle tipo medicamento */
.med-type-toggle { margin-bottom: 4px; }
.toggle-label {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text);
}
.toggle-label input[type="checkbox"] { display: none; }
.toggle-slider {
  width: 36px; height: 20px; background: var(--border);
  border-radius: 20px; position: relative; flex-shrink: 0;
  transition: background .2s;
}
.toggle-slider::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 14px; height: 14px; background: #fff; border-radius: 50%;
  transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-label input:checked + .toggle-slider { background: var(--accent); }
.toggle-label input:checked + .toggle-slider::after { left: 19px; }

/* Badge neutro */
.lc-badge.badge-neutral { background: var(--bg2); color: var(--text2); }

/* ── SECTION LABEL BAR ── */
.section-label-bar {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 700; color: var(--text);
  margin: 18px 0 10px; padding: 0 2px;
}
.section-label-bar span:first-child { display: flex; align-items: center; gap: 6px; }

/* ── NOTAS DE SESSÃO ── */
.tn-card {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 14px 14px 10px;
  margin-bottom: 10px; box-shadow: var(--shadow);
}
.tn-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 10px; gap: 8px;
}
.tn-date { font-size: 12px; font-weight: 700; color: var(--text); margin-right: 8px; }
.tn-badge {
  font-size: 11px; background: var(--secondary-bg); color: var(--secondary);
  border-radius: 20px; padding: 2px 9px; font-weight: 600;
}
.tn-section { margin-bottom: 8px; }
.tn-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px;
}
.tn-text {
  font-size: 13px; color: var(--text); line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
}
.tn-text-highlight {
  background: var(--accent-bg); border-left: 3px solid var(--accent);
  padding: 6px 10px; border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
}

/* ── SEÇÃO: ENTENDA A FIBROMIALGIA (visual infográfico) ── */

/* Capa */
.fec-capa {
  background: linear-gradient(150deg,#1a2f6e 0%,#2a4aaa 60%,#4a6fd4 100%);
  border-radius: var(--radius);
  padding: 22px 20px 18px;
  text-align: center;
  margin-bottom: 8px;
}
.fec-capa-tag {
  display: inline-block;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  padding: 4px 12px; border-radius: 20px; margin-bottom: 12px;
}
.fec-capa-titulo {
  font-size: 17px; font-weight: 700; color: #fff; line-height: 1.45;
}
.fec-capa-sub {
  margin-top: 10px; font-size: 12px; color: rgba(255,255,255,.6);
}

/* Card infográfico */
.fec2-card {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.10);
  transition: box-shadow .2s, transform .15s;
}
.fec2-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.16); transform: translateY(-1px); }

/* Cabeçalho colorido */
.fec2-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 16px 14px;
  color: #fff;
}
.fec2-emoji {
  font-size: 34px; line-height: 1; flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
}
.fec2-head-txt { flex: 1; }
.fec2-num {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  opacity: .7; margin-bottom: 2px;
}
.fec2-nome {
  font-size: 20px; font-weight: 800; letter-spacing: -.3px;
  line-height: 1.1;
}
.fec2-chevron {
  font-size: 12px; opacity: .8;
  transition: transform .25s;
}
.fec2-card.open .fec2-chevron { transform: rotate(180deg); }

/* Corpo branco */
.fec2-body {
  display: none;
  background: var(--card);
  padding: 16px 16px 14px;
  border-top: none;
}
.fec2-card.open .fec2-body { display: block; }

.fec2-tag {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  padding: 3px 10px; border-radius: 12px;
  margin-bottom: 8px;
}
.fec2-analogy {
  font-size: 13.5px; color: var(--text); line-height: 1.7;
  margin: 0 0 14px;
}
.fec2-science {
  font-size: 13px; color: var(--text2); line-height: 1.65;
  margin: 0;
}

/* Card final */
.fec2-final {
  background: linear-gradient(135deg,#4a235a,#7d3c98,#a855c8);
  border-radius: var(--radius);
  text-align: center;
  padding: 24px 20px 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(120,50,160,.3);
}
.fec2-final-titulo {
  font-size: 20px; font-weight: 800; color: #fff;
  line-height: 1.35; margin-bottom: 10px;
}
.fec2-final-titulo em { font-style: italic; opacity: .9; }
.fec2-final-sub {
  font-size: 13px; color: rgba(255,255,255,.85);
  line-height: 1.6; margin: 0 0 12px;
}
.fec2-final-fonte {
  font-size: 11px; color: rgba(255,255,255,.45);
}

/* Compatibilidade: manter classe antiga caso haja referência */
.fibro-edu-card { display: none; }

/* ── BLOCO DE NOTAS ── */
.notepad-textarea {
  width: 100%; min-height: 180px; resize: vertical;
  font-family: var(--font); font-size: 13px; line-height: 1.6;
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px;
  color: var(--text); transition: border-color .2s;
  box-sizing: border-box;
}
.notepad-textarea:focus { outline: none; border-color: var(--green); background: var(--card); }

/* ── FRASE TOPO DASHBOARD ────────────────────────────────── */
.fibro-topic-banner {
  background: linear-gradient(135deg, #7B5EA7, #9b7ec8);
  color: #fff;
  text-align: center;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 10px;
}
.ftb-frase {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}
.ftb-sub {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
  text-align: center;
}

/* ── BIBLIOTECA DE ARTIGOS (dashboard) ──────────────────── */
.artigos-section-titulo {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 18px 2px 6px;
}

/* ── CARD ARTIGO DESTAQUE (dashboard) ───────────────────── */
.artigo-card {
  background: linear-gradient(135deg, #4a2d6e, #7B5EA7);
  border-radius: 16px;
  padding: 18px;
  margin: 14px 0 10px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 16px rgba(123,94,167,0.35);
}
.artigo-card:active { transform: scale(0.98); }
.artigo-card-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.artigo-card-titulo {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 8px;
}
.artigo-card-preview {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
  margin-bottom: 10px;
}
.artigo-card-autor {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  font-style: italic;
  text-align: right;
}

/* ── MODAL DO ARTIGO ─────────────────────────────────────── */
.artigo-modal-box {
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
}
.artigo-modal-header {
  background: linear-gradient(135deg, #4a2d6e, #7B5EA7);
  padding: 14px 16px 10px;
  display: flex;
  justify-content: flex-end;
}
.artigo-modal-header .modal-close { color: #fff; }
.artigo-modal-body { padding: 0 20px 28px; }
.artigo-modal-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #7B5EA7;
  text-transform: uppercase;
  margin: 18px 0 8px;
}
.artigo-modal-titulo {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 16px;
}
.artigo-modal-intro {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
  font-style: italic;
  border-left: 3px solid #7B5EA7;
  padding-left: 12px;
  margin-bottom: 16px;
}
.artigo-modal-texto {
  font-size: 13px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 14px;
}
.artigo-sintoma {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg2);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}
.artigo-sintoma-icon { font-size: 22px; flex-shrink: 0; }
.artigo-destaque {
  background: linear-gradient(135deg, #4a2d6e18, #7B5EA720);
  border-left: 4px solid #7B5EA7;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}
.artigo-cta {
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  color: #7B5EA7;
  margin: 20px 0 18px;
}
.artigo-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(230,126,34,0.12);
  border: 1px solid rgba(230,126,34,0.35);
  color: #935116;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  margin: 18px 0 14px;
}
body.dark .artigo-disclaimer {
  background: rgba(230,126,34,0.16);
  color: #f2b26b;
}
.artigo-fonte-link {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #7B5EA7;
  text-decoration: none;
  border: 1.5px solid #7B5EA7;
  border-radius: 10px;
  padding: 9px 14px;
  margin: 0 0 18px;
}
.artigo-fonte-link:active { transform: scale(0.98); }
.artigo-assinatura {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  text-align: right;
}
.artigo-assinatura-nome {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.artigo-assinatura-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── BOTÃO DE PÂNICO ─────────────────────────────────────── */
.panico-section {
  margin: 18px 0 8px;
  text-align: center;
}
.btn-panico {
  display: block;
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(192,57,43,0.4);
  animation: panico-pulse 2s infinite;
  transition: transform .1s;
}
.btn-panico:active { transform: scale(0.97); }
@keyframes panico-pulse {
  0%,100% { box-shadow: 0 4px 18px rgba(192,57,43,0.4); }
  50%      { box-shadow: 0 4px 28px rgba(192,57,43,0.7); }
}
.panico-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── MODAL DE PÂNICO — BOTÕES DE CONTATO ─────────────────── */
.btn-emergencia {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: #fff;
  border-radius: 14px;
  padding: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .1s, box-shadow .1s;
  box-shadow: 0 3px 12px rgba(192,57,43,0.3);
}
.btn-emergencia:active { transform: scale(0.97); }
.btn-emerg-icon { font-size: 28px; }
.btn-emerg-info { flex: 1; }
.btn-emerg-nome { font-size: 15px; font-weight: 700; }
.btn-emerg-fone { font-size: 12px; opacity: .85; margin-top: 2px; }
.btn-emerg-ligar {
  background: rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
}

/* ── ALERTA DE MEDICAMENTO (toast fixo) ──────────────────── */
.med-alert-toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 2px solid #9B59B6;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  z-index: 9999;
  min-width: 290px;
  max-width: 92vw;
  animation: slideDown .3s ease;
}
@keyframes slideDown {
  from { opacity:0; transform: translateX(-50%) translateY(-20px); }
  to   { opacity:1; transform: translateX(-50%) translateY(0); }
}
.med-alert-ico { font-size: 26px; }
.med-alert-txt { flex: 1; font-size: 13px; line-height: 1.4; color: var(--text); }
.med-alert-btn {
  background: #9B59B6;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.med-alert-btn:active { opacity: .8; }

/* ═══════════════════════════════════════════════════
   DIVÃ DIGITAL
═══════════════════════════════════════════════════ */
.diva-mood-row {
  display: flex; gap: 8px; justify-content: space-between; margin: 10px 0 14px;
}
.diva-mood-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--bg); border: 2px solid var(--border); border-radius: 12px;
  padding: 8px 6px; font-size: 22px; cursor: pointer; flex: 1;
  transition: all .2s;
}
.diva-mood-btn span { font-size: 10px; color: var(--text-muted); font-weight: 600; }
.diva-mood-btn.ativo { border-color: #8e44ad; background: #f5eefb; }

.diva-recorder {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg); border: 2px dashed var(--border);
  border-radius: 16px; padding: 20px; gap: 12px; margin: 8px 0;
}
.diva-timer {
  font-size: 36px; font-weight: 700; color: #8e44ad; font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
}
.diva-wave {
  display: flex; align-items: center; gap: 4px; height: 32px;
}
.diva-wave span {
  display: block; width: 4px; background: #c39bd3; border-radius: 4px;
  height: 8px; animation: none; transition: height .1s;
}
.diva-wave.gravando span {
  animation: diva-bar .8s ease-in-out infinite;
}
.diva-wave span:nth-child(2) { animation-delay: .1s; }
.diva-wave span:nth-child(3) { animation-delay: .2s; }
.diva-wave span:nth-child(4) { animation-delay: .3s; }
.diva-wave span:nth-child(5) { animation-delay: .4s; }
.diva-wave span:nth-child(6) { animation-delay: .3s; }
.diva-wave span:nth-child(7) { animation-delay: .2s; }
.diva-wave span:nth-child(8) { animation-delay: .1s; }
.diva-wave span:nth-child(9) { animation-delay: .2s; }
.diva-wave span:nth-child(10) { animation-delay: .3s; }
@keyframes diva-bar {
  0%,100% { height: 8px; } 50% { height: 28px; background: #8e44ad; }
}
.diva-controls { display: flex; gap: 10px; }
.diva-btn-rec {
  background: #8e44ad; color: #fff; border: none; border-radius: 50px;
  padding: 12px 24px; font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}
.diva-btn-rec.gravando { background: #c0392b; }
.diva-btn-stop {
  background: var(--bg-card); color: var(--text); border: 2px solid var(--border);
  border-radius: 50px; padding: 12px 20px; font-size: 14px; font-weight: 700; cursor: pointer;
}

.diva-item {
  background: var(--bg-card); border-radius: 14px; padding: 14px 16px;
  margin-bottom: 10px; border: 1px solid var(--border);
}
.diva-item-header {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px;
}
.diva-item-title { font-size: 14px; font-weight: 700; color: var(--text); }
.diva-item-date { font-size: 11px; color: var(--text-muted); }
.diva-item-mood { font-size: 20px; }
.diva-item audio { width: 100%; margin: 6px 0; border-radius: 8px; }
.diva-item-actions { display: flex; gap: 6px; margin-top: 8px; }
.diva-item-actions button {
  font-size: 11px; padding: 5px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); font-weight: 600;
}

/* ═══════════════════════════════════════════════════
   EXERCÍCIO & ACADEMIA
═══════════════════════════════════════════════════ */
.exercicio-guide-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border-radius: 14px; padding: 14px 16px;
  margin-bottom: 8px; border: 1px solid var(--border);
}
.egc-icon { font-size: 28px; }
.egc-title { font-size: 14px; font-weight: 700; color: var(--text); }
.egc-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }

.exercicio-item {
  background: var(--bg-card); border-radius: 14px; padding: 14px 16px;
  margin-bottom: 8px; border: 1px solid var(--border);
}
.exercicio-item-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
}
.exercicio-item-tipo { font-size: 15px; font-weight: 700; color: var(--text); }
.exercicio-item-data { font-size: 11px; color: var(--text-muted); }
.exercicio-item-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.exercicio-tag {
  font-size: 11px; padding: 3px 8px; border-radius: 20px;
  background: rgba(39,174,96,.12); color: #1a6e3c; font-weight: 600;
}
.exercicio-dor-tag {
  font-size: 11px; padding: 3px 8px; border-radius: 20px; font-weight: 600;
}

/* ═══════════════════════════════════════════════════
   SUS / INSS
═══════════════════════════════════════════════════ */
.sus-direito-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border-radius: 14px; padding: 14px 16px;
  margin-bottom: 8px; border: 1px solid var(--border);
}
.sdc-icon { font-size: 28px; }
.sdc-title { font-size: 14px; font-weight: 700; color: var(--text); }
.sdc-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
