/* ═══════════════════════════════════════════════════════════════
   H6NOTAS — Design System (web)
   Roxo · Azul · Laranja — vidro, leveza e brilho suave
   ═══════════════════════════════════════════════════════════════ */
:root {
  --bg: #F3F3F9; --bg2: #ECEBF6; --surface: #FFFFFF; --surface2: #F7F6FC; --surface3: #EFEDF8;
  --text: #17161F; --text2: #55536B; --muted: #9896AD; --line: rgba(30, 24, 70, .08); --line2: rgba(30, 24, 70, .14);
  --violet: #6B4EFF; --violet-2: #8A6BFF; --violet-soft: #EEEAFF; --blue: #3D8BFF; --blue-soft: #E7F0FF;
  --orange: #FF8A3D; --orange-soft: #FFEFE3; --yellow: #FFC53D; --coral: #FF6B5B; --green: #3DBE6A; --pink: #FF6FB5; --teal: #1FBFB0; --gray: #8E8CA3; --indigo: #4C4FD9;
  --accent: var(--violet); --accent-2: var(--violet-2); --accent-soft: var(--violet-soft);
  --grad: linear-gradient(135deg, #8A5CFF 0%, #6B4EFF 45%, #3D8BFF 100%);
  --grad-warm: linear-gradient(135deg, #FFB547 0%, #FF7A45 100%);
  --glass: rgba(255, 255, 255, .62); --glass-strong: rgba(255, 255, 255, .82); --glass-brd: rgba(255, 255, 255, .75);
  --glass-shadow: 0 10px 40px rgba(45, 30, 120, .14), inset 0 1px 0 rgba(255, 255, 255, .9);
  --shadow-sm: 0 2px 8px rgba(40, 30, 100, .06); --shadow: 0 10px 30px rgba(40, 30, 100, .09); --shadow-lg: 0 24px 60px rgba(40, 30, 100, .18);
  --r-sm: 12px; --r: 20px; --r-lg: 28px; --r-xl: 34px;
  --sidebar: 272px; --list: 360px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --tabbar-h: 76px;
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  --editor-size: 17px;
  color-scheme: light;
}
:root[data-accent="blue"] { --accent: var(--blue); --accent-2: #6AA6FF; --accent-soft: var(--blue-soft); }
:root[data-accent="orange"] { --accent: #F7772A; --accent-2: #FF9D5C; --accent-soft: var(--orange-soft); }
:root[data-theme="dark"] {
  --bg: #0D0C15; --bg2: #13121E; --surface: #1A1928; --surface2: #211F31; --surface3: #2A283C;
  --text: #F3F2FA; --text2: #C2C0D6; --muted: #8584A0; --line: rgba(255, 255, 255, .07); --line2: rgba(255, 255, 255, .13);
  --violet-soft: rgba(124, 99, 255, .18); --blue-soft: rgba(61, 139, 255, .16); --orange-soft: rgba(255, 138, 61, .16);
  --accent-soft: rgba(124, 99, 255, .2);
  --glass: rgba(30, 28, 46, .62); --glass-strong: rgba(32, 30, 48, .86); --glass-brd: rgba(255, 255, 255, .09);
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3); --shadow: 0 10px 30px rgba(0, 0, 0, .35); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { overflow: hidden; overscroll-behavior: none; transition: background .4s var(--ease), color .4s var(--ease); }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
svg.i { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 18px; height: 18px; } svg.i.xs { width: 15px; height: 15px; } svg.i.lg { width: 28px; height: 28px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
:focus-visible { outline: 2.5px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; border-radius: 10px; }
.scroll { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }

/* Fundo com brilho suave */
.aurora { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; animation: float 18s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 46vw; height: 46vw; background: #C9BBFF; top: -18vw; right: -12vw; }
.aurora i:nth-child(2) { width: 34vw; height: 34vw; background: #BFD8FF; bottom: -14vw; left: -10vw; animation-delay: -6s; }
.aurora i:nth-child(3) { width: 22vw; height: 22vw; background: #FFD9BF; bottom: 10vh; right: 8vw; opacity: .35; animation-delay: -11s; }
[data-theme="dark"] .aurora i { opacity: .16; }
@keyframes float { to { transform: translate3d(3vw, 4vh, 0) scale(1.08); } }

/* Vidro (Apple-like) */
.glass { background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); border: 1px solid var(--glass-brd); box-shadow: var(--glass-shadow); }
.glass-strong { background: var(--glass-strong); -webkit-backdrop-filter: blur(28px) saturate(190%); backdrop-filter: blur(28px) saturate(190%); border: 1px solid var(--glass-brd); box-shadow: var(--glass-shadow); }

/* ── Estrutura ─────────────────────────────────────────────── */
#app { position: relative; z-index: 1; height: 100%; display: flex; }
.sidebar { width: var(--sidebar); flex: none; height: 100%; display: flex; flex-direction: column; padding: 18px 14px 14px; gap: 6px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 55%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.main { flex: 1; min-width: 0; height: 100%; display: flex; position: relative; }
.pane-list { width: var(--list); flex: none; height: 100%; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: color-mix(in srgb, var(--surface) 35%, transparent); }
.pane-main { flex: 1; min-width: 0; height: 100%; position: relative; display: flex; flex-direction: column; }
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: screenIn .45s var(--ease) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px) scale(.995); } }
.page { padding: 26px 30px calc(120px + var(--safe-b)); max-width: 1040px; width: 100%; margin: 0 auto; }

/* Sidebar */
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.sb-brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 6px 16px rgba(107, 78, 255, .35); }
.sb-item { text-decoration: none; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 13px; color: var(--text2); font-weight: 600; font-size: 14.5px; transition: background .2s, color .2s, transform .2s var(--spring); position: relative; width: 100%; text-align: left; }
.sb-item:hover { background: var(--surface3); color: var(--text); }
.sb-item.on { background: var(--accent-soft); color: var(--accent); }
.sb-item:active { transform: scale(.97); }
.sb-item .count { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 700; }
.sb-item .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.sb-sec { margin: 14px 10px 4px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; justify-content: space-between; }
.sb-sec button { color: var(--muted); padding: 4px; border-radius: 8px; } .sb-sec button:hover { color: var(--accent); background: var(--accent-soft); }
.tree .sb-item { padding-top: 7px; padding-bottom: 7px; }
.tree .tw { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 6px; color: var(--muted); transition: transform .25s var(--ease); flex: none; }
.tree .tw.open { transform: rotate(90deg); } .tree .tw.none { visibility: hidden; }
.sidebar .search { flex: none; }
a.chip, a.set, a.ccard, a.row { text-decoration: none; color: inherit; }
.sb-foot { margin-top: auto; display: flex; gap: 8px; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 15px; transition: transform .2s var(--spring), box-shadow .2s, background .2s, opacity .2s; white-space: nowrap; }
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--accent); background-image: var(--grad); color: #fff; box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-primary:hover { box-shadow: 0 14px 32px color-mix(in srgb, var(--accent) 45%, transparent); }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-ghost { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.btn-danger { background: color-mix(in srgb, var(--coral) 14%, transparent); color: var(--coral); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; } .btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--text); transition: background .2s, transform .2s var(--spring); position: relative; flex: none; }
.icon-btn:hover { background: var(--surface3); } .icon-btn:active { transform: scale(.9); }
.icon-btn.glass { background: var(--glass); }
.icon-btn .badge { position: absolute; top: 7px; right: 8px; width: 10px; height: 10px; background: var(--coral); border: 2px solid var(--surface); border-radius: 50%; animation: pop .4s var(--spring); }
.icon-btn.square { border-radius: 14px; background: var(--accent); background-image: var(--grad); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent); }
@keyframes pop { from { transform: scale(0); } }

/* Barra superior das telas */
.topbar { display: flex; align-items: center; gap: 8px; padding: calc(14px + var(--safe-t)) 18px 10px; position: sticky; top: 0; z-index: 5; }
.topbar h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .sub { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* Indicador de sincronização */
.sync-pill { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--text2); white-space: nowrap; transition: all .3s var(--ease); }
.sync-pill .led { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 20%, transparent); }
.sync-pill[data-s="syncing"] .led { background: var(--blue); animation: pulse 1s infinite; box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 22%, transparent); }
.sync-pill[data-s="offline"] .led { background: var(--orange); box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 22%, transparent); }
.sync-pill[data-s="pending"] .led { background: var(--yellow); }
.sync-pill[data-s="error"] .led { background: var(--coral); }
.sync-pill[data-s="local"] .led { background: var(--gray); box-shadow: none; }
.sync-pill svg.spin { animation: spin 1s linear infinite; }
@keyframes pulse { 50% { opacity: .35; } } @keyframes spin { to { transform: rotate(360deg); } }

