:root {
  --bg-start: #0f1221;
  --bg-end: #0b1a2b;
  --card-bg: rgba(255, 255, 255, 0.94);
  --text: #0f172a;
  --muted: #5a6473;
  --accent: #ff8a3d;
  --accent-2: #2ec4b6;
  --border: rgba(15, 23, 42, 0.12);
  --shadow: 0 24px 80px rgba(8, 16, 32, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: #eef2ff;
  background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
  position: relative;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 138, 61, 0.25), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(46, 196, 182, 0.18), transparent 42%),
    radial-gradient(circle at 60% 80%, rgba(110, 166, 255, 0.12), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 64px 20px 40px;
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
}

.hero {
  margin-bottom: 28px;
}

.admin-hero {
  display: grid;
  gap: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.hero h1,
.auth-card h1 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  margin: 16px 0 10px;
}

.hero p {
  margin: 0;
  max-width: 640px;
  color: rgba(238, 242, 255, 0.82);
  font-size: 1.05rem;
}

.auth-card {
  max-width: 460px;
  width: 100%;
  display: grid;
  gap: 12px;
}

.auth-sub {
  margin: 0 0 8px;
  color: var(--muted);
}

.card {
  background: var(--card-bg);
  color: var(--text);
  border-radius: 22px;
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.alert {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-weight: 600;
}

.alert.ok {
  background: rgba(46, 196, 182, 0.18);
  color: #0f5f59;
  border: 1px solid rgba(46, 196, 182, 0.35);
}

.alert.err {
  background: rgba(255, 138, 61, 0.2);
  color: #7a2f00;
  border: 1px solid rgba(255, 138, 61, 0.4);
}

.upload-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

label {
  font-weight: 600;
  font-size: 0.95rem;
}

input[type="text"],
input[type="password"],
select {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #cbd5f5;
  font-size: 1rem;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.2);
}

.help {
  font-size: 0.85rem;
  color: var(--muted);
}

.file-drop {
  position: relative;
  border: 2px dashed #cbd5f5;
  border-radius: 16px;
  padding: 18px;
  background: #f6f8ff;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.file-drop.dragover {
  border-color: var(--accent-2);
  background: rgba(46, 196, 182, 0.12);
  transform: translateY(-2px);
}

.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-ui {
  display: grid;
  gap: 4px;
  text-align: center;
}

.file-ui strong {
  font-size: 1.05rem;
  color: #0f172a;
}

.file-ui span {
  color: var(--muted);
}

.file-ui small {
  color: #7a8493;
}

.file-list {
  margin-top: 10px;
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.file-item {
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.04);
  border-radius: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #ffb35c);
  color: #2b1600;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(255, 138, 61, 0.25);
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline {
  background: transparent;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.18);
}

.btn-small {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.limits {
  font-size: 0.82rem;
  color: var(--muted);
}

.admin-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.group-list {
  display: grid;
  gap: 18px;
}

.program-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

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

.group-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 18px;
  background: #fff;
  display: grid;
  gap: 12px;
}

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

.group-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.file-grid {
  display: grid;
  gap: 10px;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.04);
  font-size: 0.95rem;
}

.empty {
  color: var(--muted);
  font-weight: 600;
}

footer {
  text-align: center;
  padding: 20px 16px 28px;
  color: rgba(238, 242, 255, 0.7);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .page {
    padding: 48px 16px 28px;
  }

  .card {
    padding: 22px;
  }

  .hero p {
    font-size: 0.98rem;
  }

  .program-header,
  .group-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .file-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
