/* LouvOrganize — design system leve (sem frameworks, sem fontes externas).
   Celular primeiro; a partir de 900px vira layout com barra lateral. */

/* ── tokens ─────────────────────────────────────────────────────────────── */
:root {
  /* neutros frios + índigo profundo + dourado só para destaques */
  --bg: #F4F6FB; --surface: #FFFFFF; --surface-2: #F8F9FC; --ink: #141A2E; --muted: #586179; --line: #E3E7EF; --line-strong: #C7CDDA;
  --brand: #3446D4; --brand-hover: #2A3ABF; --brand-ink: #FFFFFF; --brand-soft: #E8EBFD; --brand-tint: #F3F5FF;
  --brand-grad: linear-gradient(135deg, #4457E8 0%, #2E35B0 55%, #241F7A 100%);
  --gold: #B7791F; --gold-soft: #FBF1DC;
  --accent: #0E8A7E;
  --ok: #18794E; --ok-soft: #E2F5EB; --warn: #8A5A00; --warn-soft: #FDF1D8; --bad: #C0362C; --bad-soft: #FDE8E6; --info: #2D5BB8; --info-soft: #E6EEFB; --idle-soft: #EEF1F6;
  --radius: 14px; --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(20,26,46,.05);
  --shadow: 0 1px 2px rgba(20,26,46,.04), 0 6px 20px -8px rgba(20,26,46,.12);
  --shadow-lg: 0 24px 60px -12px rgba(20,26,46,.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --side-w: 248px; --tab-h: 64px; --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1020; --surface: #141A2D; --surface-2: #1A2136; --ink: #E9ECF5; --muted: #9AA3BA; --line: #252D45; --line-strong: #3A4463;
    --brand: #8A9BFF; --brand-hover: #A2B0FF; --brand-ink: #0A0F2E; --brand-soft: #222B57; --brand-tint: #171F3E;
    --brand-grad: linear-gradient(135deg, #3F4FD6 0%, #2B2F9C 60%, #1F1A66 100%);
    --gold: #E5B65A; --gold-soft: #33280F;
    --accent: #5FD0C2;
    --ok: #6FD59C; --ok-soft: #12301F; --warn: #EBBE62; --warn-soft: #33280F; --bad: #FF8F86; --bad-soft: #3A1A1A; --info: #96B5EE; --info-soft: #1B2840; --idle-soft: #1F2740;
    --shadow-sm: none; --shadow: 0 1px 0 rgba(255,255,255,.03), 0 8px 24px -12px rgba(0,0,0,.6); --shadow-lg: 0 24px 60px -12px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1020; --surface: #141A2D; --surface-2: #1A2136; --ink: #E9ECF5; --muted: #9AA3BA; --line: #252D45; --line-strong: #3A4463;
  --brand: #8A9BFF; --brand-hover: #A2B0FF; --brand-ink: #0A0F2E; --brand-soft: #222B57; --brand-tint: #171F3E;
  --brand-grad: linear-gradient(135deg, #3F4FD6 0%, #2B2F9C 60%, #1F1A66 100%);
  --gold: #E5B65A; --gold-soft: #33280F;
  --accent: #5FD0C2;
  --ok: #6FD59C; --ok-soft: #12301F; --warn: #EBBE62; --warn-soft: #33280F; --bad: #FF8F86; --bad-soft: #3A1A1A; --info: #96B5EE; --info-soft: #1B2840; --idle-soft: #1F2740;
  --shadow-sm: none; --shadow: 0 8px 24px -12px rgba(0,0,0,.6); --shadow-lg: 0 24px 60px -12px rgba(0,0,0,.8);
  color-scheme: dark;
}

/* ── base ───────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
html.dlg-open { overflow: hidden; }
body { margin: 0; font: 16px/1.5 var(--font); color: var(--ink); background: var(--bg); min-height: 100vh; min-height: 100dvh; -webkit-font-smoothing: antialiased; }
h1 { font-size: 1.5rem; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .25rem; font-weight: 750; }
h2 { font-size: 1.08rem; letter-spacing: -.01em; margin: 1.5rem 0 .6rem; font-weight: 700; }
h3 { font-size: .95rem; margin: 1rem 0 .4rem; font-weight: 700; }
h1:focus { outline: none; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
p { margin: .5rem 0; }
code { font-size: .88em; background: var(--idle-soft); padding: .05em .35em; border-radius: 5px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex: none; display: inline-block; vertical-align: middle; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: var(--brand-ink); padding: .5rem 1rem; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; top: 8px; }
.page { animation: page-in .22s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── moldura: celular ───────────────────────────────────────────────────── */
.side { display: none; }
.mtop { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .55rem 16px; padding-top: max(.55rem, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-weight: 750; letter-spacing: -.01em; min-width: 0; }
.brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; color: #fff;
  background: var(--brand-grad); box-shadow: 0 4px 12px -4px rgba(52,70,212,.55); }
main { padding: 16px; padding-bottom: calc(var(--tab-h) + 28px + env(safe-area-inset-bottom)); max-width: 1180px; width: 100%; margin: 0 auto; }
body.is-bare main { padding-bottom: 40px; }
main:focus { outline: none; }
.tabbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-top: 1px solid var(--line); }
.tabbar a, .tabbar button { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: .7rem; font-weight: 600; position: relative; -webkit-tap-highlight-color: transparent; }
.tabbar a[aria-current="page"], .tabbar button.on { color: var(--brand); }
.tabbar a[aria-current="page"]::before, .tabbar button.on::before { content: ""; position: absolute; top: 8px; width: 52px; height: 30px; border-radius: 999px;
  background: var(--brand-soft); z-index: -1; }
.tabbar a:focus-visible, .tabbar button:focus-visible { outline: 3px solid var(--brand); outline-offset: -6px; border-radius: 12px; }
.tabbar .ic { margin-top: 2px; }

/* ── moldura: computador ────────────────────────────────────────────────── */
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
  .mtop, .tabbar { display: none; }
  .side { display: flex; flex-direction: column; gap: .75rem; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--line); }
  .side .brand { padding: 4px 8px 10px; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .side-nav a, .side-foot a, .side-foot button { all: unset; cursor: pointer; display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem;
    border-radius: 10px; color: var(--muted); font-weight: 560; font-size: .95rem; transition: background .15s, color .15s; }
  .side-nav a:hover, .side-foot a:hover, .side-foot button:hover { background: var(--surface-2); color: var(--ink); }
  .side-nav a { position: relative; }
  .side-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 680; }
  .side-nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
  .side-nav a:focus-visible, .side-foot a:focus-visible, .side-foot button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
  .side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: .75rem; }
  .me { display: flex; align-items: center; gap: .6rem; padding: .6rem .5rem 0; min-width: 0; }
  .me strong { display: block; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
  .me small { color: var(--muted); font-size: .76rem; }
  main { padding: 28px 36px 48px; }
  h1 { font-size: 1.75rem; }
}
.church-sw { min-height: 38px; font-size: .9rem; padding: .35rem .6rem; }

/* ── cabeçalho de página e ações ────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; gap: .75rem 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head .grow { flex: 1 1 260px; min-width: 0; }
.page-head p { margin: .2rem 0 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
@media (max-width: 640px) {
  .page-head > .actions { width: 100%; }
  .page-head > .actions > .btn.primary { flex: 1 1 auto; justify-content: center; }
}

/* ── botões ─────────────────────────────────────────────────────────────── */
.btn { font: inherit; font-weight: 600; font-size: .94rem; cursor: pointer; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  padding: .5rem .95rem; border-radius: var(--radius-sm); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 42px; transition: background .15s, border-color .15s, transform .08s, box-shadow .15s; box-shadow: var(--shadow-sm); position: relative; }
.btn:hover { border-color: var(--muted); background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--brand) 80%, transparent); }
.btn.primary:hover { background: var(--brand-hover); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: var(--surface); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ok { background: var(--ok); color: #fff; border-color: transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.ok { color: #0D2414; } }
.btn.sm { padding: .3rem .7rem; min-height: 34px; font-size: .86rem; border-radius: 9px; }
.btn.link { border: 0; background: none; color: var(--brand); padding: .2rem; min-height: 0; box-shadow: none; text-decoration: underline; font-weight: 600; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.loading { color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor;
  border-color: var(--brand-ink) var(--brand-ink) transparent transparent; animation: spin .7s linear infinite; }
.btn.danger.loading::after, .btn:not(.primary).loading::after { border-color: var(--ink) var(--ink) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (pointer: coarse) { .btn { min-height: 44px; } .btn.sm { min-height: 38px; } }

/* ── formulários ────────────────────────────────────────────────────────── */
label { display: block; font-weight: 620; font-size: .88rem; margin-bottom: .3rem; }
.field { margin-bottom: 1rem; }
.field .hint { font-weight: 450; color: var(--muted); font-size: .8rem; display: block; margin-top: .1rem; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: .55rem .75rem; width: 100%; min-height: 44px; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
input:user-invalid, textarea:user-invalid, select:user-invalid { border-color: var(--bad); }
input[type=checkbox], input[type=radio] { width: 1.15rem; height: 1.15rem; min-height: 0; accent-color: var(--brand); margin: 0; flex: none; }
input[type=color] { padding: .2rem; width: 64px; cursor: pointer; }
input[readonly] { background: var(--surface-2); }
select { appearance: none; -webkit-appearance: none; padding-right: 2.2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23857a7e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; }
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.check { display: flex; gap: .6rem; align-items: center; font-weight: 450; margin: .15rem 0; padding: .35rem .5rem; border-radius: 9px; cursor: pointer; }
.check:hover { background: var(--surface-2); }
fieldset { min-width: 0; }
legend { padding: 0; margin-bottom: .4rem; }
.grid2 { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1 1 180px; min-width: 0; }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.1rem; align-items: end; padding: .75rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); }
.filters > div { flex: 1 1 150px; min-width: 0; }
.filters label { font-weight: 560; font-size: .8rem; color: var(--muted); }
.card .filters, .filters.bare { background: none; border: 0; padding: 0; }

/* ── superfícies ────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.15rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card > h2:first-child, .card > h3:first-child, .card > .row:first-child h2 { margin-top: 0; }
@media (min-width: 900px) { .card { padding: 1.35rem 1.5rem; } }
details.card > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .5rem; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; }
details[open].card > summary::before { transform: rotate(45deg); }
details > summary { cursor: pointer; }
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.cards > .card { margin-bottom: 0; }
.stats { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 1.25rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: .15rem; transition: transform .15s var(--ease), border-color .15s; }
button.stat { font: inherit; text-align: left; cursor: pointer; }
a.stat:hover, button.stat:hover { transform: translateY(-2px); border-color: var(--line-strong); }
[id^="h-"] { scroll-margin-top: 72px; }
.stat .n { font-size: 1.75rem; font-weight: 780; letter-spacing: -.03em; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: .84rem; font-weight: 560; display: flex; align-items: center; gap: .35rem; }
/* “precisa de atenção” = dourado (contrasta com o índigo sem parecer erro) */
.stat.hot { background: linear-gradient(135deg, var(--gold-soft), var(--surface) 80%); border-color: color-mix(in srgb, var(--gold) 35%, var(--line)); }
.stat.hot .n { color: var(--gold); }
.stat.hot .l .ic { color: var(--gold); }
/* banner do início */
.hero { position: relative; overflow: hidden; isolation: isolate; margin: 0 0 1.1rem; padding: 1.35rem 1.4rem; border-radius: 20px;
  background: var(--brand-grad); color: #fff; box-shadow: 0 18px 40px -22px rgba(36,31,122,.9); align-items: center; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.hero::before { width: 280px; height: 280px; right: -70px; top: -120px; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); }
.hero::after { width: 200px; height: 200px; left: 35%; bottom: -150px; background: radial-gradient(circle, rgba(229,182,90,.35), transparent 70%); }
.hero h1 { color: #fff; }
.hero .date { color: rgba(255,255,255,.78); font-size: .9rem; font-weight: 560; }
.hero .btn.primary { background: #fff; color: #2A30A0; box-shadow: 0 8px 20px -10px rgba(0,0,0,.45); }
.hero .btn.primary:hover { background: #EEF0FF; }
@media (min-width: 900px) { .hero { padding: 1.75rem 2rem; } }
.hero .date::first-letter { text-transform: uppercase; }
.card strong > a, .list strong > a { color: inherit; text-decoration: none; }
.card strong > a:hover, .list strong > a:hover { color: var(--brand); text-decoration: underline; }
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
  .stat { padding: .7rem .75rem; }
  .stat .n { font-size: 1.45rem; }
  .stat .l { font-size: .74rem; line-height: 1.25; }
  .stat .l .ic { display: none; }
}

/* tabelas (no celular viram cartões — main.js preenche data-label) */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; background: var(--surface-2); font-weight: 650; }
th button { all: unset; cursor: pointer; font: inherit; text-transform: inherit; letter-spacing: inherit; display: inline-flex; align-items: center; gap: .25rem; }
th button:hover { color: var(--ink); }
th button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); border-radius: 4px; }
th[aria-sort] { color: var(--brand); }
th[aria-sort] button::after { content: "↑"; font-size: .9em; }
th[aria-sort="descending"] button::after { content: "↓"; }
@media (max-width: 720px) {
  .tablewrap { border: 0; background: none; box-shadow: none; overflow: visible; }
  table.rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rtable tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .55rem .85rem; margin-bottom: .65rem; box-shadow: var(--shadow); }
  .rtable tr:hover { background: var(--surface); }
  .rtable td { border: 0; padding: .3rem 0; display: flex; gap: .75rem; align-items: flex-start; justify-content: space-between; text-align: right; min-height: 0; }
  .rtable td > * { text-align: left; }
  .rtable td::before { content: attr(data-label); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; text-align: left; flex: none; padding-top: .15rem; }
  .rtable td[data-label=""]::before, .rtable td:first-child::before { display: none; }
  .rtable td:first-child { font-size: 1.02rem; padding-top: .2rem; justify-content: flex-start; text-align: left; }
  .rtable td:last-child:has(.actions) { justify-content: flex-start; border-top: 1px solid var(--line); margin-top: .35rem; padding-top: .6rem; }
  .rtable td:has(.actions)::before, .rtable td:has(> .av)::before { display: none; }
  .rtable td:has(> .av:only-child) { display: none; }
  .rtable td .chips { justify-content: flex-end; }
  .rtable td .actions { width: 100%; }
  .rtable td .actions > * { flex: 1 1 auto; }
}

.empty { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; padding: 2.25rem 1rem; color: var(--muted);
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); }
.card .empty { border: 0; background: none; padding: 1.5rem .5rem; }
.empty strong { color: var(--ink); font-size: 1.02rem; }
.empty-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: .35rem; }
.empty-act { margin-top: .75rem; }
.alert { padding: .75rem .95rem; border-radius: var(--radius-sm); margin: .75rem 0; border: 1px solid; border-left-width: 4px; }
.alert.info { background: var(--info-soft); border-color: var(--info); }
.alert.warn { background: var(--warn-soft); border-color: var(--warn); }
.alert.bad  { background: var(--bad-soft);  border-color: var(--bad); }
.alert.ok   { background: var(--ok-soft);   border-color: var(--ok); }