/* ── Tab bar flutuante (mobile) ───────────────────────────── */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--safe-b)); z-index: 40; display: none; align-items: center; justify-content: space-around; width: min(440px, calc(100% - 28px)); height: 68px; border-radius: 999px; padding: 0 8px; transition: transform .45s var(--ease), opacity .3s; }
.tabbar.hide { transform: translate(-50%, 140%); opacity: 0; }
.tabbar .tab { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); position: relative; transition: color .25s, transform .25s var(--spring); }
.tabbar .tab.on { color: var(--accent); }
.tabbar .tab.on::after { content: ""; position: absolute; bottom: 7px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: pop .35s var(--spring); }
.tabbar .tab:active { transform: scale(.88); }
.tabbar .fab { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--accent); background-image: var(--grad); box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 50%, transparent), inset 0 1px 0 rgba(255, 255, 255, .4); transition: transform .3s var(--spring); margin-top: -2px; }
.tabbar .fab:active { transform: scale(.88) rotate(90deg); }
.tabbar .fab svg { width: 26px; height: 26px; stroke-width: 2.4; }
.tabbar .tab .badge { position: absolute; top: 12px; right: 13px; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); }

/* FAB desktop */
.fab-float { position: absolute; right: 26px; bottom: 26px; z-index: 20; width: 60px; height: 60px; border-radius: 50%; color: #fff; background: var(--accent); background-image: var(--grad); display: grid; place-items: center; box-shadow: 0 14px 30px color-mix(in srgb, var(--accent) 45%, transparent); transition: transform .3s var(--spring); }
.fab-float:hover { transform: translateY(-3px) scale(1.04); } .fab-float:active { transform: scale(.9); }

/* ── Dashboard ────────────────────────────────────────────── */
.hello { display: flex; align-items: flex-start; gap: 12px; margin: 6px 0 20px; }
.hello .t { flex: 1; min-width: 0; }
.hello small { display: block; color: var(--muted); font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.hello h2 { margin: 0; font-size: 32px; letter-spacing: -.03em; font-weight: 800; line-height: 1.12; }
.hello .acts { display: flex; gap: 6px; align-items: center; }
.avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 16px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; } .avatar.lg { width: 108px; height: 108px; font-size: 38px; border: 4px solid var(--surface); box-shadow: var(--shadow); }
.searchbar { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.search { flex: 1; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid var(--line); color: var(--muted); cursor: text; transition: box-shadow .25s; }
.search:hover { box-shadow: var(--shadow); }
.search input { flex: 1; border: 0; outline: 0; background: none; font-size: 15.5px; color: var(--text); min-width: 0; }
.search kbd { font: 700 11px var(--font); background: var(--surface3); border-radius: 7px; padding: 3px 7px; color: var(--muted); }
.sec-h { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 14px; }
.sec-h h3 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.sec-h a, .sec-h button.link { font-size: 13.5px; font-weight: 700; color: var(--accent); text-decoration: none; }
.hscroll { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 30px 18px; margin: 0 -30px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; } .hscroll > * { scroll-snap-align: start; flex: none; }

/* Cartões de pasta com recorte (referência) */
.fcard { --c: var(--violet); width: 170px; height: 186px; border-radius: 26px; background: var(--c); color: #fff; padding: 18px 16px; position: relative; display: flex; flex-direction: column; text-align: left;
  -webkit-mask: radial-gradient(circle 22px at calc(100% + 4px) 50%, transparent 21px, #000 22px); mask: radial-gradient(circle 22px at calc(100% + 4px) 50%, transparent 21px, #000 22px);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--c) 30%, transparent); transition: transform .3s var(--spring); overflow: hidden; }
.fcard-wrap { position: relative; } .fcard-wrap .notch { position: absolute; right: -6px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--c); box-shadow: var(--shadow-sm); }
.fcard:hover { transform: translateY(-4px) rotate(-.6deg); } .fcard:active { transform: scale(.96); }
.fcard::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 0% 0%, rgba(255, 255, 255, .28), transparent 55%); pointer-events: none; }
.fcard .ic { width: 50px; height: 50px; border-radius: 16px; background: rgba(255, 255, 255, .24); display: grid; place-items: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.fcard .ic svg { width: 26px; height: 26px; }
.fcard .nm { margin-top: auto; font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fcard .ct { font-size: 12.5px; opacity: .85; font-weight: 600; margin-top: 4px; }
.fcard .lock { position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; border-radius: 9px; background: rgba(255, 255, 255, .25); display: grid; place-items: center; }
.fcard.add { background: var(--surface); color: var(--accent); border: 2px dashed color-mix(in srgb, var(--accent) 40%, transparent); box-shadow: none; -webkit-mask: none; mask: none; align-items: center; justify-content: center; gap: 8px; font-weight: 700; }

/* Tiles pequenos (fixadas) */
.tile { width: 128px; min-height: 128px; border-radius: 22px; padding: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; position: relative; transition: transform .25s var(--spring), box-shadow .25s; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tile .tic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; }
.tile b { font-size: 13.5px; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.tile .chk { position: absolute; top: 8px; right: 8px; color: var(--muted); }

/* Linhas de notas */
.row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); width: 100%; text-align: left; transition: transform .25s var(--spring), box-shadow .25s; margin-bottom: 10px; }
.row:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.row .ric { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; flex: none; font-weight: 800; }
.row .rt { flex: 1; min-width: 0; } .row .rt b { display: block; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .rt span { font-size: 13px; color: var(--muted); font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.datebox { width: 62px; height: 62px; border-radius: 18px; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; flex: none; }
.datebox b { font-size: 22px; } .datebox span { font-size: 12.5px; font-weight: 700; }

/* Semana (calendário) */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 14px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.week .d { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; border-radius: 16px; font-size: 12px; color: var(--muted); font-weight: 700; position: relative; }
.week .d b { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: var(--text); font-size: 15px; }
.week .d.today b { background: var(--yellow); color: #3a2a00; }
.week .d.has b { background: var(--accent); color: #fff; }
.week .d .plus { position: absolute; top: 2px; right: 4px; background: var(--coral); color: #fff; font-size: 10px; border-radius: 999px; padding: 1px 5px; border: 2px solid var(--surface); }

/* Anéis de progresso */
.rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 18px 12px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); text-align: center; }
.ring { display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; }
.ring svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.ring circle.bg { stroke: var(--surface3); } .ring circle.fg { transition: stroke-dashoffset 1.4s var(--ease); }
.ring .v { position: relative; } .ring .v b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 19px; color: var(--text); }

/* Chips e tags */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll-x { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; } .chips.scroll-x::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 15px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 13.5px; color: var(--text2); white-space: nowrap; transition: all .2s var(--ease); flex: none; }
.chip:hover { border-color: var(--line2); } .chip.on { background: var(--accent); color: #fff; border-color: transparent; box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 30%, transparent); }
.chip .n { font-size: 11px; opacity: .7; }
.tagpill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 700; }

/* Segmentado */
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface3); position: relative; }
.seg button { height: 36px; padding: 0 16px; border-radius: 999px; font-weight: 700; font-size: 13.5px; color: var(--text2); position: relative; z-index: 1; transition: color .25s; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { color: var(--text); background: var(--surface); box-shadow: var(--shadow-sm); }

/* ── Lista de notas ───────────────────────────────────────── */
.list-head { padding: calc(16px + var(--safe-t)) 18px 8px; display: flex; flex-direction: column; gap: 12px; }
.list-head .lh1 { display: flex; align-items: center; gap: 6px; }
.list-head h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.03em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-head .meta { font-size: 13px; color: var(--muted); font-weight: 600; }
.list-body { flex: 1; min-height: 0; padding: 4px 14px calc(120px + var(--safe-b)); }
.group-t { font-size: 13px; font-weight: 800; color: var(--muted); margin: 18px 6px 8px; letter-spacing: .02em; display: flex; align-items: center; gap: 6px; }
.subfolders { display: flex; gap: 10px; overflow-x: auto; padding: 2px 4px 10px; scrollbar-width: none; }
.subfolders::-webkit-scrollbar { display: none; }
.subf { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 13.5px; flex: none; transition: transform .2s var(--spring); }
.subf:active { transform: scale(.95); }
.subf .sw { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; color: #fff; }

/* Item estilo lista (Apple Notes) */
.ni { display: block; width: 100%; text-align: left; padding: 13px 14px; border-radius: 18px; position: relative; transition: background .2s, transform .25s var(--spring); user-select: none; -webkit-user-select: none; }
.ni + .ni::before { content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 1px; background: var(--line); }
.ni:hover { background: var(--surface); } .ni.on { background: var(--accent-soft); } .ni.on::before, .ni.on + .ni::before { opacity: 0; }
.ni:active { transform: scale(.985); }
.ni .t1 { display: flex; align-items: center; gap: 6px; font-weight: 750; font-size: 15.5px; } .ni .t1 span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.ni .t2 { display: flex; gap: 8px; font-size: 13.5px; color: var(--muted); margin-top: 3px; } .ni .t2 time { color: var(--text2); font-weight: 600; flex: none; }
.ni .t2 span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ni .t3 { display: flex; gap: 6px; margin-top: 7px; align-items: center; flex-wrap: wrap; }
.ni .fchip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.ni .fchip i { width: 8px; height: 8px; border-radius: 3px; }
.ni .ico { color: var(--muted); }
.ni .colorbar { position: absolute; left: 4px; top: 16px; bottom: 16px; width: 4px; border-radius: 4px; }

/* Grade (quadrados) */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gcard { aspect-ratio: 1; border-radius: 22px; padding: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; text-align: left; position: relative; overflow: hidden; transition: transform .3s var(--spring), box-shadow .3s; user-select: none; -webkit-user-select: none; }
.gcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); } .gcard:active { transform: scale(.96); }
.gcard.colored { color: #fff; border: 0; } .gcard.colored .gp, .gcard.colored .gm { color: rgba(255, 255, 255, .85); }
.gcard b { font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gcard .gp { font-size: 12.5px; color: var(--text2); margin-top: 6px; line-height: 1.45; flex: 1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.gcard .gm { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); font-weight: 700; margin-top: 8px; }
.gcard .pin { position: absolute; top: 12px; right: 12px; }

/* Cartões (retângulos) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ccard { border-radius: 26px; padding: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); text-align: left; position: relative; overflow: hidden; transition: transform .3s var(--spring), box-shadow .3s; user-select: none; -webkit-user-select: none; display: flex; flex-direction: column; gap: 8px; min-height: 150px; }
.ccard:hover { transform: translateY(-3px); box-shadow: var(--shadow); } .ccard:active { transform: scale(.97); }
.ccard.colored { color: #fff; border: 0; } .ccard.colored .cp, .ccard.colored .cm { color: rgba(255, 255, 255, .88); }
.ccard.colored::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .25), transparent 55%); pointer-events: none; }
.ccard .ch { display: flex; align-items: flex-start; gap: 8px; } .ccard .ch b { font-size: 18px; letter-spacing: -.02em; line-height: 1.25; flex: 1; }
.ccard .cp { font-size: 13.5px; color: var(--text2); line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.ccard .cm { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 700; margin-top: auto; flex-wrap: wrap; }
.progress { height: 6px; border-radius: 6px; background: color-mix(in srgb, currentColor 14%, transparent); overflow: hidden; flex: 1; min-width: 60px; }
.progress i { display: block; height: 100%; border-radius: 6px; background: var(--green); transition: width .6s var(--ease); }
.colored .progress i { background: #fff; }
.avs { display: flex; } .avs .avatar { width: 24px; height: 24px; font-size: 10px; border: 2px solid var(--surface); margin-left: -7px; } .avs .avatar:first-child { margin-left: 0; }

/* Kanban */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding: 4px 4px 24px; align-items: flex-start; min-height: 60vh; scroll-snap-type: x proximity; }
.kcol { width: 280px; flex: none; border-radius: 26px; background: color-mix(in srgb, var(--surface3) 65%, transparent); padding: 12px; display: flex; flex-direction: column; gap: 10px; scroll-snap-align: start; transition: background .2s, box-shadow .2s; }
.kcol.over { background: var(--accent-soft); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); }
.kcol .kh { display: flex; align-items: center; gap: 8px; padding: 4px 6px; font-weight: 800; font-size: 14.5px; }
.kcol .kh .n { margin-left: auto; font-size: 12px; color: var(--muted); background: var(--surface); padding: 2px 9px; border-radius: 999px; }
.kcol .kh i { width: 10px; height: 10px; border-radius: 50%; }
.kcard { border-radius: 18px; padding: 13px 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); text-align: left; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; transition: transform .2s var(--spring), box-shadow .2s, opacity .2s; }
.kcard b { font-size: 14.5px; display: block; } .kcard p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kcard .km { display: flex; gap: 6px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.kcard.dragging { opacity: .35; } .kadd { height: 40px; border-radius: 14px; color: var(--muted); font-weight: 700; font-size: 13.5px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed var(--line2); }
.kadd:hover { color: var(--accent); border-color: var(--accent); }
.drag-ghost { position: fixed; z-index: 200; pointer-events: none; transform: rotate(3deg) scale(1.04); box-shadow: var(--shadow-lg); width: 256px; }

/* Lock overlay em cartões */
.lockedv { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }

/* Vazio */
.empty { text-align: center; padding: 60px 24px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .art { width: 120px; height: 120px; border-radius: 36px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); margin-bottom: 8px; animation: bob 3s ease-in-out infinite; }
.empty .art svg { width: 54px; height: 54px; stroke-width: 1.6; }
.empty h4 { margin: 0; color: var(--text); font-size: 18px; } .empty p { margin: 0; max-width: 300px; line-height: 1.5; font-size: 14.5px; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-3deg); } }

