:root {
  --radix-green: #1b4332;
  --radix-green-accent: #2d6a4f;
  --radix-green-mid: #40916c;
  --radix-green-soft: #eaf5ef;
  --radix-green-heading: #14532d;
  /* Primária em verde (estilo Soft UI) */
  --primary: #2d6a4f;
  --primary-hover: #1b4332;
  --primary-soft: #e8f5ef;
  --bank-orange: #2d6a4f;
  --bank-orange-soft: #e8f5ef;
  --soft-bg: #f5f7fb;
  --soft-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
  --soft-shadow-sm: 0 2px 12px rgba(15, 23, 42, 0.05);
  --soft-shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  --bg: #f5f7fb;
  --card: #fff;
  --text: #111827;
  --muted: #6b7280;
  --error: #b00020;
  --line: #e8eaef;
}

* { box-sizing: border-box; }
body.radix-body {
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body.radix-bank-body {
  background: var(--soft-bg);
}

body.soft-ui {
  background: var(--soft-bg);
}

/* Shell antigo (sidebar) — mantido vazio para compat */
.radix-shell { display: flex; min-height: 100vh; align-items: stretch; }

/* —— Layout Soft UI: sidebar + main —— */
.radix-bank-shell.soft-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: var(--soft-bg);
}

.soft-sidebar {
  width: 17.5rem;
  flex: 0 0 17.5rem;
  display: flex;
  flex-direction: column;
  background: var(--card);
  box-shadow: var(--soft-shadow);
  border-right: 1px solid var(--line);
  padding: 1.25rem 0.85rem 1rem;
  min-height: 100vh;
  min-width: 0;
}

.soft-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 0.35rem 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.85rem;
}

.soft-brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--radix-green-mid), var(--radix-green-accent));
  box-shadow: 0 4px 14px rgba(45, 106, 79, 0.35), var(--soft-shadow-inset);
  flex-shrink: 0;
}

.soft-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.soft-brand-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--radix-green-heading);
  letter-spacing: 0.02em;
}

.soft-brand-sub {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--radix-green-mid);
  text-transform: lowercase;
}

.soft-sidebar-meta {
  padding: 0 0.35rem 0.85rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

.soft-meta-balance {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-bottom: 0.5rem;
}

.soft-meta-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 600;
}

.soft-meta-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.soft-meta-account {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #374151;
  line-height: 1.35;
}

.soft-meta-id {
  margin: 0.2rem 0 0;
  font-size: 0.7rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.soft-sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.25rem 0 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.soft-sidebar-nav .bank-nav-section {
  display: block;
  width: 100%;
  margin: 0.85rem 0 0.25rem;
  padding: 0.35rem 0.65rem 0.15rem;
  font-weight: 700;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--radix-green-heading);
  opacity: 0.55;
  white-space: normal;
}

.soft-sidebar-nav .bank-nav-section:first-child {
  margin-top: 0;
}

.soft-sidebar-nav .bank-nav-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  margin: 0;
  border-radius: 12px;
  border-bottom: none;
  font-size: 0.84rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.soft-sidebar-nav .bank-nav-link .bn-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  font-size: 1.05rem;
  line-height: 1;
  background: #eef2f7;
  box-shadow: var(--soft-shadow-inset);
  flex-shrink: 0;
}

.soft-sidebar-nav .bank-nav-link:hover {
  color: var(--radix-green-heading);
  background: rgba(45, 106, 79, 0.06);
}

.soft-sidebar-nav .bank-nav-link:hover .bn-ico {
  background: var(--radix-green-soft);
}

.soft-sidebar-nav .bank-nav-link.is-active {
  color: var(--radix-green-heading);
  font-weight: 700;
  background: #fff;
  box-shadow: var(--soft-shadow-sm), var(--soft-shadow-inset);
}

.soft-sidebar-nav .bank-nav-link.is-active .bn-ico {
  background: linear-gradient(145deg, var(--radix-green-mid), var(--radix-green-accent));
  box-shadow: 0 3px 12px rgba(45, 106, 79, 0.3);
}

