/* =========================================================
   Prometo — folha de estilos
   Cores inspiradas no logótipo: azul vivo + amarelo/laranja
   ========================================================= */
:root {
  --blue-50: #eef4ff; --blue-100: #dbe7ff; --blue-200: #b6ccff; --blue-400: #4d84ff;
  --blue-500: #1f63ff; --blue-600: #0b4fe0; --blue-700: #0a3eb4; --blue-900: #0a1f5c;
  --yellow: #ffc61a; --orange: #ff8a00; --red: #f0435a; --green: #12b886;

  --bg: #f4f7ff;
  --bg-grad: radial-gradient(1200px 600px at 100% -10%, #dfe9ff 0%, transparent 60%),
             radial-gradient(900px 500px at -10% 110%, #fff1cf 0%, transparent 55%);
  --surface: #ffffff;
  --surface-2: #f6f8fe;
  --border: #e3e9f7;
  --text: #0f1d3d;
  --text-2: #5a6788;
  --text-3: #8d98b5;
  --primary: var(--blue-600);
  --primary-soft: var(--blue-50);
  --accent: var(--orange);
  --shadow-sm: 0 1px 2px rgba(15, 29, 61, .06), 0 1px 1px rgba(15, 29, 61, .04);
  --shadow: 0 8px 24px -8px rgba(15, 45, 120, .18), 0 2px 6px rgba(15, 29, 61, .05);
  --shadow-lg: 0 24px 60px -16px rgba(10, 40, 120, .35);
  --radius: 18px; --radius-sm: 12px; --radius-xs: 9px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar: 252px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #070d1f;
  --bg-grad: radial-gradient(1000px 600px at 100% -10%, #0e2466 0%, transparent 60%),
             radial-gradient(800px 500px at -10% 110%, #2b1f05 0%, transparent 55%);
  --surface: #0f1830;
  --surface-2: #142042;
  --border: #1f2c52;
  --text: #ecf1ff;
  --text-2: #a5b1d3;
  --text-3: #6d7aa0;
  --primary: var(--blue-400);
  --primary-soft: rgba(77, 132, 255, .14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  background-image: var(--bg-grad); background-attachment: fixed;
  font-size: 15.5px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img, video { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.sm { width: 16px; height: 16px; } .ico.lg { width: 26px; height: 26px; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); } .small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; } .grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- Arranque ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { animation: float 2.4s ease-in-out infinite, fade-in .5s var(--ease); filter: drop-shadow(0 20px 30px rgba(11, 79, 224, .25)); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 700; cursor: pointer;
  background: var(--surface-2); color: var(--text); white-space: nowrap;
  transition: transform .18s var(--spring), box-shadow .2s var(--ease), background .2s, opacity .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn.primary { background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); color: #fff; box-shadow: 0 8px 20px -6px rgba(11, 79, 224, .55); }
.btn.primary:hover { box-shadow: 0 12px 26px -6px rgba(11, 79, 224, .65); }
.btn.accent { background: linear-gradient(135deg, var(--yellow), var(--orange)); color: #3a2300; box-shadow: 0 8px 20px -6px rgba(255, 138, 0, .55); }
.btn.danger { background: rgba(240, 67, 90, .12); color: var(--red); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 14px; font-size: 14px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px; border: 0; background: transparent; color: var(--text-2);
  display: inline-grid; place-items: center; cursor: pointer; position: relative;
  transition: background .2s, color .2s, transform .18s var(--spring);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.9); }
.icon-btn.sm { width: 34px; height: 34px; border-radius: 10px; }
.badge {
  position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center;
  border: 2px solid var(--surface); animation: pop .35s var(--spring);
}
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); color: var(--text-2); }
.pill.blue { background: var(--primary-soft); color: var(--primary); }
.pill.red { background: rgba(240, 67, 90, .12); color: var(--red); }
.pill.orange { background: rgba(255, 138, 0, .14); color: #d87200; }
.pill.green { background: rgba(18, 184, 134, .14); color: var(--green); }

/* ---------- Formulários ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--text-2); }
.input, textarea.input, select.input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--surface); outline: none; transition: border-color .2s, box-shadow .2s;
}
textarea.input { resize: vertical; min-height: 90px; }
.input:focus { border-color: var(--blue-400); box-shadow: 0 0 0 4px rgba(31, 99, 255, .15); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { flex: 1; border: 0; background: transparent; padding: 8px 12px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--text-2); transition: background .25s var(--ease), color .2s; }
.seg button.on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--border); border-radius: 99px; cursor: pointer; transition: background .25s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); transition: transform .3s var(--spring); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(20px); }
.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius-sm); padding: 18px; text-align: center; cursor: pointer;
  color: var(--text-2); transition: border-color .2s, background .2s;
}
.dropzone.over, .dropzone:hover { border-color: var(--blue-400); background: var(--primary-soft); }
.file-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 8px 6px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; animation: pop .3s var(--spring); }
.file-chip a, .file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; color: inherit; }
.file-chip button { border: 0; background: transparent; color: var(--text-3); cursor: pointer; display: grid; padding: 2px; }

/* ---------- Layout da aplicação ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px;
  background: color-mix(in srgb, var(--surface) 75%, transparent); backdrop-filter: blur(16px);
  border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; font-weight: 900; font-size: 22px; color: var(--text); letter-spacing: -.02em; }
.brand img { width: 46px; height: 46px; border-radius: 13px; box-shadow: 0 6px 16px -4px rgba(11, 79, 224, .5); transition: transform .4s var(--spring); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand small { display: block; font-size: 11.5px; font-weight: 700; color: var(--text-3); letter-spacing: .02em; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; color: var(--text-2);
  font-weight: 700; position: relative; transition: background .2s, color .2s;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--primary-soft); color: var(--primary); }
.nav-link.active::before { content: ""; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--primary); animation: grow-y .35s var(--spring); }
.nav-link .count { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 99px; }
.sidebar .spacer { flex: 1; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: var(--surface-2); color: var(--text); }
.me-card:hover { background: var(--primary-soft); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px;
  padding: 14px 28px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px);
}
.topbar h1 { font-size: 22px; font-weight: 900; }
.topbar .mobile-logo { display: none; }
.view { padding: 8px 28px 40px; max-width: 1080px; width: 100%; margin: 0 auto; flex: 1; }
.view-enter { animation: view-in .42s var(--ease) both; }
.tabbar { display: none; }

/* ---------- Cartões ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.card.hover { transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; cursor: pointer; }
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue-200); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 26px 0 12px; }
.section-title h2 { font-size: 17px; font-weight: 800; }
.stagger > * { animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }

.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 26px; color: #fff;
  background: linear-gradient(130deg, var(--blue-500) 0%, var(--blue-700) 60%, #082c86 100%);
  box-shadow: var(--shadow-lg);
}
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 198, 26, .55), transparent 65%); animation: pulse-glow 5s ease-in-out infinite; }
.hero h2 { font-size: 26px; font-weight: 900; position: relative; z-index: 1; }
.hero p { margin: 6px 0 0; opacity: .85; position: relative; z-index: 1; }
.hero .bell { position: absolute; right: 26px; bottom: 18px; width: 70px; height: 70px; z-index: 1; animation: ring 4s ease-in-out infinite; transform-origin: 50% 10%; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.stat { padding: 16px; }
.stat b { display: block; font-size: 28px; font-weight: 900; line-height: 1.1; }
.stat .ico-wrap { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 10px; }
.tint-blue { background: var(--primary-soft); color: var(--primary); }
.tint-orange { background: rgba(255, 138, 0, .14); color: var(--orange); }
.tint-red { background: rgba(240, 67, 90, .12); color: var(--red); }
.tint-green { background: rgba(18, 184, 134, .14); color: var(--green); }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }

.banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(255, 198, 26, .18), rgba(255, 138, 0, .12)); border: 1px solid rgba(255, 138, 0, .25); margin-top: 16px; animation: rise .5s var(--ease); }
.banner .ico { color: var(--orange); }

/* ---------- Avatares ---------- */
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; overflow: hidden; background: linear-gradient(135deg, var(--blue-400), var(--blue-700)); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 112px; height: 112px; font-size: 40px; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar.c1 { background: linear-gradient(135deg, #ffc61a, #ff8a00); }
.avatar.c2 { background: linear-gradient(135deg, #12b886, #0b7f5c); }
.avatar.c3 { background: linear-gradient(135deg, #f0435a, #b3133a); }
.avatar.c4 { background: linear-gradient(135deg, #8b5cf6, #5b21b6); }
.avatar.square { border-radius: 14px; }

/* ---------- Listas genéricas ---------- */
.list { display: grid; gap: 10px; }
.item { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); transition: transform .2s var(--ease), box-shadow .2s, opacity .3s, background .3s; }
.item:hover { box-shadow: var(--shadow-sm); }
.item.leaving { animation: leave .3s var(--ease) forwards; }
.empty { text-align: center; padding: 40px 20px; color: var(--text-2); animation: fade-in .5s var(--ease); }
.empty .ico { width: 54px; height: 54px; color: var(--blue-200); margin: 0 auto 10px; stroke-width: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--border); background: var(--surface); padding: 6px 13px; border-radius: 999px; font-weight: 700; font-size: 13.5px; color: var(--text-2); cursor: pointer; transition: all .2s var(--ease); }
.chip:hover { border-color: var(--blue-200); color: var(--text); }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Caixa de verificação animada */
.check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--blue-200); background: transparent; flex: none; display: grid; place-items: center; cursor: pointer; color: #fff; transition: background .25s var(--ease), border-color .25s, transform .2s var(--spring); }
.check:hover { border-color: var(--primary); transform: scale(1.08); }
.check .ico { width: 15px; height: 15px; stroke-width: 3; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .3s var(--ease) .05s; }
.check.on { background: var(--green); border-color: var(--green); animation: pop .35s var(--spring); }
.check.on .ico { stroke-dashoffset: 0; }
.done-text { text-decoration: line-through; color: var(--text-3); }

/* Lembretes */
.rem { align-items: flex-start; cursor: pointer; }
.rem .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rem .title { font-weight: 800; }
.rem.prio-high { border-left: 4px solid var(--red); }
.rem.prio-low { border-left: 4px solid var(--blue-200); }
.rem .details { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.rem .details > div { overflow: hidden; }
.rem.open .details { grid-template-rows: 1fr; }
.rem .notes { white-space: pre-wrap; margin: 10px 0 0; color: var(--text-2); }
.rem .thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rem .thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; cursor: zoom-in; transition: transform .2s var(--ease); }
.rem .thumbs img:hover { transform: scale(1.04); }
.rem.done { opacity: .65; }

/* Compras */
.lists-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.list-card .emoji { font-size: 34px; line-height: 1; margin-bottom: 10px; display: inline-block; transition: transform .35s var(--spring); }
.list-card:hover .emoji { transform: rotate(-10deg) scale(1.15); }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 12px; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--yellow), var(--orange)); transition: width .6s var(--ease); }
.add-bar { display: flex; gap: 8px; padding: 8px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--border); box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s; }
.add-bar:focus-within { border-color: var(--blue-400); box-shadow: 0 0 0 4px rgba(31, 99, 255, .12); }
.add-bar input { border: 0; outline: none; background: transparent; padding: 6px 12px; min-width: 0; }
.add-bar input.qty { width: 90px; border-left: 1px solid var(--border); }
.shop-item .qty { font-weight: 700; font-size: 13px; color: var(--text-2); background: var(--surface-2); padding: 2px 9px; border-radius: 8px; }
.shop-item .del { opacity: 0; transition: opacity .2s; }
.shop-item:hover .del { opacity: 1; }

/* Comunidades */
.comm-card { display: flex; gap: 14px; align-items: center; }
.comm-card .unread { background: var(--primary); color: #fff; font-weight: 800; font-size: 12px; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; padding: 0 6px; animation: pop .35s var(--spring); }

/* Chat */
.chat { display: grid; grid-template-columns: 1fr 300px; gap: 18px; height: calc(100vh - 92px); padding-bottom: 12px; }
.chat-main { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.messages { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 4px; scroll-behavior: smooth; overscroll-behavior: contain; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 78%; animation: msg-in .32s var(--spring) both; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble { padding: 9px 13px; border-radius: 18px 18px 18px 6px; background: var(--surface-2); word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; position: relative; }
.msg.mine .bubble { background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); color: #fff; border-radius: 18px 18px 6px 18px; }
.msg .who { font-size: 12px; font-weight: 800; color: var(--primary); margin-bottom: 2px; }
.msg .time { font-size: 11px; opacity: .6; margin-top: 3px; text-align: right; }
.msg.grouped .avatar { visibility: hidden; }
.msg.grouped .who { display: none; }
.msg .media { border-radius: 12px; overflow: hidden; margin: 2px 0 4px; max-width: 320px; }
.msg .media img { cursor: zoom-in; max-height: 320px; object-fit: cover; }
.msg .media video { max-height: 320px; background: #000; }
.msg .filebox { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(127, 140, 180, .15); color: inherit; margin-bottom: 4px; }
.msg .del-msg { opacity: 0; transition: opacity .2s; align-self: center; }
.msg:hover .del-msg { opacity: 1; }
.sys { align-self: center; font-size: 12.5px; color: var(--text-2); background: var(--surface-2); padding: 4px 12px; border-radius: 99px; margin: 8px 0; animation: fade-in .4s var(--ease); text-align: center; }
.day-sep { align-self: center; font-size: 12px; font-weight: 800; color: var(--text-3); margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .06em; }
.typing { height: 22px; padding: 0 18px; font-size: 12.5px; color: var(--text-3); }
.typing .dots i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin: 0 1px; animation: blink 1.2s infinite; }
.typing .dots i:nth-child(2) { animation-delay: .2s; } .typing .dots i:nth-child(3) { animation-delay: .4s; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
.composer textarea { flex: 1; resize: none; border: 1.5px solid var(--border); border-radius: 20px; padding: 10px 14px; max-height: 140px; min-height: 44px; outline: none; background: var(--surface-2); transition: border-color .2s; }
.composer textarea:focus { border-color: var(--blue-400); }
.composer .send { width: 44px; height: 44px; border-radius: 50%; padding: 0; }
.attach-preview { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border); background: var(--surface-2); animation: rise .25s var(--ease); }
.attach-preview img, .attach-preview video { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; }
.upbar { height: 4px; background: var(--border); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.upbar i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .15s; }
.chat-side { overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.invite { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--primary-soft); font-family: ui-monospace, Menlo, monospace; font-weight: 800; letter-spacing: .12em; color: var(--primary); }
.member { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.online-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); border: 2px solid var(--surface); margin-left: -16px; margin-top: 24px; flex: none; }
.load-more { align-self: center; margin-bottom: 8px; }

/* Notificações */
.notif { cursor: pointer; }
.notif.unread { background: var(--primary-soft); border-color: var(--blue-200); }
.notif .n-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; flex: none; }

/* Perfil */
.profile-head { display: flex; align-items: center; gap: 22px; }
.avatar-edit { position: relative; }
.avatar-edit .cam { position: absolute; right: 0; bottom: 0; width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--surface); background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .2s var(--spring); }
.avatar-edit .cam:hover { transform: scale(1.12) rotate(-8deg); }
.setting { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.setting:last-child { border-bottom: 0; }

/* ---------- Autenticação ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px; color: #fff; text-align: center;
  background: radial-gradient(600px 400px at 80% 10%, rgba(255, 198, 26, .35), transparent 60%), linear-gradient(150deg, #1f63ff, #0a3eb4 55%, #061f66); }
.auth-art img { width: min(320px, 70%); filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .35)); animation: float 4s ease-in-out infinite; }
.auth-art h2 { font-size: 30px; font-weight: 900; margin-top: 18px; }
.auth-art p { opacity: .85; max-width: 380px; }
.auth-art .bubbles span { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .08); animation: drift 14s linear infinite; }
.features { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.features span { background: rgba(255, 255, 255, .14); padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; backdrop-filter: blur(6px); }
.auth-form { display: grid; place-items: center; padding: 32px 22px; }
.auth-card { width: 100%; max-width: 410px; animation: rise .5s var(--ease); }
.auth-card h1 { font-size: 30px; font-weight: 900; }
.auth-card .switcher { margin-top: 18px; text-align: center; color: var(--text-2); }
.pw-wrap { position: relative; }
.pw-wrap .icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.strength { height: 5px; border-radius: 5px; background: var(--border); overflow: hidden; margin-top: 6px; }
.strength i { display: block; height: 100%; width: 0; transition: width .3s var(--ease), background .3s; }
.secure-note { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 12.5px; color: var(--text-3); margin-top: 18px; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(6, 14, 40, .45); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fade-in .25s var(--ease); }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow-y: auto; background: var(--surface); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 22px; animation: modal-in .38s var(--spring); }
.modal-back.closing { animation: fade-out .22s var(--ease) forwards; }
.modal-back.closing .modal { animation: modal-out .22s var(--ease) forwards; }
.modal header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal header h3 { font-size: 20px; font-weight: 900; }
.modal footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, .88); display: grid; place-items: center; padding: 20px; animation: fade-in .2s; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; animation: modal-in .35s var(--spring); }

/* ---------- Toasts ---------- */
#toasts { position: fixed; top: 16px; right: 16px; z-index: 200; display: grid; gap: 10px; width: min(360px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow-lg); animation: toast-in .45s var(--spring); cursor: pointer; }
.toast.out { animation: toast-out .3s var(--ease) forwards; }
.toast .t-ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.toast b { display: block; font-size: 14.5px; }
.toast p { margin: 2px 0 0; font-size: 13.5px; color: var(--text-2); }

/* Esqueleto de carregamento */
.skel { border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; height: 64px; }

/* ---------- Animações ---------- */
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes view-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes leave { to { opacity: 0; transform: translateX(30px) scale(.96); height: 0; padding-block: 0; margin: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(20px) scale(.94); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px) scale(.9); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(40px); } }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes ring { 0%, 70%, 100% { transform: rotate(0); } 74% { transform: rotate(14deg); } 78% { transform: rotate(-12deg); } 82% { transform: rotate(9deg); } 86% { transform: rotate(-6deg); } 90% { transform: rotate(3deg); } }
@keyframes pulse-glow { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.15); opacity: .6; } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes drift { from { transform: translateY(110vh) rotate(0); } to { transform: translateY(-30vh) rotate(360deg); } }
@keyframes bell-shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(18deg); } 40% { transform: rotate(-14deg); } 60% { transform: rotate(9deg); } 80% { transform: rotate(-5deg); } }
.shake { animation: bell-shake .7s var(--ease); transform-origin: 50% 15%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) { .chat { grid-template-columns: 1fr; } .chat-side { display: none; } .chat-side.show { display: flex; position: fixed; inset: 0; z-index: 90; background: var(--bg); padding: 20px; animation: view-in .3s var(--ease); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); }
  .topbar .mobile-logo { display: block; width: 34px; height: 34px; border-radius: 10px; }
  .topbar h1 { font-size: 19px; }
  .view { padding: 4px 16px 110px; }
  .two-col { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 50;
    background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px); border: 1px solid var(--border); border-radius: 24px; padding: 6px; box-shadow: var(--shadow-lg);
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 7px 0; border-radius: 18px; color: var(--text-3); font-size: 11px; font-weight: 800; position: relative; transition: color .2s, background .25s var(--ease); }
  .tabbar a.active { color: var(--primary); background: var(--primary-soft); }
  .tabbar a.active .ico { animation: pop .4s var(--spring); }
  .tabbar .count { position: absolute; top: 2px; right: calc(50% - 22px); background: var(--red); color: #fff; font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; display: grid; place-items: center; padding: 0 4px; }
  .chat { height: calc(100dvh - 70px); padding-bottom: 0; margin: 0 -16px; }
  .chat-main { border-radius: 0; border-inline: 0; }
  .view.chat-view { padding-bottom: 0; }
  .shell.in-chat .tabbar { display: none; }
  .msg { max-width: 88%; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 36px 20px 30px; }
  .auth-art img { width: 150px; }
  .auth-art h2 { font-size: 22px; } .auth-art p, .features { display: none; }
  .modal-back { align-items: end; padding: 0; }
  .modal { border-radius: 26px 26px 0 0; max-height: 92vh; animation: sheet-in .4s var(--ease); padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .modal-back.closing .modal { animation: sheet-out .25s var(--ease) forwards; }
  .shop-item .del { opacity: 1; }
  .msg .del-msg { opacity: .6; }
  .hero .bell { width: 54px; height: 54px; right: 16px; }
}
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(100%); } }
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; } .profile-head { flex-direction: column; text-align: center; } }
.theme-toggle { border: 0; background: transparent; cursor: pointer; width: 100%; text-align: left; font: inherit; }
.block { display: block; } .m0 { margin: 0; } .emoji-md { font-size: 24px; line-height: 1; } .gap-18 { height: 18px; }
.late { color: var(--red); font-weight: 700; }
.hero-actions { margin-top: 16px; position: relative; z-index: 1; }
.n-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; flex: none; }
.thumb-video { width: 180px; border-radius: 12px; background: #000; }
.m-top { margin-top: 14px; margin-bottom: 6px; } .mb { margin-bottom: 10px; font-size: 16px; }
.chat-side h3 { font-size: 16px; font-weight: 800; }
.chat-side #close-side { display: none; }
.chat-side.show #close-side { display: inline-grid; }
@media (min-width: 1101px) { #info-btn { display: none; } }
.msg audio { max-width: 240px; margin: 4px 0; }
.msg .bubble a { color: inherit; text-decoration: underline; }
.list-card h3 { font-size: 17px; font-weight: 800; }
.profile-head h2 { font-size: 24px; font-weight: 900; }
.stat { color: var(--text); }
a.item { color: var(--text); }

/* =========================================================
   Versão 2 — novos componentes
   ========================================================= */
.mobile-only { display: none; }
.hide-sm { display: inline; }
.right { text-align: right; } .center { text-align: center; } .mt { margin-top: 16px; } .mt-8 { margin-top: 8px; }
.auto-w { width: auto; min-width: 140px; }
.toolbar { margin-bottom: 16px; flex-wrap: wrap; }
.section-title.first { margin-top: 0; }
.form-foot { justify-content: flex-end; margin-top: 14px; }
.center-row { justify-content: center; margin-top: 14px; }
.big-ico { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 14px; }
.avatar.xs { width: 18px; height: 18px; font-size: 8px; }
.mini-badge { background: var(--red); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 6px; margin-left: 4px; }
.link-btn { border: 0; background: none; color: var(--primary); font-weight: 700; cursor: pointer; font-size: 13px; padding: 4px; }
.code-input { letter-spacing: .2em; font-weight: 800; font-family: ui-monospace, Menlo, monospace; text-transform: uppercase; font-size: 18px; }
.quote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--blue-200); background: var(--surface-2); border-radius: 8px; font-size: 14px; white-space: pre-wrap; }
.block-col { flex-direction: column; align-items: stretch; }
.active-ico { color: var(--primary); background: var(--primary-soft); }
.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0%, 100% { background: transparent; } 30% { background: rgba(255, 198, 26, .3); } }
.danger-chip { color: var(--red); border-color: rgba(240, 67, 90, .4); }