/* ── Editor ───────────────────────────────────────────────── */
.ed-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.ed-top { display: flex; align-items: center; gap: 4px; padding: calc(10px + var(--safe-t)) 14px 8px; position: relative; z-index: 6; }
.ed-top .grow { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.saved { font-size: 12.5px; color: var(--muted); font-weight: 700; display: inline-flex; align-items: center; gap: 5px; transition: opacity .3s; white-space: nowrap; }
.saved .ok { color: var(--green); } .saved.saving .ok { color: var(--blue); animation: pulse .8s infinite; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; overflow: hidden; white-space: nowrap; }
.crumbs button { color: var(--muted); padding: 4px 6px; border-radius: 8px; } .crumbs button:hover { color: var(--accent); background: var(--accent-soft); }
.ed-scroll { flex: 1; min-height: 0; }
.ed-paper { max-width: 760px; margin: 0 auto; padding: 8px 34px calc(170px + var(--safe-b)); }
.ed-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 600; margin: 6px 0 14px; text-align: center; justify-content: center; }
.ed-shared { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: 13px; margin-bottom: 14px; }

.editor { font-size: var(--editor-size); line-height: 1.62; outline: none; }
.blk { position: relative; display: flex; align-items: flex-start; gap: 8px; padding: 1px 0; border-radius: 8px; animation: blkIn .25s var(--ease); }
@keyframes blkIn { from { opacity: 0; transform: translateY(3px); } }
.blk .bx { flex: 1; min-width: 0; outline: none; white-space: pre-wrap; word-break: break-word; padding: 3px 2px; min-height: 1.6em; caret-color: var(--accent); }
.blk .bx:empty::before { content: attr(data-ph); color: var(--muted); opacity: .7; pointer-events: none; }
.blk[data-t="p"] .bx:not(:focus):empty::before { content: ""; }
.editor .blk:first-child[data-t="p"] .bx:empty::before, .editor .blk:only-child .bx:empty::before { content: attr(data-ph); }
.blk[data-t="h1"] .bx { font-size: 1.85em; font-weight: 800; letter-spacing: -.03em; line-height: 1.22; padding-top: 10px; }
.blk[data-t="h2"] .bx { font-size: 1.38em; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; padding-top: 12px; }
.blk[data-t="h3"] .bx { font-size: 1.12em; font-weight: 800; padding-top: 8px; }
.blk .mk { flex: none; min-width: 22px; height: 1.62em; display: grid; place-items: center; color: var(--accent); font-weight: 800; padding-top: 3px; font-size: .95em; user-select: none; }
.blk[data-t="bullet"] .mk::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.blk[data-t="bullet"][data-i="1"] .mk::before, .blk[data-t="bullet"][data-i="3"] .mk::before { background: none; border: 2px solid currentColor; width: 6px; height: 6px; }
.blk[data-t="bullet"][data-i="2"] .mk::before, .blk[data-t="bullet"][data-i="4"] .mk::before { border-radius: 2px; }
.blk[data-i="1"] { padding-left: 28px; } .blk[data-i="2"] { padding-left: 56px; } .blk[data-i="3"] { padding-left: 84px; } .blk[data-i="4"] { padding-left: 112px; }
.blk .cb { flex: none; width: 24px; height: 24px; margin-top: calc((1.62em - 24px) / 2 + 3px); border-radius: 50%; border: 2px solid var(--line2); display: grid; place-items: center; color: #fff; transition: all .25s var(--spring); cursor: pointer; }
.blk .cb svg { width: 14px; height: 14px; stroke-width: 3; opacity: 0; transform: scale(.4); transition: all .25s var(--spring); }
.blk.done .cb { background: var(--accent); border-color: var(--accent); box-shadow: 0 4px 10px color-mix(in srgb, var(--accent) 35%, transparent); }
.blk.done .cb svg { opacity: 1; transform: none; }
.blk.done .bx { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.blk[data-t="quote"] { padding-left: 4px; } .blk[data-t="quote"] .bx { border-left: 4px solid var(--accent); padding-left: 16px; color: var(--text2); font-style: italic; }
.blk[data-t="code"] .bx { font-family: var(--mono); font-size: .86em; background: var(--surface3); border-radius: 14px; padding: 14px 16px; line-height: 1.6; tab-size: 2; }
.blk[data-t="callout"] { background: var(--orange-soft); border-radius: 16px; padding: 12px 14px; margin: 6px 0; }
.blk[data-t="callout"] .ci { flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--grad-warm); color: #fff; display: grid; place-items: center; margin-top: 2px; }
.blk[data-t="divider"] { padding: 14px 0; } .blk[data-t="divider"] hr { flex: 1; border: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--line2), transparent); margin: 0; }
.blk[data-t="divider"].sel hr { background: var(--accent); }
.blk[data-c="violet"] .bx { color: var(--violet); } .blk[data-c="blue"] .bx { color: var(--blue); } .blk[data-c="orange"] .bx { color: var(--orange); }
.blk[data-c="red"] .bx { color: var(--coral); } .blk[data-c="green"] .bx { color: var(--green); } .blk[data-c="gray"] .bx { color: var(--muted); } .blk[data-c="pink"] .bx { color: var(--pink); }
.blk[data-bg] { border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.blk[data-bg="yellow"] { background: #FFF4CC; } .blk[data-bg="violet"] { background: var(--violet-soft); } .blk[data-bg="blue"] { background: var(--blue-soft); } .blk[data-bg="orange"] { background: var(--orange-soft); } .blk[data-bg="green"] { background: color-mix(in srgb, var(--green) 14%, transparent); }
[data-theme="dark"] .blk[data-bg="yellow"] { background: rgba(255, 197, 61, .16); }
.bx b, .bx strong { font-weight: 800; } .bx code { font-family: var(--mono); font-size: .86em; background: var(--surface3); padding: 2px 6px; border-radius: 6px; color: var(--coral); }
.bx mark { background: linear-gradient(transparent 35%, color-mix(in srgb, var(--yellow) 65%, transparent) 35%); color: inherit; padding: 0 2px; }
.bx a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); cursor: pointer; }
.bx .htag { color: var(--accent); font-weight: 700; background: var(--accent-soft); border-radius: 6px; padding: 0 4px; }

