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

:root {
  --primary: #1a1a2e;
  --accent: #e94560;
  --surface: #fff;
  --bg: #f8f9fa;
  --border: #dee2e6;
  --text: #1a1a2e;
  --text-muted: #6c757d;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header & Nav */
header {
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 0;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

header h1 {
  font-size: 1.25rem;
  font-weight: 700;
}

header h1 a {
  color: #fff;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}

nav a:hover,
nav a.active {
  background: var(--accent);
  color: #fff;
}

/* Main */
main.container {
  padding: 2rem 1rem;
}

/* Footer */
footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 1rem;
  margin-top: 3rem;
  font-size: 0.875rem;
}

/* Page header */
.page-header {
  margin-bottom: 1.5rem;
}

.page-header h2 {
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.15s, transform 0.15s;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.card-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}

.card-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.card-count {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* Quick links */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.quick-link-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  display: block;
}

.quick-link-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(233,69,96,0.15);
}

.quick-link-card .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.quick-link-card .label {
  font-weight: 600;
  color: var(--primary);
}

/* Section heading */
.section-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  margin: 1.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th {
  background: var(--primary);
  color: #fff;
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  white-space: nowrap;
}

td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr:nth-child(even) td {
  background: #f9fafb;
}

tr:hover td {
  background: #f0f4ff;
}

table a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

table a:hover {
  text-decoration: underline;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge--success { background: #d4edda; color: #155724; }
.badge--warning { background: #fff3cd; color: #856404; }
.badge--danger  { background: #f8d7da; color: #721c24; }

/* Detail card */
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  max-width: 700px;
}

.detail-row {
  display: flex;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 600;
  color: var(--text-muted);
  min-width: 160px;
  font-size: 0.875rem;
}

.detail-value {
  color: var(--text);
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  margin: 0 0.4rem;
}

/* Progress bar */
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar__fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
}

.progress-bar__fill--warning { background: var(--warning); }
.progress-bar__fill--success { background: var(--success); }

/* Category filter pills */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.pill {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pill:hover,
.pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* 404 */
.not-found {
  text-align: center;
  padding: 4rem 1rem;
}

.not-found h2 {
  font-size: 4rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.not-found p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s;
}

.btn:hover {
  background: var(--accent);
}

/* Utilities */
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
