/* ALZHEIMR · estilo. Paleta neutra (bege/grafite), uma cor de destaque, sem estilos inline (CSP). */
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
:root {
  /* Paleta do manual de marca: Violeta #8B5CF6, Lavanda #B794FF, Grafite #0B0B10, Carvão #14141C, Cinza Tech #2A2A38, Off White #F5F5FA */
  color-scheme: dark;
  --bg: #0b0b10;
  --paper: #14141c;
  --panel: #191822;
  --ink: #f5f5fa;
  --ink2: #d7d4e1;
  --muted: #a39fb3;
  --line: #2a2a38;
  --soft: #1f1d2b;
  --violet: #8b5cf6;
  --accent: #b794ff;
  --accent-soft: rgba(139, 92, 246, 0.13);
  --warn: #f4b37a;
  --warn-soft: rgba(244, 179, 122, 0.12);
  --good: #7fd6a4;
  --danger: #ff7a7a;
  --dark: #8b5cf6;
  --grad: linear-gradient(135deg, #7947e6, #6332bd);
  --radius: 20px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 40px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; line-height: 1.5; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.4em; }
p { margin: 0 0 0.6em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { opacity: 0.5; cursor: wait; }
a { color: inherit; }
img { max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { align-items: center; text-align: center; }
.error { color: var(--danger); font-size: 14px; min-height: 1em; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; color: var(--accent); margin: 0 0 6px; }
.eyebrow.light { color: rgba(255, 255, 255, 0.6); }
.lead { font-size: 17px; color: var(--ink2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Botões */
.primary, .secondary, .btn, .danger-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px; font-weight: 600; text-decoration: none;
  transition: transform 0.08s ease, background 0.2s;
}
.primary { background: var(--grad); color: #fff; border: 1px solid #b794ff; box-shadow: 0 6px 25px rgba(139, 92, 246, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2); }
.primary:hover { background: #7543d4; box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4); }
.primary.big { min-height: 54px; padding: 0 34px; font-size: 17px; }
.secondary, .btn { background: rgba(255, 255, 255, 0.02); border: 1px solid #4a3d63; color: var(--ink); }
.secondary:hover { border-color: var(--accent); }
.danger-btn { background: var(--danger); color: #fff; }
.primary:active, .secondary:active, .mic-btn:active { transform: scale(0.97); }
.small.primary, .small.secondary { min-height: 36px; padding: 0 14px; font-size: 14px; }
.link { color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; font-size: 14px; }
.link.danger { color: var(--danger); }
.file-btn { cursor: pointer; position: relative; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.stack { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.stack.center { align-items: center; margin: 24px 0; }

/* Formulários */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink2); margin: 12px 0 5px; }
input, select { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
input:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="checkbox"] { width: 20px; min-height: 20px; height: 20px; accent-color: var(--violet); flex: none; margin-top: 2px; }
input[type="range"] { padding: 0; min-height: 28px; border: 0; accent-color: var(--violet); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; margin: 14px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

/* ---------- Entrar / Cadastro ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr minmax(380px, 520px); }
.auth-side { background: radial-gradient(ellipse at 85% 15%, #30204b 0, transparent 55%), radial-gradient(ellipse at 50% 120%, #3a2366 0, transparent 50%), var(--bg); color: #fff; border-right: 1px solid var(--line); padding: 8vh 7vw; display: flex; flex-direction: column; justify-content: center; }
.auth-side h1 { letter-spacing: 0.14em; font-size: 26px; margin-top: 18px; }
.auth-side h2 { font-size: clamp(30px, 4vw, 48px); margin: 28px 0 12px; font-weight: 700; }
.auth-side p { color: rgba(255, 255, 255, 0.72); max-width: 480px; font-size: 17px; }
.auth-side .eyebrow { color: var(--accent); }
.auth-side h2 em { font-style: normal; color: var(--accent); }
.auth-points { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 10px; color: rgba(255, 255, 255, 0.85); }
.auth-points li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 12px; }
.free-badge { display: inline-block; align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); border: 1px solid #6c568e; color: #cfbaff !important; font-weight: 700; font-size: 13px !important; }
.auth-card { background: var(--paper); padding: 6vh 40px; overflow-y: auto; max-height: 100vh; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); padding: 4px; border-radius: 999px; margin-bottom: 18px; }
.tab { min-height: 44px; border-radius: 999px; font-weight: 600; color: var(--muted); }
.tab.active { background: var(--panel); color: var(--ink); box-shadow: inset 0 0 0 1px #4a3d63; }
.auth-form .primary { width: 100%; margin-top: 18px; }
.auth-form .link { display: block; margin: 10px auto 0; }
.photo-pick { display: flex; flex-direction: column; align-items: center; gap: 10px; position: relative; margin-bottom: 6px; }
.photo-canvas { width: 168px; height: 168px; border-radius: 50%; background: var(--soft); border: 3px solid var(--panel); box-shadow: 0 0 0 1px #8b5cf6aa, 0 0 30px rgba(139, 92, 246, 0.25); touch-action: none; }
.photo-canvas.has-photo { cursor: grab; }
.photo-canvas.small { width: 140px; height: 140px; }
.photo-empty { position: absolute; top: 0; width: 168px; height: 168px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 13px; pointer-events: none; }
.photo-icon { width: 34px; height: 34px; background: var(--muted); -webkit-mask: var(--i-camera) center / contain no-repeat; mask: var(--i-camera) center / contain no-repeat; }
.photo-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.photo-actions input[type="range"] { max-width: 220px; }
.photo-actions small { text-align: center; font-size: 12px; }

/* ---------- Estrutura ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: #0e0e15; border-right: 1px solid var(--line); padding: 26px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 8px; margin-bottom: 30px; }
.brand strong { display: block; letter-spacing: 0.1em; }
.brand small { font-size: 10px; letter-spacing: 0.08em; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--ink2); font-weight: 500; text-align: left; }
.nav-item:hover { background: var(--soft); }
.nav-item.active { background: var(--accent-soft); color: #fff; box-shadow: inset 0 0 0 1px #6c568e; }
.nav-item.active .ico { background: var(--accent); }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; text-align: left; }
.me:hover, .me.active { background: var(--soft); }
.me small { display: block; color: var(--muted); font-size: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--soft); }
.avatar.xl { width: 140px; height: 140px; }
main { min-width: 0; padding: 26px clamp(16px, 4vw, 48px) 120px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.topbar h1 { font-size: clamp(24px, 3vw, 32px); }
.bell { position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; }
.bell-icon { width: 20px; height: 20px; background: var(--ink); -webkit-mask: var(--i-bell) center / contain no-repeat; mask: var(--i-bell) center / contain no-repeat; }
.bell b { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; display: grid; place-items: center; }
.view { max-width: 1120px; display: flex; flex-direction: column; gap: 18px; }
.bottom-nav { display: none; }

/* Ícones (máscaras SVG) */
.ico { display: inline-block; width: 20px; height: 20px; background: currentColor; flex: none; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ico-sun { --m: var(--i-sun); }
.ico-book { --m: var(--i-book); }
.ico-life { --m: var(--i-life); }
.ico-chat { --m: var(--i-chat); }
.ico-compass { --m: var(--i-compass); }
.ico-feather { --m: var(--i-feather); }
.ico-camera { --m: var(--i-camera); }
.ico-image { --m: var(--i-image); }
.ico-user { --m: var(--i-user); }
.ico-pin { --m: var(--i-pin); width: 28px; height: 28px; }
:root {
  --i-sun: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E");
  --i-book: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M4 4h6a2 2 0 0 1 2 2v14a2 2 0 0 0-2-2H4zM20 4h-6a2 2 0 0 0-2 2v14a2 2 0 0 1 2-2h6z'/%3E%3C/svg%3E");
  --i-life: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 12h4l3-8 4 16 3-8h4'/%3E%3C/svg%3E");
  --i-chat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3C/svg%3E");
  --i-compass: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m15.5 8.5-2 5-5 2 2-5z'/%3E%3C/svg%3E");
  --i-camera: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h3l2-3h6l2 3h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1z'/%3E%3Ccircle cx='12' cy='13.5' r='3.5'/%3E%3C/svg%3E");
  --i-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='M21 17l-5-5-9 8'/%3E%3C/svg%3E");
  --i-feather: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 4c-8 0-13 5-13 13v3M7 17l7-7M20 4c0 8-5 12-13 13'/%3E%3C/svg%3E");
  --i-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1-4 4-6 8-6s7 2 8 6'/%3E%3C/svg%3E");
  --i-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 21s7-6.2 7-12a7 7 0 0 0-14 0c0 5.8 7 12 7 12z'/%3E%3Ccircle cx='12' cy='9' r='2.5'/%3E%3C/svg%3E");
  --i-bell: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 16V11a6 6 0 0 1 12 0v5l2 2H4zM10 21h4'/%3E%3C/svg%3E");
  --i-mic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3'/%3E%3C/svg%3E");
  --i-stop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6' y='6' width='12' height='12' rx='2' fill='black'/%3E%3C/svg%3E");
  --i-camera: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M4 8h3l2-3h6l2 3h3v11H4z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/svg%3E");
  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E");
}

/* ---------- Cartões ---------- */
.card { background: linear-gradient(145deg, #1a1726, #111119); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.card-title { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.card h3 { font-size: 19px; }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }
.by { font-size: 12px; color: var(--muted); margin-top: 12px; }
.skeleton { min-height: 96px; background: linear-gradient(90deg, var(--paper) 0%, var(--panel) 50%, var(--paper) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border: 1px solid var(--line); border-radius: var(--radius); }
.skeleton.tall { min-height: 260px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--soft); font-size: 12px; font-weight: 600; color: var(--ink2); }
.chip.soft { background: transparent; border: 1px solid var(--line); font-weight: 500; }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.mood1, .chip.mood2 { background: var(--warn-soft); color: var(--warn); }
.chip.mood4, .chip.mood5 { background: rgba(127, 214, 164, 0.12); color: var(--good); }
.grid2c { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.section-head h2 { font-size: 20px; margin: 0; }
.seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.seg button.active { background: var(--panel); color: var(--ink); box-shadow: inset 0 0 0 1px #4a3d63; }
.seg.wide { display: flex; }
.seg.wide button { flex: 1; justify-content: center; min-height: 42px; }
.seg.mini button { padding: 4px 10px; font-size: 12px; }
.count { background: var(--violet); color: #fff; border-radius: 999px; font-size: 11px; min-width: 18px; height: 18px; display: inline-grid; place-items: center; padding: 0 5px; }

/* ---------- Microfone ---------- */
.mic { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; width: 100%; }
.mic-title { font-size: 18px; }
.mic-btn {
  --lvl: 0;
  position: relative; width: 84px; height: 84px; border-radius: 50%; background: var(--grad); color: #fff;
  display: grid; place-items: center; box-shadow: 0 0 0 1px #b794ff, 0 10px 40px rgba(139, 92, 246, 0.45);
  transition: transform 0.1s;
}
.mic-btn::before {
  content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--accent);
  opacity: 0; transform: scale(calc(1 + var(--lvl) * 0.35)); transition: transform 0.08s linear, opacity 0.2s;
}
.mic-btn.big { width: 112px; height: 112px; }
.mic-icon { width: 34px; height: 34px; background: #fff; -webkit-mask: var(--i-mic) center / contain no-repeat; mask: var(--i-mic) center / contain no-repeat; }
.mic-btn.big .mic-icon { width: 44px; height: 44px; }
.mic.dark .mic-btn { background: var(--grad); }
.mic.dark .mic-icon { background: #fff; }
.mic.recording .mic-btn { background: var(--danger); }
.mic.recording .mic-btn::before { opacity: 0.9; }
.mic.recording .mic-icon { background: #fff; -webkit-mask-image: var(--i-stop); mask-image: var(--i-stop); }
.mic.sending .mic-btn { animation: pulse 1.2s infinite; pointer-events: none; }
@keyframes pulse { 50% { opacity: 0.5; transform: scale(0.95); } }
.mic-time { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); visibility: hidden; }
.mic.recording .mic-time { visibility: visible; color: var(--danger); font-weight: 700; }
.mic-status { font-size: 14px; color: var(--muted); max-width: 420px; margin: 0; }
.mic-prompt { font-size: 15px; font-style: italic; color: var(--accent); max-width: 460px; animation: fade 0.8s; margin: 0; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.mic-live { max-width: 560px; max-height: 140px; overflow-y: auto; font-size: 15px; color: var(--ink2); margin: 0; }
.mic.dark .mic-status, .mic.dark .mic-time { color: rgba(255, 255, 255, 0.7); }
.mic.dark .mic-live { color: #fff; }
.mic.dark .mic-prompt { color: #cfbaff; }
.mic.dark .mic-cancel { color: rgba(255, 255, 255, 0.7); }
.mic.dark.recording .mic-time { color: #ffb4ad; }

/* ---------- Hoje ---------- */
.hero { background: radial-gradient(ellipse at 90% 10%, #3a2560 0, transparent 60%), linear-gradient(125deg, #1a1726, #101017); border: 1px solid #3a2d55; color: #fff; border-radius: 24px; padding: clamp(22px, 4vw, 40px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; }
.hero h2 { font-size: clamp(26px, 3.4vw, 38px); }
.hero p { color: rgba(255, 255, 255, 0.75); font-size: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stats.mini { grid-template-columns: repeat(3, 1fr); margin-top: 14px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px; min-height: 86px; }
.stat b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stat span { font-size: 13px; color: var(--muted); }
.grid-ai { display: grid; grid-template-columns: 1fr 1.4fr 1.2fr; gap: 18px; }
.big-state { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.meter { height: 8px; background: var(--soft); border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.meter-fill { display: block; height: 100%; background: linear-gradient(90deg, #8b5cf6, #b794ff); border-radius: 999px; }
.moods { display: flex; gap: 8px; }
.mood-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--soft); border: 1px solid var(--line); position: relative; }
.mood-btn::after { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--ink2); }
.mood-btn.m1::after { content: "1"; } .mood-btn.m2::after { content: "2"; } .mood-btn.m3::after { content: "3"; } .mood-btn.m4::after { content: "4"; } .mood-btn.m5::after { content: "5"; }
.mood-btn:hover { background: var(--violet); }
.mood-btn:hover::after { color: #fff; }
.pattern h3 { font-size: 20px; }
.evidence { font-size: 13px; color: var(--muted); border-left: 3px solid var(--line); padding-left: 10px; }
.ref { background: var(--accent-soft); border-radius: 14px; padding: 14px 16px; margin-top: 14px; }
.ref small { display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 4px; }
.ref b { display: block; margin-bottom: 4px; }
.ref p { font-size: 14px; color: var(--ink2); margin: 0 0 4px; }
.ref .lesson { font-weight: 600; color: var(--ink); }
.steps { padding-left: 20px; margin: 0; display: grid; gap: 8px; }
.steps li::marker { font-weight: 700; color: var(--accent); }
.focus { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.otd { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.otd b { color: var(--accent); }

/* Mapa */
.map { width: 100%; border-radius: 14px; overflow: hidden; background: var(--soft); z-index: 0; }
.map-m { height: 320px; }
.map-l { height: 420px; }
.map-empty { display: flex; gap: 14px; align-items: center; padding: 20px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); }
.map-empty p { margin: 0; }
.routes { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.routes li { display: flex; gap: 12px; font-size: 14px; }
.routes small { color: var(--muted); min-width: 96px; }
.pop b { display: block; }
.pop small { color: var(--muted); }
.pop p { margin: 4px 0 0; }
.leaflet-container { font: inherit; }

/* Modal / toast */
.modal { position: fixed; inset: 0; background: rgba(6, 6, 10, 0.8); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; z-index: 1000; animation: fade 0.2s; }
.modal-box { background: var(--paper); border-radius: 22px; padding: 26px; width: min(520px, 100%); max-height: 86vh; overflow-y: auto; }
.modal-box .primary { margin-top: 12px; width: 100%; }
.saved h2 { font-size: 22px; }
.insight { background: var(--soft); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: #241d38; border: 1px solid #6c568e; color: #fff; padding: 12px 20px; border-radius: 14px; z-index: 1100; max-width: min(92vw, 520px); font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); }
.notes { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.notes li { padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.notes li.unread { border-color: var(--accent); background: var(--accent-soft); }
.notes small { color: var(--muted); }

/* ---------- Memória ---------- */
.toolbar { display: grid; grid-template-columns: 1fr 220px; gap: 10px; }
.memories { display: flex; flex-direction: column; gap: 10px; }
.day { font-size: 13px; color: var(--muted); margin: 14px 0 0; font-weight: 600; }
.mem { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.mem-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.mem-time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 4px; }
.mem-summary { display: block; margin-bottom: 4px; }
.mem-text { white-space: pre-wrap; color: var(--ink2); font-size: 15px; margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.mem-text.open { -webkit-line-clamp: unset; display: block; }
.mem-more { align-self: flex-start; margin-top: 4px; }
.mem audio { width: 100%; height: 36px; margin-top: 10px; }
.mem-foot { display: flex; justify-content: flex-end; }
.mem-foot .link { font-size: 12px; color: var(--muted); }

/* ---------- Minha vida ---------- */
.areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 14px; }
.areas small { font-size: 10px; letter-spacing: 0.14em; font-weight: 800; color: var(--muted); }
.areas p { font-size: 14px; margin: 2px 0 0; }
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: 110px 1fr 44px; gap: 10px; align-items: center; font-size: 14px; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); }
.hbar-track { height: 14px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--ink2); border-radius: 0 4px 4px 0; }
.hbar b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.vbars { display: flex; align-items: flex-end; gap: 2px; height: 140px; padding-bottom: 2px; border-bottom: 1px solid var(--line); }
.vcol { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.vbar { display: block; width: 100%; background: var(--ink2); border-radius: 4px 4px 0 0; }
.vbar.none { background: var(--line); }
.vcol:hover .vbar { background: var(--accent); }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; border-left: 2px solid var(--line); padding-left: 18px; }
.timeline li { position: relative; display: flex; gap: 12px; }
.timeline li::before { content: ""; position: absolute; left: -24px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline b { color: var(--accent); min-width: 44px; }
.timeline p { margin: 2px 0 0; font-size: 14px; color: var(--ink2); }
.clean { padding-left: 18px; margin: 0; display: grid; gap: 6px; }
.meds { display: grid; gap: 10px; }
.med { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.med small { display: block; color: var(--muted); }
.med ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.med.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* ---------- Mentor ---------- */
.chat { display: flex; flex-direction: column; gap: 12px; padding-bottom: 260px; }
.bubble { max-width: min(680px, 88%); padding: 14px 18px; border-radius: 20px; font-size: 15px; white-space: pre-wrap; }
.bubble p { margin: 0; }
.bubble.me { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 6px; }
.bubble.ai { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble .link { font-size: 12px; color: var(--muted); }
.mentor-dock { position: fixed; bottom: 0; left: 240px; right: 0; padding: 18px 16px 24px; background: linear-gradient(180deg, rgba(11, 11, 16, 0) 0%, var(--bg) 30%); display: flex; flex-direction: column; align-items: center; z-index: 5; }
.mentor-dock .check { margin: 4px 0 0; color: var(--muted); }

/* ---------- Futuro ---------- */
.grid-fut { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; }
.mic-card { padding: 32px 22px; position: sticky; top: 20px; }
.prio { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.prio li { border-left: 4px solid var(--line); padding: 6px 0 6px 14px; }
.prio li.u-alta { border-color: var(--warn); }
.prio li.u-media { border-color: var(--accent); }
.prio p { margin: 2px 0 4px; font-size: 14px; color: var(--ink2); }
.small-title { font-size: 13px; color: var(--muted); margin-top: 18px; }
.tasks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tasks li { display: flex; gap: 10px; align-items: center; }
.check-btn { width: 24px; height: 24px; border: 2px solid #c9c2b5; border-radius: 7px; flex: none; }
.check-btn:hover { background: var(--violet); border-color: var(--violet); }
.bills { display: grid; gap: 10px; }
.bill { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; flex-wrap: wrap; }
.bill small { display: block; color: var(--muted); }
.bill.atrasado { border-color: #6b4b33; background: var(--warn-soft); }
.bill.pago { opacity: 0.7; }

/* ---------- Legado ---------- */
.legacy { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.cover { aspect-ratio: 2 / 3; border-radius: 6px 16px 16px 6px; padding: 28px 24px; color: #fff; display: flex; flex-direction: column; box-shadow: inset 8px 0 0 rgba(0, 0, 0, 0.18), 0 20px 40px rgba(20, 20, 20, 0.22); position: relative; overflow: hidden; }
.cover::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -60px; bottom: 40px; background: rgba(255, 255, 255, 0.12); }
.cover small { font-size: 10px; letter-spacing: 0.2em; opacity: 0.8; }
.cover h2 { font-family: Georgia, "Times New Roman", serif; font-size: 30px; margin-top: auto; }
.cover p { opacity: 0.85; font-size: 14px; }
.cover-author { margin-top: 18px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.9; }
.cover-terra { background: linear-gradient(160deg, #8a7a55, #4a3f2a); }
.cover-aurora { background: linear-gradient(160deg, #c08a6a, #6a3f4f); }
.cover-oceano { background: linear-gradient(160deg, #4f7387, #1f3442); }
.cover-noite { background: linear-gradient(160deg, #3b3e48, #121317); }
.cover-floresta { background: linear-gradient(160deg, #5d7a5c, #233626); }
.legacy-info .lead { font-size: 19px; }
.motivation { font-size: 16px; font-weight: 600; border-left: 3px solid var(--accent); padding-left: 14px; margin-top: 16px; }
.chapters { padding-left: 20px; margin: 0; display: grid; gap: 12px; }
.chapters li > div { display: inline-block; width: calc(100% - 110px); vertical-align: top; }
.chapters p { font-size: 14px; color: var(--ink2); margin: 2px 0 0; }
.chapters .chip { float: right; }
.legacy-mic { text-align: center; }
.view-stack { display: flex; flex-direction: column; gap: 18px; }
.next-prompt { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; max-width: 640px; margin: 0 auto 8px; }

/* ---------- Perfil ---------- */
.profile { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.profile-photo { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.profile-photo input[type="range"] { width: 140px; }
.requests { list-style: none; padding: 0; margin: 12px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- Onboarding ---------- */
.onboarding { position: fixed; inset: 0; background: radial-gradient(ellipse at 50% 110%, #56329a 0, #201430 30%, #0b0b10 68%); color: #fff; overflow-y: auto; z-index: 50; }
.ob { min-height: 100%; display: flex; flex-direction: column; align-items: center; padding: 6vh 20px; }
.ob-dots { display: flex; gap: 8px; margin-bottom: 6vh; }
.ob-dots span { width: 28px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.2); }
.ob-dots span.on { background: var(--accent); }
.ob-body { max-width: 640px; width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; animation: fade 0.5s; }
.ob-body.wide { max-width: 980px; }
.ob-body h1 { font-size: clamp(28px, 5vw, 44px); }
.ob-body .lead { color: rgba(255, 255, 255, 0.85); font-size: 18px; }
.ob-body .muted { color: rgba(255, 255, 255, 0.55); }
.ob-body .primary { }
.ob-body .link { color: rgba(255, 255, 255, 0.6); }
.ob-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; width: 100%; text-align: left; }
.ob-card { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 16px; padding: 18px; }
.ob-card b { display: block; margin: 6px 0 4px; }
.ob-card p, .ob-card small { color: rgba(255, 255, 255, 0.7); font-size: 14px; margin: 0; }
.ob-card.accent { background: var(--grad); border: 1px solid #b794ff; text-align: center; }
.ob-card.accent small { color: rgba(255, 255, 255, 0.8); letter-spacing: 0.14em; font-size: 10px; font-weight: 800; }
.ob-card .ico { width: 24px; height: 24px; }
.ob-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; width: 100%; text-align: left; }
.ob-cols ul { padding-left: 18px; color: rgba(255, 255, 255, 0.8); }
.onboarding .timeline { text-align: left; border-color: rgba(255, 255, 255, 0.2); }
.onboarding .timeline b { color: var(--accent); }

/* ---------- Celular ---------- */
@media (max-width: 1000px) {
  .grid-ai { grid-template-columns: 1fr 1fr; }
  .grid-ai .advice { grid-column: 1 / -1; }
  .legacy { grid-template-columns: 220px 1fr; }
}
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 36px 22px 28px; }
  .auth-side h2 { margin: 14px 0 6px; }
  .auth-points { display: none; }
  .auth-card { padding: 22px 18px 40px; max-height: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  main { padding: 16px 14px 110px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(7, 1fr); position: fixed; bottom: 0; left: 0; right: 0; background: rgba(11, 11, 16, 0.94); backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 20; }
  .bn { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--muted); padding: 6px 0; }
  .bn { text-transform: capitalize; }
  .bn.active { color: var(--ink); font-weight: 700; }
  .seg.wide { display: grid; grid-template-columns: 1fr 1fr; border-radius: 18px; }
  .seg.wide button { border-radius: 14px; }
  .grid-fut .mic-card { order: -1; }
  .topbar { margin-bottom: 14px; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .stats { grid-template-columns: 1fr 1fr; }
  .grid-ai, .grid2c, .grid-fut, .legacy, .ob-cols, .toolbar { grid-template-columns: 1fr; }
  .legacy-cover { max-width: 260px; margin: 0 auto; }
  .mentor-dock { left: 0; bottom: 64px; }
  .chat { padding-bottom: 300px; }
  .mic-card { position: static; }
  .grid2 { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 90px 1fr 40px; }
  .map-m { height: 260px; }
  .toast { bottom: 84px; }
  .chapters li > div { width: 100%; }
  .chapters .chip { float: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Superadmin ---------- */
.a-login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at 50% 0, #30204b, var(--bg) 60%); }
.a-login-card { width: min(380px, 100%); display: flex; flex-direction: column; }
.a-login-card .primary { margin-top: 18px; }
.a-shell { min-height: 100vh; }
.a-top { display: flex; align-items: center; gap: 18px; padding: 14px 24px; background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.a-top .brand { margin: 0; }
.a-top .seg { flex: 1; }
.a-view { max-width: 1200px; margin: 0 auto; padding: 24px; }
.stack-l { display: flex; flex-direction: column; gap: 16px; }
.a-view .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats.mini4 { grid-template-columns: repeat(4, 1fr); margin: 12px 0; }
.stats.mini4 .stat { min-height: 0; padding: 10px; }
.stats.mini4 .stat b { font-size: 18px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover { background: var(--soft); }
.users { background: var(--paper); border-radius: var(--radius); overflow: hidden; }
.chip.ok { background: rgba(127, 214, 164, 0.12); color: var(--good); }
.chip.off { background: var(--soft); color: var(--muted); }
.cfg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 16px; margin-bottom: 12px; }
.row-actions { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.row-actions.wrap { flex-wrap: wrap; }
.row-actions input { max-width: 260px; }
.req { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.req p { margin: 2px 0; }
.a-user-head { display: flex; gap: 18px; align-items: center; }
.a-user-head .avatar.xl { width: 96px; height: 96px; }
.danger-btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
@media (max-width: 760px) { .a-view .stats { grid-template-columns: 1fr 1fr; } .tbl.users th:nth-child(n+5), .tbl.users td:nth-child(n+5) { display: none; } .req { flex-direction: column; } }

/* ---------- Termos ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 40px 20px 80px; }
.doc h2 { margin-top: 28px; font-size: 20px; }

/* ---------- V0.5: ícones dos espaços ---------- */
.ico-rocket { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 15c-1.5 1.5-2 5-2 5s3.5-.5 5-2M9 15l-2-2c1-5 5-9 11-10 0 6-5 10-10 11zM14 9.5a1.5 1.5 0 1 0 0-.1'/%3E%3C/svg%3E"); }
.ico-briefcase { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2M3 13h18'/%3E%3C/svg%3E"); }
.ico-heart { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20s-8-4.7-8-10.5A4.5 4.5 0 0 1 12 7a4.5 4.5 0 0 1 8 2.5C20 15.3 12 20 12 20z'/%3E%3C/svg%3E"); }
.ico-pulse { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h4l2-5 4 10 2-5h6'/%3E%3C/svg%3E"); }
.ico-brain { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4a3 3 0 0 0-3 3 3 3 0 0 0-2 5 3 3 0 0 0 2 5 3 3 0 0 0 6 1V5a3 3 0 0 0-3-1zM15 4a3 3 0 0 1 3 3 3 3 0 0 1 2 5 3 3 0 0 1-2 5 3 3 0 0 1-6 1'/%3E%3C/svg%3E"); }
.ico-coins { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='9' cy='7' rx='6' ry='3'/%3E%3Cpath d='M3 7v5c0 1.7 2.7 3 6 3s6-1.3 6-3V7M9 15v2c0 1.7 2.7 3 6 3s6-1.3 6-3v-5c0-1.7-2.7-3-6-3'/%3E%3C/svg%3E"); }
.ico-users { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20c.8-3.5 3.3-5 6.5-5s5.7 1.5 6.5 5M16 4.5a3.5 3.5 0 0 1 0 7M18 15c2 .6 3.2 2.2 3.5 5'/%3E%3C/svg%3E"); }
.ico-star { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1-4.4-4.3 6.1-.9z'/%3E%3C/svg%3E"); }
.ico-plane { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14 3 11l1.5-1.5 7 1L16 6c1-1 3-1.5 3.5-1S19 7.5 18 8.5l-4.5 4.5 1 7L13 21.5l-3-7zM7 17l-3 3'/%3E%3C/svg%3E"); }
.ico-spark { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v4M12 17v4M3 12h4M17 12h4M6 6l2.5 2.5M15.5 15.5 18 18M6 18l2.5-2.5M15.5 8.5 18 6'/%3E%3C/svg%3E"); }
.ico-phone { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h4l2 5-2.5 1.5a11 11 0 0 0 5 5L15 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E"); }

/* ---------- V0.5: espaços (mente que se expande) ---------- */
.nav-title { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; margin: 18px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; color: var(--muted); }
.nav-all { font-size: 12px; color: var(--accent); font-weight: 600; letter-spacing: 0; }
.nav-hint { font-size: 12px; color: var(--muted); padding: 4px 12px 0; line-height: 1.5; }
.space-item span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; text-align: left; }
.new-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); flex: none; }
.tag-new { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; background: var(--violet); border-radius: 999px; padding: 2px 7px; }
.spaces-strip { display: flex; flex-direction: column; gap: 10px; }
.space-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.space-chips::-webkit-scrollbar { display: none; }
.space-chip { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 600; }
.space-chip .ico { width: 16px; height: 16px; color: var(--accent); }
.space-chip:hover, .space-chip.is-new { border-color: #6c568e; background: var(--accent-soft); }
.space-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.space-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(145deg, #1a1726, #111119); color: var(--ink); position: relative; transition: border-color 0.2s, transform 0.2s; }
.space-card:hover { border-color: #6c568e; transform: translateY(-2px); }
.space-card small { font-size: 10px; letter-spacing: 0.16em; color: var(--accent); font-weight: 700; }
.space-card b { font-size: 17px; }
.space-card .tag-new { position: absolute; top: 14px; right: 14px; }
.iconbox { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid #4a3d63; color: var(--accent); margin-bottom: 6px; }
.chip.violet { background: var(--accent-soft); color: var(--accent); border: 1px solid #4a3d63; }
.space-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 28px; border-radius: var(--radius); border: 1px solid #3a2d55; background: radial-gradient(ellipse at 90% 0, #3a2560 0, transparent 60%), linear-gradient(125deg, #1a1726, #101017); }
.space-hero h2 { font-size: 30px; margin: 10px 0 6px; letter-spacing: -0.02em; }
.space-stats { display: flex; gap: 12px; }
.space-stats > * { min-width: 110px; }
.grid-space { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.urgent { border-color: #7a3b3b; background: linear-gradient(145deg, #2a1418, #15101a); }
.urgent h2 { color: #ffb4b4; }
.stack.row { flex-direction: row; flex-wrap: wrap; gap: 10px; }
.care { border-color: #3a2d55; }
.care-search { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 6px; }
.care-search select { flex: 1; min-width: 180px; min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 0 12px; font: inherit; }
.care-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.care-item { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); }
.care-item small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.care-item p { margin: 6px 0 0; color: var(--ink2); }
.care-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.celebrate { text-align: center; }
.celebrate-ico { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: var(--grad); border: 1px solid #b794ff; color: #fff; box-shadow: 0 0 40px rgba(139, 92, 246, 0.5); }
.celebrate-ico .ico { width: 34px; height: 34px; }
.map-tiles { filter: invert(1) hue-rotate(200deg) brightness(0.85) contrast(0.9) saturate(0.6); }
.leaflet-container { background: #0e0e15 !important; }
@media (max-width: 760px) {
  .grid-space { grid-template-columns: 1fr; }
  .space-hero { padding: 22px; }
  .space-hero h2 { font-size: 24px; }
  .care-item { flex-direction: column; }
}

/* ---------- V0.5.1: robustez visual ---------- */
body { overflow-wrap: anywhere; }
.page-root { display: contents; }
.error-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-color: #6b3b3b; }
.error-card p { margin: 0; color: #ffb4b4; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.top-me { display: none; width: 44px; height: 44px; border-radius: 50%; padding: 0; border: 1px solid var(--line); overflow: hidden; }
.top-me .avatar { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .top-me { display: inline-flex; } }
button:disabled { opacity: 0.6; cursor: progress; }
.inline-error { color: var(--danger); font-size: 14px; }

/* ---------- Fotos ---------- */
.photo-hero { display: flex; flex-direction: column; gap: 16px; }
.photo-hero h2 { font-size: 24px; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); align-self: flex-start; }
.segmented button { padding: 9px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; }
.segmented button.on { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(183, 148, 255, 0.45); }
.photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.photo-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px; border-radius: 18px; text-align: left; background: var(--grad); color: #fff; border: 1px solid #b794ff; box-shadow: 0 10px 34px rgba(139, 92, 246, 0.3); min-height: 120px; transition: transform 0.1s; }
.photo-btn.alt { background: var(--soft); border-color: var(--line); box-shadow: none; color: var(--ink); }
.photo-btn:active { transform: scale(0.98); }
.photo-btn .ico { width: 30px; height: 30px; background: currentColor; margin-bottom: auto; }
.photo-btn b { font-size: 17px; }
.photo-btn small { opacity: 0.75; }
.photo-tray { display: flex; flex-direction: column; gap: 12px; }
.photo-tray:empty { display: none; }
.tray-item { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 12px; border-radius: 16px; background: var(--soft); border: 1px solid var(--line); align-items: start; }
.tray-item img { width: 120px; height: 150px; object-fit: cover; border-radius: 10px; background: #000; }
.tray-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; align-items: flex-start; }
.tray-state { font-weight: 600; font-size: 14px; }
.tray-state:empty { display: none; }
.tray-item.sending { opacity: 0.85; }
.tray-item.sending .tray-state::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; border: 2px solid var(--accent); border-top-color: transparent; animation: spin 0.8s linear infinite; vertical-align: -1px; }
.tray-item.done { border-color: rgba(127, 214, 164, 0.5); }
.tray-item.done .tray-state { color: var(--good); }
.tray-note { margin: 0; }
.mic.mini { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; text-align: left; gap: 10px; }
.mic.mini .mic-btn { width: 48px; height: 48px; box-shadow: 0 0 0 1px #b794ff; }
.mic.mini .mic-icon { width: 22px; height: 22px; }
.mic.mini .mic-time:not(:empty) { order: 2; }
.mic.mini .mic-status { margin: 0; font-size: 14px; }
.mic.mini .mic-live { flex-basis: 100%; }
.photo-send { align-self: stretch; }
@keyframes spin { to { transform: rotate(360deg); } }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.photo-cell { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--soft); border: 1px solid var(--line); padding: 0; text-align: left; }
.photo-cell img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.photo-cell:hover img { transform: scale(1.04); }
.photo-cap { position: absolute; inset: auto 0 0 0; padding: 28px 10px 10px; background: linear-gradient(transparent, rgba(8, 8, 12, 0.92)); display: flex; flex-direction: column; gap: 2px; }
.photo-cap small { color: var(--ink2); font-size: 11px; }
.photo-cap b { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mem-photo { display: block; width: 100%; padding: 0; margin-bottom: 12px; border-radius: 14px; overflow: hidden; background: var(--soft); border: 1px solid var(--line); }
.mem-photo img { width: 100%; max-height: 300px; object-fit: contain; display: block; }
.photo-view { display: flex; flex-direction: column; gap: 16px; }
.photo-view img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; background: #000; }
.photo-view-text h2 { font-size: 18px; }
@media (max-width: 520px) {
  .photo-actions { grid-template-columns: 1fr; }
  .photo-btn { min-height: 0; display: grid; grid-template-columns: 30px 1fr; column-gap: 14px; row-gap: 0; align-items: center; justify-items: start; padding: 16px; }
  .photo-btn .ico { margin: 0; grid-row: span 2; }
  .segmented { display: grid; grid-template-columns: 1fr 1fr; align-self: stretch; }
  .segmented button { padding: 9px 8px; font-size: 13px; }
  .tray-item { grid-template-columns: 88px 1fr; }
  .tray-item img { width: 88px; height: 110px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}
.modal-box:has(.photo-view) { width: min(920px, 100%); max-height: 94vh; padding: 18px; }
.photo-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.photo-cta > .ico { width: 34px; height: 34px; background: var(--accent); flex: none; }
.photo-cta > div { flex: 1 1 220px; }
.photo-cta p { margin: 2px 0 0; }
.photo-grid > p { grid-column: 1 / -1; }
.tray-item { transition: opacity 0.4s, transform 0.4s; }
.tray-item.leaving { opacity: 0; transform: translateY(-6px); }


/* V0.7 — Calm Intelligence: camada visual, sem substituir as telas funcionais. */
:root{--ux-bg:#0b0b10;--ux-card:#14141c;--ux-line:#2a2a38;--ux-accent:#b794ff}
.shell{background:var(--ux-bg);grid-template-columns:224px minmax(0,1fr)}
.sidebar{padding:24px 14px;overflow:auto;scrollbar-width:thin;background:#101016}.nav{gap:3px}.nav-item{padding:10px 12px;font-size:13px}.nav-item.active{background:#221c35;box-shadow:inset 0 0 0 1px #604994}.brand{margin-bottom:24px}.brand img{width:34px;height:34px}.nav-hint{font-size:11px}.me{margin-top:12px}.shell main{padding:26px clamp(18px,4vw,58px) 100px}.topbar,.view{max-width:960px;margin-left:auto;margin-right:auto}.topbar{margin-bottom:24px}.topbar h1{font-size:25px;font-weight:650}.view{gap:18px}.page-root{display:flex;flex-direction:column;gap:18px;min-width:0}.card{border:1px solid var(--ux-line);background:var(--ux-card);box-shadow:none;border-radius:20px;padding:22px;min-width:0}.card-title{letter-spacing:.06em}.ux-welcome{border:1px solid #39304c;border-radius:24px;padding:30px;background:radial-gradient(ellipse at 95% 0,#33214e 0,transparent 60%),#15141d}.ux-welcome h2{font-size:clamp(27px,4vw,44px);letter-spacing:-.04em;margin:7px 0 6px;line-height:1.16}.ux-welcome>p:not(.eyebrow){color:#c1bbcc;margin-bottom:22px}.ux-welcome .eyebrow{color:#b794ff;font-size:11px;letter-spacing:.13em}.ux-composer-wrap{background:#0d0d14;border:1px solid #3a3449;border-radius:18px;padding:12px;margin-top:10px}.ux-composer textarea{display:block;width:100%;resize:vertical;min-height:65px;border:0;box-shadow:none;background:transparent;color:#f5f5fa;padding:8px 10px;font:inherit;outline:none}.ux-composer-actions,.ux-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.ux-composer-actions{justify-content:space-between;padding:2px 4px 4px}.ux-composer-actions .primary{width:auto;min-width:94px;margin:0;padding:10px 18px}.ux-composer-wrap .ux-details{margin-top:4px;border:0}.ux-composer-wrap .ux-details summary{padding:9px 10px;color:#c8b1ff}.ux-composer-wrap .mic{padding:5px 0}.ux-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.ux-metric{min-width:0;border:1px solid #2c2a38;background:#191821;border-radius:15px;display:flex;flex-direction:column;gap:7px;padding:15px}.ux-metric>span,.ux-metric small{color:#aaa4b8;font-size:12px;line-height:1.4}.ux-metric strong{font-size:clamp(18px,2.1vw,25px);letter-spacing:-.04em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.ux-two{display:grid;grid-template-columns:1fr 1fr;gap:14px}.ux-two>.card{margin:0}.ux-two h2,.ux-two h3,.card h2{font-size:19px;letter-spacing:-.02em}.ux-weather{display:flex;align-items:center;gap:16px;padding:13px 0}.ux-weather>strong{font-size:45px;line-height:1;color:#f5f5fa;letter-spacing:-.06em}.ux-weather p{font-size:12px;color:#b8b1c3}.ux-sectionhead{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}.ux-sectionhead input{max-width:160px;min-height:38px}.ux-shortcut{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid #353044;border-radius:12px;color:#e7dfff;background:#201b2c;text-align:left;font-size:13px;min-height:44px}.ux-shortcut .ico{color:#b794ff}.ux-arrow{margin-left:auto;font-size:19px;color:#b794ff}.ux-feed{display:flex;flex-direction:column;gap:12px}.ux-feed article{padding:15px 0;border-bottom:1px solid #292735;min-width:0}.ux-feed article:last-child{border-bottom:0}.ux-feed article p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;margin:6px 0}.ux-feed article .ux-metric{max-width:220px;margin-top:8px}.ux-feed .ux-details{margin-top:7px}.ux-details{border:1px solid #302d3b;border-radius:12px;margin:10px 0;overflow:hidden}.ux-details summary{padding:12px 14px;cursor:pointer;color:#d5c8ef;font-size:13px;font-weight:600}.ux-detail-body{padding:0 14px 14px;overflow-wrap:anywhere}.ux-detail-body p{line-height:1.6}.ux-list{display:flex;flex-direction:column;gap:0}.ux-line{display:flex;align-items:center;gap:10px;justify-content:space-between;border-bottom:1px solid #2a2835;padding:13px 0;min-width:0;font-size:14px}.ux-line:last-child{border-bottom:0}.ux-line>div{min-width:0;flex:1;overflow-wrap:anywhere}.ux-line small{display:block;margin-top:3px;color:#aaa4b8;font-size:12px}.ux-line strong{white-space:nowrap;font-variant-numeric:tabular-nums}.ux-edit{font-size:12px;color:#c9b3ff;border:1px solid #3c354c;padding:7px 9px;border-radius:8px;min-height:34px;flex:none}.ux-form{display:flex;flex-direction:column;gap:10px}.ux-form label{display:flex;flex-direction:column;gap:5px}.ux-form label[hidden]{display:none}.ux-form .check{flex-direction:row}.ux-form input,.ux-form select{min-width:0;width:100%;min-height:42px}.ux-form input[type=checkbox]{width:auto;min-height:0}.ux-timegrid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:12px 10px;margin:12px 0 16px}.ux-hour{display:flex;flex-direction:column;gap:5px;min-width:0}.ux-hour>small{font-size:11px;color:#a9a4b6;font-variant-numeric:tabular-nums}.ux-hour-cells{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}.ux-slot{height:19px;border-radius:4px;background:#292735;display:block;overflow:hidden;position:relative;border:1px solid #383546}.ux-slot i{height:100%;display:block;border-radius:3px}.ux-slot.mixed{outline:1px dashed #d3b8ff}.ux-legend{display:flex;gap:10px;flex-wrap:wrap;font-size:12px;color:#b8b2c5;margin:8px 0}.ux-legend span{display:flex;align-items:center;gap:5px}.ux-legend i{width:9px;height:9px;border-radius:3px}.ux-unknown{background:#373442}.ux-unplaced{padding:12px;border:1px dashed #514564;border-radius:12px;margin:12px 0}.ux-unplaced p{margin:5px 0}.ux-hub{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0 0}.ux-stack{display:flex;flex-direction:column;gap:18px}.ux-check{justify-content:flex-start;cursor:pointer}.ux-check input{accent-color:#8b5cf6;flex:none;width:18px;height:18px}.ux-mentor-feed article{padding:18px;border:1px solid #302d3b;border-radius:18px;background:#171620;max-width:100%}.ux-mentor-feed .ux-user{align-self:flex-end;background:#262038;max-width:85%}.ux-mentor-feed small{color:#b794ff}.ux-mentor-feed h2{font-size:24px}.ux-mentor-feed p{margin:5px 0}.ux-mentor-feed+.ux-composer-wrap{position:sticky;bottom:12px;z-index:6;box-shadow:0 12px 40px #0006}.ux-analysis ol{padding-left:20px}.ux-analysis li{margin:8px 0}.ux-stack .card>.primary,.card>.primary{margin-top:12px}.ux-actions input{flex:1;min-width:120px}.ux-hub .ux-shortcut{min-height:56px}.ux-welcome .primary:focus-visible,.ux-shortcut:focus-visible,.ux-edit:focus-visible{outline:2px solid #b794ff;outline-offset:3px}
@media(max-width:1000px){.ux-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.ux-timegrid{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:760px){.shell{grid-template-columns:minmax(0,1fr)}.shell main{padding:17px 15px calc(100px + env(safe-area-inset-bottom))}.topbar{margin-bottom:15px}.topbar h1{font-size:23px}.page-root{gap:12px}.card{padding:16px;border-radius:17px}.ux-welcome{padding:20px 15px;border-radius:20px}.ux-welcome h2{font-size:31px}.ux-welcome>p:not(.eyebrow){font-size:14px;margin-bottom:16px}.ux-metrics{gap:8px}.ux-metric{padding:12px;gap:5px}.ux-metric strong{font-size:22px}.ux-two{grid-template-columns:1fr;gap:12px}.ux-timegrid{grid-template-columns:repeat(4,minmax(0,1fr));gap:11px 7px}.ux-slot{height:16px}.ux-line{gap:6px;font-size:13px}.ux-line strong{font-size:13px}.ux-edit{padding:6px}.ux-hub{grid-template-columns:1fr}.bottom-nav{grid-template-columns:repeat(4,1fr);padding:8px 10px calc(8px + env(safe-area-inset-bottom));background:#101018f5}.bn{font-size:11px;min-height:49px;justify-content:center;border-radius:12px;gap:4px}.bn.active{background:#241d38;color:#cbb4ff}.ux-mentor-feed+.ux-composer-wrap{bottom:calc(77px + env(safe-area-inset-bottom))}.ux-sectionhead input{max-width:145px}.ux-feed article{padding:12px 0}.ux-mentor-feed article{padding:14px}.ux-mentor-feed .ux-user{max-width:94%}.ux-composer-wrap{padding:8px}.ux-mentor-feed .ux-composer textarea{min-height:65px}}
.ux-voice-entry{border-top:1px solid #292735;margin-top:8px;padding-top:6px}.ux-voice-entry .mic{display:flex;flex-direction:row;align-items:center;gap:10px;justify-content:flex-start;flex-wrap:wrap;text-align:left;padding:4px 8px}.ux-voice-entry .mic-btn{width:44px;height:44px;min-width:44px;box-shadow:none}.ux-voice-entry .mic-icon{width:21px;height:21px}.ux-voice-entry .mic-status{font-size:13px;margin:0;flex:1}.ux-voice-entry .mic-live{flex-basis:100%;margin:0}.ux-voice-entry .mic-live:empty{display:none}.ux-voice-entry .mic-time{font-size:11px}.ux-mindmap{padding:10px 0 20px;text-align:center}.ux-mind-root{display:inline-block;background:#32224f;border:1px solid #785ab1;border-radius:14px;padding:12px 24px;color:#e6d8ff;font-weight:650}.ux-branches{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:20px;position:relative}.ux-branches:before{content:'';position:absolute;top:-11px;left:16.6%;right:16.6%;height:1px;background:#68518c}.ux-branch{position:relative;padding:10px;border:1px solid #3d344d;border-radius:12px;background:#201b2c;font-size:13px}.ux-branch:nth-child(-n+3):before{content:'';position:absolute;height:10px;width:1px;top:-11px;left:50%;background:#68518c}.ux-branch.done{border-color:#4c9a7e;color:#94d6be}.ux-check input:checked+div b{color:#94d6be}.ux-timegrid .ux-slot:focus-visible{outline:2px solid #b794ff}
.ux-quick{gap:8px}.ux-quick .ux-shortcut{flex:1;min-width:0}.ux-quick .ux-shortcut span:nth-child(2){white-space:normal}.ux-quick .ux-shortcut .ux-arrow{display:none}@media(max-width:420px){.ux-quick .ux-shortcut{font-size:11px;padding:9px 7px;gap:5px}.ux-quick .ux-shortcut .ico{width:16px;height:16px}}