/* Tabela */
.blk[data-t="table"] { display: block; margin: 8px 0; }
.tbl-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line2); background: var(--surface); }
.tbl { border-collapse: collapse; min-width: 100%; font-size: .9em; }
.tbl td { border: 1px solid var(--line); min-width: 110px; padding: 0; vertical-align: top; }
.tbl tr:first-child td { border-top: 0; } .tbl td:first-child { border-left: 0; } .tbl tr:last-child td { border-bottom: 0; } .tbl td:last-child { border-right: 0; }
.tbl.head tr:first-child td { background: var(--surface3); font-weight: 800; }
.tbl .cell { outline: none; padding: 10px 12px; min-height: 1.5em; white-space: pre-wrap; word-break: break-word; }
.tbl td:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.tbl-tools { display: none; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.blk[data-t="table"]:focus-within .tbl-tools { display: flex; animation: blkIn .2s; }
.tbl-tools button { height: 32px; padding: 0 12px; border-radius: 10px; background: var(--surface3); font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.tbl-tools button:hover { background: var(--accent-soft); color: var(--accent); }

/* Cartão de link */
.blk[data-t="link"] { margin: 6px 0; }
.lcard { flex: 1; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line2); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--text); transition: transform .25s var(--spring), box-shadow .25s; min-width: 0; }
.lcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.lcard .lic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; }
.lcard .lt { flex: 1; min-width: 0; } .lcard .lt b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcard .lt span { font-size: 12.5px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcard .ext { color: var(--muted); }
.blk .bmenu { position: absolute; left: -38px; top: 4px; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); opacity: 0; transition: opacity .2s; }
.blk:hover .bmenu { opacity: 1; } .blk .bmenu:hover { background: var(--surface3); color: var(--text); }

