/* Os Profissa de Terça — tema visual (sobre Bootstrap 5.3) */

:root,
[data-bs-theme="light"] {
  --brand: #174a8b;        /* azul da camisa */
  --brand-strong: #0f2d57;  /* azul-marinho */
  --brand-soft: #e1eefc;
  --brand-ink: #0f2d57;
  --accent: #00adec;        /* azul-celeste do escudo */

  --surface-0: #f3f5f9;
  --surface-1: #ffffff;
  --surface-2: #f6f8fb;
  --line: #e2e7ef;
  --ink: #0f1a2b;
  --ink-2: #475569;
  --ink-3: #7a8699;

  --ok: #047857;   --ok-soft: #dcfce7;
  --warn: #b45309; --warn-soft: #fef3c7;
  --bad: #c2410c;  --bad-soft: #ffedd5;
  --neg: #b91c1c;

  --series-1: #2a78d6; /* receitas */
  --series-2: #eb6834; /* despesas */

  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 20, .04), 0 4px 16px rgba(16, 24, 20, .04);

  --bs-body-bg: var(--surface-0);
  --bs-body-color: var(--ink);
  --bs-secondary-color: var(--ink-2);
  --bs-border-color: var(--line);
  --bs-primary: var(--brand);
  --bs-primary-rgb: 23, 74, 139;
  --bs-link-color: var(--brand);
  --bs-link-color-rgb: 23, 74, 139;
  --bs-link-hover-color: var(--brand-strong);
  --bs-body-font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-border-radius: 12px;
  --bs-border-radius-lg: 16px;
  --bs-tertiary-bg: var(--surface-2);
  color-scheme: light;
}

[data-bs-theme="dark"] {
  --brand: #5cc3f2;
  --brand-strong: #93d9f8;
  --brand-soft: rgba(0, 173, 236, .15);
  --brand-ink: #bfe8fb;
  --accent: #00adec;

  --surface-0: #0a1120;
  --surface-1: #111a2c;
  --surface-2: #172238;
  --line: #243149;
  --ink: #eef2f8;
  --ink-2: #aab6c8;
  --ink-3: #7b889d;

  --ok: #34d399;   --ok-soft: rgba(52, 211, 153, .14);
  --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .14);
  --bad: #fb923c;  --bad-soft: rgba(251, 146, 60, .15);
  --neg: #f87171;

  --series-1: #3987e5;
  --series-2: #d95926;

  --shadow: 0 1px 2px rgba(0, 0, 0, .3);

  --bs-body-bg: var(--surface-0);
  --bs-body-color: var(--ink);
  --bs-secondary-color: var(--ink-2);
  --bs-border-color: var(--line);
  --bs-primary-rgb: 92, 195, 242;
  --bs-link-color: var(--brand);
  --bs-link-color-rgb: 92, 195, 242;
  --bs-link-hover-color: var(--brand-strong);
  --bs-tertiary-bg: var(--surface-2);
  color-scheme: dark;
}

