/**
 * Authentication Pages Styles for Mr Mohrr7am
 */

/* Auth Container */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 110px 16px 60px;
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
}

.auth-background,
.auth-particles,
.math-shape-auth {
  pointer-events: none;
}

.auth-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.auth-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.auth-particles canvas {
  pointer-events: none;
}

.auth-container .container {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: 30px;
}

/* Auth Background - Light/Dark Theme Support */
.light-theme .math-auth-bg {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.dark-theme .math-auth-bg {
  background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
}

/* Fallback for when theme class is not applied */
.math-auth-bg {
  background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
}

/* Auth Card */
.auth-card {
  width: 100%;
  max-width: 800px;
  border-radius: 25px;
  overflow: visible;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border: none;
  position: relative;
  z-index: 3;
  pointer-events: auto;
  transition: box-shadow 0.3s ease;
  margin-bottom: 30px;
}

/* Theme-based card styling */
.light-theme .auth-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.dark-theme .auth-card {
  background: rgba(30, 41, 59, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.auth-card:hover {
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
}

.card-body {
  padding: 50px 60px !important; /* Increased padding for more cozy feel */
}

/* Auth Header */
.auth-header {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.auth-icon-container {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(58, 146, 98, 0.3);
}

.auth-icon-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(45deg);
  animation: shine 3s infinite;
}

.math-icon-animated {
  font-size: 2.5rem;
  color: #fff;
  position: relative;
  z-index: 1;
  animation: pulse 2s infinite alternate;
}

/* Light theme header styling */
.light-theme .auth-header h2 {
  color: #333;
  font-size: 2rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.light-theme .auth-header p {
  color: rgba(33, 37, 41, 0.7) !important;
  font-size: 1.1rem;
}

/* Dark theme header styling */
.dark-theme .auth-header h2 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.dark-theme .auth-header p {
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 1.1rem;
}

/* Auth Form */
.auth-form {
  margin-bottom: 25px;
}

/* Light theme form styling */
.light-theme .form-label {
  color: rgba(33, 37, 41, 0.9);
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.light-theme .form-control {
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #333;
  border-radius: 10px;
  padding: 12px 15px;
  transition: all 0.3s ease;
}

.light-theme .form-control:focus {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 114, 255, 0.5);
  color: #333;
  box-shadow: 0 0 0 0.25rem rgba(0, 114, 255, 0.15);
}

.light-theme .form-control::placeholder {
  color: rgba(33, 37, 41, 0.5);
}

/* Dark theme form styling */
.dark-theme .form-label {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.dark-theme .form-control {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 10px;
  padding: 12px 15px;
  transition: all 0.3s ease;
}

.dark-theme .form-control:focus {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(0, 198, 255, 0.5);
  color: #fff;
  box-shadow: 0 0 0 0.25rem rgba(0, 198, 255, 0.25);
}

.dark-theme .form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Light theme input group */
.light-theme .input-group-text {
  background: linear-gradient(180deg, #3a9262 0%, #2f7a52 100%);
  border: 1px solid transparent;
  border-right: 0;
  color: #fff;
  border-radius: 10px 0 0 10px;
}

.light-theme .btn-outline-secondary {
  border-color: rgba(58, 146, 98, 0.22);
  color: #2f7a52;
  border-radius: 0 10px 10px 0;
  background-color: rgba(58, 146, 98, 0.08);
}

.light-theme .btn-outline-secondary:hover {
  background: linear-gradient(180deg, #3a9262 0%, #2f7a52 100%);
  border-color: #3a9262;
  color: #fff;
}

/* Dark theme input group */
.dark-theme .input-group-text {
  background: linear-gradient(180deg, #3a9262 0%, #246347 100%);
  border: 1px solid transparent;
  border-right: 0;
  color: #fff;
  border-radius: 10px 0 0 10px;
}

.dark-theme .btn-outline-secondary {
  border-color: rgba(58, 146, 98, 0.35);
  color: #4ade80;
  border-radius: 0 10px 10px 0;
  background-color: rgba(58, 146, 98, 0.16);
}

.dark-theme .btn-outline-secondary:hover {
  background: linear-gradient(180deg, #3a9262 0%, #246347 100%);
  border-color: #3a9262;
  color: #fff;
}

/* Input group focus effect */
.input-focused .input-group-text {
  border-color: rgba(0, 198, 255, 0.5);
  transition: all 0.3s ease;
}

.form-text {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin-top: 8px;
}

/* Light theme checkboxes */
.light-theme .form-check-label {
  color: rgba(33, 37, 41, 0.8);
  font-size: 0.95rem;
}

.light-theme .form-check-input {
  background-color: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.2);
}

.light-theme .form-check-input:checked {
  background-color: #0072ff;
  border-color: #0072ff;
}

/* Dark theme checkboxes */
.dark-theme .form-check-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.dark-theme .form-check-input {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.dark-theme .form-check-input:checked {
  background-color: #00c6ff;
  border-color: #00c6ff;
}

/* Improved checkbox visual effect */
.form-check-input {
  width: 1.2em;
  height: 1.2em;
  margin-top: 0.15em;
  transition: all 0.2s ease;
}

.form-check-input:checked {
  transform: scale(1.05);
}

.form-check-label a {
  color: #00c6ff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.form-check-label a:hover {
  color: #0072ff;
  text-decoration: underline;
}

.float-end {
  color: #00c6ff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.float-end:hover {
  color: #0072ff;
  text-decoration: underline;
}

.invalid-feedback {
  color: #ff6b6b;
  font-size: 0.85rem;
}

/* Auth Buttons */
.auth-card .btn-primary {
  background: linear-gradient(90deg, #00c6ff, #0072ff);
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 15px rgba(0, 114, 255, 0.3);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 4;
  pointer-events: auto;
  cursor: pointer;
}

.auth-card .btn-primary:hover {
  box-shadow: 0 12px 20px rgba(0, 114, 255, 0.4);
  background: linear-gradient(90deg, #0072ff, #00c6ff);
}

.btn-lg {
  font-size: 1.1rem;
  padding: 15px 25px;
}

/* Auth Separator */
.auth-separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 25px 0;
}

.auth-separator::before,
.auth-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-separator-text {
  padding: 0 15px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* Social Login Buttons */
/* Light theme social buttons */
.light-theme .auth-card .btn-outline-primary {
  border: 1px solid rgba(0, 114, 255, 0.3);
  color: #0072ff;
  background-color: rgba(0, 114, 255, 0.05);
  border-radius: 10px;
  padding: 12px 15px;
  transition: all 0.3s ease;
}

.light-theme .auth-card .btn-outline-primary:hover {
  background-color: rgba(0, 114, 255, 0.1);
  border-color: rgba(0, 114, 255, 0.5);
  color: #0056b3;
  transform: translateY(-3px);
}

/* Dark theme social buttons */
.dark-theme .auth-card .btn-outline-primary {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 15px;
  transition: all 0.3s ease;
}

.dark-theme .auth-card .btn-outline-primary:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  transform: translateY(-3px);
}

.auth-container .auth-card,
.auth-container .d-grid,
.auth-container .auth-footer,
.auth-container .btn-primary {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Auth Footer */
.auth-footer {
  text-align: center;
  margin-top: 25px;
  padding: 15px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Light theme footer styling */
.light-theme .auth-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.light-theme .auth-footer p {
  color: rgba(33, 37, 41, 0.7);
  font-size: 0.95rem;
}

.light-theme .auth-footer a {
  color: #0072ff;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.light-theme .auth-footer a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Dark theme footer styling */
.dark-theme .auth-footer p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.dark-theme .auth-footer a {
  color: #00c6ff;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.dark-theme .auth-footer a:hover {
  color: #0072ff;
  text-decoration: underline;
}

/* Floating Math Shapes */
.math-shape-auth {
  position: absolute;
  opacity: 0.1;
  z-index: 0;
}

.auth-shape1 {
  top: 10%;
  left: 5%;
  width: 150px;
  height: 150px;
  background: #00c6ff;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: float-shape-slow 15s infinite alternate ease-in-out;
}

.auth-shape2 {
  bottom: 10%;
  right: 5%;
  width: 120px;
  height: 120px;
  background: #0072ff;
  border-radius: 64% 36% 27% 73% / 55% 58% 42% 45%;
  animation: float-shape-slow 12s infinite alternate-reverse ease-in-out;
}

.auth-shape3 {
  top: 50%;
  right: 15%;
  width: 80px;
  height: 80px;
  background: #00c6ff;
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  animation: float-shape-slow 10s infinite alternate ease-in-out;
}

.auth-shape4 {
  bottom: 30%;
  left: 10%;
  width: 100px;
  height: 100px;
  background: #0072ff;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  animation: float-shape-slow 13s infinite alternate-reverse ease-in-out;
}

/* Responsive Styles */
@media (max-width: 576px) {
  .auth-container {
    padding: 92px 10px 36px;
    align-items: flex-start;
  }

  .auth-container .container {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }

  .auth-card {
    margin: 0;
    max-width: 100%;
    border-radius: 16px;
  }

  .card-body {
    padding: 24px 18px !important;
  }

  .auth-header {
    margin-bottom: 22px;
  }

  .auth-icon-container {
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
  }

  .math-icon-animated {
    font-size: 2rem;
  }

  .auth-header h2 {
    font-size: 1.35rem;
    line-height: 1.3;
  }

  .light-theme .auth-header h2,
  .dark-theme .auth-header h2 {
    font-size: 1.35rem;
  }

  .auth-header p {
    font-size: 0.95rem !important;
  }

  .auth-form .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  .auth-form .form-text {
    font-size: 0.78rem;
    line-height: 1.45;
    margin-top: 6px;
  }

  .auth-form .mb-4 {
    margin-bottom: 1.1rem !important;
  }

  .auth-form .btn-lg {
    padding: 14px 20px;
    font-size: 1rem;
  }

  .auth-form-options {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-forgot-link {
    align-self: flex-end;
  }
}

/* Additional safe area top spacing for very small heights */
@media (max-height: 650px) {
  .auth-container {
    padding-top: 90px;
  }
}

/* Bottom margin and footer fixes */

/* Fix for EJS footer */
.auth-container + footer,
.auth-container ~ footer {
  margin-top: 0;
}

/* Auth pages skip AOS scripts, so reveal footer content immediately */
.auth-container + footer [data-aos],
.auth-container ~ footer [data-aos] {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}

/* Enhanced Registration Form Styles */
.auth-form .row {
  margin-bottom: 0;
}

/* Form info box for student code explanation */
.form-info-box {
  display: flex;
  align-items: flex-start;
  padding: 20px;
  background: linear-gradient(
    135deg,
    rgba(0, 114, 255, 0.1),
    rgba(0, 198, 255, 0.1)
  );
  border-radius: 12px;
  border: 1px solid rgba(0, 114, 255, 0.2);
  height: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.light-theme .form-info-box {
  background: linear-gradient(
    135deg,
    rgba(0, 114, 255, 0.08),
    rgba(0, 198, 255, 0.08)
  );
  border-color: rgba(0, 114, 255, 0.15);
}

.dark-theme .form-info-box {
  background: linear-gradient(
    135deg,
    rgba(0, 114, 255, 0.15),
    rgba(0, 198, 255, 0.15)
  );
  border-color: rgba(0, 114, 255, 0.3);
}

.form-info-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.form-info-box i {
  font-size: 1.5rem;
  margin-top: 5px;
  flex-shrink: 0;
}

.form-info-box div {
  flex: 1;
}

.form-info-box strong {
  color: #0072ff;
  display: block;
  margin-bottom: 5px;
  font-size: 1rem;
}

.light-theme .form-info-box strong {
  color: #0056b3;
}

.dark-theme .form-info-box strong {
  color: #4dabf7;
}

.form-info-box p {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 0;
}

.light-theme .form-info-box p {
  color: #6c757d;
}

.dark-theme .form-info-box p {
  color: #adb5bd;
}

/* Form field styling for wider layout */
.auth-form .form-label {
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.required-asterisk {
  color: #dc2626;
  font-weight: 700;
  margin-left: 2px;
}

.auth-form .input-group-text {
  min-width: 52px;
  justify-content: center;
  position: relative;
}

.auth-form .input-group-text::after {
  content: '';
  position: absolute;
  inset: 8px 8px 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.auth-form .input-group-text i {
  position: relative;
  z-index: 1;
  font-size: 1rem;
  width: 1.15em;
  text-align: center;
  color: #fff;
}

.auth-form .input-group:focus-within .input-group-text {
  background: linear-gradient(180deg, #2f7a52 0%, #1f5a3c 100%);
}

.auth-form .input-group:focus-within .input-group-text::after {
  background: rgba(255, 255, 255, 0.2);
}

.light-theme .auth-form .form-label {
  color: #333;
}

.dark-theme .auth-form .form-label {
  color: #fff;
}

/* Enhanced input group styling */
.auth-form .input-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.auth-form .input-group > .form-control,
.auth-form .input-group > .form-select {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  border-radius: 0 !important;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  border-left: 0;
  border-right: 0;
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.4;
}

.light-theme .auth-form .input-group > .form-control,
.light-theme .auth-form .input-group > .form-select {
  border-color: rgba(0, 0, 0, 0.1);
}

.dark-theme .auth-form .input-group > .form-control,
.dark-theme .auth-form .input-group > .form-select {
  border-color: rgba(255, 255, 255, 0.2);
}

.auth-form .input-group > .input-group-text {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 0;
  flex-shrink: 0;
}

.auth-form .input-group > .input-group-text:first-child {
  border-radius: 12px 0 0 12px;
}

.auth-form .input-group > .form-control:last-child {
  border-radius: 0 12px 12px 0 !important;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.dark-theme .auth-form .input-group > .form-control:last-child {
  border-right-color: rgba(255, 255, 255, 0.2);
}

.auth-form .input-group > .auth-password-toggle,
.auth-form .input-group > .btn-outline-secondary:last-child {
  min-width: 48px;
  min-height: 48px;
  padding: 0 12px;
  margin: 0;
  border-radius: 0 12px 12px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-left: 0;
}

.auth-form-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

.auth-form-options .form-check {
  margin-bottom: 0;
}

.auth-forgot-link {
  color: #0072ff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.light-theme .auth-forgot-link {
  color: #0072ff;
}

.dark-theme .auth-forgot-link {
  color: #00c6ff;
}

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

.auth-form .input-group:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-form .input-group:focus-within {
  box-shadow: 0 0 0 3px rgba(0, 198, 255, 0.2);
  transform: translateY(-1px);
}

/* Enhanced select styling */
.auth-form .form-select {
  background-size: 16px 12px;
  background-position: right 12px center;
  padding-right: 40px;
}

/* Better spacing for password fields in register form */
.auth-form .row:last-of-type .col-md-6:first-child {
  padding-right: 15px;
}

.auth-form .row:last-of-type .col-md-6:last-child {
  padding-left: 15px;
}

/* Enhanced button styling */
.auth-form .btn-lg {
  padding: 15px 30px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.auth-form .btn-lg:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 114, 255, 0.3);
}

/* Alert enhancements */
.alert {
  border-radius: 12px;
  border: none;
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alert-danger {
  background: linear-gradient(135deg, #ff6b6b, #ff5252);
  color: white;
}

.alert-success {
  background: linear-gradient(135deg, #51cf66, #40c057);
  color: white;
}

.alert ul {
  margin-bottom: 0;
  padding-left: 1.2rem;
}

.alert li {
  margin-bottom: 0.5rem;
}

.alert li:last-child {
  margin-bottom: 0;
}

/* Responsive adjustments for wider card */
@media (max-width: 992px) {
  .auth-card {
    max-width: 700px;
  }

  .card-body {
    padding: 40px 50px !important;
  }
}

@media (max-width: 768px) {
  .auth-card {
    max-width: 95%;
    margin: 0 2.5%;
  }

  .card-body {
    padding: 30px 25px !important;
  }

  .auth-form .row:last-of-type .col-md-6:first-child,
  .auth-form .row:last-of-type .col-md-6:last-child {
    padding-right: 15px;
    padding-left: 15px;
  }
}

@media (max-width: 576px) {
  .auth-card {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
  }

  .card-body {
    padding: 25px 20px !important;
  }
}

.dark-theme .auth-card .alert-warning {
  background: rgba(251, 191, 36, 0.16);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.dark-theme .auth-card .alert-success {
  background: rgba(16, 185, 129, 0.16);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.dark-theme .auth-card .alert-danger {
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Floating Flash Messages */
.floating-flash-message {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.floating-flash-message .alert {
  margin-bottom: 0;
  border: none;
  border-radius: 12px;
  position: relative;
}

.light-theme .floating-flash-message .alert-warning {
  background: rgba(255, 193, 7, 0.9);
  color: #664d03;
  border-left: 4px solid #ffc107;
}

.dark-theme .floating-flash-message .alert-warning {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
  border-left: 4px solid #ffc107;
}

.light-theme .floating-flash-message .alert-success {
  background: rgba(25, 135, 84, 0.9);
  color: #0a3622;
  border-left: 4px solid #198754;
}

.dark-theme .floating-flash-message .alert-success {
  background: rgba(25, 135, 84, 0.15);
  color: #198754;
  border-left: 4px solid #198754;
}

/* Slide in animation */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Auto-hide animation */
.floating-flash-message {
  animation: slideInLeft 0.5s ease-out, fadeOut 0.5s ease-in 4s forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-100%);
  }
}

/* Responsive adjustments for floating messages */
@media (max-width: 768px) {
  .floating-flash-message {
    left: 10px !important;
    right: 10px !important;
    max-width: calc(100% - 20px) !important;
  }
}

.auth-form .invalid-feedback {
  margin-top: 0.4rem;
}

.auth-form .input-group:has(.is-invalid) + .invalid-feedback,
.auth-form.was-validated .input-group:has(:invalid) + .invalid-feedback {
  display: block;
}

.register-section {
  padding: 14px 16px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.03);
}

.light-theme .register-section,
html[data-theme='light'] .register-section,
html[data-bs-theme='light'] .register-section {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.dark-theme .register-section {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.28);
}

.register-org-row {
  --bs-gutter-y: 0.85rem;
}

.custom-org-wrap {
  margin-top: 8px;
}

.custom-org-wrap .form-text {
  margin-top: 6px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.custom-org-wrap .form-control {
  min-height: 48px;
}

.student-type-selector-auth .student-type-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.student-type-selector-auth .student-type-option {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.student-type-selector-auth .student-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.student-type-selector-auth .student-type-option-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 76px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.35);
  color: #f8fafc;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.student-type-selector-auth .student-type-option-content i {
  color: #4ade80;
}

.student-type-selector-auth .student-type-option-label {
  color: inherit;
  font-weight: 600;
}

.student-type-selector-auth .student-type-option input:checked + .student-type-option-content {
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.2);
  color: #f8fafc;
}

.student-type-selector-auth .student-type-hint {
  display: block;
  margin-top: 8px;
  color: rgba(248, 250, 252, 0.65);
  font-size: 0.85rem;
}

.student-type-selector-auth.is-invalid .student-type-option-content {
  border-color: rgba(248, 113, 113, 0.55);
}

.light-theme .student-type-selector-auth .student-type-option-content,
html[data-theme='light'] .student-type-selector-auth .student-type-option-content,
html[data-bs-theme='light'] .student-type-selector-auth .student-type-option-content {
  border: 1px solid #d7e0ea;
  background: #f4f7fb;
  color: #0f172a;
  box-shadow: none;
}

.light-theme .student-type-selector-auth .student-type-option-content i,
html[data-theme='light'] .student-type-selector-auth .student-type-option-content i,
html[data-bs-theme='light'] .student-type-selector-auth .student-type-option-content i {
  color: #1f8a4c;
}

.light-theme .student-type-selector-auth .student-type-option:hover .student-type-option-content,
html[data-theme='light'] .student-type-selector-auth .student-type-option:hover .student-type-option-content,
html[data-bs-theme='light'] .student-type-selector-auth .student-type-option:hover .student-type-option-content {
  border-color: #b7c7d6;
  background: #eef4f8;
  color: #0f172a;
}

.light-theme .student-type-selector-auth .student-type-option input:checked + .student-type-option-content,
html[data-theme='light'] .student-type-selector-auth .student-type-option input:checked + .student-type-option-content,
html[data-bs-theme='light'] .student-type-selector-auth .student-type-option input:checked + .student-type-option-content {
  border-color: #1f8a4c;
  background: #e8f8ee;
  box-shadow: 0 0 0 1px rgba(31, 138, 76, 0.18);
  color: #0f172a;
}

.light-theme .student-type-selector-auth .student-type-option input:checked + .student-type-option-content i,
html[data-theme='light'] .student-type-selector-auth .student-type-option input:checked + .student-type-option-content i,
html[data-bs-theme='light'] .student-type-selector-auth .student-type-option input:checked + .student-type-option-content i {
  color: #167a42;
}

.light-theme .student-type-selector-auth .student-type-hint,
html[data-theme='light'] .student-type-selector-auth .student-type-hint,
html[data-bs-theme='light'] .student-type-selector-auth .student-type-hint {
  color: #5b6b7c;
}

.light-theme .student-type-selector-auth.is-invalid .student-type-option-content,
html[data-theme='light'] .student-type-selector-auth.is-invalid .student-type-option-content,
html[data-bs-theme='light'] .student-type-selector-auth.is-invalid .student-type-option-content {
  border-color: #ef4444;
}

@media (max-width: 768px) {
  .student-type-selector-auth .student-type-options {
    grid-template-columns: 1fr;
  }
}