/* chips, barras, abas, listas */
.chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 620; padding: .16rem .55rem; border-radius: 999px;
  background: var(--idle-soft); color: var(--ink); border: 1px solid transparent; white-space: nowrap; line-height: 1.4; }
.dot { width: .55rem; height: .55rem; border-radius: 50%; display: inline-block; flex: none; vertical-align: middle; }
.dot.lg { width: .8rem; height: .8rem; margin-right: .2rem; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 8%, transparent); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chips { display: flex; gap: .3rem; flex-wrap: wrap; }
.bar { height: 8px; border-radius: 999px; background: var(--idle-soft); overflow: hidden; min-width: 60px; }
.bar > span { display: block; height: 100%; background: var(--ok); border-radius: 999px; transition: width .4s var(--ease); }
.bar.partial > span { background: var(--warn); }
.bar.low > span { background: var(--bad); }
.tabs { display: inline-flex; gap: 2px; margin-bottom: 1rem; flex-wrap: wrap; padding: 3px; background: var(--idle-soft); border-radius: 12px; }
.tabs button, .tabs a { font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; padding: .4rem .95rem; border: 0; background: none; color: var(--muted);
  border-radius: 9px; text-decoration: none; min-height: 0; box-shadow: none; }
.tabs button[aria-pressed="true"], .tabs a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 1px 3px rgba(0,0,0,.08); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: .75rem 0; border-bottom: 1px solid var(--line); display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.list > li:last-child { border-bottom: 0; padding-bottom: .2rem; }
.list > li:first-child { padding-top: .2rem; }
.list .grow { flex: 1 1 200px; min-width: 0; }
.list .actions { margin-left: auto; }
.month-title { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1.4rem 0 .5rem; font-weight: 700; }
.month-title:first-child { margin-top: 0; }