/* Barra offline */
.offline-bar { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 7px 14px; margin: 0 28px 8px; border-radius: 12px; font-size: 13px; font-weight: 700;
  background: rgba(255, 138, 0, .14); color: #b25e00; animation: rise .3s var(--ease); }
[data-theme="dark"] .offline-bar { color: #ffb347; }

/* Toasts com ações */
.toast-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.toast-actions .btn { padding: 5px 11px; font-size: 12.5px; }

/* Folha de ações */
.modal.sheet { max-width: 420px; }
.sheet-list { display: grid; gap: 4px; }
.sheet-item { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border: 0; background: transparent; border-radius: 12px; cursor: pointer; font-weight: 700; text-align: left; transition: background .2s; }
.sheet-item:hover { background: var(--surface-2); }
.sheet-item.danger { color: var(--red); }
.react-pick { display: flex; justify-content: space-between; gap: 4px; padding: 6px; margin-bottom: 10px; background: var(--surface-2); border-radius: 999px; }
.react-pick button { border: 0; background: transparent; font-size: 24px; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; transition: transform .2s var(--spring), background .2s; }
.react-pick button:hover { transform: scale(1.25); background: var(--surface); }

/* Criação rápida */
.qa-block { margin-bottom: 14px; }
.quick-add { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--border); box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s; }
.hero .quick-add { border-color: transparent; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4); }
.quick-add:focus-within { border-color: var(--blue-400); box-shadow: 0 0 0 4px rgba(31, 99, 255, .15); }
.quick-add > .ico { color: var(--orange); }
.quick-add input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; padding: 8px 4px; color: var(--text); }
.quick-add .recording { color: #fff; background: var(--red); animation: pulse-rec 1.2s infinite; }
@keyframes pulse-rec { 50% { box-shadow: 0 0 0 8px rgba(240, 67, 90, .2); } }
.qa-preview { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .3s var(--ease), opacity .3s, margin .3s; }
.qa-preview.show { max-height: 120px; opacity: 1; margin-top: 10px; }
.hero .qa-preview .pill { background: rgba(255, 255, 255, .92); }
.hero .qa-preview .link-btn { color: #fff; }

.card-banner { color: var(--text); }
.date-chip { width: 46px; flex: none; text-align: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary); padding: 5px 0; line-height: 1.1; }
.date-chip b { display: block; font-size: 19px; font-weight: 900; }
.date-chip span { font-size: 11px; font-weight: 800; text-transform: uppercase; }

/* Calendário */
.cal-title { font-size: 19px; font-weight: 900; text-transform: capitalize; }
.cal-card { padding: 12px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; animation: fade-in .3s var(--ease); }
.cal-wd { text-align: center; font-size: 12px; font-weight: 800; color: var(--text-3); text-transform: uppercase; padding: 4px 0; }
.cal-day { border: 0; background: transparent; border-radius: 12px; min-height: 56px; padding: 6px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: background .2s, transform .15s var(--spring); }
.cal-day:hover { background: var(--surface-2); }
.cal-day:active { transform: scale(.94); }
.cal-day .n { font-weight: 800; font-size: 14px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.other { opacity: .38; }
.cal-day.today .n { background: var(--primary); color: #fff; }
.cal-day.sel { background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--blue-200); }
.dots { display: flex; gap: 3px; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: var(--primary); }
.dot.event { background: var(--green); } .dot.birthday { background: var(--orange); }
.cal.week .cal-day { min-height: 140px; align-items: stretch; }
.cal.week .cal-day .n { align-self: center; }
.wk-items { display: grid; gap: 3px; }
.wk-item { font-size: 11px; text-align: left; padding: 3px 5px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.wk-item.event { background: rgba(18, 184, 134, .14); color: var(--green); }
.wk-item.birthday { background: rgba(255, 138, 0, .14); color: #d87200; }
.cal-legend { display: flex; gap: 16px; justify-content: center; margin-top: 18px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-item { width: 100%; text-align: left; cursor: pointer; font: inherit; }

/* Compras v2 */
.list-head { margin-bottom: 12px; }
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.totals:empty { display: none; }
.total-box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; display: grid; gap: 2px; animation: rise .35s var(--ease); }
.total-box span { font-size: 12px; color: var(--text-2); display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.total-box b { font-size: 17px; font-weight: 900; }
.shared-note { display: flex; align-items: center; gap: 6px; color: var(--primary); background: var(--primary-soft); padding: 7px 12px; border-radius: 10px; margin-bottom: 12px; font-weight: 700; }
.add-bar input.price { width: 80px; }
.suggest { margin: 12px 0 18px; }
.cat-group { margin-bottom: 14px; }
.cat-title { font-size: 13px; font-weight: 800; color: var(--text-2); margin: 0 4px 8px; text-transform: uppercase; letter-spacing: .03em; }
.shop-item .money { color: var(--green); background: rgba(18, 184, 134, .1); }
.shop-item.pending { opacity: .6; }

/* Chat v2 */
.bubble-wrap { display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.msg.mine .bubble-wrap { align-items: flex-end; }
.msg-more { opacity: 0; transition: opacity .2s; align-self: center; flex: none; }
.msg:hover .msg-more { opacity: .7; }
.reply-quote { display: block; text-align: left; width: 100%; border: 0; cursor: pointer; padding: 6px 10px; margin: 2px 0 6px; border-radius: 10px; background: rgba(127, 140, 180, .14); border-left: 3px solid var(--orange); color: inherit; font: inherit; font-size: 13px; }
.reply-quote b { display: block; font-size: 12px; }
.reply-quote span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; max-width: 260px; }
.reactions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: -6px; padding: 0 6px; position: relative; z-index: 1; }
.react { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 1px 8px; font-size: 13px; cursor: pointer; animation: pop .3s var(--spring); box-shadow: var(--shadow-sm); }
.react.mine { border-color: var(--blue-400); background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.edited { font-style: italic; }
.voice { display: flex; align-items: center; gap: 6px; }
.voice audio { height: 36px; max-width: 220px; }
.event-card { background: var(--surface); color: var(--text); border-radius: 14px; padding: 12px; min-width: 240px; display: grid; gap: 8px; box-shadow: var(--shadow-sm); margin: 2px 0 4px; }
.event-card.past { opacity: .7; }
.ev-desc { margin: 0; white-space: pre-wrap; }
.rsvp { display: flex; gap: 6px; flex-wrap: wrap; }
.card-msg { display: grid; gap: 8px; justify-items: center; padding: 10px 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(255, 198, 26, .2), rgba(255, 138, 0, .12)); }
.compose-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border); background: var(--surface-2); animation: rise .25s var(--ease); }
.compose-bar > .ico { color: var(--primary); }
.composer-note { padding: 14px; text-align: center; color: var(--text-2); border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: center; align-items: center; font-size: 14px; }
.mic-btn { color: var(--primary); }
.rec-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); background: rgba(240, 67, 90, .06); animation: rise .2s var(--ease); }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); animation: blink 1s infinite; }
.attach-preview audio { height: 36px; flex: 1; }
.close-side { display: none; }
.chat-side.show .close-side { display: inline-grid; }
.profile-card { display: grid; justify-items: center; gap: 4px; position: relative; }
.profile-card .close-side { position: absolute; left: 10px; top: 10px; }
.card-row { width: 100%; border: 0; background: transparent; cursor: pointer; font: inherit; border-radius: 10px; }
.card-row:hover { background: var(--surface-2); }
.report { display: grid; gap: 6px; }