/* Barra de formatação flutuante */
.fmt { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(16px + var(--safe-b)); z-index: 30; display: flex; align-items: center; gap: 2px; padding: 6px; border-radius: 22px; max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; transition: transform .4s var(--ease), opacity .3s; }
.fmt::-webkit-scrollbar { display: none; }
.fmt.hide { transform: translate(-50%, 150%); opacity: 0; }
.fmt button { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; color: var(--text); transition: background .15s, transform .2s var(--spring); font-weight: 800; font-size: 15px; }
.fmt button:hover { background: color-mix(in srgb, var(--text) 8%, transparent); } .fmt button:active { transform: scale(.88); }
.fmt button.on { background: var(--accent); color: #fff; }
.fmt .sep { width: 1px; height: 24px; background: var(--line2); margin: 0 4px; flex: none; }
.fmt .aa { width: auto; padding: 0 12px; font-size: 14px; gap: 4px; display: flex; }

/* ── Menus, folhas e diálogos ─────────────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 90; background: rgba(15, 12, 40, .26); animation: fade .25s both; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.scrim.clear { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
@keyframes fade { from { opacity: 0; } }
.menu { position: fixed; z-index: 100; min-width: 240px; max-width: min(320px, calc(100vw - 24px)); padding: 7px; border-radius: 22px; animation: menuIn .28s var(--spring) both; transform-origin: var(--ox, top) var(--oy, left); max-height: min(70vh, 560px); overflow-y: auto; }
@keyframes menuIn { from { opacity: 0; transform: scale(.86); } }
.menu .mi { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 14px; font-weight: 650; font-size: 14.5px; text-align: left; transition: background .15s; }
.menu .mi:hover, .menu .mi.kb { background: color-mix(in srgb, var(--text) 7%, transparent); }
.menu .mi .k { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 700; }
.menu .mi.danger { color: var(--coral); }
.menu .mi .sw { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--surface3); flex: none; }
.menu .mi small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.menu hr { border: 0; height: 1px; background: var(--line2); margin: 5px 8px; }
.menu .mh { padding: 8px 12px 4px; font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.menu .swatches { display: flex; gap: 8px; padding: 8px 12px; flex-wrap: wrap; }
.menu .swatches button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line2); transition: transform .2s var(--spring); }
.menu .swatches button:hover { transform: scale(1.15); } .menu .swatches button.on { box-shadow: 0 0 0 2.5px var(--accent); }
.menu.ctx-preview { padding: 0; overflow: hidden; }
.ctx-card { padding: 16px 18px; border-bottom: 1px solid var(--line); max-height: 180px; overflow: hidden; -webkit-mask: linear-gradient(#000 70%, transparent); mask: linear-gradient(#000 70%, transparent); }
.ctx-card b { font-size: 16px; } .ctx-card p { font-size: 13px; color: var(--text2); margin: 6px 0 0; line-height: 1.5; white-space: pre-line; }

.sheet { position: fixed; z-index: 100; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px, 100%); max-height: 92vh; display: flex; flex-direction: column; border-radius: 34px 34px 0 0; padding: 10px 22px calc(22px + var(--safe-b)); animation: sheetIn .45s var(--ease) both; }
.sheet.center { bottom: auto; top: 50%; transform: translate(-50%, -50%); border-radius: 32px; animation: dlgIn .4s var(--spring) both; width: min(480px, calc(100% - 28px)); padding: 22px; }
@keyframes sheetIn { from { transform: translate(-50%, 100%); } }
@keyframes dlgIn { from { opacity: 0; transform: translate(-50%, -46%) scale(.92); } }
.sheet .grab { width: 44px; height: 5px; border-radius: 5px; background: var(--line2); margin: 0 auto 14px; flex: none; }
.sheet h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; } .sheet .lead { margin: 0 0 18px; color: var(--text2); font-size: 14.5px; line-height: 1.5; }
.sheet .body { overflow-y: auto; margin: 0 -22px; padding: 2px 22px; }
.sheet .acts { display: flex; gap: 10px; margin-top: 18px; } .sheet .acts .btn { flex: 1; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 700; color: var(--text2); }
.inp { height: 52px; border-radius: 16px; border: 1.5px solid var(--line2); background: var(--surface); padding: 0 16px; font-size: 15.5px; outline: none; transition: border-color .2s, box-shadow .2s; width: 100%; }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
textarea.inp { height: auto; min-height: 110px; padding: 14px 16px; resize: vertical; line-height: 1.5; }
.inp-wrap { position: relative; } .inp-wrap .inp { padding-right: 48px; } .inp-wrap .suffix { position: absolute; right: 6px; top: 6px; }
.hint { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.hint.ok { color: var(--green); } .hint.bad { color: var(--coral); }
.strength { height: 6px; border-radius: 6px; background: var(--surface3); overflow: hidden; } .strength i { display: block; height: 100%; transition: width .4s var(--ease), background .4s; }
.codebox { display: flex; gap: 8px; justify-content: center; }
.codebox input { width: 48px; height: 58px; text-align: center; font-size: 24px; font-weight: 800; border-radius: 16px; border: 1.5px solid var(--line2); background: var(--surface); outline: none; }
.codebox input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.toggle { width: 52px; height: 32px; border-radius: 999px; background: var(--line2); position: relative; transition: background .25s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .3s var(--spring); }
.toggle.on { background: var(--green); } .toggle.on::after { transform: translateX(20px); }

/* Listas de configurações */
.group { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.group-title { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin: 24px 8px 10px; }
.set { display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: 100%; text-align: left; min-height: 58px; }
.set + .set { border-top: 1px solid var(--line); }
.set:is(button):hover { background: var(--surface2); }
.set .sic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; }
.set .st { flex: 1; min-width: 0; } .set .st b { display: block; font-size: 15px; font-weight: 700; } .set .st span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.set .val { color: var(--muted); font-size: 14px; font-weight: 600; } .set .chev { color: var(--muted); }
.copybox { display: flex; align-items: center; gap: 8px; background: var(--surface3); border-radius: 14px; padding: 6px 6px 6px 14px; font-family: var(--mono); font-size: 12.5px; }
.copybox span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 16px; }
.theme-card { border-radius: 18px; padding: 8px; border: 2px solid var(--line); text-align: center; font-weight: 700; font-size: 13px; transition: border-color .2s, transform .2s var(--spring); }
.theme-card.on { border-color: var(--accent); } .theme-card:active { transform: scale(.95); }
.theme-card .pv { height: 64px; border-radius: 12px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 5px; padding: 9px; }
.theme-card .pv i { height: 7px; border-radius: 4px; display: block; }