/* calendário */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.cal .dow { background: var(--surface-2); padding: .5rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); font-weight: 700; }
.cal .day { min-height: 108px; padding: .35rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .8rem; min-width: 0; }
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day:nth-last-child(-n+7) { border-bottom: 0; }
.cal .day.out { background: var(--surface-2); color: var(--muted); }
.cal .day.out .ev { opacity: .65; }
.cal .num { font-weight: 650; display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; margin-bottom: .2rem; border-radius: 999px; font-size: .8rem; }
.cal .day.today .num { background: var(--brand); color: var(--brand-ink); }
.ev { display: block; width: 100%; text-align: left; font: inherit; font-size: .74rem; cursor: pointer; border: 0; border-left: 3px solid var(--brand);
  background: var(--brand-tint); color: var(--ink); border-radius: 6px; padding: .25rem .4rem; margin-bottom: .25rem; line-height: 1.3; overflow: hidden; transition: filter .12s, transform .12s; }
.ev:hover { filter: brightness(.97); transform: translateY(-1px); }
.ev b { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.ev .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; font-weight: 560; }
.ev.cancelled { opacity: .55; text-decoration: line-through; }
.ev.draft { background: repeating-linear-gradient(-45deg, var(--surface-2), var(--surface-2) 6px, var(--surface) 6px, var(--surface) 12px); }
@media (min-width: 721px) { .cal-wrap-list-only { display: none; } }
/* celular: grade do mês compacta (só o horário em cada escala; toque abre os detalhes) */
@media (max-width: 720px) {
  .cal-wrap-month { margin-bottom: 1rem; }
  .cal .dow { padding: .4rem 0; font-size: .62rem; letter-spacing: .02em; }
  .cal .day { min-height: 62px; padding: .2rem; }
  .cal .num { min-width: 1.35rem; height: 1.35rem; font-size: .72rem; margin-bottom: .1rem; }
  .cal .ev { padding: .2rem .1rem; border-left-width: 2px; border-radius: 4px; margin-bottom: .15rem; text-align: center; min-height: 22px; }
  .cal .ev b { font-size: 0; letter-spacing: 0; }
  .cal .ev b .tm { font-size: .64rem; color: var(--ink); text-transform: none; }
  .cal .ev .t { display: none; }
}
.filters .view-sw { flex: 0 0 auto; margin: 0; }
.filters .view-sw button { white-space: nowrap; }
.pop { position: fixed; z-index: 60; max-width: 320px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem;
  box-shadow: var(--shadow-lg); font-size: .85rem; pointer-events: none; animation: pop-in .12s var(--ease); }
.pop h4 { margin: 0 0 .2rem; font-size: .95rem; }
.pop ul { margin: .35rem 0 0; padding-left: 1rem; }
@keyframes pop-in { from { opacity: 0; transform: translateY(4px) scale(.98); } }

/* vestimenta */
.swatches { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.swatches .sw { width: 18px; height: 18px; border-radius: 6px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent); }
.swatches.labeled { display: flex; gap: 6px; margin: .5rem 0 .25rem; }
.swatches.labeled .sw { width: auto; min-width: 46px; height: 44px; border-radius: 8px; display: flex; align-items: flex-end; padding: 3px 5px; }
.swatches.labeled .sw small { font-size: .6rem; font-weight: 650; line-height: 1.1; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.8); max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatches.labeled .sw.light small { color: #141A2E; text-shadow: none; }
.dress-chip { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.dress-chip .swatches { gap: 2px; }
.dress-chip .sw { width: 12px; height: 12px; border-radius: 4px; }
.eyebrow { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.figs { --fig-line: rgba(20,26,46,.42); display: flex; justify-content: center; gap: clamp(.5rem, 3vw, 2rem); flex-wrap: nowrap; margin-top: .9rem; padding: .9rem .5rem .6rem;
  border-radius: var(--radius-sm); background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--brand) 9%, var(--surface-2)) 0%, var(--surface-2) 70%); }
.figs figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 150px; flex: 1 1 0; min-width: 0; }
.figs figcaption { font-size: .68rem; color: var(--muted); text-align: center; line-height: 1.3; margin-top: .35rem; }
.fig { display: block; overflow: visible; filter: drop-shadow(0 6px 6px rgba(0,0,0,.12)); }
.fig .o, .fig .h { stroke: var(--fig-line); stroke-width: 1.1; stroke-linejoin: round; }
.fig .h { stroke-width: .8; }
.dress-code .figs figcaption { display: none; }
.dress-weeks li.is-now { background: var(--brand-tint); margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; border-radius: 10px; }
.dress-weeks select { min-width: 190px; }
.color-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .45rem; }
.color-row input[type=color] { width: 52px; height: 42px; padding: 3px; flex: 0 0 auto; cursor: pointer; }
.color-row input[name=cname] { flex: 1 1 auto; min-width: 0; }
dialog .figs figcaption { font-size: .64rem; }
:root[data-theme="dark"] .figs { --fig-line: rgba(233,236,245,.38); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .figs { --fig-line: rgba(233,236,245,.38); } }