/* Cartão de aniversário */
.bday-card { border-radius: 20px; padding: 18px; background: linear-gradient(160deg, #fff7e0, #ffe9d1 60%, #e8efff); color: #3a2300; margin-bottom: 14px; }
[data-theme="dark"] .bday-card { background: linear-gradient(160deg, #3a2a05, #2a1a08 60%, #0e1b45); color: #fff1d6; }
.bday-head { text-align: center; font-size: 42px; animation: float 3s ease-in-out infinite; }
.bday-head h3 { font-size: 22px; font-weight: 900; margin-top: 4px; }
.sigs { display: grid; gap: 12px; margin-top: 14px; }
.sig { display: flex; gap: 10px; align-items: flex-start; animation: rise .4s var(--ease) both; }
.sig p { margin: 0 0 2px; white-space: pre-wrap; font-family: "Segoe Print", "Bradley Hand", cursive, var(--font); font-size: 15px; }
.sign-form textarea { min-height: 80px; }

/* Álbum */
.modal.wide { max-width: 760px; }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; margin-bottom: 12px; }
.album-item { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--surface-2); animation: pop .35s var(--spring); }
.album-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.album-item:hover img { transform: scale(1.06); }
.album-item .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .25); }
.lightbox video { max-width: 100%; max-height: 100%; border-radius: 10px; }

