html {
  font-size: 15px;
}

body {
  margin-bottom: 60px;
  background: #f8f8f6;
  color: #202124;
  font-family: "SF Pro Display", "Geist Sans", "Helvetica Neue", Tahoma, sans-serif;
  line-height: 1.6;
}

a {
  color: #1f6c9f;
  text-decoration: none;
}

a:hover {
  color: #174f74;
}

.app-nav {
  background: #fff;
  border-bottom: 1px solid #eaeaea;
  margin-bottom: 1.5rem;
}

.navbar-brand {
  color: #111;
  font-weight: 800;
}

.nav-link {
  color: #575a5f;
}

.nav-link:hover {
  color: #111;
}

.home,
.auth-shell,
section[dir="rtl"] {
  max-width: 1120px;
  margin: 0 auto;
}

.button,
button {
  border: 0;
  border-radius: 6px;
  background: #111;
  color: #fff;
  padding: 0.6rem 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background-color 160ms ease, transform 160ms ease;
}

.button:hover,
button:hover {
  background: #333;
  color: #fff;
}

.button:active,
button:active {
  transform: scale(0.98);
}

.button-light {
  background: #fff;
  color: #111;
  border: 1px solid #eaeaea;
}

.button-light:hover {
  background: #f7f6f3;
  color: #111;
}

.button-dark {
  background: #111;
  color: #fff;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #e0e0dd;
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.75rem;
  background: #fff;
  color: #202124;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #eaeaea;
}

th,
td {
  padding: 0.75rem;
  border-bottom: 1px solid #eeeeec;
  text-align: right;
}

.panel,
.metric {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.metrics,
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.metric {
  color: inherit;
  text-decoration: none;
}

.metric strong {
  display: block;
  font-size: 2rem;
}

.toolbar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.toolbar select {
  max-width: 260px;
}

.alert {
  background: #fff0f0;
  border: 1px solid #f1b8b8;
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.admin-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 3rem;
}

.dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem 0 0.75rem;
  border-bottom: 1px solid #eaeaea;
}

.dashboard-hero h1 {
  margin: 0;
  color: #111;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.05;
}

.hero-copy {
  max-width: 46rem;
  margin: 0.75rem 0 0;
  color: #666a6f;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: #787774;
  font-family: "Geist Mono", "SF Mono", Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 16rem;
  color: #575a5f;
  font-size: 0.92rem;
}

.dashboard-grid {
  display: grid;
  gap: 1rem;
}

.dashboard-grid-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-card,
.dashboard-panel {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 8px;
}

.kpi-card {
  display: flex;
  min-height: 10rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.15rem;
  color: #202124;
  transition: border-color 160ms ease, transform 160ms ease;
}

.kpi-card:hover {
  border-color: #d6d6d2;
  color: #111;
  transform: translateY(-1px);
}

.kpi-card strong {
  display: block;
  color: #111;
  font-size: 2.7rem;
  font-weight: 850;
  line-height: 1;
}

.kpi-label {
  color: #575a5f;
  font-size: 0.95rem;
}

.kpi-card small {
  color: #787774;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(18rem, 0.85fr);
  gap: 1rem;
  align-items: start;
}

.dashboard-main,
.dashboard-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-panel {
  padding: 1.15rem;
}

.compact-panel {
  padding: 1rem;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-heading h2,
.dashboard-panel h2 {
  margin: 0;
  color: #111;
  font-size: 1.1rem;
  font-weight: 800;
}

.text-link {
  color: #575a5f;
  font-size: 0.9rem;
}

.bar-list,
.mini-list,
.quick-actions,
.stacked-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(7rem, 0.7fr) minmax(8rem, 1.8fr) minmax(2rem, auto);
  gap: 0.75rem;
  align-items: center;
  color: #202124;
}

.bar-label {
  color: #575a5f;
}

.bar-track {
  height: 0.72rem;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f1ee;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.tone-blue {
  background-color: #e1f3fe;
}

.tone-yellow {
  background-color: #fbf3db;
}

.tone-red {
  background-color: #fdebec;
}

.tone-green {
  background-color: #edf3ec;
}

.tone-neutral {
  background-color: #eeeeec;
}

.mini-row,
.stacked-metrics > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: #575a5f;
}

.stacked-metrics strong,
.mini-row strong {
  color: #111;
  font-size: 1.35rem;
}

.dot {
  display: inline-flex;
  width: 0.75rem;
  height: 0.75rem;
  flex: 0 0 0.75rem;
  border-radius: 999px;
}

.table-wrap {
  overflow-x: auto;
}

.dashboard-table {
  min-width: 720px;
  border: 0;
}

.dashboard-table th {
  color: #787774;
  font-size: 0.84rem;
  font-weight: 700;
}

.dashboard-table td {
  vertical-align: middle;
}

.status-chip {
  display: inline-flex;
  border-radius: 999px;
  background: #f7f6f3;
  color: #575a5f;
  padding: 0.16rem 0.55rem;
  font-size: 0.8rem;
}

.empty-state {
  margin: 0;
  color: #787774;
}

@media (max-width: 992px) {
  .dashboard-grid-kpis,
  .dashboard-layout {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-main {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .dashboard-hero,
  .hero-meta {
    align-items: stretch;
  }

  .dashboard-hero {
    flex-direction: column;
  }

  .dashboard-grid-kpis,
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 1fr auto;
  }

  .bar-track {
    grid-column: 1 / -1;
  }
}
