/* Security pages (login, register, password reset) */

body {
  font-family: var(--font-family-base);
  background: linear-gradient(135deg, var(--bs-primary) 0%, var(--darkblue) 100%);
  color: var(--bs-body-color);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Left side with background image */
#security-md {
  background-color: #101137;
  min-height: 100vh;
  position: relative;
  padding: 3rem;
  overflow: hidden;
}

#security-md > img:first-child {
  max-width: 280px;
  width: 50%;
  height: auto;
  z-index: 2;
  position: relative;
  margin-bottom: 2rem;
}

#security-world {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100% !important;
  height: auto;
  opacity: 0.2;
  object-fit: contain;
  object-position: center bottom;
  mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 100%);
}


/* Right side with form */
#security-form {
  min-height: 100vh;
  padding: 2rem;
  position: relative;
  background: linear-gradient(135deg, var(--bs-primary) 0%, var(--darkblue) 100%);
}

@media (min-width: 992px) {
  #security-form {
    background: #fff;
  }
}

#security-form > img {
  max-width: 180px;
  width: 33%;
  margin-bottom: 2rem;
}

/* In mobile, make logo white on blue background */
@media (max-width: 991px) {
  #security-form > img {
    filter: brightness(0) invert(1);
  }
}

/* Back button to homepage */
.back-to-home {
  position: absolute;
  top: 2rem;
  left: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--darkblue);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 2px solid var(--gray-300);
  background-color: #fff;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.back-to-home:hover {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(61, 165, 235, 0.2);
  transform: translateX(-2px);
}

/* Mobile: white transparent button on blue background */
@media (max-width: 991px) {
  .back-to-home {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
  }

  .back-to-home:hover {
    border-color: #fff;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }
}

.back-to-home i {
  font-size: 1rem;
}

/* Form container */
#security-form form {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  #security-form form {
    width: 50%;
  }
}

/* Mobile: white card on blue background */
@media (max-width: 991px) {
  #security-form form {
    background-color: #fff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  }
}

#security-form h1 {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  color: var(--darkblue);
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
  padding: 2rem 2rem 0;
}

#security-form h4 {
  color: var(--darkblue);
  text-align: center;
  padding: 2rem;
}

#security-form p {
  text-align: center;
  color: var(--darkblue);
  margin-bottom: 2rem;
  padding: 1rem;
}

/* Links in form content (not the back button) */
#security-form form a,
#security-form p a {
  color: var(--bs-primary);
  font-weight: 600;
  text-decoration: none;
}

#security-form form a:hover,
#security-form p a:hover {
  text-decoration: underline;
}

/* Form groups */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--darkblue);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  text-transform: capitalize;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  transition: all 0.2s ease;
  background-color: #fff;
}

.form-control:focus {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(61, 165, 235, 0.1);
}

.form-control:hover:not(:focus) {
  border-color: var(--gray-400);
}

/* Checkbox styling */
.form-check {
  display: flex;
  align-items: center;
}

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.5rem;
  border: 2px solid var(--gray-300);
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.form-check-label {
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
}

/* Links in form */
#security-form .row a {
  color: var(--bs-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

#security-form .row a:hover {
  text-decoration: underline;
}

/* Submit button */
.btn-primary.btn-block.btn-lg {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  background-color: var(--bs-primary);
  color: #fff;
  transition: all 0.2s ease;
  margin-top: 2rem;
}

.btn-primary.btn-block.btn-lg:hover {
  background-color: var(--darkblue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(61, 165, 235, 0.3);
}

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

/* Alerts */
.alert {
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: none;
}

.alert-danger {
  background-color: color-mix(in srgb, var(--bs-danger) 10%, white);
  color: var(--bs-danger);
  border-left: 4px solid var(--bs-danger);
}

.alert-success {
  background-color: color-mix(in srgb, var(--bs-success) 10%, white);
  color: var(--bs-success);
  border-left: 4px solid var(--bs-success);
}

/* Legal mentions */
.legal-mention {
  font-size: 0.75rem;
}

/* Verification card for register_step2 */
.verification-card {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

/* Mobile: white card on blue background */
@media (max-width: 991px) {
  .verification-card {
    background-color: #fff;
    padding: 3rem 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  }
}

/* Responsive */
@media (max-width: 991px) {
  #security-form {
    padding: 3rem 1.5rem;
  }

  .back-to-home {
    position: static;
    margin-bottom: 2rem;
    display: inline-flex;
  }
}

@media (min-width: 992px) {
  #security-form {
    padding: 3rem;
  }
}