/* Introdução */
.onboard { position: fixed; inset: 0; z-index: 150; background: rgba(6, 14, 40, .55); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade-in .3s var(--ease); }
.onboard.closing { animation: fade-out .3s var(--ease) forwards; }
.onboard-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 28px; padding: 28px 24px 20px; box-shadow: var(--shadow-lg); animation: modal-in .45s var(--spring); }
.ob-slide { text-align: center; min-height: 250px; display: grid; align-content: center; gap: 10px; justify-items: center; }
.ob-emoji { font-size: 64px; animation: float 3s ease-in-out infinite; }
.ob-slide h2 { font-size: 22px; font-weight: 900; }
.ob-lang { width: 100%; text-align: left; margin-top: 8px; }
.ob-dots { display: flex; gap: 6px; justify-content: center; margin: 14px 0; }
.ob-dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--border); transition: width .3s var(--ease), background .3s; }
.ob-dots i.on { width: 24px; background: var(--primary); }

/* Autenticação v2 */
.lang-pick { display: flex; align-items: center; gap: 6px; justify-content: flex-end; color: var(--text-3); margin-bottom: 10px; }
.lang-pick select { border: 0; background: transparent; font-weight: 700; color: var(--text-2); cursor: pointer; }
.qr { display: grid; place-items: center; margin: 12px 0; }
.qr img { border-radius: 14px; background: #fff; padding: 8px; }
.secret { letter-spacing: .1em; text-align: center; }
.steps { padding-left: 18px; color: var(--text-2); }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0; }
.codes code { background: var(--surface-2); padding: 8px; border-radius: 8px; font-weight: 800; letter-spacing: .08em; }
.people-list { max-height: 50vh; overflow-y: auto; margin-top: 10px; }
.people-list .item { width: 100%; text-align: left; cursor: pointer; font: inherit; }