.soft-sidebar-help {
  margin-top: auto;
  padding: 1rem 0.65rem 0.25rem;
  border-radius: 14px;
  background: linear-gradient(155deg, #f1f5f9 0%, #e2e8f0 100%);
  box-shadow: var(--soft-shadow-inset), 0 2px 10px rgba(15, 23, 42, 0.04);
  border: 1px solid var(--line);
}

.soft-help-title {
  margin: 0 0 0.25rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--radix-green-heading);
}

.soft-help-text {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
}

.soft-help-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.5rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(145deg, var(--radix-green-mid), var(--radix-green-accent));
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(45, 106, 79, 0.25);
}

.soft-help-btn:hover {
  filter: brightness(1.05);
}

.soft-main-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.soft-main-header {
  flex: 0 0 auto;
  padding: 1.1rem clamp(1rem, 3vw, 1.75rem) 0.65rem;
  background: var(--soft-bg);
}

.soft-topbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.65rem;
}

.soft-breadcrumb {
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}

.soft-breadcrumb a {
  color: var(--radix-green-accent);
  font-weight: 600;
  text-decoration: none;
}

.soft-breadcrumb a:hover {
  text-decoration: underline;
}

.soft-bc-current {
  color: var(--muted);
  font-weight: 500;
}

.soft-topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.soft-topbar-actions--end {
  margin-left: auto;
}

.soft-search {
  width: min(12rem, 32vw);
  padding: 0.48rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--soft-shadow-inset);
  color: var(--text);
}

.soft-search::placeholder {
  color: #94a3b8;
}

.soft-search:focus {
  outline: none;
  border-color: var(--radix-green-mid);
  box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.2);
}

.soft-icon-btn {
  display: none;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  box-shadow: var(--soft-shadow-sm);
}

.soft-icon-btn:hover {
  background: var(--radix-green-soft);
}

.soft-user-chip.rbx-user-chip {
  max-width: min(200px, 38vw);
}

.soft-page-title.radix-bank-page-title {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 700;
  color: var(--radix-green-heading);
  line-height: 1.2;
}

.soft-main-header .radix-bank-page-sub {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
}

.radix-logout-inline {
  margin: 0;
}

.btn-text-accent {
  background: none;
  border: none;
  color: var(--radix-green-accent);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
}

.btn-text-accent:hover {
  background: var(--primary-soft);
}