/* diálogos: cartão no computador, folha que sobe de baixo no celular */
dialog { border: 0; border-radius: 18px; padding: 0; max-width: min(560px, calc(100vw - 24px)); width: 100%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog[open] { animation: dlg-in .2s var(--ease); }
dialog::backdrop { background: rgba(15,10,12,.48); backdrop-filter: blur(2px); animation: fade-in .2s; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }
dialog .dlg-body { padding: 1.35rem 1.4rem; max-height: min(72vh, 680px); overflow: auto; overscroll-behavior: contain; }
dialog .dlg-foot { padding: .85rem 1.4rem; border-top: 1px solid var(--line); display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; background: var(--surface-2); }
dialog h2 { margin-top: 0; font-size: 1.2rem; }
dialog.wide { max-width: min(760px, calc(100vw - 24px)); }
@media (max-width: 640px) {
  dialog, dialog.wide { margin: auto 0 0; max-width: 100%; border-radius: 22px 22px 0 0; max-height: 92dvh; padding-bottom: env(safe-area-inset-bottom); }
  dialog[open] { animation: sheet-in .26s var(--ease); }
  dialog::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 999px; background: var(--line-strong); margin: 8px auto 0; }
  dialog .dlg-body { max-height: calc(92dvh - 120px); padding: 1rem 1.15rem; }
  dialog .dlg-foot { padding: .75rem 1.15rem; }
  dialog .dlg-foot .btn { flex: 1 1 0; }
}
@keyframes sheet-in { from { transform: translateY(100%); } }
.sheet-menu { padding-top: .75rem !important; }
.sheet-head { display: flex; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.sheet-head small { display: block; color: var(--muted); font-size: .82rem; }
.menu-list { display: flex; flex-direction: column; }
.menu-list a, .menu-list button { all: unset; cursor: pointer; display: flex; align-items: center; gap: .85rem; padding: .85rem .35rem; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 560; }
.menu-list a > span, .menu-list button > span { flex: 1; }
.menu-list a > .ic:first-child, .menu-list button > .ic:first-child { color: var(--muted); }
.menu-list a[aria-current="page"] { color: var(--brand); }
.menu-list a[aria-current="page"] > .ic:first-child { color: var(--brand); }
.menu-list .ic:last-child { color: var(--line-strong); }
.menu-list .danger-text { color: var(--bad); border-bottom: 0; }
.menu-list .danger-text .ic { color: var(--bad) !important; }
.menu-list a:focus-visible, .menu-list button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); border-radius: 8px; }

/* avisos */
#toasts { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tab-h) + 14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: .5rem;
  align-items: center; z-index: 90; pointer-events: none; }
@media (min-width: 900px) { #toasts { bottom: 24px; left: auto; right: 24px; align-items: flex-end; } }
body.is-bare #toasts { bottom: 20px; }
.toast { display: flex; align-items: center; gap: .55rem; background: var(--ink); color: var(--bg); padding: .7rem 1rem; border-radius: 12px; box-shadow: var(--shadow-lg);
  max-width: 460px; pointer-events: auto; font-size: .92rem; font-weight: 520; cursor: pointer; animation: toast-in .25s var(--ease); }
.toast .ic { color: #7FD195; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.bad .ic { color: #fff; }
.toast.out { opacity: 0; transform: translateY(6px); transition: .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }

/* carregamento (esqueleto) */
.skeleton { padding-top: .25rem; }
.sk { background: linear-gradient(90deg, var(--idle-soft) 25%, var(--surface-2) 50%, var(--idle-soft) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border-radius: 8px; }
.sk-title { height: 30px; width: 45%; margin-bottom: .6rem; }
.sk-line { height: 14px; width: 100%; margin: .6rem 0; }
.sk-cards { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 1.25rem 0; }
.sk-card { height: 92px; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* telas sem moldura: login, cadastro, página pública */
body.is-bare { background:
  radial-gradient(1100px 520px at 50% -180px, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%), var(--bg); }
.auth { max-width: 440px; margin: 0 auto; padding: max(6vh, 24px) 16px 32px; }
.auth .card { padding: 1.6rem; border-radius: 18px; }
.logo { display: flex; flex-direction: column; align-items: center; gap: .55rem; font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); text-align: center; margin-bottom: 1.4rem; }
.logo::before { content: ""; width: 56px; height: 56px; border-radius: 17px; box-shadow: 0 10px 24px -10px rgba(52,70,212,.6);
  background: url("../icons/icon.svg") center / cover no-repeat; }
.logo small { display: block; font-size: .9rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.auth h1 { font-size: 1.35rem; margin-bottom: .9rem; }

/* pequenos componentes */
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center;
  font-weight: 750; font-size: .78rem; flex: none; letter-spacing: .02em; }
.setlist-item { display: grid; grid-template-columns: 2rem 1fr; gap: .6rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 12px; margin-bottom: .5rem; background: var(--surface-2); }
.setlist-item .ord { font-weight: 780; color: var(--brand); font-size: 1.1rem; text-align: center; }
.when { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 54px; padding: .35rem .3rem; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand); line-height: 1.05; flex: none; }
.when b { font-size: 1.3rem; font-weight: 800; }
.when small { font-size: .68rem; text-transform: uppercase; font-weight: 700; letter-spacing: .05em; }

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

@media print {
  .only-setlist .card:not(#setlist-card), .only-setlist .page-head { display: none !important; }
  .side, .mtop, .tabbar, .no-print, #toasts, .actions { display: none !important; }
  .shell { display: block; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border: 0; padding: 0; }
  main { padding: 0; }
}

/* Versão do sistema: discreta, sem competir com o conteúdo */
.app-ver { margin: .75rem 0 0; text-align: center; font-size: .7rem; letter-spacing: .02em; color: var(--muted); opacity: .75; font-variant-numeric: tabular-nums; user-select: all; }
.side-foot .app-ver { text-align: left; padding: 0 .5rem; }

/* ══ 1.3.0 — reorganização: menu em grupos, busca, abas, início em duas colunas ══ */

/* menu lateral: grupos, busca, atalho de teclado */
kbd { font: 600 .7rem/1 var(--font); padding: .2rem .38rem; border-radius: 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px;
  background: var(--surface); color: var(--muted); white-space: nowrap; }
.side-group { margin: .9rem .75rem .3rem; font-size: .68rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); opacity: .85; }
.side-search { all: unset; cursor: pointer; display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: .9rem; transition: border-color .15s, background .15s; }
.side-search span { flex: 1; }
.side-search:hover { border-color: var(--line-strong); color: var(--ink); }
.side-search:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.icon-btn { all: unset; cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); }
.icon-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }

/* abas de área (Agenda, Pessoas) e trilha de volta */
.seg { display: flex; gap: 2px; padding: 3px; margin-bottom: 1rem; background: var(--idle-soft); border-radius: 12px; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg a { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 9px; color: var(--muted); text-decoration: none;
  font-weight: 620; font-size: .9rem; white-space: nowrap; transition: background .15s, color .15s; }
.seg a:hover { color: var(--ink); }
.seg a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 1px 3px rgba(0,0,0,.08); }
.seg a[aria-current="page"] .ic { color: var(--brand); }
.crumb { display: inline-flex; align-items: center; gap: .2rem; margin: 0 0 .35rem -.2rem; color: var(--muted); font-size: .88rem; font-weight: 600; text-decoration: none; }
.crumb:hover { color: var(--brand); }