@media (max-width: 900px) {
  .mobile-only { display: inline-grid; }
  .offline-bar { margin: 0 16px 8px; }
  .msg-more { display: none; }
  .totals { grid-template-columns: repeat(3, 1fr); }
  .total-box b { font-size: 14px; }
  .cal-day { min-height: 46px; padding: 4px 2px; }
  .cal.week .cal-day { min-height: 110px; }
  .wk-item { font-size: 10px; }
}
@media (max-width: 520px) {
  .hide-sm { display: none; }
  .add-bar input.qty { width: 60px; }
  .add-bar input.price { width: 64px; }
}
/* Toasts: canto inferior direito no computador (não tapam a barra superior) */
@media (min-width: 901px) {
  #toasts { top: auto; bottom: 20px; display: flex; flex-direction: column-reverse; }
}
/* Ajustes v2 */
.msg .bubble { white-space: normal; }
.msg .bubble .txt { white-space: pre-wrap; }
.cal-title { text-transform: none; }
.chat-head .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.react-pick { justify-content: space-around; gap: 0; }
.react-pick button { width: 36px; height: 36px; font-size: 21px; flex: none; }
.hero .bell { top: 20px; bottom: auto; }
.hero h2, .hero > p { padding-right: 80px; }
@media (max-width: 900px) { .hero .bell { width: 44px; height: 44px; top: 18px; } .hero h2, .hero > p { padding-right: 52px; } }

