:root {
  --font-serif: "Newsreader", Georgia, Cambria, "Times New Roman", Times, serif;
  --font-sans: "Atkinson Hyperlegible", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --bg-page: #f8f6f1;
  --bg-surface: #ffffff;
  --bg-subtle: #f0ebe1;
  --bg-hover: #ece5d8;
  
  --text-main: #1b2822;
  --text-muted: #53645c;
  --text-subtle: #798b82;
  
  --border-light: #e5ded3;
  --border-medium: #d1c7b8;
  
  --brand-green: #235944;
  --brand-green-hover: #194333;
  --brand-green-soft: #eaf3ee;
  --brand-green-ink: #163b2d;
  
  --gold: #9d7522;
  --gold-soft: #fcf4e4;
  --gold-ink: #6b4d0e;
  
  --danger: #b32626;
  --danger-hover: #911c1c;
  --danger-soft: #fceeed;
  --danger-ink: #751414;
  
  --info: #1d5f8a;
  --info-soft: #ebf4fa;
  --info-ink: #0f3d5b;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 2px rgba(27, 40, 34, 0.05);
  --shadow-md: 0 4px 12px rgba(27, 40, 34, 0.08);
  --shadow-lg: 0 12px 32px rgba(27, 40, 34, 0.12);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* App Header */
.app-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo-mark {
  width: 38px;
  height: 38px;
  background: var(--brand-green);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.35rem;
  box-shadow: 0 2px 6px rgba(35, 89, 68, 0.25);
}

.brand-titles h1 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-green-ink);
  line-height: 1.15;
}

