: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; }

.form-card { padding: 0; overflow: hidden; }
.form-card-head { padding: 1.1rem 1.25rem 0; margin-bottom: 0; }
.form-card-body { padding: 0.25rem 1.25rem 1.25rem; }
.form-card .form-stack input,
.form-card .form-stack select,
.form-card .form-stack textarea { max-width: 100%; }
.form-section-label { margin: 1.25rem 0 0.5rem; font-size: 0.95rem; color: var(--text); }
.form-actions-inline { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; align-items: center; }
.field-hint { font-size: 0.88rem; line-height: 1.45; margin-top: 0.35rem; }

.back-nav { margin: 0 0 1rem; font-size: 0.92rem; }
.back-nav a { color: var(--radix-green-accent); font-weight: 600; text-decoration: none; }
.back-nav a:hover { text-decoration: underline; }

.checkin-card { margin-bottom: 1.25rem; padding: 1rem 1.15rem; }
.checkin-card-inner { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.checkin-field { flex: 1 1 12rem; min-width: 10rem; margin: 0; }
.checkin-label { display: block; font-size: 0.85rem; margin-bottom: 0.25rem; }
.checkin-input {
  width: 100%; letter-spacing: 0.12em; font-weight: 700; text-transform: uppercase;
  padding: 0.55rem 0.65rem; border-radius: 8px; border: 1px solid var(--line);
}

.env-kv-list { list-style: none; margin: 0; padding: 0; }
.env-kv-list li {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem;
  padding: 0.55rem 0; border-bottom: 1px solid var(--line); font-size: 0.92rem;
}
.env-kv-list li:last-child { border-bottom: none; }
.env-kv-list li span:first-child { font-weight: 600; color: var(--text-muted, #607d8b); }

.empty-state--compact { padding: 1.25rem 1rem; }
.selected-patient-card { margin-top: .75rem; padding: 1rem 1.15rem; border-left: 4px solid var(--radix-green-accent); }
.integration-card-detail { margin: 0; font-size: 0.88rem; line-height: 1.45; }

/* Página Configurações (super-admin) */
.settings-page {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.settings-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--soft-shadow-sm);
  overflow: hidden;
}
.settings-panel--launch.is-ready { border-left: 4px solid var(--radix-green-accent, #2d6a4f); }
.settings-panel--launch.is-pending { border-left: 4px solid #e65100; }

.settings-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fafb 0%, #fff 100%);
}
.settings-panel__title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.settings-panel__icon {
  flex: 0 0 2.25rem;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--radix-green-soft, #edf8f1);
  font-size: 1.1rem;
  line-height: 1;
}
.settings-panel__head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--radix-green, #1b4332);
}

.settings-panel__body {
  flex: 1 1 auto;
  padding: 1.25rem 1.35rem;
}
.settings-panel__body--flush { padding: 0; }
.settings-panel__lead {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}
.settings-panel__foot {
  padding: 1rem 1.35rem;
  border-top: 1px solid var(--line);
  background: #fafbfc;
}
.settings-panel__foot--muted {
  font-size: 0.82rem;
  color: var(--muted);
}
.settings-panel__hint {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.settings-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.settings-env-list { margin: 0; }
.settings-env-row {
  display: grid;
  grid-template-columns: minmax(7rem, 38%) 1fr;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.75rem 1.35rem;
  border-bottom: 1px solid var(--line);
}
.settings-env-row:last-child { border-bottom: none; }
.settings-env-row dt {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.settings-env-row dd {
  margin: 0;
  min-width: 0;
  word-break: break-all;
}
.settings-env-row dd code {
  font-size: 0.88rem;
  background: #f1f5f9;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  color: #334155;
}

.launch-readiness-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.launch-readiness-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.launch-readiness-item:last-child { border-bottom: none; }
.launch-readiness-icon {
  flex: 0 0 1.65rem;
  width: 1.65rem;
  height: 1.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  background: #eceff1;
  color: #546e7a;
  margin-top: 0.1rem;
}
.launch-readiness-item.is-done .launch-readiness-icon {
  background: #e8f5e9;
  color: #1b5e20;
}
.launch-readiness-body { flex: 1; min-width: 0; }
.launch-readiness-body strong { display: block; font-size: 0.94rem; color: var(--text); }
.launch-readiness-body p { margin: 0.25rem 0 0; font-size: 0.86rem; line-height: 1.45; color: var(--muted); }
.launch-readiness-action { flex-shrink: 0; margin: 0; align-self: center; text-decoration: none; }

.settings-backup-block {
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}
.settings-backup-block:first-of-type { border-top: none; padding-top: 0.25rem; }
.settings-backup-block__title {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.settings-form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.85rem 1rem;
  align-items: end;
}
.settings-form-row--2 { grid-template-columns: 1fr 1fr; }
.settings-form-field label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}
.settings-form-field__spacer { visibility: hidden; height: 0; margin: 0; overflow: hidden; }
.settings-form-field input,
.settings-form-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.58rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.92rem;
  background: #fff;
  font-family: inherit;
}
.settings-form-field input:focus,
.settings-form-field select:focus {
  outline: none;
  border-color: var(--radix-green-accent);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
}
.settings-form-field--action .btn-primary,
.settings-form-field--action .btn-danger { width: 100%; white-space: nowrap; }
.settings-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.85rem 0 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
  cursor: pointer;
}
.settings-check input { margin-top: 0.2rem; flex-shrink: 0; }
.settings-backup-block--history .table-responsive-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.settings-backup-block--history .table { border-radius: 0; margin: 0; }

@media (max-width: 900px) {
  .settings-overview-grid,
  .settings-form-row,
  .settings-form-row--2 {
    grid-template-columns: 1fr;
  }
  .settings-env-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .settings-form-field--action .btn-primary,
  .settings-form-field--action .btn-danger { width: auto; }
  .launch-readiness-item { flex-wrap: wrap; }
  .launch-readiness-action { width: 100%; margin-top: 0.35rem; }
}

.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;
}

/* Modal (pacotes de assinatura, etc.) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 20, 0.48);
  backdrop-filter: blur(3px);
}
.modal-backdrop[hidden] {
  display: none !important;
}
.modal-backdrop.is-open {
  display: flex;
}
body.modal-open {
  overflow: hidden;
}
.modal-card {
  width: 100%;
  max-width: 720px;
  max-height: min(92vh, 900px);
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 48px rgba(15, 23, 20, 0.18);
  padding: 1.35rem 1.5rem 1.5rem;
}
.modal-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.modal-card-header h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--radix-green-heading);
}
.modal-card-header p {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Formulário em grelha (2 colunas) */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}
.form-group {
  min-width: 0;
}
.form-group-full {
  grid-column: 1 / -1;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 0.92rem;
  background: #fff;
  color: var(--text);
}
.form-group input[readonly] {
  background: var(--bg, #f7f9f8);
  color: var(--muted);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--radix-green-mid, #2d6a4f);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
}
.form-group textarea {
  resize: vertical;
  min-height: 4.5rem;
}
.form-group .field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}
.form-section {
  grid-column: 1 / -1;
  margin-top: 0.25rem;
}
.form-section-title {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-section-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  background: var(--bg, #f7f9f8);
  border: 1px solid var(--line);
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}
.badge-discount {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0d6b2f;
  background: #e8f5e9;
  border-radius: 4px;
}
.subscriptions-section-title {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.05rem;
  color: var(--radix-green-heading);
}
@media (max-width: 640px) {
  .form-grid,
  .form-section-inner {
    grid-template-columns: 1fr;
  }
  .modal-card {
    padding: 1rem 1.1rem 1.15rem;
    border-radius: 12px;
  }
}

/* Super admin — formulário de empresa */
.company-form-page {
  max-width: 920px;
}
.company-form-back {
  margin: 0 0 0.85rem;
}
.company-form-back a {
  color: var(--radix-green-accent, #2d6a4f);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
}
.company-form-back a:hover {
  text-decoration: underline;
}
.company-form-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line, #e0e0e0);
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbf9 0%, #fff 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.company-form-hero h3 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  color: var(--radix-green-heading, #1b4332);
}
.company-form-hero .muted {
  margin: 0;
  max-width: 36rem;
  line-height: 1.5;
  font-size: 0.9rem;
}
.company-form-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.company-form-panel {
  border: 1px solid var(--line, #e0e0e0);
  border-radius: 14px;
  background: #fff;
  padding: 1.15rem 1.25rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.company-form-panel--readonly {
  background: #fafbfc;
  border-style: dashed;
}
.company-form-panel-head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.company-form-panel-head h4 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: var(--radix-green-heading, #1b4332);
}
.company-form-panel-head .muted {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
}
.company-form-step {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--radix-green-mid, #2d6a4f);
  color: #fff;
  font-weight: 800;
  font-size: 0.88rem;
}
.company-form-step--muted {
  background: #eceff1;
  color: #546e7a;
  font-size: 0.72rem;
  font-weight: 700;
}
.company-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.15rem;
}
.company-form-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.company-form-grid .span-2 { grid-column: span 2; }
.company-form-grid .span-3 { grid-column: 1 / -1; }
.company-form-field label {
  display: block;
  margin-top: 0.75rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text, #1a1a1a);
}
.company-form-field:first-child label,
.company-form-panel-head + .company-form-grid .company-form-field label,
.company-form-cnpj-row + .company-form-field label {
  margin-top: 0;
}
.company-form-field input,
.company-form-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line, #cfd8dc);
  border-radius: 10px;
  font-size: 0.95rem;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.company-form-field input:focus,
.company-form-field textarea:focus {
  outline: none;
  border-color: var(--radix-green-mid, #2d6a4f);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
}
.company-form-panel--readonly .company-form-field input,
.company-form-panel--readonly .company-form-field textarea {
  background: #f1f3f4;
  color: #37474f;
  border-color: #dfe3e6;
  cursor: default;
}
.company-form-field textarea {
  resize: vertical;
  min-height: 5.5rem;
  font-family: inherit;
  line-height: 1.45;
}
.company-form-cnpj-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: flex-end;
}
.company-form-field--grow {
  flex: 1 1 14rem;
  min-width: 0;
}
.company-form-field--action {
  flex: 0 0 auto;
}
.company-form-sr-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.company-form-lookup-btn {
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  white-space: nowrap;
}
.company-form-status {
  margin: 0.75rem 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: var(--bg, #f7f9f8);
  border: 1px solid transparent;
}
.company-form-status.is-loading {
  background: #f0f7ff;
  border-color: #c5daf5;
  color: #1a4480;
}
.company-form-status.is-success {
  background: #e8f5e9;
  border-color: #a5d6a7;
  color: #1b5e20;
}
.company-form-status.is-error {
  background: #ffebee;
  border-color: #ef9a9a;
  color: #b71c1c;
}
.company-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line, #e0e0e0);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.company-form-actions .btn-primary {
  min-width: 10rem;
  padding: 0.65rem 1.25rem;
  font-weight: 700;
}
@media (max-width: 720px) {
  .company-form-grid,
  .company-form-grid--3 {
    grid-template-columns: 1fr;
  }
  .company-form-grid .span-2,
  .company-form-grid .span-3 {
    grid-column: auto;
  }
  .company-form-field--action {
    width: 100%;
  }
  .company-form-lookup-btn {
    width: 100%;
  }
  .company-form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .company-form-actions .btn-primary,
  .company-form-actions .btn-secondary-sm {
    width: 100%;
    text-align: center;
  }
}

/* —— Login premium —— */
.radix-login-body {
  min-height: 100vh;
  background: var(--soft-bg);
}
.radix-login-split {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
}
.radix-login-hero {
  flex: 1 1 45%;
  background: linear-gradient(145deg, #1b4332 0%, #2d6a4f 45%, #40916c 100%);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 2.5rem;
}
.radix-login-hero-inner { max-width: 26rem; }
.radix-login-hero-mark {
  display: block;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.2);
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.radix-login-hero h2 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.radix-login-hero p { margin: 0 0 1.25rem; opacity: 0.92; line-height: 1.55; }
.radix-login-features {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.7;
  opacity: 0.95;
}
.radix-login-wrap {
  flex: 1 1 55%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}
.radix-login-card {
  width: 100%;
  max-width: 26rem;
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--soft-shadow);
  border: 1px solid var(--line);
}
.radix-login-card-head h1 { margin: 0 0 0.35rem; font-size: 1.65rem; color: var(--radix-green-heading); }
.radix-login-card-head .muted { margin: 0 0 1.25rem; }
.btn-primary-lg {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  margin-top: 0.5rem;
}
.radix-login-footer-link { margin-top: 1rem; text-align: center; font-size: 0.9rem; }

/* —— Legal / conteúdo —— */
.legal-card { padding: 1.5rem 1.75rem; }
.legal-meta { margin-bottom: 1.25rem; font-size: 0.85rem; }
.legal-lead { font-size: 1.05rem; line-height: 1.55; color: #374151; }
.legal-prose h4 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  color: var(--radix-green-heading);
}
.legal-prose p, .legal-list { line-height: 1.6; color: #374151; }
.legal-list { padding-left: 1.25rem; }
.legal-list li { margin-bottom: 0.4rem; }
.page-intro-card {
  background: linear-gradient(180deg, #fff 0%, var(--primary-soft) 100%);
  border: 1px solid #c8e6d4;
}
.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}
.empty-state p:first-child { font-weight: 600; color: #374151; margin-bottom: 0.35rem; }
.stat-caption { font-size: 0.78rem; margin: 0.35rem 0 0; }
.support-channels { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1rem; }
.security-checklist { list-style: none; padding: 0; margin: 0; }
.security-checklist li {
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.4rem;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid var(--line);
}
.security-checklist li.is-ok { border-color: #a7f3d0; background: #ecfdf5; }
.security-checklist li.is-warn { border-color: #fde68a; background: #fffbeb; }
.config-list { list-style: none; padding: 0; margin: 0; }
.config-list li { padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.config-list.mono code { font-size: 0.82rem; }
.soft-search-form { display: inline-flex; margin-right: 0.5rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

@media (max-width: 900px) {
  .radix-login-split { flex-direction: column; }
  .radix-login-hero { flex: none; padding: 2rem 1.5rem; }
  .radix-login-hero-inner { max-width: none; }
}

/* —— Platform v2: componentes modernos —— */
.btn-primary {
  background: linear-gradient(135deg, var(--radix-green-mid), var(--radix-green-accent));
  border: none;
  box-shadow: 0 4px 14px rgba(45, 106, 79, 0.28);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--radix-green-accent), var(--radix-green));
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(45, 106, 79, 0.32);
}
.card {
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow-sm);
}
.data-card { padding: 0; overflow: hidden; }
.data-card .section-head {
  padding: 1rem 1.25rem;
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
.data-card .table-responsive-wrap,
.data-card .empty-state,
.data-card .notification-feed { padding: 0 1.25rem 1.25rem; }
.data-card .section-head + .table-responsive-wrap { padding-top: 0.5rem; }
.table-modern tbody tr {
  transition: background 0.12s ease;
}
.table-modern tbody tr:hover {
  background: #f8fafc;
}
.table-modern thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 2px solid var(--line);
}
.table-actions {
  white-space: nowrap;
  font-size: 0.88rem;
}
.table-actions a {
  color: var(--radix-green-accent);
  font-weight: 600;
  text-decoration: none;
  margin-right: 0.65rem;
}
.table-actions a:hover { text-decoration: underline; }
.row-link { color: inherit; text-decoration: none; }
.row-link:hover strong { color: var(--radix-green-accent); }
.cpf-chip {
  font-size: 0.82rem;
  background: #f1f5f9;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  color: #475569;
}
.text-sm { font-size: 0.85rem; }
.filters-dual { gap: 0.75rem; margin-bottom: 0.5rem; }
.filters-dual .list-filter-card { margin: 0; }
.integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.integration-card {
  padding: 1.1rem 1.25rem;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.integration-card:hover {
  box-shadow: var(--soft-shadow);
  transform: translateY(-2px);
}
.integration-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.integration-detail { margin: 0; font-size: 0.88rem; line-height: 1.45; }
.notification-feed {
  list-style: none;
  margin: 0;
  padding: 0.75rem 0 0;
}
.notification-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem 1rem;
  align-items: start;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.notification-item:last-child { border-bottom: none; }
.notification-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--radix-green-mid);
  margin-top: 0.35rem;
  box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.2);
}
.notification-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.notification-body strong { font-size: 0.95rem; }
.notification-time { font-size: 0.78rem; white-space: nowrap; }
.table-avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--radix-green-heading);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
}
.soft-sidebar {
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}
.bank-nav-link {
  border-radius: 10px;
  transition: background 0.12s ease, color 0.12s ease;
}
.bank-nav-link.is-active {
  background: var(--primary-soft);
  color: var(--radix-green-heading);
  font-weight: 700;
}
.soft-page-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--radix-green-heading);
}
.list-filter-card {
  border: 1px solid var(--line);
  box-shadow: none;
  background: #fff;
}
@media (max-width: 768px) {
  .soft-sidebar {
    width: 100%;
    flex: none;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .radix-bank-shell.soft-layout { flex-direction: column; }
  .notification-item { grid-template-columns: auto 1fr; }
  .notification-time { grid-column: 2; }
}

/* —— P.C.A.I (conteúdo clínico) —— */
.settings-panel__subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}
.settings-panel--wide { width: 100%; }

