/* Shared style sheet for Kaaj Performance Dashboard */
:root {
  font-family: 'Inter', system-ui, sans-serif;
  --bg: #f9fafb;
  --fg: #111827;
  --primary: #2563eb;
  --border: #e5e7eb;
  --error-high: #dc2626;
  --error-medium: #f59e0b;
  --error-low: #10b981;
}

/* ------------ Layout ------------ */
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  gap: 2rem;
}

h1 {
  margin: 0;
}

/* Navigation & Controls */
.navigation,
.controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link,
.navigation a {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  font-weight: 600;
}

.nav-link:hover,
.navigation a:hover {
  background: var(--primary);
  color: white;
}

input[type='number'],
input[type='text'] {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

input[type='number'] {
  width: 6rem;
}

button {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ------------ Tables ------------ */
table {
  width: 100%;
  max-width: 1200px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

table th,
table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: right;
}

table th:first-child,
table td:first-child {
  text-align: left;
}

table th {
  background: #f3f4f6;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

table tr:hover {
  background: #f1f5f9;
}

/* Bucket / summary tables (compare view) */
.bucket-table {
  border-collapse: collapse;
  margin: 0 auto;
  font-size: 0.9rem;
}

.bucket-table th,
.bucket-table td {
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: right;
}

.bucket-table th:first-child,
.bucket-table td:first-child {
  text-align: left;
}

.bucket-table th {
  background: #f3f4f6;
  font-weight: 600;
}

/* ------------ Stat cards ------------ */
.stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.stat {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.5rem;
  text-align: center;
  min-width: 150px;
}

.stat .label {
  font-size: 0.75rem;
  color: #6b7280;
}

.stat .value {
  font-size: 1.25rem;
  font-weight: 600;
}

/* ------------ Misc ------------ */
.loading {
  text-align: center;
  color: #6b7280;
  font-size: 1.125rem;
}

.bank-title {
  color: var(--primary);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* Error colouring */
.error-count.zero { color: var(--error-low); }
.error-count.low { color: var(--error-medium); }
.error-count.medium { color: var(--error-high); }
.error-count.high { color: #991b1b; }

/* Clickable rows */
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: #f1f5f9 !important; } 