/* Chips / avatar (área principal) */
.rbx-user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  max-width: min(240px, 42vw);
}
.rbx-user-chip-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rbx-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--primary-soft);
}
.rbx-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--radix-green-soft), #d8f3dc);
  color: var(--radix-green-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* Compat: links de navegação fora do sidebar (não usado no layout actual) */
.bank-nav-link {
  text-decoration: none;
}

.radix-bank-main {
  flex: 1 1 auto;
  background: var(--soft-bg);
  overflow: auto;
  padding: 0 clamp(0.85rem, 2.5vw, 1.5rem) 1.5rem;
}

.soft-main.radix-bank-main {
  padding-top: 0.25rem;
}

.radix-bank-page-head {
  padding: clamp(0.75rem, 2.5vw, 1rem) clamp(0.85rem, 3vw, 1.4rem) 0.35rem;
  background: var(--soft-bg);
}
.radix-bank-page-head .radix-bank-page-title {
  margin: 0;
  font-size: clamp(1.12rem, 2.8vw, 1.45rem);
  font-weight: 700;
  color: var(--radix-green-heading);
  line-height: 1.25;
}
.radix-bank-page-sub {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
}

.soft-flash {
  margin-bottom: 1rem;
  border: none;
  box-shadow: var(--soft-shadow-sm);
}
.soft-flash--ok {
  border-left: 4px solid var(--radix-green-accent) !important;
  background: #f0fdf4 !important;
}
.soft-flash--err {
  border-left: 4px solid #c0392b !important;
  background: #fdf2f2 !important;
}
.soft-flash-p {
  margin: 0;
}

.radix-main { flex: 1; overflow: auto; min-height: 100vh; }
.radix-topbar {
  min-height: 74px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.radix-title { margin: 0; color: #1f2937; font-size: 2rem; font-weight: 700; }
.radix-topbar-sub { margin: .25rem 0 0; color: var(--muted); font-size: .9rem; }
.radix-topbar-actions { display: flex; align-items: center; gap: .7rem; }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
.avatar-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--radix-green);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.radix-content {
  padding: clamp(0.75rem, 2.5vw, 1.4rem);
  max-width: 100%;
}
.radix-bank-content {
  padding-top: 0.75rem;
}

/* Títulos principais do painel (cards, secções) em verde */
.radix-bank-shell .card > h3,
.radix-bank-shell .card h3:first-of-type,
.radix-bank-shell .section-head h3 {
  color: var(--radix-green-heading);
  font-weight: 700;
}
.radix-bank-shell .card > h3 {
  margin-top: 0;
}

.radix-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.radix-login-card {
  background: var(--card);
  padding: 2rem;
  border-radius: 16px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.radix-login-card h1 { color: var(--radix-green); margin-top: 0; }
.radix-login-card input {
  width: 100%; padding: 0.6rem; margin-bottom: 0.75rem; border: 1px solid #ccc; border-radius: 8px;
}
.radix-login-card label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.25rem; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
  gap: clamp(0.65rem, 2vw, 1rem);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: clamp(0.65rem, 2vw, 1rem);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
  gap: clamp(0.65rem, 2vw, 1rem);
}

/* Listagens — filtro por nome + tabelas responsivas */
.list-filter-card {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
}
.list-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 1rem;
}
.list-filter-row--ops {
  align-items: flex-end;
}
.list-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1 12rem;
  min-width: 0;
}
.list-filter-field--select {
  flex: 1 1 14rem;
}
.list-filter-label {
  font-size: 0.78rem;
  font-weight: 600;
}
.list-filter-input,
.list-filter-select.form-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 0.88rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
}
.form-select {
  font: inherit;
  font-size: 0.88rem;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  min-width: 0;
  max-width: 100%;
}
.list-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.list-filter-hint {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.list-page-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.list-page-actions {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.table-responsive-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
}
.table-responsive-wrap .table {
  margin: 0;
  min-width: 520px;
}

.soft-main-wrap,
.soft-main,
.radix-bank-content,
.radix-content {
  min-width: 0;
}

.radix-bank-shell.soft-layout {
  overflow-x: hidden;
}

.inline-form-cancel {
  display: inline;
}

@media (max-width: 640px) {
  .grid-2-stack,
  .grid-3-stack,
  .grid-4-stack {
    grid-template-columns: 1fr;
  }
}
.card {
  background: var(--card);
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow-sm), var(--soft-shadow-inset);
}
.stat-card .stat { font-size: 2.05rem; }
.stat { font-size: 2rem; font-weight: 800; color: var(--radix-green); margin: 0.25rem 0 0; line-height: 1.05; }
.muted { color: var(--muted); font-size: 0.9rem; }
.stat-soft-orange { background: #fff5f0; }
.stat-soft-green { background: #edf8f1; }
.stat-soft-blue { background: #eef7fd; }
.stat-soft-yellow { background: #fff9ea; }

.btn-primary {
  display: inline-block;
  background: linear-gradient(145deg, var(--radix-green-mid), var(--radix-green-accent));
  color: #fff !important;
  padding: 0.58rem 0.95rem;
  border-radius: 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(45, 106, 79, 0.22);
}
.btn-primary:hover {
  filter: brightness(1.05);
}
.btn-danger-sm {
  background: var(--error);
  color: #fff;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
}

.table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 12px; overflow: hidden; }
.table th, .table td { padding: 0.65rem; text-align: left; border-bottom: 1px solid var(--line); }
.table th { background: var(--radix-green-soft); color: #20593f; font-weight: 700; }
.table-compact th, .table-compact td { padding: 0.5rem; font-size: 0.9rem; }

/* Super-admin — agenda global (tabela larga + paginação) */
.table-wrap-ops {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
}
.table-wrap-ops .table {
  border-radius: 0;
  margin: 0;
}
.ops-appt-table .ops-col-id { width: 4.5rem; }
.ops-appt-table .ops-notes-cell {
  max-width: 14rem;
  word-break: break-word;
}
.ops-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.ops-pagination-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.form-stack label { display: block; margin-top: 0.75rem; font-weight: 600; font-size: 0.9rem; }
.form-stack input, .form-stack select, .form-stack textarea {
  width: 100%; max-width: 480px; padding: 0.5rem; margin-top: 0.25rem; border-radius: 8px; border: 1px solid #ccc;
}
.form-stack .check { display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; font-weight: normal; }
.form-stack button { margin-top: 1rem; }

.alert-error { background: #ffebee; color: var(--error); padding: 0.75rem; border-radius: 8px; margin-bottom: 1rem; }
.alert-success { background: #e8f5e9; color: #1b5e20; padding: 0.75rem; border-radius: 8px; margin-bottom: 1rem; }

/* Super admin — perfil em Configurações */
.settings-foto-row { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.settings-foto-avatar img, .settings-foto-placeholder {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--line);
}
.settings-foto-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); font-size: 2rem;
}
.settings-social-row { display: flex; align-items: flex-end; gap: 0.75rem; margin-bottom: 1rem; }
.settings-social-ico {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff;
}
.settings-social-ico:hover { background: var(--bg); }
.settings-social-ico.is-disabled { opacity: 0.45; pointer-events: none; }
.settings-social-row .form-stack { flex: 1; min-width: 0; margin-top: 0; }
.settings-social-row .form-stack label { margin-top: 0; }
.lic-bloco[hidden] { display: none !important; }
.btn-secondary-sm {
  display: inline-block; background: #fff; color: var(--text); border: 1px solid var(--line);
  padding: 0.45rem 0.75rem; border-radius: 8px; font-weight: 600; font-size: 0.88rem;
  cursor: pointer; text-decoration: none;
}
.btn-secondary-sm:hover { background: var(--bg); }

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .5rem;
  flex-wrap: wrap;
}
.section-head h3 { margin: 0; }
.section-head a { color: var(--radix-green-accent); font-weight: 600; text-decoration: none; font-size: .9rem; }

.quick-links { display: flex; flex-wrap: wrap; gap: .5rem; }

.kpi-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill {
  display: inline-flex;
  align-items: center;
  padding: .3rem .6rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
}
.pill-muted { background: #eceff1; color: #455a64; }
.pill-ok { background: #e8f5e9; color: #1b5e20; }
.pill-bad { background: #ffebee; color: #b71c1c; }
.pill-warn { background: #fff8e1; color: #ef6c00; }

.mini-chart {
  margin-top: .65rem;
  padding-top: .4rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  gap: .85rem;
  min-height: 170px;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}
.mini-col { display: flex; flex-direction: column; align-items: center; gap: .35rem; min-width: 28px; }
.mini-col small { color: var(--muted); font-size: .75rem; }
.bar-pair { display: flex; align-items: flex-end; gap: 3px; min-height: 125px; }
.bar {
  width: 10px;
  border-radius: 4px 4px 0 0;
  display: inline-block;
}
.bar-main { background: #2f855a; }
.bar-sub { background: #9ad3b2; }

.kpi-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  gap: .7rem;
  margin-top: .5rem;
}
.kpi-summary > div {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .75rem;
  background: #fff;
}
.kpi-summary strong { display: block; color: var(--radix-green-heading); font-size: 1.1rem; }
.kpi-summary span { color: var(--muted); font-size: .82rem; }
.chart-canvas {
  width: 100%;
  max-width: 100%;
  height: 300px;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  margin-top: .5rem;
  display: block;
}
.chart-empty {
  margin: .5rem 0 0;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fafafa;
}

.radix-bank-shell .card {
  min-width: 0;
}
.radix-bank-shell .card .chart-canvas {
  max-width: min(100%, 100vw - 2rem);
}

.chart-toolbar {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
}
.chart-select {
  font: inherit;
  font-size: .85rem;
  padding: .35rem .6rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  min-width: 11rem;
}
.small-chart-hint {
  font-size: .82rem;
  margin: 0 0 .5rem;
  line-height: 1.4;
}
.chart-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: .65rem;
  font-size: .82rem;
  color: var(--muted);
}
.chart-legend {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.swatch-ok { background: #2d6a4f; }
.swatch-muted { background: #94a3b8; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  .soft-search {
    width: min(11rem, 28vw);
  }
}

@media (max-width: 900px) {
  .soft-sidebar {
    width: 15rem;
    flex-basis: 15rem;
  }
}

@media (max-width: 768px) {
  .radix-shell { flex-direction: column; }
  .radix-title { font-size: 1.35rem; color: var(--radix-green-heading); }
  .radix-topbar { padding: .9rem 1rem; }
  .radix-bank-shell.soft-layout {
    flex-direction: column;
  }
  .soft-sidebar {
    width: 100%;
    flex: 0 0 auto;
    min-height: 0;
    border-right: none;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
    padding: 0.75rem 0.65rem 0.5rem;
  }
  .soft-sidebar-meta {
    padding-bottom: 0.5rem;
    margin-bottom: 0.35rem;
  }
  .soft-sidebar-help {
    display: none;
  }
  .soft-sidebar-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.25rem 0 0.35rem;
    gap: 0.25rem;
    max-height: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .soft-sidebar-nav .bank-nav-section {
    display: none;
  }
  .soft-sidebar-nav .bank-nav-link {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0.2rem;
    padding: 0.45rem 0.5rem;
    font-size: 0.68rem;
    width: auto;
    border-radius: 10px;
  }
  .soft-sidebar-nav .bank-nav-link .bn-ico {
    width: 2rem;
    height: 2rem;
    font-size: 0.92rem;
  }
  .soft-main-wrap {
    min-height: 0;
  }
  .soft-main-header {
    padding: 0.85rem 1rem 0.5rem;
  }
  .soft-topbar-row {
    flex-direction: column;
    align-items: stretch;
  }
  .soft-topbar-actions {
    justify-content: flex-end;
  }
  .soft-search {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
  .chart-toolbar {
    width: 100%;
    flex-wrap: wrap;
  }
  .chart-select {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 420px) {
  .soft-brand-title {
    font-size: 0.98rem;
  }
  .soft-meta-account {
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  .soft-sidebar-nav .bank-nav-link {
    padding: 0.4rem 0.45rem 0.3rem;
    font-size: 0.62rem;
  }
  .soft-sidebar-nav .bank-nav-link .bn-ico {
    font-size: 0.85rem;
  }
  .quick-links {
    flex-direction: column;
    align-items: stretch;
  }
  .quick-links .btn-primary {
    text-align: center;
  }
}

/* Moderação de pacientes (super-admin) */
.patient-status {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}
.patient-status--active { background: #e8f5e9; color: #2e7d32; }
.patient-status--inactive { background: #f5f5f5; color: #616161; }
.patient-status--suspended { background: #fff3e0; color: #e65100; }
.patient-status--deleted { background: #ffebee; color: #c62828; }
.btn-warning-sm {
  font-size: 0.78rem;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  border: 1px solid #ffb74d;
  background: #fff8e1;
  color: #e65100;
  cursor: pointer;
}
.btn-warning-sm:hover { background: #ffe082; }
.ops-patient-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
  min-width: 9rem;
}
.inline-form-moderation { margin: 0; display: block; }

.inline-form-password {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.inline-form-password .input-password-sm {
  min-width: 8rem;
  max-width: 10rem;
  font-size: 0.85rem;
  padding: 0.28rem 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.profile-account-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.profile-account-avatar {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}
a.rbx-user-chip.soft-user-chip {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a.rbx-user-chip.soft-user-chip:hover .rbx-user-chip-name {
  color: var(--radix-green-mid);
}

.table-avatar-cell {
  width: 48px;
  vertical-align: middle;
}
.table-avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.table-avatar-placeholder {
  display: inline-flex;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: var(--surface-2, #f0f0f0);
  text-decoration: none;
  font-size: 1.1rem;
}
dl.profile-dl {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
}
dl.profile-dl dt {
  margin: 0;
  font-weight: 600;
  color: var(--text-muted, #666);
}
dl.profile-dl dd {
  margin: 0;
}

.email-page-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--line, #e0e0e0);
  margin-top: 0.5rem;
}
.email-page-tab {
  padding: 0.65rem 1.1rem;
  text-decoration: none;
  color: var(--text-muted, #666);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.email-page-tab:hover {
  color: var(--radix-green-mid, #2d6a4f);
}
.email-page-tab.is-active {
  color: var(--radix-green-mid, #2d6a4f);
  border-bottom-color: var(--radix-green-mid, #2d6a4f);
}
.email-test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.email-test-card {
  padding: 0.85rem 1rem;
  background: var(--bg, #fafafa);
  border-radius: 10px;
  border: 1px solid var(--line, #e8e8e8);
}
.email-test-section {
  margin-bottom: 1rem;
}

/* Super admin — Banco Inter PIX (P.C.A.I) */
.inter-pix-page {
  max-width: 920px;
}
.inter-pix-hero {
  margin-bottom: 1.25rem;
}
.inter-pix-hero h3 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  color: var(--radix-green-heading, #1b4332);
}
.inter-pix-hero p {
  margin: 0;
  max-width: 40rem;
  line-height: 1.5;
}
.inter-pix-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.inter-pix-status-card {
  border: 1px solid var(--line, #e0e0e0);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.inter-pix-status-card strong {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #666);
  font-weight: 700;
}
.inter-pix-status-card span {
  font-size: 0.95rem;
  font-weight: 600;
  word-break: break-word;
}
.inter-pix-panel {
  border: 1px solid var(--line, #e0e0e0);
  border-radius: 14px;
  background: #fff;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.inter-pix-panel h4 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: var(--radix-green-heading, #1b4332);
}
.inter-pix-panel > p.muted {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  line-height: 1.45;
}
.inter-pix-path {
  display: block;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  background: var(--bg, #f7f9f8);
  border: 1px dashed var(--line, #d0d7d4);
  border-radius: 8px;
  font-size: 0.78rem;
  word-break: break-all;
  font-family: ui-monospace, Consolas, monospace;
}
.inter-pix-webhook-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
  margin-top: 0.5rem;
}
.inter-pix-webhook-row input {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line, #ccc);
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: ui-monospace, Consolas, monospace;
  background: var(--bg, #fafafa);
}
.inter-pix-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.25rem;
}
.inter-pix-form-grid .span-2 {
  grid-column: 1 / -1;
}
.inter-pix-form.form-stack label {
  margin-top: 0.85rem;
}
.inter-pix-form.form-stack input,
.inter-pix-form.form-stack select {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}
.inter-pix-form.form-stack .field-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted, #666);
  font-weight: 400;
}
.inter-pix-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.5rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: var(--bg, #f7f9f8);
  border: 1px solid var(--line, #e8e8e8);
}
.inter-pix-toggle input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--radix-green-mid, #2d6a4f);
}
.inter-pix-toggle span {
  font-weight: 600;
  font-size: 0.95rem;
}
.inter-pix-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line, #eee);
}
.inter-pix-migration {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #f0f7ff;
  border: 1px solid #c5daf5;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #1a4480;
}
.inter-pix-migration code {
  font-size: 0.82rem;
}
@media (max-width: 720px) {
  .inter-pix-form-grid {
    grid-template-columns: 1fr;
  }
  .inter-pix-form-grid .span-2 {
    grid-column: auto;
  }
  .inter-pix-webhook-row {
    flex-direction: column;
  }
  .inter-pix-actions .btn-primary,
  .inter-pix-actions .btn-secondary-sm {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}
.inter-pix-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}
@media (max-width: 640px) {
  .inter-pix-upload-grid {
    grid-template-columns: 1fr;
  }
}
.inter-pix-file-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem;
  border: 2px dashed var(--line, #cfd8d3);
  border-radius: 12px;
  background: var(--bg, #f9fbfa);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.inter-pix-file-field:hover {
  border-color: var(--radix-green-mid, #2d6a4f);
  background: #f0f7f3;
}
.inter-pix-file-field.has-file {
  border-style: solid;
  border-color: var(--radix-green-mid, #2d6a4f);
  background: #edf7f1;
}
.inter-pix-file-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--radix-green-heading, #1b4332);
}
.inter-pix-file-input {
  font-size: 0.82rem;
  width: 100%;
}
.inter-pix-file-hint {
  font-size: 0.78rem;
  color: var(--muted, #666);
}
.inter-pix-upload-status {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  line-height: 1.45;
}
.inter-pix-divider {
  border: none;
  border-top: 1px solid var(--line, #e8e8e8);
  margin: 1.25rem 0 0;
}