/* Perfil */
.cover { height: 190px; border-radius: 0 0 34px 34px; background: var(--grad); position: relative; overflow: hidden; margin: 0 -30px; }
.cover::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 190, 120, .7), transparent 65%); left: 50%; top: -110px; transform: translateX(-50%); filter: blur(10px); }
.cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 15% 110%, rgba(255, 138, 61, .5), transparent 60%); }
.prof-head { display: flex; flex-direction: column; align-items: center; margin-top: -58px; position: relative; z-index: 2; text-align: center; }
.prof-head .edit-av { position: absolute; top: 74px; left: calc(50% + 26px); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); }
.prof-head h2 { margin: 12px 0 2px; font-size: 26px; letter-spacing: -.02em; } .prof-head .un { color: var(--muted); font-weight: 600; }
.badges { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.badge-p { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 10px; font-weight: 700; font-size: 13.5px; background: var(--accent); color: #fff; }
.badge-p.soft { background: var(--accent-soft); color: var(--accent); } .badge-p.warm { background: var(--grad-warm); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-size: 24px; letter-spacing: -.02em; } .stat span { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 4px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow-x: auto; box-shadow: var(--shadow-sm); }
.heat i { width: 14px; height: 14px; border-radius: 4px; background: var(--surface3); }
.heat i[data-l="1"] { background: color-mix(in srgb, var(--accent) 30%, var(--surface3)); } .heat i[data-l="2"] { background: color-mix(in srgb, var(--accent) 55%, var(--surface3)); }
.heat i[data-l="3"] { background: color-mix(in srgb, var(--accent) 80%, var(--surface3)); } .heat i[data-l="4"] { background: var(--orange); }
.achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ach { padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; position: relative; }
.ach .ai { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.ach b { font-size: 14px; } .ach span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.ach.off { opacity: .45; filter: grayscale(1); }
.level { padding: 18px; border-radius: 24px; background: var(--grad); color: #fff; display: flex; align-items: center; gap: 16px; box-shadow: 0 16px 34px color-mix(in srgb, var(--accent) 30%, transparent); position: relative; overflow: hidden; }
.level::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 180, 100, .55), transparent 65%); }
.level .lv { width: 64px; height: 64px; border-radius: 20px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-size: 26px; font-weight: 800; flex: none; }
.level .lt { flex: 1; z-index: 1; } .level .lt b { font-size: 19px; display: block; } .level .lt span { font-size: 13px; opacity: .9; }
.level .bar { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .25); margin-top: 10px; overflow: hidden; } .level .bar i { display: block; height: 100%; background: #fff; border-radius: 8px; transition: width 1.2s var(--ease); }

/* Pessoas */
.person { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.person + .person { border-top: 1px solid var(--line); }
.person .pt { flex: 1; min-width: 0; } .person .pt b { display: block; font-size: 15px; } .person .pt span { font-size: 12.5px; color: var(--muted); }

/* Notificações */
.notif { display: flex; gap: 12px; padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 10px; position: relative; }
.notif.unread::after { content: ""; position: absolute; top: 18px; right: 16px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.notif .nic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; }
.notif .nt { flex: 1; min-width: 0; padding-right: 14px; } .notif .nt b { display: block; font-size: 14.5px; } .notif .nt p { margin: 3px 0 0; font-size: 13px; color: var(--text2); } .notif .nt time { font-size: 12px; color: var(--muted); font-weight: 600; }
.notif .na { display: flex; gap: 8px; margin-top: 10px; }

/* Toast */
.toasts { position: fixed; z-index: 300; left: 50%; transform: translateX(-50%); top: calc(16px + var(--safe-t)); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(420px, calc(100% - 24px)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px 12px 12px; border-radius: 20px; font-weight: 650; font-size: 14px; animation: toastIn .5s var(--spring) both; max-width: 100%; }
.toast.out { animation: toastOut .35s var(--ease) both; }
.toast .ti { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--accent); flex: none; }
.toast .ti.ok { background: var(--green); } .toast .ti.err { background: var(--coral); } .toast .ti.warn { background: var(--orange); }
.toast button { margin-left: auto; color: var(--accent); font-weight: 800; padding: 4px 8px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-24px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-16px) scale(.95); } }

