/**
 * Infinity AI — Enterprise Admin Portal
 * Design language aligned with Client Panel (deep navy + copper gold).
 */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #07090b;
  --bg-2: #0b1016;
  --surface: #12171d;
  --surface-2: #0e1319;
  --surface-hover: #161c24;
  --line: rgba(216, 172, 106, 0.14);
  --line-strong: rgba(216, 172, 106, 0.32);
  --text: #f2efe8;
  --text-2: #c6c0b4;
  --muted: #a7a297;
  --gold: #d8ac6a;
  --gold-2: #ecd0a0;
  --gold-deep: #b9986f;
  --gold-grad: linear-gradient(135deg, #ecd0a0 0%, #d8ac6a 55%, #b9986f 100%);
  --ok: #7dcea0;
  --warn: #e0b35a;
  --bad: #e07a6b;
  --info: #8caeff;
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
  --shadow-gold: 0 12px 34px rgba(210, 180, 140, 0.22);
  --sidebar-w: 240px;
  --header-h: 64px;
  --font: "Inter", "Segoe UI", sans-serif;
  --mono: "Inter", ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --t: 180ms;
  --min-w: 1440px;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  min-width: var(--min-w);
  background:
    radial-gradient(1000px 520px at 6% -10%, rgba(216, 172, 106, 0.07), transparent 55%),
    radial-gradient(800px 400px at 92% 0%, rgba(140, 174, 255, 0.04), transparent 50%),
    var(--bg);
  overflow: hidden;
}

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

a {
  color: var(--gold-2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* —— App shell —— */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  min-width: var(--min-w);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.1rem 0.85rem;
  background: rgba(7, 9, 11, 0.96);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.35rem;
}

.side-brand .mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--gold-grad);
  color: #07090b;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: var(--shadow-gold);
  flex-shrink: 0;
}

.side-brand b {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.side-brand small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 12px;
  padding: 0.62rem 0.75rem;
  cursor: pointer;
  text-align: left;
  font-weight: 550;
  font-size: 0.875rem;
  transition:
    color var(--t) var(--ease),
    background var(--t) var(--ease),
    border-color var(--t) var(--ease),
    box-shadow var(--t) var(--ease);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(216, 172, 106, 0.06);
}

.nav-item.active {
  color: var(--gold-2);
  background: var(--surface);
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(216, 172, 106, 0.18);
}

.nav-item.active svg {
  color: var(--gold);
  opacity: 1;
}

.nav-footer {
  border-top: 1px solid var(--line);
  padding-top: 0.65rem;
  margin-top: 0.35rem;
}

.nav-item.logout {
  color: var(--bad);
}

.nav-item.logout:hover {
  background: rgba(224, 122, 107, 0.1);
  color: #f0a195;
}

