* {
  box-sizing: border-box;
}

:root {
  --bg: #07111f;
  --bg-soft: #0d1a2d;
  --panel: rgba(11, 21, 39, 0.82);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #ecf3ff;
  --muted: #9bb0cf;
  --primary: #4da3ff;
  --primary-strong: #2d7fe0;
  --success: #1fc77a;
  --danger: #ff5b6e;
  --warning: #ffb84d;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(77, 163, 255, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(31, 199, 122, 0.12), transparent 24%),
    linear-gradient(180deg, #06101d 0%, #091627 100%);
  color: var(--text);
}

body {
  position: relative;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 95%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  backdrop-filter: blur(14px);
  background: rgba(6, 16, 29, 0.68);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.brand-badge {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--primary), #8e7dff);
  box-shadow: 0 16px 40px rgba(77, 163, 255, 0.28);
}

.topbar-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.page-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 50px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: 24px;
}

.auth-panel,
.welcome-panel {
  margin-bottom: 22px;
}

.panel-header {
  margin-bottom: 18px;
}

.panel-header h2,
.panel-header h3 {
  margin: 8px 0 8px;
  font-size: 1.45rem;
  line-height: 1.2;
}

.panel-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #8ebfff;
  font-weight: 700;
}

.filters-wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.filter-field,
.form-field {
  display: grid;
  gap: 8px;
}

.filter-field label,
.form-field label {
  font-size: 0.93rem;
  font-weight: 700;
  color: #d9e6fb;
}

.filter-field select,
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-radius: 14px;
  padding: 14px 15px;
  outline: none;
  font-size: 0.98rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #88a0c4;
}

.filter-field select:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: rgba(77, 163, 255, 0.7);
  background: rgba(255,255,255,0.06);
}

.assessment-list {
  display: grid;
  gap: 16px;
}

.assessment-card {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  border-radius: 20px;
  padding: 18px;
  display: grid;
  gap: 16px;
}

.assessment-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.assessment-card__subject {
  margin: 0 0 6px;
  color: #8ebfff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.assessment-card__title {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.assessment-card__meta {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.assessment-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.assessment-card__actions .btn {
  min-width: 170px;
}

.badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.badge--live {
  background: rgba(31, 199, 122, 0.15);
  color: #80efbb;
  border: 1px solid rgba(31, 199, 122, 0.24);
}

.badge--pending {
  background: rgba(255, 184, 77, 0.14);
  color: #ffd18a;
  border: 1px solid rgba(255, 184, 77, 0.22);
}

.form-grid {
  display: grid;
  gap: 16px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 13px 18px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
  color: white;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 14px 34px rgba(77, 163, 255, 0.28);
}

.btn-secondary {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
}

.empty-state,
.notice-box {
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 18, 0.72);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 1000;
}

.modal-card {
  width: min(520px, 100%);
  background: rgba(10, 18, 34, 0.96);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  min-width: 260px;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 16px;
  color: white;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 999;
}

.toast--show {
  opacity: 1;
  transform: translateY(0);
}

.toast--success {
  background: linear-gradient(135deg, #1baf6c, #1fc77a);
  box-shadow: 0 16px 36px rgba(31, 199, 122, 0.22);
}

.toast--error {
  background: linear-gradient(135deg, #ff6f7f, #ff4d62);
  box-shadow: 0 16px 36px rgba(255, 91, 110, 0.22);
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .page-wrap {
    width: min(100% - 20px, 1180px);
    margin-top: 18px;
  }

  .topbar {
    padding: 16px 14px;
    align-items: flex-start;
    flex-direction: column;
  }

  .assessment-card__top,
  .filters-wrap {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .filters-wrap {
    display: grid;
  }
}