.pcai-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: none;
}

.pcai-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.pcai-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.pcai-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 1.25rem 1.5rem;
  padding: 1.35rem 1.5rem;
  border-radius: 14px;
  border: 1px solid #c8e6d4;
  background: linear-gradient(135deg, #fff 0%, var(--primary-soft) 55%, #f0faf4 100%);
  box-shadow: var(--soft-shadow-sm);
}
.pcai-hero__badge {
  display: inline-block;
  margin-bottom: 0.45rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--radix-green-accent);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #b7dfc8;
}
.pcai-hero__title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--radix-green-heading);
}
.pcai-hero__lead {
  margin: 0.5rem 0 0;
  max-width: 42rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #374151;
}
.pcai-hero__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  align-self: center;
}
.pcai-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 4.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow-sm);
}
.pcai-stat__value {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--radix-green-heading);
}
.pcai-stat__label {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.pcai-stat--status {
  min-width: auto;
  padding: 0.55rem 0.75rem;
  background: transparent;
  border: none;
  box-shadow: none;
}

.pcai-inline-form,
.pcai-lesao-form,
.pcai-stack-form {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.pcai-form-grid {
  display: grid;
  gap: 0.85rem 1rem;
  align-items: end;
}
.pcai-form-grid--profession {
  grid-template-columns: minmax(9rem, 1fr) minmax(8rem, 0.85fr) minmax(12rem, 2fr) auto auto;
}
.pcai-form-grid--lesao {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pcai-form-grid--concurso {
  grid-template-columns: minmax(8rem, 0.9fr) minmax(12rem, 2fr) minmax(9rem, 1fr) auto;
}
.pcai-concurso-form {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.pcai-field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
}
.pcai-field--link.is-radix .pcai-input {
  border-style: dashed;
}
.pcai-desc-cell {
  max-width: 16rem;
  font-size: 0.88rem;
  line-height: 1.4;
}
.pcai-link-cell {
  max-width: 14rem;
  font-size: 0.84rem;
}
.pcai-ext-link {
  color: var(--radix-green-accent);
  font-weight: 600;
  word-break: break-all;
  text-decoration: none;
}
.pcai-ext-link:hover { text-decoration: underline; }

.pcai-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.pcai-field--grow { min-width: 0; }
.pcai-field--full { grid-column: 1 / -1; }
.pcai-field--check {
  align-self: end;
  padding-bottom: 0.15rem;
}
.pcai-field--action {
  align-self: end;
}
.pcai-field__spacer {
  display: block;
  height: 1.25rem;
  visibility: hidden;
}
.pcai-field label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #374151;
  letter-spacing: 0.01em;
}
.pcai-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.pcai-check input { margin: 0; }

.pcai-input,
.pcai-page select.pcai-input,
.pcai-page textarea.pcai-input {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text);
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  box-sizing: border-box;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.pcai-input:focus,
.pcai-page select.pcai-input:focus,
.pcai-page textarea.pcai-input:focus {
  outline: none;
  border-color: var(--radix-green-mid);
  box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.15);
}
.pcai-textarea {
  resize: vertical;
  min-height: 5.5rem;
}
.pcai-textarea--mono {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.45;
}
.pcai-textarea--legal {
  font-size: 0.88rem;
  line-height: 1.55;
}

.pcai-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 1rem;
}
.pcai-form-actions .btn-primary,
.pcai-form-actions .btn-secondary-sm {
  margin: 0;
}

