/* Nossa Família — paleta do ícone: sálvia, lavanda, pêssego, creme e manteiga */
:root {
  --sage: #7FB3A6;
  --sage-deep: #4F8A7B;
  --sage-soft: #E4F0EC;
  --lav: #A3ACDB;
  --lav-deep: #6E78B8;
  --lav-soft: #ECEEF8;
  --coral: #F2958A;
  --coral-deep: #D9695C;
  --coral-soft: #FDEBE8;
  --butter: #FFD58A;
  --butter-soft: #FFF4DD;
  --peach: #FFE1D2;
  --cream: #FFF8F0;
  --bg: #F6F4F0;
  --surface: #FFFFFF;
  --line: #E9E5DE;
  --text: #2E3A39;
  --muted: #6F7B7A;
  --grad: linear-gradient(135deg, #7FB3A6 0%, #A3ACDB 100%);
  --radius: 18px;
  --shadow: 0 1px 2px rgba(46, 58, 57, .04), 0 6px 20px rgba(46, 58, 57, .06);
  --shadow-lg: 0 20px 60px rgba(46, 58, 57, .18);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sage-deep); }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  padding: 10px 16px; border-radius: 12px; font: inherit; font-weight: 600;
  background: var(--sage-deep); color: #fff; transition: transform .08s, background .2s, box-shadow .2s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #437b6d; box-shadow: 0 4px 14px rgba(79,138,123,.3); }