.brand-titles .tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.user-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-email {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.role-badge.super-admin {
  background: var(--gold-soft);
  color: var(--gold-ink);
  border: 1px solid rgba(157, 117, 34, 0.25);
}

.role-badge.reviewer {
  background: var(--brand-green-soft);
  color: var(--brand-green-ink);
  border: 1px solid rgba(35, 89, 68, 0.25);
}

/* Main Content Layout */
.app-main {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Page Section Headers */
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.section-header .section-desc {
  font-size: 0.925rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Filter Controls & Search Bar */
.toolbar-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 480px;
}

.search-input {
  width: 100%;
  padding: 0.6rem 0.75rem 0.6rem 2.25rem;
  font-size: 0.925rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.search-input:focus {
  border-color: var(--brand-green);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(35, 89, 68, 0.1);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
  font-size: 0.9rem;
}

.filter-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.filter-pill {
  border: 1px solid var(--border-light);
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: 0.825rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.filter-pill.active {
  background: var(--brand-green);
  color: white;
  border-color: var(--brand-green);
}

/* Card Surface & Tables */
.card-surface {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.925rem;
}

.data-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
}

.data-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--bg-page);
}

.church-cell-name {
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.church-cell-id {
  font-family: var(--font-mono);
  font-size: 0.775rem;
  color: var(--text-subtle);
  margin-top: 0.15rem;
}

.church-cell-meta {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  gap: 0.4rem;
}

.status-pill.active {
  background: var(--brand-green-soft);
  color: var(--brand-green-ink);
}

.status-pill.suspended {
  background: var(--danger-soft);
  color: var(--danger-ink);
}

.status-pill.verified {
  background: var(--brand-green-soft);
  color: var(--brand-green-ink);
}

.status-pill.unverified {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.status-pill.pending {
  background: var(--gold-soft);
  color: var(--gold-ink);
}

/* Buttons */
.btn {
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  min-height: 40px;
}

.btn-primary {
  background: var(--brand-green);
  color: white;
}

.btn-primary:hover {
  background: var(--brand-green-hover);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background: var(--bg-hover);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger-ink);
  border-color: rgba(179, 38, 38, 0.2);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

.btn-sm {
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  min-height: 32px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.action-group {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

/* Modal Dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(27, 40, 34, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

.modal-backdrop.show {
  display: flex;
  animation: fadeIn 0.15s ease-out;
}

.modal-dialog {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--text-main);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  background: var(--bg-page);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.form-help {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.925rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-main);
  outline: none;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(35, 89, 68, 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

/* Auth Barrier Screen */
.auth-barrier {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.auth-card .logo-mark {
  width: 64px;
  height: 64px;
  background: var(--brand-green);
  color: white;
  border-radius: var(--radius-lg);
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 14px rgba(35, 89, 68, 0.25);
}

.auth-card h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--brand-green-ink);
  margin-bottom: 0.5rem;
}

.auth-card p {
  color: var(--text-muted);
  font-size: 0.925rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.btn-google {
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
  font-weight: 600;
  font-size: 0.95rem;
  width: 100%;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.btn-google:hover {
  background: #f8f9fa;
  border-color: #c5c7cb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.google-g-icon {
  width: 18px;
  height: 18px;
}

/* Empty / State Views */
.state-box {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

.state-box-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.state-box h4 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.state-box p {
  font-size: 0.9rem;
  max-width: 440px;
  margin: 0 auto;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--text-main);
  color: white;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: slideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 400px;
}

.toast.toast-success {
  background: var(--brand-green-ink);
  border-left: 4px solid var(--brand-green);
}

.toast.toast-error {
  background: var(--danger-ink);
  border-left: 4px solid var(--danger);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Secondary 2-Col Layout */
.dashboard-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.dist-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.dist-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--brand-green-ink);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dist-card p.dist-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.dist-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dist-info {
  flex: 1;
  min-width: 0;
}

.dist-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.dist-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dist-meta {
  font-size: 0.75rem;
  color: var(--text-subtle);
  font-weight: 700;
}

.dist-bar-track {
  height: 6px;
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.dist-bar-fill {
  height: 100%;
  background: var(--brand-green);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

.dist-bar-fill.fill-gold {
  background: var(--gold);
}

.dist-bar-fill.fill-info {
  background: var(--info);
}

/* Priority & Category Pills */
.priority-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.priority-pill.normal {
  background: var(--info-soft);
  color: var(--info-ink);
}

.priority-pill.important {
  background: var(--gold-soft);
  color: var(--gold-ink);
}

.priority-pill.maintenance {
  background: var(--danger-soft);
  color: var(--danger-ink);
}

/* Detail Modals & Sections */
.modal-dialog-large {
  max-width: 760px;
}

.detail-section {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px dashed var(--border-light);
}

.detail-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.detail-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-green);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.detail-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem 1.25rem;
}

.detail-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.detail-val {
  font-size: 0.9rem;
  color: var(--text-main);
  font-weight: 500;
}

.detail-val.mono {
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.detail-quote {
  background: var(--bg-subtle);
  border-left: 3px solid var(--brand-green);
  padding: 0.85rem 1.15rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-main);
  font-style: italic;
  max-height: 240px;
  overflow-y: auto;
}

.detail-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.detail-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  color: var(--text-main);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

.detail-tag:hover {
  background: var(--bg-hover);
}

/* Settings & Policies Cards */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.settings-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.settings-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--brand-green-ink);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-card p.settings-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.settings-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex: 1;
}

.settings-list-item {
  font-size: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--text-main);
  line-height: 1.4;
}

.settings-list-item strong {
  color: var(--brand-green-ink);
}

.settings-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-green);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  background: var(--brand-green-soft);
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
  width: fit-content;
}

.settings-link-btn:hover {
  background: var(--brand-green);
  color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .user-section {
    width: 100%;
    justify-content: space-between;
  }
  .dashboard-two-col {
    grid-template-columns: 1fr;
  }
}

/* Shell: menú lateral + contenido */
.shell { flex: 1; display: grid; grid-template-columns: 220px minmax(0, 1fr); max-width: 1360px; width: 100%; margin: 0 auto; }
.side-nav { padding: 1.5rem 0.75rem; border-right: 1px solid var(--border-light); display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 63px; align-self: start; height: calc(100vh - 63px); overflow-y: auto; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group-title { font-size: 0.8rem; font-weight: 700; color: var(--text-subtle); padding: 0 0.75rem 0.35rem; }
.tab-btn { display: flex; align-items: center; gap: 0.7rem; width: 100%; min-height: 44px; padding: 0.5rem 0.75rem; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--text-muted); font: 600 0.95rem var(--font-sans); text-align: left; cursor: pointer; transition: background 0.15s, color 0.15s; }
.tab-btn:hover { background: var(--bg-subtle); color: var(--brand-green-ink); }
.tab-btn:focus-visible { outline: 2px solid var(--brand-green); outline-offset: 2px; }
.tab-btn.active { background: var(--brand-green-soft); color: var(--brand-green-ink); box-shadow: inset 3px 0 0 var(--brand-green); }
.tab-label { flex: 1; }
.nav-ico { flex: none; }
.tab-badge { min-width: 1.5rem; text-align: center; background: var(--bg-subtle); color: var(--text-muted); font-size: 0.8rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: var(--radius-pill); }
.tab-badge.highlight { background: var(--gold); color: #fff; }
.app-main { max-width: none; margin: 0; }

/* Resumen */
.attention-panel { background: var(--gold-soft); border: 1px solid rgba(157,117,34,.3); border-left: 5px solid var(--gold); border-radius: var(--radius-md); padding: 1.25rem 1.5rem; margin-bottom: 2rem; }
.attention-panel.is-clear { background: var(--brand-green-soft); border-color: rgba(35,89,68,.25); border-left-color: var(--brand-green); }
.attention-panel h3 { font: 700 1.35rem var(--font-serif); color: var(--gold-ink); margin-bottom: 0.75rem; }
.attention-panel ul { list-style: none; display: grid; gap: 0.6rem; }
.attention-panel li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: 1.05rem; font-weight: 600; }
.attention-clear { font: 600 1.15rem var(--font-serif); color: var(--brand-green-ink); }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 2rem; border-top: 1px solid var(--border-medium); border-bottom: 1px solid var(--border-light); }
.figures > div { padding: 1.1rem 1.25rem 1.1rem 0; }
.figures > div + div { padding-left: 1.25rem; border-left: 1px solid var(--border-light); }
.figures dt { font-size: 0.9rem; font-weight: 700; color: var(--text-muted); }
.figures dd:not(.fig-sub) { font: 700 2.6rem/1.1 var(--font-serif); color: var(--brand-green-ink); margin: 0.2rem 0; font-variant-numeric: lining-nums; }
.figures .fig-sub { font-size: 0.85rem; color: var(--text-muted); }
.dist-row-label { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.95rem; margin-bottom: 0.3rem; }
.dist-row-count { font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.dist-card h3 { margin-bottom: 1rem; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side-nav { position: static; height: auto; flex-direction: row; gap: 0.25rem; overflow-x: auto; padding: 0.5rem 0.75rem; border-right: 0; border-bottom: 1px solid var(--border-light); background: var(--bg-surface); }
  .nav-group { flex-direction: row; gap: 0.25rem; }
  .nav-group-title { display: none; }
  .tab-btn { width: auto; white-space: nowrap; }
  .tab-btn.active { box-shadow: inset 0 -3px 0 var(--brand-green); }
  .figures > div + div { border-left: 0; padding-left: 0; }
  .attention-panel li { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .tab-pane.active { animation: none; } .tab-btn, .dist-bar-fill { transition: none; } }

.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.search-icon { color: var(--text-subtle); flex: none; }

.pill-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; }
.more-menu { position: relative; }
.more-menu summary { list-style: none; cursor: pointer; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 230px; background: var(--bg-surface); border: 1px solid var(--border-medium); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 0.35rem; display: flex; flex-direction: column; }
.more-list button, .more-list a { text-align: left; background: none; border: 0; border-radius: var(--radius-sm); padding: 0.65rem 0.75rem; min-height: 44px; font: 600 0.9rem var(--font-sans); color: var(--text-main); text-decoration: none; cursor: pointer; display: flex; align-items: center; }
.more-list button:hover, .more-list a:hover { background: var(--bg-subtle); }
.more-list .danger { color: var(--danger); border-top: 1px solid var(--border-light); border-radius: 0 0 var(--radius-sm) var(--radius-sm); margin-top: 0.2rem; }
.more-list .danger:hover { background: var(--danger-soft); }
.table-responsive:has(.more-menu[open]) { overflow: visible; }
.card-surface:has(.more-menu[open]) { overflow: visible; }

.env-badge { font-size: 0.8rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: var(--radius-pill); }
.env-badge.env-prod { background: var(--danger-soft); color: var(--danger-ink); }
.env-badge.env-dev { background: var(--info-soft); color: var(--info-ink); }
.env-switch { font-size: 0.85rem; color: var(--text-muted); }