/* abas internas de uma tela (escala, minhas escalas) */
.tabs-line { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin: 0 0 1rem; overflow-x: auto; scrollbar-width: none; }
.tabs-line::-webkit-scrollbar, .seg::-webkit-scrollbar { display: none; }
.tabs-line [role=tab] { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; padding: .7rem .9rem; margin-bottom: -1px;
  color: var(--muted); font-weight: 640; font-size: .95rem; border-bottom: 2.5px solid transparent; white-space: nowrap; transition: color .15s, border-color .15s; }
.tabs-line [role=tab]:hover { color: var(--ink); }
.tabs-line [role=tab][aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.tabs-line [role=tab]:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); border-radius: 8px 8px 0 0; }
.badge { font-size: .72rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; background: var(--idle-soft); color: var(--muted); font-variant-numeric: tabular-nums; }
[aria-selected="true"] > .badge { background: var(--brand-soft); color: var(--brand); }
.pane[hidden] { display: none; }

/* menu de ações secundárias */
.kebab { position: relative; display: inline-block; }
.kebab > summary { list-style: none; padding: .3rem .5rem; }
.kebab > summary::-webkit-details-marker { display: none; }
.kebab[open] > summary { background: var(--surface-2); border-color: var(--muted); }
.kebab-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 210px; padding: .35rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: pop-in .12s var(--ease); }
.kebab-pop > a, .kebab-pop > button { all: unset; cursor: pointer; padding: .55rem .7rem; border-radius: 8px; font-size: .92rem; font-weight: 560; color: var(--ink); white-space: nowrap; }
.kebab-pop > a:hover, .kebab-pop > button:hover, .kebab-pop > a:focus-visible, .kebab-pop > button:focus-visible { background: var(--surface-2); }
.kebab-pop .danger-text { color: var(--bad); }
.kebab-pop .danger-text:hover { background: var(--bad-soft); }
.page-head .kebab > summary { min-height: 42px; padding: .5rem .7rem; }
@media (max-width: 640px) { .page-head > .actions .kebab { flex: 0 0 auto; } }

/* busca global */
dialog.palette { max-width: min(640px, calc(100vw - 24px)); margin: 10vh auto auto; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; max-height: 76vh; }
dialog.palette[open] { animation: dlg-in .16s var(--ease); }
.pal-in { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); color: var(--muted); }
.pal-in input { border: 0; box-shadow: none !important; padding: .4rem 0; min-height: 40px; font-size: 1.05rem; background: none; }
.pal-list { list-style: none; margin: 0; padding: .4rem; overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pal-close { display: none; font: inherit; font-weight: 600; font-size: .92rem; color: var(--brand); background: none; border: 0; padding: .4rem .2rem; cursor: pointer; flex: none; }
.pal-list [role=option] { display: flex; align-items: center; gap: .75rem; padding: .55rem .65rem; border-radius: 10px; cursor: pointer; }
.pal-list [aria-selected="true"] { background: var(--brand-soft); }
.pal-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }
[aria-selected="true"] .pal-ic { background: var(--surface); color: var(--brand); }
.pal-ic .av { width: 30px; height: 30px; font-size: .7rem; }
.pal-t { flex: 1; min-width: 0; }
.pal-t strong { display: block; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-t small { display: block; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-k { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pal-group { padding: .6rem .65rem .25rem; font-size: .7rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pal-empty { padding: 1.5rem; text-align: center; color: var(--muted); }
.pal-foot { display: flex; gap: 1rem; padding: .55rem 1rem; border-top: 1px solid var(--line); background: var(--surface-2); font-size: .76rem; color: var(--muted); }
.pal-foot kbd { margin-right: .15rem; }
.pal-tip { margin-left: auto; }
@media (max-width: 640px) {
  dialog.palette { margin: 0 0 auto; width: 100%; max-width: 100%; max-height: 100vh; max-height: 100dvh; border-radius: 0 0 18px 18px; }
  dialog.palette::before { display: none; }
  .pal-in { padding-top: max(.7rem, env(safe-area-inset-top)); }
  .pal-in input { min-width: 0; font-size: 16px; }           /* 16px evita o zoom automático do iPhone */
  .pal-close { display: inline-block; }
  .pal-k { display: none; }                                  /* mais espaço para o nome no celular */
  .pal-foot, .pal-in kbd { display: none; }
}

/* cabeçalho de cartão */
.card-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; flex-wrap: wrap; }
.card-head h2 { margin: 0; flex: 1; display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.card-head h2 .ic { color: var(--brand); }
.card-head .count { min-width: 1.6rem; height: 1.6rem; padding: 0 .45rem; border-radius: 999px; display: grid; place-items: center; font-size: .8rem; font-weight: 750;
  background: var(--gold-soft); color: var(--gold); }
.more-link { display: inline-flex; align-items: center; gap: .1rem; font-size: .88rem; font-weight: 620; text-decoration: none; }
.more-link:hover { text-decoration: underline; }
.sep { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); margin: 0 .45rem; vertical-align: middle; }

/* início: duas colunas no computador */
.hero-sub { color: rgba(255,255,255,.86); margin: .35rem 0 0 !important; font-size: .98rem; }
.dash { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.dash-main > .card, .dash-main > .spot, .dash-side > .card { margin-bottom: 1rem; }
@media (min-width: 1100px) {
  .dash { grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
  .dash-side { position: sticky; top: 20px; }
}
/* próximo serviço */
.spot { display: grid; grid-template-columns: auto 1fr; gap: .9rem 1.1rem; align-items: center; padding: 1.1rem 1.2rem; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand-tint), var(--surface) 70%); border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); box-shadow: var(--shadow); }
.spot-when { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 68px; height: 72px; border-radius: 16px;
  background: var(--brand-grad); color: #fff; box-shadow: 0 10px 22px -12px rgba(36,31,122,.9); line-height: 1.05; }
.spot-when b { font-size: 1.75rem; font-weight: 800; }
.spot-when small { font-size: .72rem; text-transform: uppercase; font-weight: 700; letter-spacing: .06em; opacity: .9; }
.spot-body h2 { margin: .1rem 0 .3rem; font-size: 1.25rem; }
.spot-body h2 a { color: inherit; text-decoration: none; }
.spot-body h2 a:hover { color: var(--brand); text-decoration: underline; }
.spot-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; color: var(--muted); margin: 0 0 .5rem; }
.spot-act { grid-column: 1 / -1; display: flex; gap: .5rem; flex-wrap: wrap; }
.spot-act .btn { flex: 1 1 160px; }
.spot-ok { display: inline-flex; align-items: center; gap: .4rem; color: var(--ok); font-weight: 650; flex: 1 1 160px; }
@media (min-width: 720px) { .spot { grid-template-columns: auto 1fr auto; } .spot-act { grid-column: auto; flex-direction: column; } .spot-act .btn { flex: 0 0 auto; } }
/* caixa de pendências */
.inbox { list-style: none; margin: 0; padding: 0; }
.inbox > li { display: flex; gap: .75rem; align-items: flex-start; flex-wrap: wrap; padding: .8rem 0; border-top: 1px solid var(--line); }
.inbox > li:first-child { border-top: 0; padding-top: .2rem; }
.inbox .grow { flex: 1 1 220px; min-width: 0; }
.inbox .actions { margin-left: auto; }
.inbox-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.tone-bad .inbox-ic { background: var(--bad-soft); color: var(--bad); }
.tone-warn .inbox-ic { background: var(--warn-soft); color: var(--warn); }
.tone-info .inbox-ic { background: var(--info-soft); color: var(--info); }
.quote { font-style: italic; }
.allgood { display: flex; gap: .8rem; align-items: center; padding: .4rem 0; }
.allgood > .ic { width: 42px; height: 42px; padding: 10px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); flex: none; }
/* linha do tempo */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { display: flex; gap: .85rem; align-items: center; padding: .7rem 0; border-top: 1px solid var(--line); }
.timeline > li:first-child { border-top: 0; padding-top: .15rem; }
.timeline .when { box-shadow: inset 3px 0 0 var(--k, var(--brand)); }
.timeline .grow { flex: 1; min-width: 0; }
.timeline strong a { color: inherit; text-decoration: none; }
.timeline strong a:hover { color: var(--brand); text-decoration: underline; }
.tl-cov { margin-top: .4rem; max-width: 360px; }
/* lateral */
.dash-side .dress-card h2 { font-size: 1.05rem; }
.dash-side .figs { gap: .25rem; padding: .6rem .25rem .4rem; }
.dash-side .figs figcaption { display: none; }
.dress-next { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.kpi { display: flex; flex-direction: column; gap: .1rem; padding: .7rem .75rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line);
  text-decoration: none; color: inherit; transition: border-color .15s, transform .15s var(--ease); }
.kpi:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.kpi .n { font-size: 1.45rem; font-weight: 780; letter-spacing: -.02em; line-height: 1.1; }
.kpi .l { font-size: .76rem; color: var(--muted); line-height: 1.3; }
.kpi.warn { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 30%, var(--line)); }
.kpi.warn .n { color: var(--gold); }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; padding: .6rem !important; }
.quick > a, .quick > button { all: unset; cursor: pointer; display: flex; align-items: center; gap: .5rem; padding: .6rem .65rem; border-radius: 10px;
  font-size: .86rem; font-weight: 620; color: var(--ink); }