/* Instalar a App */
.install-btn { margin-top: 14px; background: linear-gradient(135deg, rgba(255,198,26,.18), rgba(255,138,0,.14)); color: #b25e00; border: 1.5px solid rgba(255,138,0,.35); }
[data-theme="dark"] .install-btn { color: #ffb347; }
.install-btn:hover { box-shadow: 0 8px 20px -8px rgba(255,138,0,.5); }
.install-btn:empty { display: none; }
.install-hero { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: var(--surface-2); margin-bottom: 14px; }
.install-hero img { border-radius: 18px; box-shadow: 0 8px 20px -6px rgba(11,79,224,.5); }
.install-steps { padding-left: 20px; display: grid; gap: 10px; line-height: 1.5; }
.ios-share { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-weight: 900; }

.install-top { display: none; }
@media (max-width: 900px) {
  .install-top { display: inline-flex; position: relative; z-index: 1; margin-top: 14px; background: #fff; color: var(--blue-700); box-shadow: 0 10px 24px -8px rgba(0,0,0,.4); animation: pop .5s var(--spring) .3s both; }
  .install-top:empty { display: none; }
  .install-btn { display: none; }
}

/* Logótipo da página de entrada: mantém sempre a proporção e adapta-se ao ecrã */
.auth-art img { height: auto; aspect-ratio: 1 / 1; object-fit: contain; }
@media (max-width: 900px) {
  .auth-art { padding: max(22px, env(safe-area-inset-top)) 20px 22px; }
  .auth-art img { width: clamp(108px, 36vw, 160px); }
  .auth-art h2 { margin-top: 8px; font-size: 20px; }
  .install-top { margin-top: 12px; padding: 9px 18px; font-size: 14px; }
}
@media (max-width: 900px) and (max-height: 620px) {
  .auth-art img { width: clamp(90px, 26vw, 120px); }
  .auth-art h2 { display: none; }
}
@media (max-width: 900px) and (orientation: landscape) {
  .auth-art { padding: 14px; flex-direction: row; gap: 16px; }
  .auth-art img { width: 84px; }
  .auth-art h2 { display: none; }
  .install-top { margin-top: 0; }
}

/* =========================================================
   Versão 3
   ========================================================= */
/* Cores principais à escolha */
[data-accent="purple"] { --blue-50: #f3efff; --blue-100: #e6dcff; --blue-200: #cdbbff; --blue-400: #9a6bff; --blue-500: #7c3aed; --blue-600: #6d28d9; --blue-700: #5b21b6; }
[data-accent="green"] { --blue-50: #e8f8f1; --blue-100: #c9eedd; --blue-200: #9fdfc2; --blue-400: #2fbf86; --blue-500: #0f9f6e; --blue-600: #0b8a5f; --blue-700: #08704d; }
[data-accent="orange"] { --blue-50: #fff3e6; --blue-100: #ffe1bf; --blue-200: #ffc78a; --blue-400: #ff9a33; --blue-500: #ea7a00; --blue-600: #d06c00; --blue-700: #a95700; }
[data-accent="pink"] { --blue-50: #fdeef4; --blue-100: #fad3e2; --blue-200: #f4a8c6; --blue-400: #ec5f97; --blue-500: #e0367a; --blue-600: #c92a69; --blue-700: #a51f55; }
[data-accent="teal"] { --blue-50: #e6f7f8; --blue-100: #c3ecee; --blue-200: #8fdade; --blue-400: #2bb8c0; --blue-500: #0e9aa7; --blue-600: #0b8592; --blue-700: #086b76; }
[data-theme="dark"][data-accent] { --primary: var(--blue-400); }
:root:not([data-theme="dark"])[data-accent] { --primary: var(--blue-600); }
.hero { background: linear-gradient(130deg, var(--blue-500) 0%, var(--blue-700) 60%, color-mix(in srgb, var(--blue-700) 70%, #000) 100%); }
.btn.primary { background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--blue-600) 55%, transparent); }
.msg.mine .bubble { background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); }
/* Tamanho da letra e contraste */
[data-font="large"] body { zoom: 1.1; }
[data-font="xlarge"] body { zoom: 1.22; }
[data-contrast="1"] { --text: #000814; --text-2: #1f2a44; --text-3: #3b4766; --border: #8b98b8; }
[data-contrast="1"][data-theme="dark"] { --text: #ffffff; --text-2: #e3e9ff; --text-3: #c2cbe6; --border: #6b7aa6; }
[data-contrast="1"] .card, [data-contrast="1"] .item { border-width: 2px; }
:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 2px; border-radius: 8px; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 300; background: var(--surface); padding: 8px 14px; border-radius: 10px; }

/* Botão flutuante do assistente */
.fab { position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: conic-gradient(from 200deg, var(--blue-500), #8b5cf6, var(--orange), var(--blue-500)); box-shadow: 0 14px 30px -8px rgba(31, 99, 255, .6);
  animation: pop .5s var(--spring) .4s both; transition: transform .2s var(--spring); }
.fab:hover { transform: scale(1.08) rotate(-8deg); }
.fab .ico { filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
@media (max-width: 900px) { .fab { bottom: calc(96px + env(safe-area-inset-bottom)); right: 18px; width: 52px; height: 52px; } }

/* Assistente */
.ai { display: flex; flex-direction: column; height: calc(100vh - 100px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 900px) { .ai { height: calc(100dvh - 190px); } }
.ai-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.ai-orb { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: #fff; margin: 0 auto;
  background: conic-gradient(from 200deg, var(--blue-500), #8b5cf6, var(--orange), var(--blue-500)); box-shadow: 0 12px 30px -10px rgba(124, 58, 237, .6); animation: float 4s ease-in-out infinite; }
.ai-orb.sm { width: 40px; height: 40px; margin: 0; animation: none; }
.ai-orb.xs { width: 30px; height: 30px; margin: 0; animation: none; flex: none; }
.ai-orb.spin { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-msgs { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { display: flex; gap: 8px; max-width: 86%; animation: msg-in .3s var(--spring) both; }
.ai-msg.user { align-self: flex-end; }
.ai-msg.user .bubble { background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); color: #fff; border-radius: 18px 18px 6px 18px; padding: 9px 13px; white-space: pre-wrap; }
.ai-msg.bot .bubble { background: var(--surface-2); border-radius: 18px 18px 18px 6px; padding: 10px 14px; }
.ai-msg.bot .bubble p { margin: 0 0 6px; } .ai-msg.bot .bubble p:last-child { margin: 0; }
.ai-msg.bot .bubble ul { margin: 4px 0; padding-left: 18px; }
.ai-empty { text-align: center; margin: auto; max-width: 520px; display: grid; gap: 10px; padding: 20px 0; }
.ai-suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ai-suggest .chip { text-align: left; }
.ai-action { align-self: flex-start; max-width: 86%; border: 2px solid var(--blue-200); background: var(--primary-soft); border-radius: 16px; padding: 12px 14px; animation: pop .35s var(--spring); }
.ai-action p { margin: 6px 0 10px; }
.ai-action.done { border-color: rgba(18, 184, 134, .5); } .ai-action.cancelled { opacity: .6; }
.ai-action-btns { justify-content: flex-end; }
.ai-off { max-width: 520px; margin: 40px auto; display: grid; gap: 10px; }

/* Pesquisa */
.search-back { position: fixed; inset: 0; z-index: 160; background: rgba(6, 14, 40, .45); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; animation: fade-in .18s; }
.search-back.closing { animation: fade-out .18s forwards; }
.search-box { width: 100%; max-width: 620px; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; animation: modal-in .3s var(--spring); }
.search-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.search-input input { flex: 1; border: 0; outline: none; background: transparent; font-size: 17px; color: var(--text); }
.search-input kbd { font-size: 11px; border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; color: var(--text-3); }
.search-results { max-height: 60vh; overflow-y: auto; padding: 8px; }
.sr-title { font-size: 12px; font-weight: 800; color: var(--text-3); text-transform: uppercase; margin: 10px 8px 4px; }
.sr-item { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; text-align: left; padding: 9px 10px; border-radius: 12px; cursor: pointer; font: inherit; color: var(--text); }
.sr-item:hover, .sr-item.active { background: var(--primary-soft); }
.sr-item mark { background: rgba(255, 198, 26, .45); color: inherit; border-radius: 3px; }
.sm-ico { width: 32px; height: 32px; border-radius: 10px; }
@media (max-width: 900px) { .search-back { padding-top: 12px; } }

/* Gestos */
.swiping { transition: none !important; position: relative; z-index: 1; }
.swipe-bg { position: absolute; inset: 0; border-radius: inherit; z-index: -1; display: flex; align-items: center; padding: 0 20px; color: #fff; font-weight: 800; opacity: .25; transition: opacity .15s; }
.swipe-bg.left { justify-content: flex-end; }
.swipe-ready .swipe-bg { opacity: 1; }
.item.rem, .item.shop-item { position: relative; }
.ptr { height: 0; overflow: hidden; display: grid; place-items: center; transition: height .2s var(--ease); }
.ptr span { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--blue-200); border-top-color: var(--primary); transition: transform .2s; }
.ptr.ready span { transform: rotate(180deg); border-color: var(--primary); }
.ptr.loading span { animation: spin .8s linear infinite; border-top-color: transparent; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 400; }

/* Personalização */
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; transition: transform .2s var(--spring); }
.swatch.on { box-shadow: 0 0 0 3px var(--text); transform: scale(1.1); }
.quick-links .setting { color: var(--text); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 520px) { .grid-3 { grid-template-columns: 1fr 1fr; } }

/* Lembretes v3 */
.btn.took { background: rgba(18, 184, 134, .12); color: var(--green); }

/* Compras v3 */
.scanner { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; margin-bottom: 10px; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scan-line { position: absolute; left: 10%; right: 10%; top: 50%; height: 2px; background: var(--red); box-shadow: 0 0 12px var(--red); animation: scan 1.6s ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateY(-60px); } to { transform: translateY(60px); } }
.settle { display: grid; gap: 6px; }
.progress.big { height: 12px; margin: 12px 0; }

/* Sondagens, presentes, localização */
.poll-card { background: var(--surface); color: var(--text); border-radius: 14px; padding: 12px; min-width: 240px; display: grid; gap: 7px; box-shadow: var(--shadow-sm); margin: 2px 0 4px; }
.poll-opt { position: relative; overflow: hidden; display: flex; gap: 8px; align-items: center; border: 1.5px solid var(--border); background: var(--surface); border-radius: 10px; padding: 8px 10px; cursor: pointer; font: inherit; color: var(--text); text-align: left; }
.poll-opt i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--primary-soft); transition: width .5s var(--ease); z-index: 0; }
.poll-opt span, .poll-opt b { position: relative; z-index: 1; }
.poll-opt.mine { border-color: var(--primary); }
.poll-opt:disabled { cursor: default; }
.opts { display: grid; gap: 8px; }
.loc-btn { margin-top: 4px; }
.wish.taken { opacity: .6; }
.paid-row { align-self: end; padding-bottom: 14px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.kv div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--border); padding-bottom: 6px; }
.kv span { color: var(--text-2); font-size: 14px; }

/* Administração */
.admin-tabs { margin-bottom: 18px; max-width: 640px; }
.admin-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.dot-status { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--text-3); }
.dot-status.ok { background: var(--green); box-shadow: 0 0 0 4px rgba(18, 184, 134, .15); }
.dot-status.warn { background: var(--orange); box-shadow: 0 0 0 4px rgba(255, 138, 0, .15); }
.dot-status.bad { background: var(--red); box-shadow: 0 0 0 4px rgba(240, 67, 90, .15); animation: blink 1.5s infinite; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 110px; margin-top: 12px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.bar i { width: 100%; height: 0; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--blue-400), var(--blue-600)); transition: height .6s var(--ease); min-height: 2px; }
.bar span { font-size: 10px; color: var(--text-3); }
.user-row { flex-wrap: wrap; }
.user-row.off { opacity: .6; }
.switch-row { display: flex; align-items: center; gap: 6px; }
body:has(#fab:not(.hidden)) #view { padding-bottom: 92px; }
.composer textarea::placeholder, .ai-composer textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member[data-gift] { text-align: left; }
.member[data-gift] > div { text-align: left; }
.invite-setting { margin-top: 12px; padding: 10px 0 0; border-top: 1px dashed var(--border); gap: 10px; cursor: pointer; }
.invite-locked { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.member .pill .ico { width: 14px; height: 14px; }