/* —— Main / header —— */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.header {
  height: var(--header-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  background: rgba(11, 16, 22, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-brand {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-right: 0.25rem;
}

.header-brand strong {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.badge-admin {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(216, 172, 106, 0.35);
  background: rgba(216, 172, 106, 0.1);
  color: var(--gold-2);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.header-search {
  flex: 1;
  max-width: 360px;
  position: relative;
}

.header-search input {
  width: 100%;
  height: 38px;
  padding: 0 0.9rem 0 2.3rem;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  outline: none;
  transition: border-color var(--t) var(--ease);
}

.header-search input:focus {
  border-color: var(--line-strong);
}

.header-search svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 32px;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.status-pill.ok .dot {
  background: var(--ok);
  box-shadow: 0 0 8px rgba(125, 206, 160, 0.55);
}

.status-pill.ok {
  color: var(--ok);
  border-color: rgba(125, 206, 160, 0.28);
}

.status-pill.bad .dot {
  background: var(--bad);
}

.status-pill.bad {
  color: var(--bad);
  border-color: rgba(224, 122, 107, 0.28);
}

.status-pill.warn .dot {
  background: var(--warn);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
}

.icon-btn:hover {
  background: var(--surface-hover);
  border-color: var(--line-strong);
  color: var(--gold-2);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.profile-wrap {
  position: relative;
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  height: 38px;
  padding: 0 0.75rem 0 0.35rem;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  color: var(--text);
}

.profile-btn:hover {
  border-color: var(--line-strong);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--gold-grad);
  color: #07090b;
  font-size: 0.7rem;
  font-weight: 800;
}

.profile-btn span {
  font-size: 0.8rem;
  font-weight: 600;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  padding: 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow);
  z-index: 50;
}

.profile-menu[hidden] {
  display: none !important;
}

.profile-menu h4 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-menu .field {
  margin-bottom: 0.65rem;
}

.profile-menu .row-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

/* —— Content —— */
.content {
  flex: 1;
  overflow: auto;
  padding: 1.35rem 1.5rem 2rem;
}

.view {
  display: none;
  animation: fadeIn 0.22s var(--ease);
}

.view.active {
  display: block;
}

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

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.page-head h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.page-head p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.page-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* —— Cards / surfaces —— */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.25rem;
}

.card + .card {
  margin-top: 1rem;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.card-head h2,
.card-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.card-head .muted {
  font-size: 0.78rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.kpi {
  padding: 1rem 1.1rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease);
}

.kpi:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.kpi .label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kpi .value {
  margin-top: 0.55rem;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.kpi .meta {
  margin-top: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-2);
}

.kpi .value.ok {
  color: var(--ok);
}

.kpi .value.warn {
  color: var(--warn);
}

.kpi .value.bad {
  color: var(--bad);
}

/* —— Forms —— */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea,
.toolbar input,
.toolbar select {
  height: 40px;
  padding: 0 0.8rem;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  outline: none;
  transition: border-color var(--t) var(--ease);
}

.field textarea {
  height: auto;
  min-height: 88px;
  padding: 0.7rem 0.8rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: var(--line-strong);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.form-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 38px;
  padding: 0 1rem;
  border-radius: 11px;
  border: 1px solid #ecd0a0;
  background: var(--gold-grad);
  color: #07090b;
  font-weight: 650;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition:
    transform var(--t) var(--ease),
    filter var(--t) var(--ease),
    box-shadow var(--t) var(--ease);
}

.btn:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

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

.btn.quiet,
.btn.ghost {
  background: transparent;
  color: var(--gold-2);
  border-color: rgba(216, 172, 106, 0.4);
  box-shadow: none;
}

.btn.quiet:hover:not(:disabled),
.btn.ghost:hover:not(:disabled) {
  background: rgba(216, 172, 106, 0.08);
  filter: none;
}

.btn.danger {
  background: transparent;
  color: var(--bad);
  border-color: rgba(224, 122, 107, 0.45);
  box-shadow: none;
}

.btn.danger:hover:not(:disabled) {
  background: rgba(224, 122, 107, 0.1);
  filter: none;
}

.btn.sm {
  height: 32px;
  padding: 0 0.7rem;
  font-size: 0.75rem;
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(7, 9, 11, 0.25);
  border-top-color: #07090b;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* —— Tables —— */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.9rem;
}

.toolbar input,
.toolbar select {
  min-width: 160px;
}

.toolbar .spacer {
  flex: 1;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

table.data th,
table.data td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.data th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 1;
}

table.data tbody tr:hover {
  background: rgba(216, 172, 106, 0.04);
}

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

table.data .muted,
.muted {
  color: var(--muted);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* —— Badges / chips —— */
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  background: rgba(216, 172, 106, 0.08);
  color: var(--gold-2);
}

.badge.ok {
  color: var(--ok);
  border-color: rgba(125, 206, 160, 0.35);
  background: rgba(125, 206, 160, 0.1);
}

.badge.warn {
  color: var(--warn);
  border-color: rgba(224, 179, 90, 0.35);
  background: rgba(224, 179, 90, 0.1);
}

.badge.bad {
  color: var(--bad);
  border-color: rgba(224, 122, 107, 0.35);
  background: rgba(224, 122, 107, 0.1);
}

.badge.info {
  color: var(--info);
  border-color: rgba(140, 174, 255, 0.35);
  background: rgba(140, 174, 255, 0.1);
}

/* —— States —— */
.state-box {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--muted);
}

.state-box strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.state-box.loading::before {
  content: "";
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 0.85rem;
  border: 2px solid rgba(216, 172, 106, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.state-box.error strong {
  color: var(--bad);
}

.toast-host {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 380px;
}

.toast {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  animation: fadeIn 0.2s var(--ease);
}

.toast.ok {
  border-color: rgba(125, 206, 160, 0.4);
  color: var(--ok);
}

.toast.error {
  border-color: rgba(224, 122, 107, 0.4);
  color: var(--bad);
}

.toast.info {
  color: var(--gold-2);
}

/* —— Tabs (settings / subnav) —— */
.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  width: fit-content;
  max-width: 100%;
}

.subtab {
  height: 34px;
  padding: 0 0.85rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.subtab:hover {
  color: var(--text);
}

.subtab.active {
  color: var(--gold-2);
  background: var(--surface);
  border-color: var(--line-strong);
}

.subpanel {
  display: none;
}

.subpanel.active {
  display: block;
}

/* —— Activity / lists —— */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 360px;
  overflow: auto;
}

.activity-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 0.82rem;
}

.activity-item .meta {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.74rem;
}

/* —— Charts —— */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  height: 160px;
  padding-top: 0.5rem;
}

.chart-bars .bar {
  flex: 1;
  min-width: 0;
  border-radius: 8px 8px 4px 4px;
  background: var(--gold-grad);
  opacity: 0.85;
  position: relative;
  transition: opacity var(--t) var(--ease);
}

.chart-bars .bar:hover {
  opacity: 1;
}

.chart-bars .bar span {
  position: absolute;
  bottom: -1.35rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  color: var(--muted);
  white-space: nowrap;
}

.chart-legend {
  display: flex;
  gap: 1rem;
  margin-top: 1.6rem;
  color: var(--muted);
  font-size: 0.75rem;
}

/* —— Drawer / dialog —— */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 60;
  display: flex;
  justify-content: flex-end;
}

.drawer-backdrop[hidden] {
  display: none !important;
}

.drawer {
  width: min(440px, 100%);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--line-strong);
  padding: 1.35rem;
  overflow: auto;
  box-shadow: var(--shadow);
}

