:root {
  --app-bg: #f4f6f8;
  --app-ink: #17212b;
  --app-muted: #6c7785;
  --app-line: #e3e8ee;
  --app-primary: #3157d5;
}

body {
  min-height: 100vh;
  background: var(--app-bg);
  color: var(--app-ink);
}

.app-navbar {
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--app-line);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.navbar-brand {
  color: var(--app-ink);
  font-weight: 700;
  letter-spacing: -.02em;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #3157d5, #243ca2);
  box-shadow: 0 10px 25px rgba(49, 87, 213, .25);
  font-weight: 800;
}

.brand-mark-sm {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: .9rem;
}

.app-main {
  max-width: 1680px;
  padding-top: 32px;
  padding-bottom: 64px;
}

.hero-panel {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid #dce3eb;
  border-radius: 20px;
  background:
    radial-gradient(circle at 85% 20%, rgba(49, 87, 213, .16), transparent 28%),
    #fff;
}

.hero-panel h1 {
  margin-bottom: 8px;
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  font-weight: 750;
  letter-spacing: -.045em;
}

.eyebrow {
  color: var(--app-primary);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .15em;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.metric-card {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid var(--app-line);
  border-radius: 16px;
  background: #fff;
}

.metric-card span {
  color: var(--app-muted);
  font-size: .82rem;
}

.metric-card strong {
  font-size: 1.9rem;
  line-height: 1;
  letter-spacing: -.04em;
}

.panel {
  margin-bottom: 24px;
  padding: 24px;
  border: 1px solid var(--app-line);
  border-radius: 18px;
  background: #fff;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 720;
  letter-spacing: -.02em;
}

.app-table {
  min-width: 1020px;
  margin-bottom: 0;
  font-size: .82rem;
}

.app-table > :not(caption) > * > * {
  padding: .8rem .65rem;
  border-bottom-color: #edf0f3;
}

.app-table thead th {
  color: var(--app-muted);
  background: #fafbfc;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.credential-cell {
  max-width: 320px;
  overflow-wrap: anywhere;
  font-family: var(--bs-font-monospace);
  font-size: .75rem;
}

.empty-cell {
  padding: 40px !important;
  color: var(--app-muted) !important;
  text-align: center;
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 18px;
}

.pagination {
  --bs-pagination-color: var(--app-ink);
  --bs-pagination-active-bg: var(--app-primary);
  --bs-pagination-active-border-color: var(--app-primary);
}

.alert-stack {
  position: fixed;
  top: 76px;
  right: 24px;
  z-index: 1080;
  width: min(420px, calc(100vw - 32px));
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(circle at 15% 15%, rgba(49, 87, 213, .14), transparent 27%),
    radial-gradient(circle at 90% 80%, rgba(34, 197, 94, .09), transparent 23%),
    var(--app-bg);
}

.auth-card {
  width: min(100%, 480px);
  padding: 38px;
  border: 1px solid var(--app-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(33, 43, 54, .09);
}

.auth-card .brand-mark {
  margin-bottom: 26px;
}

.auth-card h1 {
  font-size: 2rem;
  font-weight: 760;
  letter-spacing: -.04em;
}

@media (max-width: 1199px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .app-main { padding-top: 18px; }
  .hero-panel { align-items: stretch; flex-direction: column; padding: 22px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { padding: 18px; border-radius: 14px; }
  .panel-heading, .pagination-row { align-items: flex-start; flex-direction: column; }
  .auth-card { padding: 26px 22px; }
}