/* Login */
.auth { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.auth-card { width: min(440px, 100%); border-radius: 34px; padding: 34px 28px 28px; animation: dlgIn2 .7s var(--spring) both; }
@keyframes dlgIn2 { from { opacity: 0; transform: translateY(30px) scale(.95); } }
.auth-logo { width: 84px; height: 84px; border-radius: 26px; margin: 0 auto 18px; display: block; box-shadow: 0 18px 40px rgba(107, 78, 255, .4); animation: bob 4s ease-in-out infinite; }
.auth h1 { text-align: center; margin: 0 0 6px; font-size: 28px; letter-spacing: -.03em; } .auth .lead { text-align: center; color: var(--text2); margin: 0 0 24px; line-height: 1.5; }
.social { display: flex; flex-direction: column; gap: 10px; }
.btn-apple { background: #000; color: #fff; } [data-theme="dark"] .btn-apple { background: #fff; color: #000; }
.btn-google { background: var(--surface); color: var(--text); border: 1.5px solid var(--line2); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 700; margin: 20px 0; } .or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
.auth .switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text2); } .auth .switch button { color: var(--accent); font-weight: 800; }

/* Tela de bloqueio */
.lockscreen { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%); animation: fade .3s; }
.lockscreen .lk { text-align: center; width: min(360px, calc(100% - 40px)); }
.lockscreen .lk .lic { width: 86px; height: 86px; margin: 0 auto 16px; border-radius: 28px; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: 0 18px 40px rgba(107, 78, 255, .35); }
.shake { animation: shake .45s; } @keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }

