* {
  box-sizing: border-box;
}

:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #dbe3ee;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #eef4ff 0%, #f8fbff 100%);
  color: var(--text);
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 28px;
  border-radius: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 30px;
}

.hero p {
  margin: 0;
  opacity: 0.95;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.row-between {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
}

button,
.btn {
  display: inline-block;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}

button:hover,
.btn:hover {
  filter: brightness(0.96);
}

.btn-secondary {
  background: #374151;
}

.btn-danger {
  background: var(--danger);
}

.btn-success {
  background: var(--success);
}

.btn-warning {
  background: var(--warning);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 14px;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8f0ff;
  color: #1847b8;
  font-size: 13px;
  font-weight: 700;
}

.badge-muted {
  background: #eef2f7;
  color: #4b5563;
}

.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}

.alert {
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.alert-success {
  background: #ecfdf3;
  color: #166534;
  border-color: #bbf7d0;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.alert-info {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.match-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  background: #fbfdff;
}

.match-title {
  margin: 0 0 6px;
  font-size: 18px;
}

.muted {
  color: var(--muted);
}

.center {
  text-align: center;
}

.login-box {
  max-width: 420px;
  margin: 70px auto;
}

.choice {
  min-width: 220px;
}

.score-input {
  width: 90px;
}

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.small {
  font-size: 14px;
}

.inline-form {
  display: inline-block;
  margin: 0;
}

.match-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.csv-help {
  font-size: 14px;
  color: #6b7280;
  margin-top: 8px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
  flex-shrink: 0;
  background: #2563eb;
  color: #fff;
}

.icon-btn:hover {
  filter: brightness(0.96);
}

.icon-mail {
  background: #2563eb;
}

.icon-delete {
  background: #dc2626 !important;
}

.icon-delete:hover {
  background: #b91c1c !important;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

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