/* Admin-specific overrides for Administrate */

/* ── Pagination ── */
.pagination {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  margin: 1.5em 0 0.5em;
  padding: 0;
}

.pagination .first,
.pagination .prev,
.pagination .page,
.pagination .next,
.pagination .last {
  margin: 0;
}

.pagination a,
.pagination span.page {
  display: inline-block;
  padding: 0.3em 0.65em;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  color: #374151;
  text-decoration: none;
  font-size: 0.9em;
  line-height: 1.4;
}

.pagination a:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.pagination .page.current {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
  font-weight: 600;
}

.pagination .page.current a {
  color: #fff;
}

/* ── Dashboard Layout ── */
.dash {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.dash__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.dash__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
}

.dash__signout {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  background: #dc2626;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 0.15s;
}

.dash__signout:hover {
  background: #b91c1c;
}

/* ── Quick Links ── */
.dash__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.dash__link {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 0.15s;
}

.dash__link:hover {
  background: #dbeafe;
}

/* ── Grid Systems ── */
.dash__row {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

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

@media (max-width: 768px) {
  .dash__row--4 { grid-template-columns: repeat(2, 1fr); }
  .dash__row--2 { grid-template-columns: 1fr; }
}

/* ── Card (base) ── */
.dash__card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 1.25rem;
}

/* ── KPI Card ── */
.kpi {
  padding: 1.25rem;
}

.kpi__label {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6b7280;
}

.kpi__value {
  margin: 0.25rem 0 0;
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

/* ── Section Panel ── */
.dash__panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
}

.dash__panel-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.dash__panel-subtitle {
  margin: 1.5rem 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Metric Tiles (colored blocks inside panels) ── */
.tile-grid {
  display: grid;
  gap: 0.75rem;
}

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

@media (min-width: 769px) {
  .tile-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.tile {
  text-align: center;
  padding: 0.75rem;
  border-radius: 0.5rem;
}

.tile__value {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.tile__value--sm {
  font-size: 1.375rem;
}

.tile__unit {
  font-size: 0.8125rem;
  font-weight: 400;
}

.tile__label {
  margin: 0.25rem 0 0;
  font-size: 0.6875rem;
  font-weight: 500;
}

/* Left-aligned tile variant */
.tile--left {
  text-align: left;
  padding: 0.75rem 1rem;
}

.tile--left .tile__label {
  margin: 0 0 0.25rem;
}

.tile--left .tile__value {
  margin: 0.25rem 0 0;
}

/* ── Color Variants ── */
.tile--blue     { background: #eff6ff; }
.tile--blue .tile__value { color: #2563eb; }
.tile--blue .tile__label { color: #3b82f6; }

.tile--indigo   { background: #eef2ff; }
.tile--indigo .tile__value { color: #4f46e5; }
.tile--indigo .tile__label { color: #6366f1; }

.tile--purple   { background: #faf5ff; }
.tile--purple .tile__value { color: #7c3aed; }
.tile--purple .tile__label { color: #8b5cf6; }

.tile--emerald  { background: #ecfdf5; }
.tile--emerald .tile__value { color: #059669; }
.tile--emerald .tile__label { color: #10b981; }

.tile--teal     { background: #f0fdfa; }
.tile--teal .tile__value { color: #0d9488; }
.tile--teal .tile__label { color: #14b8a6; }

.tile--cyan     { background: #ecfeff; }
.tile--cyan .tile__value { color: #0891b2; }
.tile--cyan .tile__label { color: #06b6d4; }

.tile--amber    { background: #fffbeb; }
.tile--amber .tile__value { color: #b45309; }
.tile--amber .tile__label { color: #d97706; }

.tile--orange   { background: #fff7ed; }
.tile--orange .tile__value { color: #c2410c; }
.tile--orange .tile__label { color: #ea580c; }

.tile--gray     { background: #f9fafb; }
.tile--gray .tile__value { color: #374151; }
.tile--gray .tile__label { color: #6b7280; }

.tile--green    { background: #f0fdf4; border: 1px solid #bbf7d0; }
.tile--green .tile__value { color: #16a34a; }
.tile--green .tile__label { color: #22c55e; }

.tile--red      { background: #fef2f2; border: 1px solid #fecaca; }
.tile--red .tile__value { color: #dc2626; }
.tile--red .tile__label { color: #ef4444; }

.tile--yellow   { background: #fefce8; border: 1px solid #fef08a; }
.tile--yellow .tile__value { color: #ca8a04; }
.tile--yellow .tile__label { color: #eab308; }

/* ── Timestamp meta ── */
.dash__meta {
  margin: 1rem 0 0;
  color: #6b7280;
  font-size: 0.8125rem;
}