/* Paleta de comandos */
.palette { position: fixed; z-index: 120; left: 50%; top: 12vh; transform: translateX(-50%); width: min(620px, calc(100% - 24px)); border-radius: 28px; overflow: hidden; animation: menuIn .3s var(--spring) both; }
.palette .ph { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.palette .ph input { flex: 1; border: 0; outline: 0; background: none; font-size: 18px; }
.palette .pl { max-height: 56vh; overflow-y: auto; padding: 8px; }
.palette .pi { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; width: 100%; text-align: left; }
.palette .pi.kb, .palette .pi:hover { background: var(--accent-soft); }
.palette .pi .pt { flex: 1; min-width: 0; } .palette .pi .pt b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .palette .pi .pt span { font-size: 12.5px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette mark, .ni mark, .row mark { background: color-mix(in srgb, var(--yellow) 55%, transparent); color: inherit; border-radius: 4px; padding: 0 1px; }

.smart-hint { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: 13px; margin: 8px 0; animation: blkIn .3s; }
.smart-hint button { color: inherit; text-decoration: underline; font-weight: 800; }

/* Confete leve */
.spark { position: fixed; z-index: 500; pointer-events: none; width: 8px; height: 8px; border-radius: 2px; animation: sparkF 1s var(--ease) forwards; }
@keyframes sparkF { to { transform: translate(var(--dx), var(--dy)) rotate(260deg); opacity: 0; } }

/* ── Responsivo ───────────────────────────────────────────── */
@media (max-width: 1180px) { :root { --list: 320px; --sidebar: 248px; } }
@media (max-width: 1023px) {
  .sidebar, .fab-float { display: none; }
  .tabbar { display: flex; }
  .main { display: block; }
  .pane-list, .pane-main { width: 100%; border: 0; position: absolute; inset: 0; background: transparent; }
  .pane-list.hidden-m, .pane-main.hidden-m { display: none; }
  .page { padding: 18px 18px calc(120px + var(--safe-b)); }
  .hscroll { padding: 4px 18px 18px; margin: 0 -18px; }
  .cover { margin: 0 -18px; }
  .ed-paper { padding: 4px 20px calc(190px + var(--safe-b)); }
  .blk .bmenu { display: none; }
  .fmt { bottom: calc(14px + var(--safe-b)); }
  .hello h2 { font-size: 30px; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cards { grid-template-columns: 1fr; }
  .kcol { width: 82vw; }
  .fcard { width: 158px; height: 176px; }
  .ring svg { width: 80px; height: 80px; }
  .theme-cards { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media print {
  body { overflow: visible; background: #fff; } .sidebar, .pane-list, .tabbar, .ed-top, .fmt, .aurora, .fab-float, .ed-meta { display: none !important; }
  .main, .pane-main, .ed-wrap, .ed-scroll { display: block; height: auto; overflow: visible; position: static; } .ed-paper { padding: 0; }
}
body:has(.auth) .tabbar, body:has(.lockscreen) .tabbar { display: none; }
.menu:focus, .menu:focus-visible { outline: none; }
@media (max-width: 520px) { .hello .sync-pill > span:not(.led) { display: none; } .hello .sync-pill { padding: 0 11px; } .hello h2 { font-size: 28px; } }

/* Notificações do painel (imagem + link) */
.notif .nimg{display:block;width:100%;max-height:180px;object-fit:cover;border-radius:14px;margin:8px 0 4px}
.notif .nlink{margin:6px 0 2px;display:inline-flex}
.bcast .bcimg{width:100%;max-height:240px;object-fit:cover;border-radius:22px;margin-bottom:12px}
.bcast .bclabel{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:800;color:var(--accent);text-transform:uppercase;letter-spacing:.06em}

/* Adicionar amigo: perfil antes de confirmar */
.friend-card{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:18px;margin:4px 0 14px;border-radius:22px;background:var(--surface2);border:1px solid var(--line);animation:pop .3s ease-out}
.friend-card .fc-av{width:88px;height:88px;border-radius:50%;display:grid;place-items:center;background:var(--grad,linear-gradient(135deg,#8A5CFF,#6B4EFF,#3D8BFF));color:#fff;font-weight:800;font-size:30px;overflow:hidden;box-shadow:0 12px 26px rgba(107,78,255,.3);margin-bottom:6px}
.friend-card .fc-av img{width:100%;height:100%;object-fit:cover}
.friend-card b{font-size:19px}
.friend-card .fc-user{color:var(--accent);font-weight:800}
@keyframes pop{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}