html, body { background: var(--surface-0); }
body {
  font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
.min-w-0 { min-width: 0; }
.num, .kpi-value, td.money, .money { font-variant-numeric: tabular-nums; }
a { text-decoration: none; }

/* ---------- botões ---------- */
.btn { font-weight: 600; border-radius: 12px; }
.btn-primary {
  --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-strong); --bs-btn-hover-border-color: var(--brand-strong);
  --bs-btn-active-bg: var(--brand-strong); --bs-btn-active-border-color: var(--brand-strong);
  --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
}
[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #06213d; --bs-btn-hover-color: #06213d; --bs-btn-active-color: #06213d; }
.btn-light {
  --bs-btn-bg: var(--surface-2); --bs-btn-border-color: var(--line); --bs-btn-color: var(--ink);
  --bs-btn-hover-bg: var(--line); --bs-btn-hover-border-color: var(--line); --bs-btn-hover-color: var(--ink);
  --bs-btn-active-bg: var(--line); --bs-btn-active-color: var(--ink);
}
.btn-soft {
  background: var(--brand-soft); color: var(--brand-ink); border: 1px solid transparent;
}
.btn-soft:hover, .btn-soft:focus-visible { background: var(--brand); color: #fff; }
[data-bs-theme="dark"] .btn-soft:hover { color: #06213d; }
.btn-icon {
  width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center;
  border-radius: 12px; color: var(--ink-2); background: transparent; border: 1px solid transparent;
}
.btn-icon:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.btn-icon.btn-sm { width: 32px; height: 32px; }
.btn-wa { color: #16a34a; }
.btn-wa:hover { color: #15803d; background: rgba(22, 163, 74, .1); }

/* ---------- formulário ---------- */
.form-control, .form-select {
  border-radius: 12px; border-color: var(--line); background-color: var(--surface-1);
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand) 22%, transparent);
}
.form-label { font-weight: 600; font-size: .85rem; color: var(--ink-2); margin-bottom: .3rem; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.input-money { font-size: 1.35rem; font-weight: 700; }

.chip-group { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  display: inline-flex; align-items: center; gap: .3rem; padding: .38rem .8rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-1); color: var(--ink-2);
  font-weight: 600; font-size: .85rem; cursor: pointer; user-select: none; white-space: nowrap;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-check:checked + .chip, .chip.active {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
[data-bs-theme="dark"] .btn-check:checked + .chip, [data-bs-theme="dark"] .chip.active { color: #06213d; }
.btn-check:focus-visible + .chip { outline: 2px solid var(--brand); outline-offset: 2px; }
.chip .count { background: rgba(0,0,0,.08); border-radius: 999px; padding: 0 .45rem; font-size: .75rem; }
.chip.active .count { background: rgba(255,255,255,.25); }

/* ---------- estrutura ---------- */
.sidebar {
  --bs-offcanvas-width: 272px;
  background: var(--surface-1);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
}
@media (min-width: 992px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 256px; z-index: 1030; }
  .app-shell { margin-left: 256px; }
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.25rem .75rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); }
.brand span { display: flex; flex-direction: column; line-height: 1.05; }
.brand strong { font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; }
.brand small { color: var(--accent); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.brand-sm strong { font-size: 1rem; }
.brand-sm strong span { display: inline; color: var(--accent); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .5rem .75rem; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: .75rem; padding: .6rem .8rem; border-radius: 12px;
  color: var(--ink-2); font-weight: 600; font-size: .93rem;
}
.sidebar-nav a i { font-size: 1.1rem; width: 1.2rem; text-align: center; }
.sidebar-nav a:hover { background: var(--surface-2); color: var(--ink); }
.sidebar-nav a.active { background: var(--brand-soft); color: var(--brand-ink); }
.sidebar-foot { border-top: 1px solid var(--line); padding: .9rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.sidebar-foot .me { display: flex; align-items: center; gap: .6rem; min-width: 0; font-size: .88rem; }

.topbar {
  position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; justify-content: space-between;
  padding: .6rem 1rem; background: color-mix(in srgb, var(--surface-0) 85%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.app-main { padding: 1.5rem 1rem 6.5rem; max-width: 1320px; margin: 0 auto; }
@media (min-width: 768px) { .app-main { padding: 2rem 1.75rem 3rem; } }
@media (min-width: 992px) { .app-main { padding: 2rem 2.25rem 3rem; } }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1025; display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface-1) 92%, transparent); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
}
.bottom-nav:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); }
.bottom-nav a, .bottom-nav button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .35rem 0; border: 0; background: none;
  color: var(--ink-3); font-size: .7rem; font-weight: 600; border-radius: 12px;
}
.bottom-nav i { font-size: 1.25rem; }
.bottom-nav .active { color: var(--brand); }

/* ---------- cabeçalho de página ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.page-head p { margin: .25rem 0 0; color: var(--ink-2); }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
@media (max-width: 575.98px) {
  .page-head h1 { font-size: 1.35rem; }
  .page-actions { width: 100%; }
  .page-actions > .btn { flex: 1; }
}

.comp-nav { display: inline-flex; align-items: center; gap: .15rem; background: var(--surface-1); border: 1px solid var(--line); border-radius: 14px; padding: 3px; }
.comp-label { position: relative; min-width: 150px; text-align: center; font-weight: 700; cursor: pointer; padding: 0 .5rem; }
.comp-label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }

/* ---------- cards ---------- */
.card-x {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.25rem;
}
.card-x + .card-x { margin-top: 0; }
.card-title-x { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; }
.card-title-x h2, .card-title-x h3 { font-size: 1rem; font-weight: 700; margin: 0; }
.card-title-x .link { font-size: .85rem; font-weight: 600; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush .card-title-x { padding: 1.1rem 1.25rem 0; }

.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
@media (min-width: 992px) { .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; } }
.kpi {
  display: flex; gap: .85rem; align-items: flex-start; background: var(--surface-1); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow);
}
.kpi-icon { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); font-size: 1.15rem; }
.kpi-label { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.kpi-value { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; white-space: nowrap; }
.kpi-sub { font-size: .78rem; color: var(--ink-3); margin-top: 2px; }
.kpi.ok .kpi-icon { background: var(--ok-soft); color: var(--ok); }
.kpi.bad .kpi-icon { background: var(--bad-soft); color: var(--bad); }
.kpi.warn .kpi-icon { background: var(--warn-soft); color: var(--warn); }
.kpi.brand .kpi-icon { background: var(--brand-soft); color: var(--brand); }
@media (max-width: 575.98px) {
  .kpi { flex-direction: column; gap: .5rem; padding: .85rem; }
  .kpi-icon { width: 34px; height: 34px; font-size: 1rem; }
  .kpi-value { font-size: 1.12rem; }
}

.hero-saldo {
  position: relative; overflow: hidden; border-radius: 20px; padding: 1.5rem; color: #eef6ff;
  background: radial-gradient(120% 140% at 100% 0%, #1f7fc4 0%, #174a8b 42%, #0f2d57 100%);
  box-shadow: 0 12px 32px -12px rgba(15, 45, 87, .55);
}
[data-bs-theme="dark"] .hero-saldo { background: radial-gradient(120% 140% at 100% 0%, #16609a 0%, #133a6e 45%, #0a1a33 100%); }
/* faixas da camisa */
.hero-saldo::before {
  content: ""; position: absolute; top: 0; bottom: 0; right: 22%; width: 18px;
  background: linear-gradient(90deg, #00adec 0 6px, #fff 6px 12px, #00adec 12px 18px); opacity: .18;
}
.hero-saldo::after {
  content: ""; position: absolute; right: -40px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%;
  border: 28px solid rgba(255, 255, 255, .06);
}
.hero-saldo .lbl { font-size: .85rem; font-weight: 600; opacity: .85; }
.hero-saldo .val { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: .25rem 0 .75rem; }
.hero-saldo .val.neg { color: #fecaca; }
.hero-saldo .row-mini { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .88rem; position: relative; z-index: 1; }
.hero-saldo .row-mini b { font-weight: 700; }
.hero-saldo a { color: #fff; }
@media (max-width: 575.98px) { .hero-saldo .val { font-size: 2rem; } }

.val-pos { color: var(--ok); font-weight: 700; }
.val-neg { color: var(--neg); font-weight: 700; }

/* ---------- avatar / status ---------- */
.avatar {
  --h: 150; width: 38px; height: 38px; flex: none; border-radius: 50%; display: inline-grid; place-items: center;
  font-weight: 700; font-size: .82rem; letter-spacing: .02em;
  background: hsl(var(--h) 65% 90%); color: hsl(var(--h) 55% 28%);
}
[data-bs-theme="dark"] .avatar { background: hsl(var(--h) 35% 22%); color: hsl(var(--h) 70% 82%); }
.avatar-sm { width: 32px; height: 32px; font-size: .72rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }

.status { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 700; padding: .22rem .6rem; border-radius: 999px; white-space: nowrap; }
.status-ok { background: var(--ok-soft); color: var(--ok); }
.status-warn { background: var(--warn-soft); color: var(--warn); }
.status-bad { background: var(--bad-soft); color: var(--bad); }
.status-muted { background: var(--surface-2); color: var(--ink-3); }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.tag-auto { background: transparent; border-style: dashed; }

/* ---------- listas de itens ---------- */
.list-x { list-style: none; margin: 0; padding: 0; }
.list-x > li, .list-row {
  display: flex; align-items: center; gap: .85rem; padding: .8rem 1.25rem; border-top: 1px solid var(--line);
}
.list-x > li:first-child { border-top: 0; }
.list-row .info { flex: 1; min-width: 0; }
.list-row .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .meta { font-size: .8rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: .15rem .6rem; }
.list-row .amount { font-weight: 800; white-space: nowrap; text-align: right; }
.list-row .acts { display: flex; gap: .25rem; align-items: center; flex: none; }
.list-row.is-pendente { background: linear-gradient(90deg, var(--bad-soft), transparent 40%); }
.list-row.is-parcial { background: linear-gradient(90deg, var(--warn-soft), transparent 40%); }
.list-row[hidden] { display: none !important; }
@media (max-width: 575.98px) {
  .list-x > li, .list-row { padding: .75rem 1rem; gap: .65rem; flex-wrap: wrap; }
  .list-row .acts { width: 100%; justify-content: flex-end; padding-left: calc(38px + .65rem); }
  .list-row .acts .btn-main { flex: 1; }
}

/* ---------- tabelas ---------- */
.table-x { width: 100%; margin: 0; --bs-table-bg: transparent; }
.table-x th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; border-bottom: 1px solid var(--line); padding: .75rem 1rem; white-space: nowrap; background: var(--surface-2); }
.table-x td { padding: .7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table-x tbody tr:last-child td { border-bottom: 0; }
.table-x tbody tr:hover td { background: var(--surface-2); }
.table-x tfoot td { font-weight: 800; background: var(--surface-2); border-top: 1px solid var(--line); padding: .75rem 1rem; }
.table-x .text-end { text-align: right; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* grade anual de mensalidades */
.grid-anual th, .grid-anual td { padding: .45rem .35rem; text-align: center; font-size: .8rem; }
.grid-anual th:first-child, .grid-anual td:first-child { text-align: left; position: sticky; left: 0; z-index: 1; background: var(--surface-1); padding-left: 1rem; min-width: 150px; }
.grid-anual th:first-child { background: var(--surface-2); }
.cell {
  display: block; min-width: 46px; padding: .3rem .2rem; border-radius: 8px; font-weight: 700; font-size: .76rem;
  border: 1px solid transparent; cursor: pointer; background: none; width: 100%; color: inherit;
}
.cell-pago { background: var(--ok-soft); color: var(--ok); }
.cell-parcial { background: var(--warn-soft); color: var(--warn); }
.cell-pendente { background: var(--bad-soft); color: var(--bad); }
.cell-isento { background: var(--surface-2); color: var(--ink-3); }
.cell-vazio { color: var(--ink-3); opacity: .5; cursor: default; }
.cell-futuro.cell-pendente { background: transparent; border: 1px dashed var(--line); color: var(--ink-3); }
.cell:hover:not(.cell-vazio) { border-color: currentColor; }

/* progresso */
.progress-x { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; display: flex; gap: 2px; }
.progress-x > span { display: block; height: 100%; border-radius: 999px; }
.progress-x .p-ok { background: var(--ok); }
.progress-x .p-warn { background: var(--warn); }
.legend-x { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: .8rem; color: var(--ink-2); margin-top: .6rem; }
.legend-x i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }

/* toolbar de filtros */
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.search-box { position: relative; flex: 1 1 220px; max-width: 360px; }
.search-box i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search-box input { padding-left: 2.3rem; }
@media (max-width: 575.98px) { .search-box { max-width: none; flex-basis: 100%; } }

.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.segmented a, .segmented button { padding: .35rem .85rem; border-radius: 9px; font-weight: 600; font-size: .85rem; color: var(--ink-2); border: 0; background: none; }
.segmented .active { background: var(--surface-1); color: var(--ink); box-shadow: var(--shadow); }

/* estado vazio */
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--ink-3); }
.empty i { font-size: 2rem; display: block; margin-bottom: .5rem; }
.empty p { margin: 0; }

/* próximo assador */
.assador {
  display: flex; align-items: center; gap: 1rem; padding: 1.25rem; border-radius: var(--radius);
  background: linear-gradient(135deg, #fff7ed, #ffedd5); border: 1px solid #fed7aa; color: #7c2d12;
}
[data-bs-theme="dark"] .assador { background: linear-gradient(135deg, #2a1a0e, #1f150c); border-color: #4a2e17; color: #fed7aa; }
.assador .fire { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: #f97316; color: #fff; font-size: 1.6rem; flex: none; }
.assador .lbl { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.assador .nome { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.assador-lg .nome { font-size: 2rem; }

.fila { counter-reset: fila; }
.fila li { cursor: default; }
.fila .handle { cursor: grab; color: var(--ink-3); }
.fila .pos { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); font-weight: 800; font-size: .8rem; flex: none; }
.fila li.is-next .pos { background: #f97316; color: #fff; }
.sortable-ghost { opacity: .4; }

/* aniversário */
.bday-date { width: 52px; flex: none; text-align: center; border-radius: 12px; background: var(--surface-2); padding: .3rem 0; line-height: 1.1; }
.bday-date b { display: block; font-size: 1.15rem; font-weight: 800; }
.bday-date small { font-size: .7rem; text-transform: uppercase; font-weight: 700; color: var(--ink-3); }
.bday-date.today { background: var(--accent); color: #06213d; }
.bday-date.today small { color: #06213d; }

/* gráficos */
.chart-box { min-height: 260px; }
.chart-legend { display: flex; gap: 1rem; font-size: .82rem; color: var(--ink-2); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.apexcharts-tooltip { border-radius: 10px !important; border: 1px solid var(--line) !important; box-shadow: var(--shadow) !important; background: var(--surface-1) !important; color: var(--ink) !important; }
.apexcharts-tooltip-title { background: var(--surface-2) !important; border-bottom: 1px solid var(--line) !important; font-weight: 700 !important; }
.apexcharts-xaxistooltip { display: none; }

/* modais */
.modal-content { border: 1px solid var(--line); border-radius: 20px; background: var(--surface-1); }
.modal-header { border-bottom: 0; padding: 1.25rem 1.5rem .5rem; }
.modal-title { font-weight: 800; font-size: 1.1rem; }
.modal-body { padding: .75rem 1.5rem; }
.modal-footer { border-top: 0; padding: .75rem 1.5rem 1.25rem; }
@media (max-width: 575.98px) {
  .modal-dialog:not(.modal-sm) { margin: 0; min-height: 100%; display: flex; align-items: flex-end; }
  .modal-dialog:not(.modal-sm) .modal-content { border-radius: 22px 22px 0 0; max-height: 92vh; overflow-y: auto; }
  .modal.fade .modal-dialog:not(.modal-sm) { transform: translateY(40px); }
  .modal.show .modal-dialog:not(.modal-sm) { transform: none; }
  .modal-footer > .btn { flex: 1; }
}
.modal-sub { font-size: .9rem; color: var(--ink-2); margin-top: -.25rem; }
.font-monospace-soft { font-size: .9rem; line-height: 1.5; }

/* toasts */
.toast-container { top: 0; right: 0; z-index: 2000; }
@media (max-width: 575.98px) { .toast-container { left: 0; right: 0; top: auto; bottom: 70px; } }
.toast-x {
  display: flex; align-items: center; gap: .75rem; background: var(--ink); color: var(--surface-1);
  border-radius: 14px; padding: .8rem 1rem; box-shadow: 0 10px 30px rgba(0,0,0,.25); min-width: 280px; font-weight: 600;
  animation: toast-in .25s ease-out;
}
.toast-x .bi { font-size: 1.2rem; }
.toast-x.success .bi { color: #34d399; }
.toast-x.error .bi { color: #f87171; }
[data-bs-theme="dark"] .toast-x.success .bi { color: #15803d; }
[data-bs-theme="dark"] .toast-x.error .bi { color: #b91c1c; }
.toast-x a { color: inherit; text-decoration: underline; margin-left: auto; white-space: nowrap; }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .toast-x { animation: none; } }

.is-loading { opacity: .55; pointer-events: none; transition: opacity .15s; }
.flash-row { animation: flash 1.2s ease-out; }
@keyframes flash { from { background-color: color-mix(in srgb, var(--brand) 18%, transparent); } to { background-color: transparent; } }

/* login */
.login-body { min-height: 100vh; background:
  linear-gradient(90deg, transparent calc(78% - 9px), rgba(0,173,236,.35) calc(78% - 9px) calc(78% - 3px), rgba(255,255,255,.35) calc(78% - 3px) calc(78% + 3px), rgba(0,173,236,.35) calc(78% + 3px) calc(78% + 9px), transparent calc(78% + 9px)),
  radial-gradient(100% 80% at 0% 0%, #1b4f8f 0%, #0f2d57 55%, #081a35 100%); }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr; align-items: center; justify-items: center; gap: 2rem; padding: 2rem 1rem; max-width: 1000px; margin: 0 auto; }
@media (min-width: 900px) { .login-wrap { grid-template-columns: 1.1fr 1fr; } }
.login-hero { color: #eef6ff; max-width: 420px; }
.login-hero h1 { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.02; margin: 1rem 0; }
.login-hero h1 span { color: #00adec; }
.login-hero p { opacity: .8; font-size: 1.05rem; }
@media (max-width: 899.98px) { .login-hero { text-align: center; } .login-hero h1 { font-size: 2rem; } .login-hero p { display: none; } }
.login-card { width: 100%; max-width: 400px; background: var(--surface-1); border-radius: 24px; padding: 2rem; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.login-card h2 { font-weight: 800; font-size: 1.4rem; margin-bottom: 1.25rem; }

/* impressão */
@media print {
  .sidebar, .bottom-nav, .topbar, .page-actions, .btn, .toolbar { display: none !important; }
  .app-shell { margin: 0 !important; }
}

.brand img { object-fit: contain; filter: drop-shadow(0 2px 4px rgba(15, 45, 87, .25)); }
.login-hero img { filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .35)); }

.churrasco-lista .list-row { flex-wrap: nowrap; border-top: 1px solid var(--line); }
.churrasco-lista .chip { padding: .3rem .65rem; font-size: .8rem; }
@media (max-width: 575.98px) { .churrasco-lista .avatar { display: none; } }

.btn-group.btn-main > a { flex: 1; }
.table-x .btn-group { white-space: nowrap; }

/* súmula da partida */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.stepper .btn { border: 0; border-radius: 0; width: 30px; padding: .25rem 0; font-weight: 800; color: var(--ink-2); }
.stepper .btn:hover { background: var(--line); }
.stepper input { width: 32px; border: 0; background: transparent; text-align: center; font-weight: 800; color: var(--ink); -moz-appearance: textfield; padding: 0; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-lbl { font-size: .75rem; font-weight: 800; color: var(--ink-3); padding-left: .45rem; }
.sumula-check { width: 1.4em; height: 1.4em; flex: none; }
.sumula-row { flex-wrap: nowrap !important; }
.sumula-row.ausente .nm, .sumula-row.ausente .avatar { opacity: .4; }
.sumula-row.ausente .nm { text-decoration: line-through; }
.sumula-row.ausente .stepper { opacity: .35; }
.sumula-save { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 5; padding: .5rem 0; }
@media (min-width: 992px) { .sumula-save { bottom: 1rem; max-width: 420px; margin-left: auto; } }
@media (max-width: 575.98px) {
  .sumula-row { padding: .6rem .75rem !important; gap: .5rem !important; }
  .sumula-row .avatar { display: none; }
  .stepper .btn { width: 26px; }
  .stepper input { width: 24px; }
  .stepper-lbl { padding-left: .3rem; }
}
.pos-medal { width: 28px; text-align: center; font-weight: 800; font-size: 1.05rem; flex: none; }
.flex-none { flex: none; }

.chip-sm { padding: .22rem .55rem; font-size: .75rem; }
.sumula-row.ausente .cobrar-avulso { opacity: .35; pointer-events: none; }
@media (max-width: 575.98px) { .cobrar-avulso .chip-sm .bi { display: none; } }

/* súmula: contadores grandes para tablet (toque ~44px) */
.sumula-acoes { display: flex; gap: .5rem; flex: none; align-items: center; }
.sumula-row .stepper { border-radius: 12px; }
.sumula-row .stepper .btn { width: 44px; height: 44px; font-size: 1.25rem; line-height: 1; touch-action: manipulation; user-select: none; }
.sumula-row .stepper .btn:active { background: var(--brand-soft); color: var(--brand); }
.sumula-row .stepper input { width: 34px; font-size: 1.15rem; }
.sumula-row .stepper-lbl { font-size: .8rem; min-width: 1.6rem; text-align: center; }
.sumula-row .stepper.tem-valor { border-color: var(--brand); background: var(--brand-soft); }
.sumula-row .stepper-gc .stepper-lbl { color: var(--neg); }
.sumula-row .stepper-gc.tem-valor { border-color: var(--neg); background: color-mix(in srgb, var(--neg) 10%, transparent); }
.sumula-check { width: 1.6em !important; height: 1.6em !important; }
/* até tablet em pé: nome numa linha e contadores embaixo, bem espaçados */
@media (max-width: 899.98px) {
  .sumula-row { flex-wrap: wrap !important; }
  .sumula-row > label { flex-basis: 60%; }
  .sumula-acoes { width: 100%; justify-content: space-between; padding-left: 2.1rem; }
  .sumula-acoes .stepper { flex: 1; justify-content: space-between; max-width: 220px; }
}
@media (max-width: 575.98px) {
  .sumula-acoes { padding-left: 0; gap: .3rem; }
  .sumula-acoes .stepper { min-width: 0; }
  .sumula-row .stepper .btn { width: 30px; height: 40px; font-size: 1.1rem; }
  .sumula-row .stepper input { width: 22px; font-size: 1rem; }
  .sumula-row .stepper-lbl { min-width: 0; padding-left: .3rem; font-size: .7rem; }
}

/* tela de carregamento */
.loading-overlay {
  position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface-0) 55%, transparent); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.loading-overlay.show { opacity: 1; pointer-events: all; }
.loading-card {
  display: flex; flex-direction: column; align-items: center; gap: .9rem; padding: 1.75rem 2.25rem;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 20px 50px rgba(15, 45, 87, .25);
  min-width: 220px; transform: translateY(8px) scale(.97); transition: transform .25s ease;
}
.loading-overlay.show .loading-card { transform: none; }
.loading-bola { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); position: relative; }
.loading-bola::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--accent); border-right-color: var(--brand); animation: gira 0.9s linear infinite; }
.loading-bola span { font-size: 2rem; animation: quica 0.9s ease-in-out infinite; }
.loading-check { display: none; width: 64px; height: 64px; border-radius: 50%; place-items: center; background: var(--ok); color: #fff; font-size: 2rem; animation: surge .3s ease-out; }
.loading-overlay.concluido .loading-bola { display: none; }
.loading-overlay.concluido .loading-check { display: grid; }
.loading-texto { font-weight: 800; font-size: 1.05rem; }
@keyframes gira { to { transform: rotate(360deg); } }
@keyframes quica { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(180deg); } }
@keyframes surge { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .loading-bola::after, .loading-bola span, .loading-check { animation: none; } }

/* ===== cartão da súmula (imagem para o WhatsApp) — sempre no tema do time, independente do modo claro/escuro ===== */
.sc-palco { position: fixed; left: -12000px; top: 0; pointer-events: none; }
.sc-card {
  width: 1080px; min-height: 1350px; box-sizing: border-box; padding: 70px 72px 56px; position: relative; overflow: hidden;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif; color: #fff;
  background: radial-gradient(900px 700px at 85% -10%, #1f7fc4 0%, rgba(31,127,196,0) 60%), linear-gradient(165deg, #174a8b 0%, #0f2d57 55%, #0a1f3d 100%);
}
.sc-quadra { position: absolute; inset: 36px; border: 4px solid rgba(255,255,255,.07); border-radius: 28px; }
.sc-meio { position: absolute; left: 0; right: 0; top: 50%; border-top: 4px solid rgba(255,255,255,.07); }
.sc-circulo { position: absolute; left: 50%; top: 50%; width: 300px; height: 300px; margin: -150px 0 0 -150px; border: 4px solid rgba(255,255,255,.07); border-radius: 50%; }
.sc-ponto { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; background: rgba(255,255,255,.1); border-radius: 50%; }
.sc-area { position: absolute; left: 50%; width: 420px; height: 210px; margin-left: -210px; border: 4px solid rgba(255,255,255,.07); }
.sc-area-top { top: -4px; border-radius: 0 0 210px 210px; }
.sc-area-bot { bottom: -4px; border-radius: 210px 210px 0 0; }
.sc-faixas { position: absolute; top: 0; bottom: 0; right: 6px; display: flex; gap: 5px; opacity: .55; }
.sc-faixas i { display: block; width: 7px; background: #00adec; }
.sc-faixas i:nth-child(2) { background: #fff; }
.sc-topo { position: relative; display: flex; align-items: center; gap: 34px; }
.sc-escudo { width: 170px; height: 170px; filter: drop-shadow(0 10px 24px rgba(0,0,0,.45)); }
.sc-kicker { font-size: 26px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: #00adec; }
.sc-nome { font-size: 66px; font-weight: 800; letter-spacing: -.02em; line-height: 1.02; margin: 6px 0 10px; }
.sc-nome span { color: #00adec; }
.sc-data { font-size: 30px; font-weight: 600; opacity: .85; }
.sc-placar { position: relative; display: flex; gap: 22px; margin: 46px 0 34px; }
.sc-num { flex: 1; text-align: center; padding: 26px 10px 22px; border-radius: 24px; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.12); }
.sc-num b { display: block; font-size: 84px; font-weight: 800; line-height: 1; }
.sc-num span { display: block; margin-top: 10px; font-size: 24px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.sc-num-gols { background: #00adec; border-color: #00adec; color: #06213d; }
.sc-num-gols span { opacity: .8; }
.sc-craque { position: relative; display: flex; align-items: center; gap: 28px; padding: 26px 34px; margin-bottom: 30px; border-radius: 26px;
  background: #fbbf24; color: #3b2300; border-bottom: 6px solid #d97706; }
.sc-estrela { width: 96px; height: 96px; flex: none; border-radius: 50%; background: #fff7e0; color: #d97706; font-size: 62px; line-height: 96px; text-align: center; }
.sc-craque-lbl { font-size: 24px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; opacity: .8; }
.sc-craque-nome { font-size: 54px; font-weight: 800; line-height: 1.1; }
.sc-craque-num { font-size: 26px; font-weight: 700; opacity: .85; }
.sc-tabela { position: relative; display: flex; gap: 24px; }
.sc-col { flex: 1; background: rgba(6,20,40,.45); border: 2px solid rgba(255,255,255,.1); border-radius: 26px; padding: 12px 26px; }
.sc-linha { display: flex; align-items: center; padding: 14px 4px; border-top: 2px solid rgba(255,255,255,.07); font-size: 32px; font-weight: 600; }
.sc-linha:first-child { border-top: 0; }
.sc-cab { font-size: 20px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #00adec; padding: 10px 4px; }
.sc-jog { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; }
.sc-jog em { font-style: normal; color: #fbbf24; }
.sc-jog small { font-size: 18px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.12); vertical-align: middle; }
.sc-bolas { font-style: normal; font-size: 22px; margin-left: 10px; letter-spacing: 2px; }
.sc-c { width: 76px; text-align: center; font-weight: 800; opacity: .9; }
.sc-forte { color: #00adec; font-size: 36px; }
.sc-gc { color: #fca5a5; }
.sc-art { background: rgba(0,173,236,.14); border-radius: 16px; }
.sc-duas .sc-linha { font-size: 26px; padding: 11px 2px; }
.sc-duas .sc-c { width: 52px; }
.sc-ausentes { position: relative; margin-top: 26px; font-size: 24px; opacity: .75; line-height: 1.4; }
.sc-obs { position: relative; margin-top: 14px; font-size: 26px; font-style: italic; opacity: .85; }
.sc-rodape { position: relative; display: flex; justify-content: space-between; margin-top: 40px; padding-top: 22px; border-top: 2px solid rgba(255,255,255,.12); font-size: 22px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }

.btn-coringa { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.btn-coringa:hover { background: #f97316; border-color: #f97316; color: #fff; }
[data-bs-theme="dark"] .btn-coringa { background: #2a1a0e; border-color: #4a2e17; color: #fed7aa; }

.bottom-nav:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, 1fr); }

/* ===== lances (vídeos) ===== */
.lances-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.lance-card { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.lance-video { position: relative; background: #000; aspect-ratio: 16 / 9; }
.lance-video video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.lance-tipo { position: absolute; top: 8px; left: 8px; background: rgba(15,45,87,.85); color: #fff; font-size: .75rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; pointer-events: none; }
.lance-fav { position: absolute; top: 6px; right: 8px; font-size: 1.1rem; pointer-events: none; }
.lance-info { padding: .75rem .9rem .85rem; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.lance-info .nm { font-weight: 700; }
.lance-info .meta { font-size: .78rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: .15rem .6rem; }
.lance-acoes { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .2rem; }
.camera-selo { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); white-space: nowrap; }
.camera-selo.on { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.camera-selo.on i { animation: pisca 1.4s ease-in-out infinite; }
.camera-selo.off { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
@keyframes pisca { 50% { opacity: .35; } }
.btn-lance-tablet { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-lance-tablet:hover, .btn-lance-tablet:active { background: #b91c1c; border-color: #b91c1c; color: #fff; }

/* ===== câmera da quadra ===== */
.camera-app { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 992px) { .camera-app { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.camera-preview { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; }
.camera-preview.ativa { aspect-ratio: 16 / 9; }
.camera-preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.camera-rec { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,.6); color: #fff; font-weight: 800; font-size: .8rem; padding: .3rem .7rem; border-radius: 999px; letter-spacing: .06em; }
.camera-rec span { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; margin-right: .35rem; animation: pisca 1s infinite; }
.camera-flash { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); background: #dc2626; color: #fff; padding: .55rem 1.1rem; border-radius: 999px; font-size: 1rem; box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.camera-intro { position: relative; z-index: 1; min-height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; color: #eef6ff;
  background: radial-gradient(120% 140% at 100% 0%, #1f7fc4 0%, #174a8b 42%, #0f2d57 100%); overflow-y: auto; }
.camera-intro h2 { font-weight: 800; margin: .5rem 0; }
.camera-intro p { max-width: 560px; opacity: .9; }
.camera-intro .form-check-label { color: #eef6ff; }
.camera-painel { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; gap: .8rem; }
.btn-lance { background: #dc2626; color: #fff; font-size: 1.35rem; font-weight: 800; padding: 1rem; border-radius: 16px; border: 0; }
.btn-lance:hover, .btn-lance:active { background: #b91c1c; color: #fff; }
.btn-lance:disabled { background: var(--surface-2); color: var(--ink-3); }
.camera-status { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.camera-status div { background: var(--surface-2); border-radius: 12px; padding: .5rem .7rem; }
.camera-status span { display: block; font-size: .72rem; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.camera-status b { font-size: 1rem; }
.camera-log { list-style: none; margin: 0; padding: 0; font-size: .78rem; color: var(--ink-2); max-height: 180px; overflow-y: auto; }
.camera-log li { padding: .25rem 0; border-top: 1px solid var(--line); }

/* anexos e parcelamento */
.tag-anexo { cursor: pointer; background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
.tag-anexo:hover { background: var(--brand); color: #fff; }
.parcela-box { border: 1px dashed var(--line); border-radius: 12px; padding: .65rem .8rem; background: var(--surface-2); }
.anexos-lista { list-style: none; margin: 0; padding: 0; }
.anexos-lista li { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.anexos-lista li:first-child { border-top: 0; }
.anexos-lista .bi { font-size: 1.4rem; color: var(--brand); }
.anexos-lista a.nome { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anexos-lista small { color: var(--ink-3); white-space: nowrap; }

.camera-config { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: .8rem; }

/* Modo simulação (tools/simulacao.ps1) */
.faixa-simulacao { position: sticky; top: 0; z-index: 1100; background: repeating-linear-gradient(45deg, #f59f00 0 14px, #e8590c 14px 28px); color: #fff; font-weight: 700; text-align: center; padding: .35rem .75rem; font-size: .85rem; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