.drawer h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.drawer-meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 1.1rem;
}

.detail-grid {
  display: grid;
  gap: 0.65rem;
}

.detail-row,
.detail-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}

.detail-row span:first-child,
.detail-item small {
  color: var(--muted);
}

.detail-item strong {
  font-weight: 600;
  word-break: break-word;
}

dialog.admin-dialog {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--text);
  padding: 0;
  max-width: 420px;
  width: calc(100% - 2rem);
  box-shadow: var(--shadow);
}

dialog.admin-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.dialog-body {
  padding: 1.25rem;
}

.dialog-body h3 {
  margin: 0 0 0.75rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.admin-dialog-message {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  min-height: 1.2em;
}

.admin-dialog-message.error {
  color: var(--bad);
}

.admin-dialog-message.ok {
  color: var(--ok);
}

/* —— Blog editor —— */
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.editor-surface {
  min-height: 220px;
  padding: 0.9rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
  outline: none;
  line-height: 1.55;
}

.editor-surface:focus {
  border-color: var(--line-strong);
}

.stack-gap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-gap {
  margin-top: 1rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-2);
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 480px at 50% -10%, rgba(216, 172, 106, 0.1), transparent 55%),
    rgba(7, 9, 11, 0.96);
}

.login-gate[hidden] {
  display: none !important;
}

.login-card {
  width: min(420px, calc(100% - 2rem));
  padding: 1.75rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.login-card > p {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.health-grid .kpi .value {
  font-size: 1.15rem;
}

@media (max-width: 1600px) {
  .grid-6 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1440px) {
  :root {
    --min-w: 1280px;
  }

  .grid-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