.btn:active { transform: translateY(1px); }
.btn .ico { width: 18px; height: 18px; }
.btn.soft { background: var(--sage-soft); color: var(--sage-deep); }
.btn.soft:hover { background: #d6e9e2; box-shadow: none; }
.btn.lav { background: var(--lav-deep); }
.btn.lav:hover { background: #5d67a8; box-shadow: 0 4px 14px rgba(110,120,184,.3); }
.btn.coral { background: var(--coral-deep); }
.btn.coral:hover { background: #c75a4e; box-shadow: 0 4px 14px rgba(217,105,92,.3); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { background: #efece6; color: var(--text); box-shadow: none; }
.btn.small { padding: 7px 12px; font-size: 13.5px; border-radius: 10px; }
.btn.icon { padding: 8px; border-radius: 10px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- formulários ---------- */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: #fff;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--sage); box-shadow: 0 0 0 4px var(--sage-soft); }
textarea { resize: vertical; min-height: 80px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--sage-deep); }

/* ---------- login ---------- */
.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 10% -10%, #dcebe6 0%, transparent 60%),
              radial-gradient(900px 500px at 110% 110%, #e3e6f6 0%, transparent 60%), var(--bg);
}
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 26px; padding: 34px 30px; box-shadow: var(--shadow-lg); text-align: center; }
.auth-card img { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 10px 30px rgba(127,179,166,.4); }
.auth-card h1 { margin: 16px 0 4px; font-size: 24px; }
.auth-card p.sub { margin: 0 0 24px; color: var(--muted); }
.auth-card form { text-align: left; }
.auth-card .btn { width: 100%; justify-content: center; padding: 12px; }

/* ---------- layout do painel ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; }
.brand img { width: 42px; height: 42px; border-radius: 12px; }
.brand b { display: block; font-size: 16px; }
.brand small { color: var(--muted); font-size: 12px; }
.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--muted); cursor: pointer; font-weight: 550; text-decoration: none; user-select: none; }
.nav:hover { background: var(--bg); color: var(--text); }
.nav.on { background: var(--sage-soft); color: var(--sage-deep); }
.nav .badge { margin-left: auto; }
.side .spacer { flex: 1; }
.side .me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--bg); }
.side .me > div:not(.avatar) { flex: 1; min-width: 0; }
.side .me b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .me small { color: var(--muted); font-size: 12px; }

.main { padding: 28px 34px 60px; max-width: 1180px; width: 100%; }
.top { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.top h1 { font-size: 26px; }
.top p { margin: 2px 0 0; color: var(--muted); }
.top .grow { flex: 1; }
.menu-btn { display: none; }

/* ---------- cards ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.card h3 { font-size: 16px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.grid.stats { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 20px; }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.stat { display: flex; align-items: center; gap: 14px; padding: 18px; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.stat:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(46,58,57,.1); }
.stat .num { font-size: 26px; font-weight: 700; line-height: 1; }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 4px; }
.bubble { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.bubble .ico { width: 22px; height: 22px; }
.t-sage { background: var(--sage-soft); color: var(--sage-deep); }
.t-lav { background: var(--lav-soft); color: var(--lav-deep); }
.t-coral { background: var(--coral-soft); color: var(--coral-deep); }
.t-butter { background: var(--butter-soft); color: #B7861F; }

.hero { background: var(--grad); color: #fff; border-radius: 24px; padding: 26px 28px; display: flex; align-items: center; gap: 22px; margin-bottom: 20px; box-shadow: 0 14px 40px rgba(127,179,166,.35); overflow: hidden; position: relative; }
.hero h2 { font-size: 22px; }
.hero p { margin: 6px 0 0; opacity: .92; }
.hero .grow { flex: 1; position: relative; }
.hero .btn { background: rgba(255,255,255,.95); color: var(--sage-deep); }
.hero .btn:hover { background: #fff; }
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.12); }

/* ---------- listas ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li .grow { flex: 1; min-width: 0; }
.li b { display: block; font-weight: 600; }
.li small, .muted { color: var(--muted); font-size: 13px; }
.li .actions { display: flex; gap: 4px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--bg); color: var(--muted); }
.chip .ico { width: 14px; height: 14px; }
.chip.sage { background: var(--sage-soft); color: var(--sage-deep); }
.chip.lav { background: var(--lav-soft); color: var(--lav-deep); }
.chip.coral { background: var(--coral-soft); color: var(--coral-deep); }
.chip.butter { background: var(--butter-soft); color: #9A6F14; }
.badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--coral); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }

.date-tile { width: 56px; flex: none; text-align: center; border-radius: 14px; padding: 8px 0; background: var(--sage-soft); color: var(--sage-deep); }
.date-tile b { display: block; font-size: 20px; line-height: 1; }
.date-tile span { font-size: 11px; text-transform: uppercase; font-weight: 700; letter-spacing: .05em; }
.date-tile.lav { background: var(--lav-soft); color: var(--lav-deep); }

.tabs { display: inline-flex; background: #ece8e1; border-radius: 12px; padding: 4px; gap: 2px; }
.tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .bubble { margin: 0 auto 12px; width: 64px; height: 64px; border-radius: 20px; }
.empty .bubble .ico { width: 30px; height: 30px; }

.progress { height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; display: flex; }
.progress i { display: block; height: 100%; }

/* ---------- modal / toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(46,58,57,.35); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; z-index: 50; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 24px; width: 100%; max-width: 540px; max-height: 92vh; overflow: auto; box-shadow: var(--shadow-lg); animation: pop .18s ease-out; }
.modal.wide { max-width: 820px; }
.modal header { display: flex; align-items: center; gap: 12px; padding: 20px 22px 6px; }
.modal header h2 { font-size: 19px; flex: 1; }
.modal .body { padding: 14px 22px; }
.modal h3 { display: flex; align-items: center; gap: 8px; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 6px 22px 22px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 60; display: flex; gap: 10px; align-items: center; animation: up .2s; max-width: 90vw; }
.toast.err { background: var(--coral-deep); }
.secret { font-family: ui-monospace, Consolas, monospace; font-size: 22px; font-weight: 700; letter-spacing: .04em; background: var(--butter-soft); color: #7a5a12; padding: 14px; border-radius: 14px; text-align: center; margin: 10px 0; user-select: all; }
.pick { max-height: 260px; overflow: auto; border: 1.5px solid var(--line); border-radius: 12px; padding: 6px 10px; }
.fam-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 10px 0 2px; }
@keyframes fade { from { opacity: 0 } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px) } }
@keyframes up { from { opacity: 0; transform: translate(-50%, 10px) } }

/* ---------- responsivo ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 40; left: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .main { padding: 18px 16px 60px; }
  .menu-btn { display: inline-flex; }
  .row { flex-direction: column; gap: 0; }
  .grid.two { grid-template-columns: 1fr; }
  .hero { flex-direction: column; align-items: flex-start; }
}