.pcai-table-wrap {
  margin-top: 0.25rem;
  border-radius: 12px;
}
.pcai-table thead th {
  background: #f8fafb;
}
.pcai-col-num {
  width: 5rem;
  text-align: center;
}
.pcai-col-actions {
  width: 11rem;
  text-align: right;
}
.pcai-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #334155;
  background: #f1f5f9;
}
.pcai-code-chip {
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pcai-row-name {
  font-weight: 600;
  color: var(--text);
}

.pcai-action-group {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}
.inline-form {
  display: inline-flex;
  margin: 0;
  padding: 0;
  vertical-align: middle;
}
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  background: transparent;
  font-family: inherit;
}
.btn-action--primary {
  color: var(--radix-green-accent);
  border-color: #b7dfc8;
  background: #f0faf4;
}
.btn-action--primary:hover {
  background: var(--primary-soft);
  text-decoration: none;
}
.btn-action--danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}
.btn-action--danger:hover {
  background: #fee2e2;
}

.pcai-secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 1100px) {
  .pcai-form-grid--profession {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pcai-field--check,
  .pcai-field--action {
    grid-column: 1 / -1;
  }
  .pcai-field--action .btn-primary {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .pcai-hero {
    flex-direction: column;
    padding: 1.15rem;
  }
  .pcai-hero__stats {
    width: 100%;
    justify-content: flex-start;
  }
  .pcai-form-grid--profession,
  .pcai-form-grid--lesao,
  .pcai-form-grid--concurso {
    grid-template-columns: 1fr;
  }
  .pcai-field--full {
    grid-column: auto;
  }
  .pcai-secondary-grid {
    grid-template-columns: 1fr;
  }
  .pcai-col-actions {
    width: auto;
  }
  .pcai-action-group {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-action {
    width: 100%;
    justify-content: center;
  }
}