.quick > a:hover, .quick > button:hover { background: var(--surface-2); }
.quick .ic { color: var(--brand); }
.quick > a:focus-visible, .quick > button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
/* primeiros passos */
.steps { counter-reset: s; list-style: none; padding: 0; margin: .75rem 0 0; display: grid; gap: .5rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2rem 1fr; column-gap: .6rem; align-items: baseline; }
.steps li::before { content: counter(s); grid-row: span 2; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-weight: 750; font-size: .85rem; }
.steps a { font-weight: 680; }
.steps span { color: var(--muted); font-size: .9rem; }

/* escala: etapas, meta e resumo de cobertura */
.ev-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; color: var(--muted); }
.ev-meta .dot { margin-right: .1rem; }
.stepper { list-style: none; display: flex; flex-wrap: wrap; row-gap: .4rem; padding: 0; margin: -.25rem 0 1rem; }
.stepper li { display: flex; align-items: center; gap: .45rem; font-size: .84rem; font-weight: 620; color: var(--muted); }
.stepper li + li::before { content: ""; width: 34px; height: 2px; background: var(--line-strong); margin: 0 .55rem; border-radius: 2px; }
.stepper li span { width: 1.45rem; height: 1.45rem; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 750;
  background: var(--idle-soft); color: var(--muted); }
.stepper li.done span { background: var(--ok); color: #fff; }
.stepper li.done + li::before { background: var(--ok); }
.stepper li.now { color: var(--ink); }
.stepper li.now span { background: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 4px var(--brand-soft); }
.cov-sum { display: flex; gap: 1rem; align-items: center; padding: .75rem .9rem; margin-bottom: 1rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.cov-sum .grow { flex: 1; min-width: 0; }
.cov-big { display: flex; flex-direction: column; align-items: center; line-height: 1.1; min-width: 72px; }
.cov-big strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.btn-group { display: inline-flex; }
.btn-group > .btn { border-radius: 0; margin-left: -1px; }
.btn-group > .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.btn-group > .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.legend { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; flex: 2 1 220px !important; padding-bottom: .55rem; }
.cal-list-title { margin-top: 1.25rem; }

/* repertório */
.insights { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 1.1rem; }
.insight { display: flex; flex-direction: column; gap: .1rem; padding: .8rem .95rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font: inherit; text-align: left; color: inherit; }
button.insight { cursor: pointer; }
button.insight:hover { border-color: var(--line-strong); }
.insight .n { font-size: 1.5rem; font-weight: 780; letter-spacing: -.02em; line-height: 1.1; }
.insight .l { font-size: .8rem; color: var(--muted); font-weight: 560; }
.insight.warn .n { color: var(--gold); }
.insight.wide { grid-column: span 2; }
@media (max-width: 640px) { .insight.wide { grid-column: 1 / -1; } }
.toplist { margin: .35rem 0 0; padding-left: 1.1rem; font-size: .86rem; display: grid; gap: .1rem; }
.toplist li span { display: inline-block; max-width: calc(100% - 3rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.toplist b { float: right; color: var(--muted); font-weight: 650; }
.key { display: inline-grid; place-items: center; min-width: 2rem; padding: .05rem .4rem; border-radius: 7px; background: var(--brand-soft); color: var(--brand); font-weight: 750; font-size: .85rem; }
.uses { font-weight: 680; font-variant-numeric: tabular-nums; }
.uses.hot { color: var(--gold); }
.uses.cold { color: var(--muted); font-weight: 500; font-style: italic; }
.links { display: flex; gap: .6rem; align-items: center; }

/* tabelas: ações com menu de três pontos não quebram a linha */
td .actions { flex-wrap: nowrap; }
@media (max-width: 720px) { .rtable td .actions > .kebab { flex: 0 0 auto; } td .actions { flex-wrap: wrap; } }

@media print { .seg, .tabs-line, .stepper, .crumb, .kebab { display: none !important; } .only-setlist #pane-repertorio { display: block !important; } }

/* ajustes finos 1.3.0 */
@media (min-width: 900px) {
  /* fundo da barra lateral acompanha páginas longas */
  .shell { background: linear-gradient(90deg, var(--surface) calc(var(--side-w) - 1px), var(--line) calc(var(--side-w) - 1px), var(--line) var(--side-w), transparent var(--side-w)); }
  .side { border-right: 0; background: none; }
}
.dash-side .dress-card > .row { flex-direction: column; align-items: stretch; }
.dress-next { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .6rem; }
.dash-side .dress-next { padding-top: .5rem; border-top: 1px dashed var(--line); margin-top: .35rem; }
.cell-stack { text-align: left; }
@media (max-width: 640px) {
  .stepper li { font-size: .76rem; gap: .3rem; }
  .stepper li + li::before { width: 14px; margin: 0 .35rem; }
  .stepper li span { width: 1.25rem; height: 1.25rem; font-size: .66rem; }
  .tabs-line [role=tab] { padding: .65rem .6rem; font-size: .9rem; gap: .35rem; }
  .tabs-line [role=tab] .ic { display: none; }
  .cov-sum { gap: .6rem; padding: .6rem .7rem; }
  .cov-big { min-width: 56px; }
  .cov-big strong { font-size: 1.3rem; }
}

/* ── 1.4.0: líder técnico, solistas, notificações e página pública ─────────── */
.chip.gold { background: var(--gold-soft); color: var(--gold); }
.access-btn { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3rem; font: inherit; text-align: left; cursor: pointer;
  background: none; border: 1px dashed var(--line-strong); border-radius: 10px; padding: .3rem .45rem; color: var(--muted); }
.access-btn:hover { border-color: var(--brand); border-style: solid; background: var(--brand-tint); }
.rtable td .access-btn { justify-content: flex-end; }

/* solistas no setlist */
.solo { display: flex; align-items: center; gap: .35rem; margin-top: .35rem; font-size: .88rem; color: var(--muted); }
.solo strong { color: var(--ink); }
.solo.me, .solo.me strong { color: var(--gold); }
.solo-pick { margin-top: .45rem; }
.solo-pick > summary { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; list-style: none; font-size: .88rem;
  padding: .3rem .65rem; border: 1px dashed var(--line-strong); border-radius: 999px; background: var(--surface); }
.solo-pick > summary::-webkit-details-marker { display: none; }
.solo-pick[open] > summary { border-style: solid; border-color: var(--brand); }
.solo-opts { display: flex; flex-wrap: wrap; gap: .1rem 1rem; margin-top: .45rem; }
.solo-opts .check { margin: 0; }
@media print { .solo-pick > summary { border: 0; padding: 0; } .solo-pick .solo-opts, .solo-pick .hint { display: none; } }

/* notificações */
.pills { display: flex; flex-wrap: wrap; gap: .45rem; border: 0; padding: 0; margin: .25rem 0 .5rem; }
.pills label { position: relative; cursor: pointer; }
.pills input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pills span { display: inline-flex; align-items: center; min-height: 40px; padding: .4rem .95rem; border-radius: 999px; font-weight: 620; font-size: .92rem;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); transition: background .15s, border-color .15s, color .15s; }
.pills input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pills label.off input:checked + span { background: var(--idle-soft); border-color: var(--line-strong); color: var(--muted); }
.pills input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.notif-on, .notif-off { display: flex; align-items: center; gap: .85rem; flex-wrap: wrap; }
.notif-on > .ic { color: var(--ok); background: var(--ok-soft); border-radius: 12px; padding: 9px; width: 42px; height: 42px; }
.nudge { display: flex; align-items: center; gap: .85rem; flex-wrap: wrap; padding: .9rem 1rem; margin-bottom: 1rem; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--gold-soft), var(--surface) 85%); border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); }
.nudge-ic { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); color: var(--gold); flex: none; }

