:root {
  --primary: #1a3a6b;
  --primary-light: #2d5a9e;
  --accent: #c8102e;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(26, 58, 107, 0.08);
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--primary);
  font-weight: 700;
}

.header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.filters {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fafbfc 0%, var(--surface) 100%);
}

.filters-grid {
  display: grid;
  grid-template-columns: 1fr repeat(2, minmax(160px, 200px));
  gap: 1rem;
  align-items: end;
}

@media (max-width: 768px) {
  .filters-grid {
    grid-template-columns: 1fr;
  }
}

.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.field input,
.field select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(45, 90, 158, 0.15);
}

.search-wrap {
  position: relative;
}

.search-wrap input {
  padding-left: 2.25rem;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 1rem;
}

.stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.875rem;
}

.stats-bar strong {
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  max-height: 70vh;
}

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

thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

thead th {
  background: #eef2f7;
  color: var(--primary);
  font-weight: 600;
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

thead th:hover {
  background: #e2e8f0;
}

thead th .sort-icon {
  margin-left: 0.35rem;
  opacity: 0.4;
  font-size: 0.75rem;
}

thead th.sorted .sort-icon {
  opacity: 1;
  color: var(--accent);
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

tbody tr:hover {
  background: #f8fafc;
}

tbody tr:nth-child(even) {
  background: #fafbfc;
}

tbody tr:nth-child(even):hover {
  background: #f1f5f9;
}

tbody td {
  padding: 0.7rem 1rem;
  vertical-align: middle;
}

td.puan {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  text-align: right;
  color: var(--primary);
}

td.empty-puan {
  color: var(--text-muted);
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  background: #e8eef5;
  color: var(--primary);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}

.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.no-results span {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.loading {
  text-align: center;
  padding: 4rem;
  color: var(--text-muted);
}

.loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-reset {
  padding: 0.65rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-reset:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.footer-note {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
