/* ================= AUTH SECTION ================= */

.auth-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.auth-card {
  background: white;
  width: 100%;
  max-width: 420px;
  padding: 40px 35px;
  border-radius: 18px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 10px;
}

.auth-subtitle {
  text-align: center;
  color: #64748b;
  margin-bottom: 25px;
  font-size: 14px;
}

.auth-error {
  background: #fee2e2;
  color: #b91c1c;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  font-size: 14px;
}

.auth-success {
  background: #dcfce7;
  color: #166534;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  font-size: 14px;
}

.auth-card-wide {
  max-width: 460px;
}

/* Form */
.auth-form .form-group {
  margin-bottom: 18px;
}

.auth-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
}

.auth-form input {
  width: 100%;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  transition: 0.3s;
}

.auth-form input:focus {
  border-color: var(--primary);
  outline: none;
}

.auth-form input[readonly] {
  background: #f8fafc;
}

/* Password toggle */
.password-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #64748b;
}

/* Links */
.auth-links {
  text-align: right;
  margin-bottom: 20px;
}

.auth-links a {
  font-size: 13px;
  color: var(--primary);
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}

.auth-inline-form {
  margin-top: 12px;
  text-align: right;
}

.auth-link-btn {
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
}

.auth-link-btn:hover {
  text-decoration: underline;
}

/* Button */
.btn-auth {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
  color: white;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-auth:hover {
  transform: translateY(-3px);
}

/* ================= REGISTRATION PAGE ================= */

.form-wrapper {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.form-card {
  background: white;
  width: 100%;
  max-width: 550px;
  padding: 40px;
  border-radius: 18px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

.form-card h2 {
  text-align: center;
  margin-bottom: 25px;
}

.error {
  background: #fee2e2;
  color: #b91c1c;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  transition: 0.3s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  outline: none;
}

/* Button */
.form-card .btn-primary {
  width: 100%;
  margin-top: 10px;
  border: none;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 480px) {
  .form-card {
    padding: 30px 20px;
  }
}

/* ================= DASHBOARD ================= */

.dashboard-section {
  padding: 80px 0;
  min-height: 70vh;
}

.dashboard-card {
  background: white;
  padding: 30px;
  border-radius: 14px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
  margin: 30px 0;
}

.dashboard-actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* ================= STUDENT FULL DASHBOARD ================= */

.student-dashboard-section {
  padding: 50px 0 80px;
}

.student-dashboard-head {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.student-dashboard-head h1 {
  color: #0f172a;
  margin-bottom: 6px;
}

.student-dashboard-head p {
  color: #64748b;
}

.student-alert {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 15px;
  font-size: 14px;
  font-weight: 500;
}

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

.student-alert.danger {
  background: #fee2e2;
  color: #991b1b;
}

.student-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.student-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

.student-card.profile {
  grid-column: span 2;
  padding: 18px;
}

.student-card.profile h3 {
  margin-bottom: 10px;
  color: #0f172a;
}

.student-card.profile p {
  font-size: 14px;
  color: #475569;
  margin-bottom: 5px;
}

.student-card.stat {
  padding: 18px 14px;
}

.student-card.stat h4 {
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #1d4ed8;
  line-height: 1.1;
}

.student-dashboard-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.student-card.panel {
  padding: 18px;
}

.panel-head {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-head h2 {
  color: #0f172a;
  font-size: 22px;
}

.muted-text {
  font-size: 14px;
  color: #64748b;
}

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

.student-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.student-table th,
.student-table td {
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  padding: 10px 8px;
  font-size: 14px;
  color: #334155;
}

.student-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #0f172a;
}

.btn-student-action,
.btn-student-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s ease;
}

.btn-student-action {
  border: none;
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
  color: #ffffff;
  cursor: pointer;
}

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

.btn-student-outline {
  border: 1px solid #bfdbfe;
  background: #ffffff;
  color: #1d4ed8;
}

.btn-student-outline:hover {
  background: #eff6ff;
}

.result-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.result-chip.ok {
  background: #dcfce7;
  color: #166534;
}

.result-chip.bad {
  background: #fee2e2;
  color: #991b1b;
}

.result-chip.neutral {
  background: #e2e8f0;
  color: #334155;
}

.paper-list {
  display: grid;
  gap: 12px;
}

.paper-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.paper-item h4 {
  color: #0f172a;
  margin-bottom: 4px;
}

.paper-item p {
  color: #64748b;
  font-size: 13px;
}

/* ================= TEST PAGE ================= */

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

.timer-box {
  min-width: 130px;
  text-align: center;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: 12px;
  padding: 10px;
}

.timer-box span {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  color: #475569;
}

.timer-box strong {
  font-size: 28px;
  color: #1d4ed8;
  line-height: 1.1;
}

.question-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  background: #ffffff;
}

.question-card h4 {
  font-size: 16px;
  color: #0f172a;
  margin-bottom: 10px;
}

.question-options {
  display: grid;
  gap: 8px;
}

.question-options label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 14px;
  color: #334155;
}

.question-options label:hover {
  background: #f8fafc;
}

.question-submit-wrap {
  margin-top: 16px;
}

@media (max-width: 1100px) {
  .student-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-card.profile {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .student-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .student-card.profile {
    grid-column: span 1;
  }

  .student-dashboard-section {
    padding: 35px 0 60px;
  }
}
