:root {
  color-scheme: dark;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #060816;
  color: #f4f7ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 28%),
    linear-gradient(135deg, #060816 0%, #0f172a 100%);
}

.card {
  width: min(100%, 460px);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  padding: 32px;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), transparent 45%);
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #8ec5ff;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.brand-logo {
  width: 22px;
  height: 22px;
  display: block;
}

h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  color: #f8fbff;
}

p {
  margin: 0 0 24px;
  color: #b3c0d3;
  line-height: 1.6;
}

.primary-btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.45);
}

.primary-btn:active {
  transform: translateY(0);
}

.secondary-btn {
  width: 100%;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-1px);
}

.status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #e7ecf5;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status.success {
  background: rgba(34, 197, 94, 0.13);
  color: #dcfce7;
  border-color: rgba(34, 197, 94, 0.25);
}

.status.error {
  background: rgba(248, 113, 113, 0.13);
  color: #ffe4e6;
  border-color: rgba(248, 113, 113, 0.25);
}

.account-info {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cdd9e8;
  line-height: 1.5;
}

.register-page {
  width: min(100%, 1100px);
  padding: 24px;
}

.register-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  padding: 28px;
  backdrop-filter: blur(16px);
}

.register-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.file-input {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  color: #dbeafe;
  cursor: pointer;
  font-weight: 600;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

#cadet-file {
  display: none;
}

.secondary-btn-inline {
  margin-top: 0;
  width: auto;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.register-status {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cdd9e8;
}

.register-status.error {
  background: rgba(248, 113, 113, 0.13);
  color: #ffe4e6;
  border-color: rgba(248, 113, 113, 0.25);
}

.cadet-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.cadet-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) 1.4fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cadet-row-na {
  background: rgba(148, 163, 184, 0.18);
  color: #d1d5db;
}

.cadet-row-excused {
  background: rgba(249, 115, 22, 0.15);
}

.cadet-row-present {
  background: rgba(34, 197, 94, 0.16);
}

.cadet-name {
  font-weight: 700;
  color: #f8fbff;
}

.cadet-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-btn {
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  color: white;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.status-btn:hover {
  transform: translateY(-1px);
}

.status-na {
  background: #64748b;
}

.status-excused {
  background: #f97316;
}

.status-present {
  background: #22c55e;
}

.status-btn.selected {
  outline: 2px solid white;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.cadet-status-label {
  font-size: 0.92rem;
  color: #dbeafe;
  min-width: 95px;
  text-align: right;
}

.empty-state {
  padding: 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
  text-align: center;
}

.register-footer {
  display: flex;
  justify-content: flex-end;
}

.register-footer .primary-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 768px) {
  .register-header {
    flex-direction: column;
  }

  .cadet-row {
    grid-template-columns: 1fr;
  }

  .cadet-status-label {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 24px;
  }

  h1 {
    font-size: 1.7rem;
  }
}
