/* ================= 4ACHIEVERS JUNIOR 2026 LUXURY LIGHT ADMIN ================= */
:root {
  --canvas: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f9fafc;
  --ink: #0f172a;
  --ink-muted: #526077;
  --ink-subtle: #8492a6;
  --hairline: rgba(15, 23, 42, 0.08);
  --hairline-strong: rgba(15, 23, 42, 0.14);
  --accent-orange: #ea580c;
  --accent-indigo: #4f46e5;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-red: #dc2626;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 14px 36px -14px rgba(15, 23, 42, 0.07);
  --shadow-float: 0 24px 60px -16px rgba(15, 23, 42, 0.18);
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* Soft Pills */
.pill-soft,
.kpi-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.pill-orange { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.pill-indigo { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.pill-emerald { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.pill-amber { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.pill-red { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.pill-slate { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }

/* Luxury Buttons */
.btn-lux-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.15rem;
  min-block-size: 42px;
  border-radius: 11px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  box-shadow: 0 8px 20px -6px rgba(234, 88, 12, 0.45);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  text-decoration: none;
}
.btn-lux-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -6px rgba(234, 88, 12, 0.52); }
.btn-lux-primary:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-full { inline-size: 100%; }

.btn-lux-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  min-block-size: 40px;
  border-radius: 11px;
  border: 1px solid var(--hairline-strong);
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.16s, border-color 0.16s;
}
.btn-lux-ghost:hover { background: #f8fafc; border-color: #94a3b8; }

.btn-lux-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-radius: 11px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
}
.btn-lux-whatsapp:hover { background: #d1fae5; }

.btn-lux-danger {
  padding: 0.6rem 1.1rem;
  min-block-size: 40px;
  border-radius: 11px;
  border: 0;
  background: #dc2626;
  color: #fff;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
}
.btn-lux-danger-ghost {
  padding: 0.55rem 0.95rem;
  min-block-size: 40px;
  border-radius: 11px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

/* ================= AUTHENTICATION PAGE ================= */
.auth-body {
  min-block-size: 100dvb;
  background:
    radial-gradient(circle at 8% 12%, rgba(238, 242, 255, 0.95) 0%, transparent 45%),
    radial-gradient(circle at 92% 88%, rgba(255, 237, 213, 0.9) 0%, transparent 45%),
    #f6f8fc;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.auth-shell {
  inline-size: min(1040px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

.auth-brand-badge {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-block-end: 1.5rem;
}
.auth-logo { height: 40px; width: auto; display: block; }
.auth-display-title {
  font-size: clamp(1.65rem, 2.7vw, 2.25rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: 0 0 0.85rem;
}
.auth-display-sub {
  color: var(--ink-muted);
  font-size: 0.96rem;
  line-height: 1.6;
  margin: 0 0 1.75rem;
}
.auth-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.auth-mini-card {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.auth-mini-card strong { font-size: 0.88rem; }
.auth-mini-card small { font-size: 0.78rem; color: var(--ink-muted); line-height: 1.45; }
.auth-mini-dot { inline-size: 10px; block-size: 10px; border-radius: 50%; margin-block-end: 0.25rem; }
.dot-orange { background: var(--accent-orange); }
.dot-indigo { background: var(--accent-indigo); }
.dot-emerald { background: var(--accent-emerald); }

.auth-card {
  background: #ffffff;
  border: 1px solid var(--hairline);
  border-radius: 24px;
  padding: 2.2rem;
  box-shadow: var(--shadow-float);
}
.auth-card-header h2 {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0.75rem 0 0.35rem;
}
.auth-card-header p {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin: 0 0 1.4rem;
}
.auth-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 600;
  margin-block-end: 1.1rem;
}

.auth-form, .lux-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}
.field-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
}
.req { color: #dc2626; }
.field-group input, .field-group select, .field-group textarea {
  inline-size: 100%;
  min-block-size: 46px;
  padding: 0.65rem 0.85rem;
  border-radius: 11px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: max(1rem, 0.9rem);
  transition: border-color 0.16s, box-shadow 0.16s;
}
.field-group textarea { min-block-size: 86px; resize: vertical; }
.field-group input:focus-visible,
.field-group select:focus-visible,
.field-group textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2.5px solid #4f46e5;
  outline-offset: 2px;
}
.field-group :is(input, select, textarea):user-invalid {
  border-color: #dc2626;
  background: #fffafa;
}

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap input { padding-inline-end: 4.4rem; }
.pw-toggle-btn {
  position: absolute;
  inset-inline-end: 0.45rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
}
.auth-footer-note {
  margin-block-start: 1.35rem;
  text-align: center;
  font-size: 0.82rem;
}
.auth-footer-note a { color: var(--ink-muted); font-weight: 600; text-decoration: none; }
.auth-footer-note a:hover { color: var(--accent-orange); }

/* ================= MAIN ADMIN WORKSPACE SHELL ================= */
.app-body {
  background:
    radial-gradient(circle at 0% 0%, rgba(238, 242, 255, 0.75) 0%, transparent 42%),
    radial-gradient(circle at 100% 0%, rgba(255, 247, 237, 0.85) 0%, transparent 40%),
    var(--canvas);
}

.app-shell {
  min-block-size: 100dvb;
  display: grid;
  grid-template-columns: 266px minmax(0, 1fr);
}

.app-sidebar {
  position: sticky;
  inset-block-start: 0;
  block-size: 100dvh;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border-inline-end: 1px solid var(--hairline);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  z-index: 40;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-inline: 0.35rem;
}
.sidebar-logo-img { height: 32px; width: auto; display: block; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-subtle);
  padding: 0.85rem 0.7rem 0.25rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  inline-size: 100%;
  min-block-size: 42px;
  padding: 0.58rem 0.8rem;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  text-align: start;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: #f1f5f9; color: var(--ink); }
.nav-item.is-active {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  color: #c2410c;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #fed7aa;
}
.nav-badge {
  margin-inline-start: auto;
  background: #ea580c;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.db-health-card {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  padding: 0.72rem 0.85rem;
}
.db-health-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: #166534;
}
.db-health-card small { display: block; font-size: 0.7rem; color: #15803d; margin-top: 0.15rem; }
.live-dot {
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.admin-profile-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.65rem;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
}
.admin-avatar {
  inline-size: 36px;
  block-size: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.admin-meta { min-inline-size: 0; flex: 1; }
.admin-meta strong { display: block; font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-meta small { display: block; font-size: 0.72rem; color: var(--ink-subtle); }
.btn-icon-ghost {
  inline-size: 34px;
  block-size: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--ink-muted);
  border: 1px solid transparent;
}
.btn-icon-ghost:hover { background: #fee2e2; color: #b91c1c; }

/* Main Column */
.app-main-wrap {
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  inset-block-start: 0;
  z-index: 30;
  background: rgba(245, 247, 251, 0.84);
  backdrop-filter: blur(14px);
  border-block-end: 1px solid var(--hairline);
  padding: 1rem 1.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.topbar-left { display: flex; align-items: center; gap: 0.9rem; min-inline-size: 0; }
.sidebar-mobile-btn {
  display: none;
  inline-size: 40px;
  block-size: 40px;
  border-radius: 11px;
  border: 1px solid var(--hairline-strong);
  background: #ffffff;
  place-items: center;
  cursor: pointer;
}
.page-heading { font-size: 1.25rem; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.page-subheading { font-size: 0.8rem; color: var(--ink-muted); margin: 0.15rem 0 0; }
.topbar-actions { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; }

.workspace-content {
  padding: 1.5rem 1.85rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}
.view-panel { display: flex; flex-direction: column; gap: 1.35rem; }
.view-panel[hidden] { display: none; }

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 1.1rem;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.kpi-card::after {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 3px;
}
.kpi-glow-indigo::after { background: linear-gradient(90deg, #4f46e5, #818cf8); }
.kpi-glow-orange::after { background: linear-gradient(90deg, #ea580c, #fb923c); }
.kpi-glow-emerald::after { background: linear-gradient(90deg, #059669, #34d399); }
.kpi-glow-amber::after { background: linear-gradient(90deg, #d97706, #fbbf24); }

.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.kpi-label { font-size: 0.78rem; font-weight: 700; color: var(--ink-muted); }
.kpi-val {
  font-size: 2.05rem;
  font-weight: 800;
  margin: 0.55rem 0 0.2rem;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.kpi-foot { font-size: 0.74rem; color: var(--ink-subtle); }

/* Glass Cards & Charts */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  padding: 1.35rem 1.45rem;
  box-shadow: var(--shadow-card);
  min-inline-size: 0;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 1.15rem;
  flex-wrap: wrap;
}
.card-head h2 { font-size: 1.05rem; font-weight: 800; margin: 0; }
.card-head p { font-size: 0.8rem; color: var(--ink-muted); margin: 0.2rem 0 0; }

.charts-bento {
  display: grid;
  grid-template-columns: 1.38fr 1fr;
  gap: 1.15rem;
}
.chart-legend { display: flex; align-items: center; gap: 1rem; font-size: 0.76rem; font-weight: 600; color: var(--ink-muted); }
.legend-dot { display: inline-block; inline-size: 9px; block-size: 9px; border-radius: 50%; margin-inline-end: 0.35rem; }

.chart-canvas-wrap {
  position: relative;
  inline-size: 100%;
  min-block-size: 250px;
}
.chart-canvas-wrap canvas { display: block; inline-size: 100%; block-size: 260px; }
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.94);
  color: #ffffff;
  padding: 0.55rem 0.78rem;
  border-radius: 10px;
  font-size: 0.75rem;
  line-height: 1.45;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
  z-index: 5;
  white-space: nowrap;
}

.donut-layout {
  display: grid;
  grid-template-columns: 166px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}
.donut-wrap { position: relative; inline-size: 166px; block-size: 166px; margin-inline: auto; }
.donut-wrap canvas { display: block; }
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.donut-center strong { font-size: 1.55rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.donut-center small { font-size: 0.74rem; color: var(--ink-subtle); font-weight: 600; }

.donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.donut-legend li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.77rem;
  color: #334155;
}
.donut-legend-left { display: flex; align-items: center; gap: 0.45rem; font-weight: 600; min-inline-size: 0; }
.donut-legend-left span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donut-legend strong { font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; }

.lower-bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}
.bar-bars-list { display: flex; flex-direction: column; gap: 0.85rem; }
.bar-row-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.81rem;
  font-weight: 700;
  margin-block-end: 0.35rem;
}
.bar-row-meta span:last-child { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.bar-track {
  inline-size: 100%;
  block-size: 9px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}
.bar-fill {
  block-size: 100%;
  border-radius: 999px;
  transition: inline-size 0.5s ease;
}

/* ================= RESPONSIVE DATA TABLES (Modern Web Guidance) ================= */
.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(470px, 70dvh);
  container-type: inline-size;
  border-radius: 14px;
  border: 1px solid var(--hairline);
}
.crm-table-scroll { max-block-size: min(620px, 74dvh); }

.lux-table {
  inline-size: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: start;
  font-size: 0.84rem;
}
.lux-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
}
.lux-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.71rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.72rem 0.68rem;
  border-block-end: 1px solid var(--hairline-strong);
  white-space: nowrap;
}
.lux-table td, .lux-table tbody th {
  padding: 0.72rem 0.68rem;
  border-block-end: 1px solid var(--hairline);
  vertical-align: middle;
  background: #ffffff;
}
.lux-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  font-weight: 700;
  color: var(--ink);
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.84rem;
  white-space: nowrap;
}
.lux-table tbody tr:hover td,
.lux-table tbody tr:hover th { background: #fffaf5; }

.table-primary-stack strong { display: block; font-size: 0.86rem; color: var(--ink); }
.table-primary-stack small { display: block; font-size: 0.74rem; color: var(--ink-subtle); }
.status-select-inline {
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}
.row-actions-flex { display: flex; align-items: center; gap: 0.4rem; }
.btn-table-sm {
  padding: 0.32rem 0.62rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  color: #334155;
}
.btn-table-sm:hover { border-color: #ea580c; color: #ea580c; }

@container (width < 680px) {
  .lux-table, .lux-table thead, .lux-table tbody, .lux-table tr, .lux-table th, .lux-table td {
    display: block;
  }
  .lux-table thead { display: none; }
  .lux-table tr {
    margin-block-end: 0.85rem;
    border: 1px solid var(--hairline-strong);
    border-radius: 14px;
    overflow: hidden;
  }
  .lux-table tbody th {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
    background: #fff7ed;
    border-block-end: 1px solid #fed7aa;
  }
  .lux-table td::before {
    font-weight: 800;
    color: var(--ink-muted);
    font-size: 0.74rem;
    display: block;
    margin-block-end: 0.2rem;
  }
  .lux-table td:nth-child(2)::before { content: var(--label-2); }
  .lux-table td:nth-child(3)::before { content: var(--label-3); }
  .lux-table td:nth-child(4)::before { content: var(--label-4); }
  .lux-table td:nth-child(5)::before { content: var(--label-5); }
  .lux-table td:nth-child(6)::before { content: var(--label-6); }
  .lux-table td:nth-child(7)::before { content: var(--label-7); }
}

/* CRM Filter Bar */
.crm-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-block-end: 1rem;
}
.crm-search-input-wrap {
  flex: 1 1 280px;
  position: relative;
  display: flex;
  align-items: center;
}
.crm-search-input-wrap svg {
  position: absolute;
  inset-inline-start: 0.85rem;
  color: var(--ink-subtle);
}
.crm-search-input-wrap input {
  inline-size: 100%;
  min-block-size: 42px;
  padding: 0.55rem 0.9rem 0.55rem 2.45rem;
  border-radius: 11px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 0.86rem;
}
.crm-selects { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.crm-selects select {
  min-block-size: 42px;
  padding: 0.5rem 0.85rem;
  border-radius: 11px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.83rem;
  font-weight: 600;
}

/* CMS Grid & Reviews */
.cms-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1.05rem;
}
.cms-group-tag {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-indigo);
  letter-spacing: 0.06em;
}
.reviews-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.2rem;
}
.testimonial-admin-grid, .programs-admin-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.cms-item-card {
  border: 1px solid var(--hairline-strong);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  background: #fafbfd;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.cms-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.cms-item-quote { font-size: 0.85rem; line-height: 1.5; color: #334155; margin: 0; }
.program-edit-row {
  border: 1px solid var(--hairline-strong);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: #fafbfd;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.6rem;
  align-items: center;
}
.program-edit-row input {
  min-block-size: 38px;
  padding: 0.4rem 0.65rem;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.82rem;
}

/* Audit Timeline */
.audit-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-block-size: 340px;
  overflow-y: auto;
}
.audit-timeline li {
  border-inline-start: 2.5px solid #cbd5e1;
  padding: 0.25rem 0 0.25rem 0.85rem;
}
.audit-timeline strong { font-size: 0.83rem; display: block; }
.audit-timeline small { font-size: 0.73rem; color: var(--ink-subtle); }

/* ================= ACCESSIBLE NATIVE DIALOGS ================= */
dialog.lux-dialog {
  border: 0;
  padding: 0;
  margin: auto;
  border-radius: 22px;
  inline-size: min(600px, calc(100vw - 1.5rem));
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}
dialog.lux-dialog-sm { inline-size: min(440px, calc(100vw - 1.5rem)); }

/* Modern Web Guidance: modal scroll containment */
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(5px);
}

.lux-dialog-head {
  padding: 1.15rem 1.4rem;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  border-block-end: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.lux-dialog-head.head-danger { background: linear-gradient(135deg, #fff5f5 0%, #fee2e2 100%); }
.lux-dialog-head h2 { margin: 0.35rem 0 0; font-size: 1.12rem; font-weight: 800; }
.dialog-x-btn {
  inline-size: 34px;
  block-size: 34px;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  background: #ffffff;
  font-weight: 800;
  cursor: pointer;
}
.lux-dialog-body {
  padding: 1.35rem 1.4rem;
  max-block-size: 76dvb;
  overflow-y: auto;
}
.field-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.checkbox-inline { flex-direction: row; align-items: center; padding-block-start: 1.4rem; }
.checkbox-inline input { inline-size: 18px; block-size: 18px; min-block-size: 18px; accent-color: #ea580c; }
.inspector-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
  background: #f8fafc;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 0.9rem;
}
.ins-meta-cell small { display: block; font-size: 0.7rem; font-weight: 700; color: var(--ink-subtle); text-transform: uppercase; }
.ins-meta-cell strong { font-size: 0.83rem; word-break: break-word; }

.dialog-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-block-start: 0.5rem;
  border-block-start: 1px solid var(--hairline);
}
.right-btns { display: flex; align-items: center; gap: 0.6rem; }
.confirm-copy { font-size: 0.9rem; line-height: 1.55; color: var(--ink-muted); margin: 0 0 0.5rem; }

/* Live Toast */
.lux-toast {
  position: fixed;
  inset-block-end: 1.4rem;
  inset-inline-end: 1.4rem;
  background: #0f172a;
  color: #ffffff;
  padding: 0.8rem 1.2rem;
  border-radius: 13px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
  z-index: 99;
}

/* ================= RESPONSIVE BREAKPOINTS ================= */
@media (max-width: 1120px) {
  .charts-bento, .lower-bento, .reviews-layout, .auth-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    inline-size: min(280px, 85vw);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow-float);
  }
  .app-sidebar.is-open { transform: translateX(0); }
  .sidebar-mobile-btn { display: grid; }
  .topbar, .workspace-content { padding-inline: 1rem; }
  .donut-layout, .field-row-2, .program-edit-row, .auth-feature-grid { grid-template-columns: 1fr; }
}