/* ── página pública: o repertório em primeiro lugar ───────────────────────── */
.pub { min-height: 100vh; min-height: 100dvh; }
.pub-wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.pub-hero { position: relative; overflow: hidden; isolation: isolate; color: #fff; background: var(--brand-grad);
  padding: max(14px, env(safe-area-inset-top)) 0 4.25rem; border-radius: 0 0 28px 28px; box-shadow: 0 20px 50px -28px rgba(36,31,122,.95); }
.pub-hero::before, .pub-hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.pub-hero::before { width: 420px; height: 420px; right: -140px; top: -200px; background: radial-gradient(circle, rgba(255,255,255,.2), transparent 70%); }
.pub-hero::after { width: 320px; height: 320px; left: -80px; bottom: -220px; background: radial-gradient(circle, rgba(229,182,90,.42), transparent 70%); }
.pub-top { display: flex; align-items: center; gap: .7rem; padding: .35rem 0 1.4rem; }
.pub-top .brand-mark { background: rgba(255,255,255,.16); box-shadow: none; }
.pub-top strong { display: block; font-size: 1rem; line-height: 1.2; }
.pub-top small { color: rgba(255,255,255,.75); font-size: .8rem; }
.pub-login { color: rgba(255,255,255,.88); font-size: .84rem; font-weight: 600; text-decoration: none; padding: .35rem .7rem; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; white-space: nowrap; }
.pub-login:hover { background: rgba(255,255,255,.12); }
.pub-hero .eyebrow { color: #F6D58E; letter-spacing: .1em; }
.pub-hero h1 { color: #fff; font-size: clamp(1.75rem, 6vw, 2.6rem); line-height: 1.08; letter-spacing: -.03em; margin: .3rem 0 .5rem; }
.pub-hero-body.compact h1 { margin-bottom: 0; }
.pub-meta, .pub-count { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin: .2rem 0; color: rgba(255,255,255,.88); font-weight: 520; }
.pub-meta .sep { background: rgba(255,255,255,.55); }
.pub-cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.pub-cta .btn.primary { background: #fff; color: #241F7A; border: 0; box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); }
.pub-cta .btn.primary:hover { background: #F1F2FF; }
.btn.lg { min-height: 50px; padding: .65rem 1.25rem; font-size: 1.02rem; border-radius: 14px; }
.btn.ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); min-height: 50px; border-radius: 14px; }
.btn.ghost:hover { background: rgba(255,255,255,.2); }
.pub-tabs { position: relative; z-index: 2; margin: -2.6rem 0 1rem; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); }
.pub-tabs a { display: inline-flex; align-items: center; gap: .35rem; text-decoration: none; }
.pub-main, body.is-bare .pub-main { padding: 0; max-width: none; }
.pub-foot { text-align: center; padding: 1.5rem 0 2.5rem; }
.pub-sec-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 1.25rem 0 .75rem; }
.pub-sec-head h2 { margin: 0; font-size: 1.3rem; }

