/* Alma Tickets - tema claro 2026 */
:root {
  color-scheme: light;
  --bg: #f8f7fc;
  --bg2: #efedf8;
  --panel: #ffffff;
  --panel2: #faf8f3;
  --line: #e6e2f1;
  --text: #241f3e;
  --muted: #837d9d;
  --blue: #7158dc;
  --cyan: #2f8292;
  --green: #2e7d63;
  --orange: #c27a32;
  --red: #bd5260;
  --purple: #7158dc;
  --shadow: 0 14px 34px rgba(41, 28, 83, .10);
}

html { background: #17132c; }
body {
  background:
    radial-gradient(circle at 82% 2%, rgba(113, 88, 220, .12), transparent 28rem),
    linear-gradient(145deg, #f9f8fd 0%, #f3f1fa 100%) !important;
  color: var(--text) !important;
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}
a { color: #215a73; }
::selection { background: rgba(33, 90, 115, .18); }

input, select, textarea {
  background: #fff !important;
  border-color: #d8d2c8 !important;
  color: var(--text) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset;
}
input::placeholder, textarea::placeholder { color: #98a1a6; }
input:focus, select:focus, textarea:focus {
  border-color: #39809a !important;
  box-shadow: 0 0 0 4px rgba(47, 130, 146, .12) !important;
}
label span { color: #56636c; }

.sidebar {
  width: 232px;
  padding: 14px 16px;
  background:
    radial-gradient(circle at 10% 0%, rgba(123, 94, 234, .28), transparent 16rem),
    linear-gradient(180deg, #18132e 0%, #17132c 54%, #211a42 100%) !important;
  border-right: 0 !important;
  box-shadow: 12px 0 30px rgba(28, 39, 45, .12);
  overflow: hidden;
}
.sidebar .brand {
  justify-content: center;
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(253, 195, 0, .26);
}
.sidebar .brand { justify-content:flex-start; gap:10px; border-bottom-color:rgba(255,255,255,.12); }
.sidebar .brand-text { display:flex; flex-direction:column; justify-content:center; min-width:0; }
.sidebar .brand-text strong { font-size:15px; line-height:1.05; white-space:nowrap; }
.sidebar .brand-text span { margin-top:4px; font-size:10px; line-height:1.15; white-space:nowrap; }
.brand-logo {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 11px;
  box-shadow: 0 14px 30px rgba(4, 10, 22, .28), 0 0 0 1px rgba(255, 255, 255, .07);
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, #f0c27b, #ce8745) !important;
  color: #173642;
  box-shadow: 0 9px 22px rgba(5, 25, 32, .22);
}
.brand-text strong, .sidebar .brand strong { color: #fff; font-size: 16px; }
.brand-text span, .sidebar .brand span { color: #abc1c8; font-size: 10.5px; }
.nav { gap: 2px; }
.nav a {
  position: relative;
  padding: 8px 12px;
  border-radius: 10px;
  color: #bdb6d5 !important;
  font-weight: 600;
  letter-spacing: .005em;
}
.nav a:hover { background: rgba(255,255,255,.08) !important; color: #fff !important; }
.nav a.active {
  background: linear-gradient(135deg, #6f58d9, #8369ea) !important;
  color: #fff !important;
  box-shadow: 0 9px 20px rgba(4, 24, 36, .34), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 99px;
  background: #fff;
}

.main { padding: 26px 30px 36px; min-width: 0; background: transparent; }
.topbar { align-items: center; margin-bottom: 22px; }
.topbar h1 { color: #241f3e; font-size: 24px; letter-spacing: -.02em; text-shadow:none; }
.topbar h1::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  margin-top: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7158dc, #a18cf1);
  box-shadow: 0 3px 12px rgba(113, 88, 220, .22);
}
.topbar p { color: #837d9d; margin-top: 5px; }
.top-actions { justify-content: flex-end; }
.user-chip {
  background: rgba(255, 255, 255, .72) !important;
  border-color: #ddd6ca !important;
  color: #46545d !important;
  box-shadow: 0 5px 16px rgba(48, 57, 61, .05);
}

.hero, .card, .table-card, .stat, .panel,
.visual-kpi, .visual-mini, .visual-card,
.finance-saas-hero, .finance-saas-card, .fs-quick-card {
  background: rgba(255, 255, 255, .92) !important;
  border-color: rgba(198, 208, 211, .86) !important;
  box-shadow: var(--shadow) !important;
}
.hero {
  position: relative;
  overflow: hidden;
  padding: 24px 26px;
  background: linear-gradient(125deg, #fff 0%, #f8f4eb 100%) !important;
}
.hero::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -58px;
  top: -82px;
  border-radius: 50%;
  background: rgba(215, 149, 77, .13);
}
.hero h2 { color: #173642; font-size: 22px; letter-spacing: -.01em; }
.kicker, .visual-eyebrow {
  background: #fff7d8 !important;
  border-color: #efd267 !important;
  color: #725600 !important;
}
.stat { position: relative; overflow: hidden; padding: 18px 19px; }
.stat::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 4px;
  left: 18px;
  bottom: 0;
  border-radius: 9px 9px 0 0;
  background: #d7954d;
}
.stat h3 { color: #72808a; }
.stat .num { color: #183d4b; font-size: 27px; }

.mini-item, .muted-box, .compact-item, .timeline-item, .link-card,
.tree-card, .tree-node-card, .finance-kpi, .finance-equivalent-panel,
.finance-equivalent-grid div, .crm-info-item, .crm-case-hero,
.drive-folder-card, .drive-preview-panel, .fs-tool, .trello-column,
.trello-card, .visual-family-row, .visual-alert, .report-insight-card,
.report-summary-item, .saas-fiscal-values div, .bank-reconcile-summary div {
  background: #fbfaf7 !important;
  border-color: #dfd9cf !important;
  color: var(--text) !important;
  box-shadow: none !important;
}
.mini-item:hover, .compact-item:hover, .visual-family-row:hover, .trello-card:hover {
  background: #fff !important;
  border-color: #c9d4d3 !important;
}
.card-header { padding: 18px 18px 12px; }
.card-header h3, .visual-card-header h3, .report-summary-head h2 {
  color: #203744;
  letter-spacing: -.01em;
}
.card-body { padding: 0 18px 18px; }
.table th, .table td { border-color: #e8e3da; }
.table th { color: #748089; background: #f8f6f1; }
.table tbody tr:hover { background: #faf8f3 !important; }
.table .title-cell strong, .compact-item strong, .family-name strong,
.report-summary-line strong, .trello-card-body strong { color: #263b46 !important; }

.btn {
  border-color: #d1cbc0;
  background: #fff;
  color: #344650;
  box-shadow: 0 4px 12px rgba(44, 55, 61, .06);
}
.btn:hover { filter: none; transform: translateY(-1px); border-color: #aebbbd; }
.btn-primary, .fs-btn:not(.secondary) {
  background: linear-gradient(145deg, #7158dc, #6047d1) !important;
  border-color: #6047d1 !important;
  color: #fff !important;
  box-shadow: 0 7px 18px rgba(96, 71, 209, .22);
}

/* Abertura do painel inspirada no ritmo visual do Segura as Pontas. */
.welcome-hero { display:flex; align-items:center; justify-content:space-between; gap:24px; background:linear-gradient(135deg,#fff 0%,#f8f6ff 100%) !important; border-color:#e8e3f4 !important; }
.welcome-date { display:block; margin-bottom:10px; color:#9188ad; font-size:10px; letter-spacing:.15em; font-weight:800; text-transform:uppercase; }
.welcome-hero h2 { margin:0; font-size:30px; color:#241f3e; }
.welcome-hero h2 em { color:#7158dc; font-style:normal; }
.welcome-hero p { max-width:620px; margin:8px 0 14px; color:#776f91; font-size:14px; }
.welcome-note { color:#7158dc; font-size:11px; font-style:italic; }
@media (max-width:700px){.welcome-hero{align-items:flex-start;flex-direction:column}.welcome-hero h2{font-size:24px}}

/* Aproveita toda a área útil do painel geral, sem faixas escuras abaixo dos cartões. */
.app-shell { min-height:100vh; background:#f6f4fb; }
.main { min-height:100vh; background:linear-gradient(145deg,#faf9fe 0%,#f3f1fa 100%); }
.dashboard-overview-grid { grid-template-columns:minmax(310px,.78fr) minmax(0,1.22fr) !important; align-items:stretch !important; }
.dashboard-overview-grid > .dashboard-card { height:100% !important; }
.dashboard-overview-grid > .dashboard-card:first-child .card-body { display:flex; flex-direction:column; height:calc(100% - 58px) !important; }
.dashboard-focus { margin-top:auto; padding:18px; border-radius:14px; background:linear-gradient(135deg,#7058db,#8b73e8); color:#fff; box-shadow:0 10px 22px rgba(99,76,201,.22); }
.dashboard-focus span { display:block; margin-bottom:8px; color:rgba(255,255,255,.72); font-size:10px; font-weight:800; letter-spacing:.1em; }
.dashboard-focus strong { display:block; font-size:15px; line-height:1.35; }
.dashboard-focus a { display:inline-block; margin-top:13px; color:#fff; font-weight:800; font-size:12px; }
.dashboard-overview-grid .dashboard-card { background:rgba(255,255,255,.96) !important; }
.dashboard-overview-grid .table-wrap { border-radius:12px; background:#fcfbff; }
@media(max-width:1180px){.dashboard-overview-grid{grid-template-columns:1fr !important}.dashboard-overview-grid > .dashboard-card:first-child .card-body{height:auto !important}.dashboard-focus{margin-top:4px}}

/* Dashboard visual: gráficos e status ficam compactos e proporcionais. */
.visual-grid-main { align-items:start; }
.visual-grid-main > .visual-card { height:auto !important; }
.visual-bar-chart { height:238px; }
.visual-bars { height:188px; }
.visual-status-list { max-height:300px; overflow-y:auto; padding-right:4px; }
.visual-status-list::-webkit-scrollbar { width:6px; }
.visual-status-list::-webkit-scrollbar-thumb { background:#d5ceed; border-radius:999px; }
.btn-secondary, .fs-btn.secondary {
  background: #f6f3ed !important;
  border-color: #d6d0c5 !important;
  color: #40535d !important;
}
.btn-success { background: #2e7d63 !important; border-color: #2e7d63 !important; color: #fff !important; }
.btn-info { background: #397f91 !important; border-color: #397f91 !important; color: #fff !important; }
.btn-danger { background: #fff0f0 !important; border-color: #e4b5ba !important; color: #a5414d !important; }
.btn-warning { background: #c8813b !important; border-color: #c8813b !important; color: #fff !important; }

.tab, .family-tab, .family-tabs-pro .family-tab {
  background: #f8f5ef !important;
  border-color: #ddd7cc !important;
  color: #53636c !important;
}
.tab.active, .family-tab.active, .family-tabs-pro .family-tab.active {
  background: #e9f0f7 !important;
  border-color: #96b1c5 !important;
  color: #0a3657 !important;
  box-shadow: inset 0 -2px 0 #fdc300;
}
.badge-open { background: #eaf3f7; color: #27677d; border-color: #a9ceda; }
.badge-progress { background: #fff4dc; color: #95601e; border-color: #e6c88e; }
.badge-wait { background: #fff0df; color: #9a5b1c; border-color: #e6bc88; }
.badge-done, .badge-yes { background: #e8f5ef; color: #2b755e; border-color: #a9d3c4; }
.badge-danger { background: #fff0f1; color: #a84351; border-color: #e5b2b9; }
.badge-info { background: #eaf5f5; color: #2b717a; border-color: #aad3d4; }
.badge-muted, .badge-no { background: #f1f0ed; color: #69757c; border-color: #d2d0ca; }
.text-danger { color: #b74653; }
.text-warning { color: #a76320; }
.text-success { color: #287159; }
.alert.success, .fs-ok { background: #eaf7f1 !important; border-color: #a6d5c4 !important; color: #266b55 !important; }
.alert.error { background: #fff0f1 !important; border-color: #e4b2b8 !important; color: #9f3f4b !important; }
.fs-alert { background: #fff5e5 !important; border-color: #e4c18b !important; color: #8d5a1f !important; }

/* Dashboard visual */
.visual-filter-card {
  background: linear-gradient(125deg, #fff 0%, #f6f1e7 100%) !important;
  border-color: #ded5c6 !important;
  border-top: 3px solid #fdc300 !important;
  box-shadow: var(--shadow) !important;
}
.visual-kpi span, .visual-mini span { color: #71808a !important; }
.visual-kpi strong, .visual-mini strong { color: #183d4b; }
.visual-kpi { border-top: 3px solid var(--kpi-color, #174f74) !important; }
.visual-kpi::before { opacity: .18; }
.visual-bars { border-color: #ddd8cf; }
.visual-donut::after { background: #fff !important; border-color: #ded8cf !important; }
.visual-legend, .visual-status-list span, .visual-progress-row div { color: #53636c !important; }
.visual-status-list div { border-color: #e6e1d8; }
.visual-progress-row em, .report-summary-bar, .panel-performance .bar-bg,
.saas-bar-row div { background: #e8e5de !important; }

/* Painel executivo: hierarquia financeira mais limpa e legível. */
.visual-filter-card {
  display: grid !important;
  grid-template-columns: minmax(300px, 1fr) auto;
  align-items: center !important;
  gap: 28px !important;
  padding: 22px 24px !important;
  margin-bottom: 20px !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(253, 195, 0, .13), transparent 26%),
    linear-gradient(125deg, #fff 0%, #faf7f0 100%) !important;
}
.visual-filter-card h2 { color: #162f4d; font-size: 25px; letter-spacing: -.02em; }
.visual-filter-card p { max-width: 440px; color: #657789 !important; }
.visual-note { color: #7d8fa0 !important; }
.visual-eyebrow { background: #fff7d8 !important; border-color: #eecb55 !important; color: #795700 !important; }
.visual-filters { min-width: 0 !important; gap: 9px !important; }
.visual-filters label span { color: #536778 !important; font-weight: 750; }
.visual-filters input, .visual-filters select { min-height: 41px; background: #fff !important; border-color: #d8d2c8 !important; color: #213b52 !important; }
.visual-filters .btn { min-height: 41px; padding-inline: 20px; box-shadow: 0 8px 16px rgba(94, 70, 185, .18); }

.visual-finance-heading {
  align-items: center !important;
  margin: 20px 0 14px !important;
  padding: 13px 16px;
  border-left: 4px solid #fdc300;
  border-radius: 0 14px 14px 0;
  background: linear-gradient(90deg, rgba(255,255,255,.76), transparent);
}
.visual-finance-heading h3 { color: #162f4d; font-size: 21px; letter-spacing: -.01em; }
.visual-finance-heading small { color: #738396 !important; }

.visual-kpi-grid.finance-breakdown { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.visual-kpi-grid.finance-results { gap: 14px; margin-top: 2px; }
.visual-kpi {
  min-height: 148px !important;
  padding: 19px 20px !important;
  border: 1px solid #d7dce1 !important;
  border-top: 3px solid var(--kpi-color, #174f74) !important;
  border-radius: 17px !important;
  background: linear-gradient(145deg, #fff 0%, #f8fafb 100%) !important;
  box-shadow: 0 8px 22px rgba(25, 51, 70, .08) !important;
  transition: transform .16s ease, box-shadow .16s ease;
}
.visual-kpi:hover { transform: translateY(-2px); box-shadow: 0 13px 28px rgba(25, 51, 70, .13) !important; }
.visual-kpi::before { width: 112px !important; height: 112px !important; inset: -52px -38px auto auto !important; opacity: .11 !important; }
.visual-kpi span { color: #687986 !important; font-size: 10px !important; letter-spacing: .09em; }
.visual-kpi strong { margin-top: 16px !important; color: #183d4b !important; font-size: clamp(22px, 2vw, 29px) !important; letter-spacing: -.025em; }
.visual-kpi small { margin-top: 9px !important; color: #72808d !important; line-height: 1.35; }
.visual-kpi-grid.finance-results .visual-kpi { min-height: 136px !important; background: linear-gradient(145deg, #fff, #f6faf8) !important; }
.visual-kpi-grid.finance-results .visual-kpi:nth-child(2) { background: linear-gradient(145deg, #fff, #faf8ff) !important; }
.visual-kpi-grid.finance-results .visual-kpi:nth-child(3) { background: linear-gradient(145deg, #fff, #f4fbfb) !important; }

@media (max-width: 1280px) {
  .visual-filter-card { grid-template-columns: 1fr !important; align-items: stretch !important; gap: 16px !important; }
  .visual-filters { grid-template-columns: 1fr 1fr 1.25fr auto !important; }
}
@media (max-width: 980px) {
  .visual-kpi-grid.finance-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .visual-filters, .visual-kpi-grid.finance-breakdown, .visual-kpi-grid.finance-results { grid-template-columns: 1fr !important; }
  .visual-finance-heading { align-items: flex-start !important; flex-direction: column; gap: 6px !important; }
}

/* Remove os ultimos blocos herdados do tema escuro no dashboard financeiro. */
.kpi-dual div {
  background: linear-gradient(180deg, #f8f6f1, #fff) !important;
  border-color: #ddd6ca !important;
  color: #223b47 !important;
}
.kpi-dual strong { color: #173642 !important; }
.kpi-dual small { color: #6d7a82 !important; }
.summary-strip {
  display: flex !important;
  flex-wrap: wrap;
  align-items: flex-start !important;
  gap: 12px !important;
}
.summary-strip .panel {
  flex: 1 1 185px;
  min-height: 86px !important;
  height: auto !important;
  padding: 14px 16px !important;
  border: 1px solid #bdc9ce !important;
  border-top: 3px solid #52788b !important;
  border-radius: 14px !important;
  background: linear-gradient(145deg, #fbfcfc, #edf1f2) !important;
  box-shadow: 0 8px 20px rgba(8, 24, 31, .13) !important;
}
.summary-strip .panel.panel-performance {
  flex: 3 1 570px;
  min-height: 124px !important;
  border-top-color: #fdc300 !important;
}
.summary-strip .label {
  color: #647681 !important;
  font-weight: 800;
}
.summary-strip .value,
.summary-strip .value > div {
  color: #173642 !important;
  font-size: 16px !important;
  line-height: 1.25;
}
.summary-strip .small {
  margin-top: 4px;
  color: #697781 !important;
  font-size: 12px !important;
  font-weight: 650;
}
.summary-strip .metric-received {
  background: linear-gradient(145deg, #f5f9fd, #eaf2f8) !important;
  border-top-color: #3f82b5 !important;
}
.summary-strip .metric-received .label { color: #316b97 !important; }
.summary-strip .metric-paid {
  background: linear-gradient(145deg, #fffaf2, #f8eddc) !important;
  border-top-color: #cf842b !important;
}
.summary-strip .metric-paid .label { color: #9b5e1d !important; }
.summary-strip .metric-invoice {
  background: linear-gradient(145deg, #faf7fd, #f0eaf7) !important;
  border-top-color: #765a96 !important;
}
.summary-strip .metric-invoice .label { color: #684d86 !important; }
.summary-strip .metric-open {
  background: linear-gradient(145deg, #fffbed, #f7efd2) !important;
  border-top-color: #d5a411 !important;
}
.summary-strip .metric-open .label { color: #87670b !important; }
.summary-strip .panel.panel-alert {
  background: linear-gradient(135deg, #edf7f2, #fff) !important;
  border-color: #b7d8cb !important;
  border-top-color: #2e7d63 !important;
}
.summary-strip .panel.panel-alert .value,
.summary-strip .panel.panel-alert .small,
.panel-performance .perf-result {
  color: #29424d !important;
}
.summary-strip .panel.panel-performance {
  background: linear-gradient(135deg, #edf4f7, #fff) !important;
  border-color: #bfd3db !important;
  border-top-color: #fdc300 !important;
}
.panel-performance .perf-line span { color: #556973 !important; }

.finance-grid { grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)) !important; }
.money-stat .num { font-size: 18px !important; line-height: 1.2; }
.money-stat.is-received::after { background: #3f82b5; }
.money-stat.is-paid::after { background: #cf842b; }

@media (max-width: 760px) {
  .summary-strip .panel,
  .summary-strip .panel.panel-performance { flex-basis: 100%; }
}

/* Pipeline */
.trello-board-shell { scrollbar-color: #6d9aa3 #e4dfd5; }
.trello-board-shell::-webkit-scrollbar-track { background: #e4dfd5; border-color: #d2cbc0; }
.trello-board-shell::-webkit-scrollbar-thumb {
  border-color: #e4dfd5;
  background: linear-gradient(90deg, #28677d, #d7954d);
}
.trello-column { background: #f0ede6 !important; }
.trello-card { background: #fff !important; }
.priority-pill { color: #53636c; border-color: #c8c5be; }
.trello-card-footer { border-color: #e7e2d9; }
.trello-card-footer a { color: #215a73; border-color: #b7c9ce; }
.trello-toast { background: #fff !important; color: var(--text) !important; border-color: #cfc8bd !important; }

/* Financeiro e relatorios */
.finance-saas-hero.positive { background: linear-gradient(135deg, #eaf6f0, #fff) !important; border-color: #add3c4 !important; }
.finance-saas-hero.negative { background: linear-gradient(135deg, #fff0f1, #fff) !important; border-color: #e3b5bb !important; }
.finance-saas-overview > :nth-child(1) { border-top: 3px solid #2e7d63 !important; }
.finance-saas-overview > :nth-child(2) { border-top: 3px solid #174f74 !important; }
.finance-saas-overview > :nth-child(3) { border-top: 3px solid #fdc300 !important; }
.finance-saas-overview > :nth-child(4) { border-top: 3px solid #745a91 !important; }
.saas-status-pill { border-color: #ccd0cb; }
.saas-mini-result.positive { color: #287159; }
.saas-mini-result.negative { color: #b74653; }
.report-insight-card strong, .report-insight-card b, .report-summary-line span { color: #243c47 !important; }
.report-insight-card span, .report-summary-head span { color: #687780 !important; }
.report-summary-head span { background: #f5f2ec !important; border-color: #d8d2c8 !important; }
.report-family-highlights strong { color: #286b55 !important; }
.fiscal-kpi { background: #fff !important; }
.drive-preview-box { background: #ece8e0 !important; }
.finance-value-positive, .finance-value-neutral,
.finance-equivalent-grid strong, .finance-kpi strong {
  color: #233b46 !important;
}
.finance-value-negative { color: #b74653 !important; }
.finance-kpi.blue { background: linear-gradient(180deg, #edf5fb, #fff) !important; border-color: #bcd4e0 !important; }
.finance-kpi.green { background: linear-gradient(180deg, #edf7f2, #fff) !important; border-color: #b9d9cc !important; }
.finance-kpi.orange { background: linear-gradient(180deg, #fff5e9, #fff) !important; border-color: #e4c7a1 !important; }
.finance-kpi.purple { background: linear-gradient(180deg, #f5f0fa, #fff) !important; border-color: #d5c5e1 !important; }
.finance-equivalent-head span { color: #2d7180 !important; border-color: #abd0d5 !important; }

/* Arvore familiar */
.tree-viewport {
  background:
    radial-gradient(circle at top, rgba(47, 130, 146, .11), transparent 42%),
    linear-gradient(180deg, #f8f6f0, #efebe3) !important;
  border-color: #d7d0c4 !important;
}
.tree-card h3 { color: #213b47 !important; }
.tree-card-topline {
  color: #315f6f !important;
  background: #eaf2f3 !important;
  border-color: #bfd1d6 !important;
}
.tree-meta, .empty-state { color: #66757e !important; }
.tree-badge.is-ativo { color: #28667a !important; background: #eaf3f7 !important; border-color: #abd0dc !important; }
.tree-badge.is-inativo { color: #68747b !important; background: #f0efec !important; border-color: #d1cec7 !important; }
.tree-badge.is-falecido { color: #95601e !important; background: #fff3dc !important; border-color: #e2c184 !important; }
.tree-badge.is-role { color: #2b717a !important; background: #e9f5f4 !important; border-color: #acd5d3 !important; }

/* FamilySearch independente */
.fs-wrap { max-width: 980px; }
.fs-card {
  background: rgba(255, 255, 255, .94) !important;
  border-color: #dcd5ca !important;
  color: var(--text) !important;
  box-shadow: var(--shadow);
}
.fs-card code, .fs-card pre, code, pre {
  background: #f5f2ec !important;
  border-color: #d9d3c8 !important;
  color: #315464 !important;
}

.login-page { position: relative; overflow: hidden; }
.login-page::before, .login-page::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
}
.login-page::before {
  width: 420px; height: 420px; left: -150px; bottom: -170px;
  background: rgba(47, 130, 146, .10);
}
.login-page::after {
  width: 350px; height: 350px; right: -100px; top: -130px;
  background: rgba(215, 149, 77, .12);
}
.login-card {
  position: relative;
  z-index: 1;
  padding: 32px;
  background: rgba(255, 255, 255, .94) !important;
  border-color: rgba(207, 199, 187, .8) !important;
  box-shadow: 0 28px 70px rgba(44, 54, 58, .14) !important;
}
.login-card .brand-mark { color: #173642; }
.login-card .brand.big strong { color: #173642; }
.login-card h1 { color: #173642; font-size: 24px; }

@media (max-width: 860px) {
  .sidebar { width: auto; height: auto; padding: 16px; overflow: visible; }
  .sidebar .brand { margin-bottom: 14px; padding-bottom: 14px; }
  .brand-logo { width: 64px; height: 64px; }
  .nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main { padding: 20px 16px 30px; }
  .topbar { align-items: flex-start; }
}
@media (max-width: 560px) {
  .nav { grid-template-columns: 1fr; }
  .topbar { display: grid; }
  .top-actions { justify-content: flex-start; }
  .login-card { padding: 24px; }
}