/* seletor de cultos (rolagem lateral) */
.pub-pick { display: flex; gap: .5rem; overflow-x: auto; margin: 0 -16px; padding: .15rem 16px .6rem; scrollbar-width: none; scroll-snap-type: x proximity; }
.pub-pick::-webkit-scrollbar { display: none; }
.pub-pick a { flex: none; scroll-snap-align: start; display: flex; flex-direction: column; gap: .05rem; min-width: 104px; padding: .55rem .8rem; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--k, var(--brand)); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm); }
.pub-pick a b { font-size: .95rem; text-transform: capitalize; }
.pub-pick a small { color: var(--muted); font-size: .76rem; white-space: nowrap; }
.pub-pick a[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pub-pick a[aria-current="true"] small { color: inherit; opacity: .85; }

/* cartões das músicas */
.songs { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.song { display: grid; grid-template-columns: 132px 1fr; gap: .9rem; align-items: start; padding: .7rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.song-art { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--brand-grad); color: #fff; }
.song-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--ease); }
.song-art:hover img { transform: scale(1.05); }
.song-art.no-img { display: grid; place-items: center; }
.song-art.no-img .ic { opacity: .5; }
.song-n { position: absolute; left: 6px; top: 6px; min-width: 26px; height: 26px; padding: 0 .4rem; border-radius: 8px; display: grid; place-items: center;
  font-weight: 800; font-size: .9rem; background: rgba(10,12,30,.72); color: #fff; }
.song-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.35));
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.song-body { min-width: 0; }
.song-title { margin: .1rem 0 0; font-size: 1.12rem; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.song-artist { margin: .1rem 0 0; color: var(--muted); font-size: .92rem; }
.song-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.tag { display: inline-flex; align-items: center; gap: .25rem; font-size: .76rem; font-weight: 620; padding: .14rem .5rem; border-radius: 7px; background: var(--idle-soft); color: var(--muted); }
.tag.key { background: var(--brand-soft); color: var(--brand); }
.tag.key b { font-weight: 800; }
.song-solo { display: flex; align-items: center; gap: .35rem; margin: .45rem 0 0; font-size: .9rem; color: var(--gold); }
.song-solo strong { color: var(--ink); }
.song-links { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .6rem; }
.song-links .listen { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.song-links .listen:hover { background: var(--brand-hover); }
@media (max-width: 520px) {
  .song { grid-template-columns: 96px 1fr; gap: .7rem; padding: .6rem; border-radius: 16px; }
  .song-title { font-size: 1.02rem; }
  .song-links .btn { flex: 1 1 auto; justify-content: center; }
}
@media (min-width: 720px) { .song { grid-template-columns: 176px 1fr; } }

/* equipe/vestimenta recolhidas, repertórios anteriores e busca */
.pub-more { margin-top: 1.25rem; }
.pub-more > summary { display: flex; align-items: center; gap: .55rem; cursor: pointer; font-weight: 650; list-style: none; }
.pub-more > summary::-webkit-details-marker { display: none; }
.pub-more > summary .dress-chip { flex: none; white-space: nowrap; }
.pub-more > summary .dress-chip .swatches { flex-wrap: nowrap; }
@media (max-width: 420px) { .pub-more > summary .dress-chip { display: none; } }
.pub-cta .btn.primary { flex: 1 1 auto; justify-content: center; }
.pub-cta .btn.ghost { flex: 0 0 auto; }
.pub-more[open] > summary { margin-bottom: .6rem; }
.pub-more .dress-card { box-shadow: none; border: 0; padding: 0; margin: 0; }
.pub-roster { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.pub-roster li { display: grid; grid-template-columns: minmax(90px, 32%) 1fr; gap: .6rem; font-size: .93rem; }
.pub-search input { border-radius: 999px; padding-left: 1rem; }
.past { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: .5rem; }
.past > summary { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; cursor: pointer; list-style: none; }
.past > summary::-webkit-details-marker { display: none; }
.past-songs { margin: 0; padding: 0 .9rem .7rem 2.6rem; }
.past-songs li { display: flex; align-items: center; gap: .55rem; padding: .3rem 0; border-top: 1px solid var(--line); }
.past-songs li a { color: var(--brand); display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; }
.past-songs li a:hover { background: var(--brand-soft); }
.dlg-body .past-songs { padding-left: 1.2rem; }
.pub-ev { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }

/* ── Minhas escalas: próxima em destaque, calendário dos meus dias, lista por culto ── */
.mine-next { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.1rem; padding: 1.2rem 1.3rem; margin-bottom: 1rem;
  background: var(--brand-grad); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow); scroll-margin: 1rem; }
.mine-next .eyebrow { width: 100%; color: #FFD98A; }
.mine-next .when { background: rgba(255,255,255,.14); color: #fff; min-width: 66px; padding: .55rem .4rem; }
.mine-next .when b { font-size: 1.8rem; }
.mine-next .grow { flex: 1 1 170px; min-width: 0; }
.mine-next h2 { margin: 0; font-size: 1.3rem; color: #fff; }
.mine-next .sub { margin: .15rem 0 0; color: rgba(255,255,255,.88); display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.mine-next .sub.strong { color: #FFD98A; font-weight: 650; margin-top: .45rem; }
.mine-next .solo { color: rgba(255,255,255,.88); }
.mine-next .role-chip { background: rgba(255,255,255,.16); color: #fff; }
.mine-next .role-chip.pending, .mine-next .role-chip.expired { background: #FFD98A; color: #3A2A00; }
.mine-next .actions { margin-left: auto; }
.mine-next .btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.35); }
.mine-next .btn:hover { background: rgba(255,255,255,.2); }
.mine-next .btn.ok { background: #fff; color: #1F1A66; border-color: #fff; }
.mine-next .btn.danger { background: transparent; color: #FFD0CB; border-color: rgba(255,208,203,.5); }

.mine-alert { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .6rem; margin-bottom: 1rem; color: var(--ink); }
.mine-alert .ic { color: var(--warn); }
.role-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.role-chip { font-size: .8rem; font-weight: 650; padding: .14rem .6rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.role-chip.pending, .role-chip.expired { background: var(--warn-soft); color: var(--warn); }
.role-chip.declined { background: var(--bad-soft); color: var(--bad); text-decoration: line-through; }

.mcal-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem 1.75rem; }
.mcal h3 { font-size: .92rem; margin: 0 0 .45rem; }
.mcal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
.mcal-grid .dw { font-size: .68rem; font-weight: 700; color: var(--muted); padding-bottom: .15rem; }
.mcal-grid .d { aspect-ratio: 1; width: 100%; max-width: 34px; margin: 0 auto; display: flex; align-items: center; justify-content: center; border-radius: 50%; font: inherit; font-size: .82rem;
  color: var(--muted); border: 0; background: none; padding: 0; min-width: 0; }
.mcal-grid .d.past { opacity: .4; }
.mcal-grid .d.today { box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--ink); font-weight: 700; }
.mcal-grid button.d { font-weight: 780; cursor: pointer; transition: transform .12s var(--ease); }
.mcal-grid button.d:hover { transform: scale(1.12); }
.mcal-grid button.d:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mcal-grid .d.confirmed { background: var(--brand); color: var(--brand-ink); }
.mcal-grid .d.pending { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 2px var(--warn); }
.mcal-grid .d.declined { color: var(--bad); text-decoration: line-through; }
.mcal-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-top: .9rem; font-size: .8rem; color: var(--muted); }
.mcal-legend i { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; margin-right: .35rem; vertical-align: -1px; }
.mcal-legend i.confirmed { background: var(--brand); }
.mcal-legend i.pending { background: var(--warn-soft); box-shadow: inset 0 0 0 2px var(--warn); }
.mcal-legend i.declined { background: var(--bad-soft); box-shadow: inset 0 0 0 2px var(--bad); }
.mcal-legend i.today { box-shadow: inset 0 0 0 1.5px var(--line-strong); }

.card > .month-title:first-of-type { margin-top: .2rem; }
.mine-list + .month-title { margin-top: 1.3rem; }
.mine-row { scroll-margin: 1rem; border-radius: 10px; }
.mine-title { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.mine-row .rel { font-size: .82rem; font-weight: 650; color: var(--brand); }
.mine-row.is-pending .when { background: var(--warn-soft); color: var(--warn); }
.mine-row.is-declined .when { background: var(--idle-soft); color: var(--muted); }
.mine-row.is-declined .mine-title strong { color: var(--muted); }
.mine-row.flash, .mine-next.flash { animation: mine-flash 1.6s var(--ease); }
@keyframes mine-flash { 0%, 35% { box-shadow: 0 0 0 3px var(--brand); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 640px) {
  .mine-next .actions, .mine-row .actions { width: 100%; margin-left: 0; }
  .mine-next .actions .btn, .mine-row .actions .btn { flex: 1 1 0; justify-content: center; white-space: nowrap; padding-inline: .5rem; }
  .mcal-hint { width: 100%; }
  /* meses lado a lado, deslizando (o próximo aparece cortado na borda, convidando a arrastar) */
  .mcal-wrap { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; gap: 1.25rem; overflow-x: auto;
    scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding-bottom: .4rem; scrollbar-width: thin; }
  .mcal { scroll-snap-align: start; }
}
