/* =====================================================
   SIMETRA REGISTER
   Bootstrap 5.3 + Select2 Bootstrap 5
===================================================== */

/* =====================================================
   01. ROOT VARIABLES
===================================================== */

:root {
  --primary: #123f67;
  --primary-dark: #0b2d4d;
  --secondary: #168b88;
  --accent: #e5a93d;

  --text: #243447;
  --muted: #7b8794;

  --border: #e2e8f0;
  --surface: #ffffff;
  --background: #f4f7fb;

  --success: #159b69;
  --warning: #e4a42b;
  --danger: #dc4c4c;

  /* TYPOGRAPHY */
  --auth-font: "Plus Jakarta Sans", sans-serif;
  --auth-font-size: 12px;
  --auth-font-size-sm: 10px;
  --auth-font-size-md: 13px;

  /* INPUT */
  --auth-input-height: 49px;
  --auth-radius: 10px;

  /* FOCUS */
  --auth-focus-shadow: 0 0 0 3px rgba(22, 139, 136, 0.1);
}

/* =====================================================
   02. RESET & GLOBAL
===================================================== */

* {
  box-sizing: border-box;
}

body.auth-page {
  margin: 0;
  min-height: 100vh;

  font-family: var(--auth-font);
  font-size: var(--auth-font-size);
  color: var(--text);

  background: var(--background);
}

/* =====================================================
   03. AUTH SHELL
===================================================== */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
}

/* =====================================================
   04. VISUAL PANEL
===================================================== */

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  padding: 48px 7%;
  overflow: hidden;

  color: #fff;

  background:
    radial-gradient(
      circle at 10% 90%,
      rgba(22, 139, 136, 0.35),
      transparent 35%
    ),
    linear-gradient(145deg, #123f67, #092b49);
}

/* DECORATION */

.auth-visual::before,
.auth-visual::after {
  content: "";
  position: absolute;

  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;

  pointer-events: none;
}

.auth-visual::before {
  width: 450px;
  height: 450px;
  right: -200px;
  top: 12%;
}

.auth-visual::after {
  width: 300px;
  height: 300px;
  right: -120px;
  top: 25%;
}

/* BRAND */

.brand,
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 13px;

  position: relative;
  z-index: 2;

  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand strong,
.mobile-brand strong {
  display: block;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 1px;
}

.brand small,
.mobile-brand small {
  display: block;
  font-size: var(--auth-font-size-sm);
  opacity: 0.8;
}

/* VISUAL CONTENT */

.visual-content {
  position: relative;
  z-index: 2;

  max-width: 510px;
  margin: 70px 0;
}

.eyebrow,
.form-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.eyebrow {
  color: #8bd4cf;
}

.visual-content h1 {
  margin: 22px 0;

  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.2;
  font-weight: 800;
}

.visual-content p {
  max-width: 450px;

  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.9;
}

/* VISUAL POINTS */

.visual-points {
  display: grid;
  gap: 20px;
  margin-top: 35px;
}

.visual-points div {
  display: flex;
  align-items: center;
  gap: 14px;

  font-size: var(--auth-font-size-md);
  color: rgba(255, 255, 255, 0.9);
}

.visual-points i {
  width: 36px;
  height: 36px;

  display: grid;
  place-items: center;

  background: rgba(255, 255, 255, 0.12);
  color: #9ce2dc;
  border-radius: 10px;

  font-size: 17px;
}

/* VISUAL FOOTER */

.visual-footer {
  position: relative;
  z-index: 2;

  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
}

/* =====================================================
   05. FORM PANEL
===================================================== */

.auth-form-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;

  padding: 45px 30px;
}

/* FORM CARD */

.form-card {
  width: 100%;
  max-width: 490px;

  padding: 38px;

  background: var(--surface);
  border-radius: 20px;

  box-shadow: 0 15px 50px rgba(21, 49, 76, 0.07);
}

/* MOBILE BRAND */

.mobile-brand {
  display: none;
  color: var(--primary);
  margin-bottom: 25px;
}

/* FORM ICON */

.form-icon {
  width: 52px;
  height: 52px;

  display: grid;
  place-items: center;

  margin-bottom: 18px;

  background: #eaf3f9;
  color: var(--primary);
  border-radius: 15px;

  font-size: 24px;
}

/* FORM TITLE */

.form-kicker {
  color: var(--secondary);
}

.form-card h2 {
  margin: 10px 0;

  font-size: 27px;
  font-weight: 800;
  color: var(--primary-dark);
}

.form-description {
  margin-bottom: 25px;

  font-size: var(--auth-font-size);
  line-height: 1.8;
  color: var(--muted);
}

/* LABEL */

.form-label {
  margin-bottom: 8px;

  font-size: var(--auth-font-size);
  font-weight: 700;
  color: #34475b;
}

.required {
  color: var(--danger);
}

/* =====================================================
   06. INPUT GROUP
===================================================== */

.input-group-custom {
  display: flex;
  align-items: center;

  min-height: var(--auth-input-height);

  border: 1px solid var(--border);
  border-radius: var(--auth-radius);

  background: var(--surface);

  transition: 0.2s ease;
  overflow: hidden;
}

/* FOCUS */

.input-group-custom:focus-within {
  border-color: var(--secondary);
  box-shadow: var(--auth-focus-shadow);
}

/* ICON */

.input-group-custom > i {
  width: 43px;
  flex-shrink: 0;

  text-align: center;
  color: #8795a4;

  font-size: 16px;
}

/* INPUT */

.input-group-custom .form-control {
  height: 47px;
  min-width: 0;

  padding: 10px 8px;

  border: 0;
  border-radius: 0;
  box-shadow: none;

  font-family: var(--auth-font);
  font-size: var(--auth-font-size);
}

.input-group-custom select.form-control {
  cursor: pointer;
}

.input-group-custom .form-control::placeholder {
  color: #adb7c2;
}

/* INVALID */

.input-group-custom:has(.form-control.is-invalid) {
  border-color: var(--danger);
}

/* PASSWORD TOGGLE */

.password-toggle {
  width: 43px;
  height: 45px;
  flex-shrink: 0;

  border: 0;
  background: transparent;

  color: #8795a4;
}

.password-toggle:hover {
  color: var(--primary);
}

/* =====================================================
   07. PASSWORD STRENGTH
===================================================== */

.password-strength {
  margin-top: 12px;
}

/* HEADER */

.strength-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;

  margin-bottom: 7px;

  font-size: var(--auth-font-size-sm);
  color: var(--muted);
}

#strengthText {
  font-weight: 800;
}

/* METER */

.strength-meter {
  height: 6px;

  background: #edf0f4;
  border-radius: 10px;
  overflow: hidden;
}

#strengthBar {
  display: block;

  width: 0;
  height: 100%;

  background: #cbd5e1;
  border-radius: inherit;

  transition:
    width 0.25s ease,
    background 0.25s ease;
}

/* LEVEL */

#strengthBar.level-1 {
  width: 20%;
  background: var(--danger);
}

#strengthBar.level-2 {
  width: 40%;
  background: var(--warning);
}

#strengthBar.level-3 {
  width: 60%;
  background: var(--warning);
}

#strengthBar.level-4 {
  width: 80%;
  background: var(--secondary);
}

#strengthBar.level-5 {
  width: 100%;
  background: var(--success);
}

/* STRENGTH TEXT */

#strengthText.level-1 {
  color: var(--danger);
}

#strengthText.level-2,
#strengthText.level-3 {
  color: #d18c15;
}

#strengthText.level-4,
#strengthText.level-5 {
  color: var(--success);
}

/* REQUIREMENTS */

.password-requirements {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 10px;

  margin-top: 12px;
}

.password-requirements > small {
  grid-column: 1 / -1;

  font-size: var(--auth-font-size-sm);
  font-weight: 700;
  color: #667587;
}

.requirement {
  display: flex;
  align-items: center;
  gap: 6px;

  font-size: var(--auth-font-size-sm);
  color: #8995a3;
}

.requirement i {
  font-size: 11px;
}

.requirement.valid {
  color: var(--success);
}

.requirement.valid i::before {
  content: "\f26b";
}

/* PASSWORD MATCH */

.password-match {
  margin-top: 7px;
  font-size: 11px;
}

.password-match.valid {
  color: var(--success);
}

.password-match.invalid {
  color: var(--danger);
}

/* =====================================================
   08. SELECT2 - SIMETRA
===================================================== */

/* WRAPPER */

.select2-icon-wrapper {
  position: relative;
  width: 100%;
}

/* ICON */

.select2-icon-wrapper > .select2-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;

  font-size: 15px;
  color: var(--muted);

  pointer-events: none;
  transition: color 0.2s ease;
}

/* CONTAINER */

.select2-icon-wrapper .select2-container {
  width: 100% !important;
}

/* =====================================================
   08.1 SELECTION
===================================================== */

.select2-container--bootstrap-5 .select2-selection {
  min-height: var(--auth-input-height);

  border: 1px solid var(--border);
  border-radius: var(--auth-radius);

  background-color: var(--surface);

  font-family: var(--auth-font);
  font-size: var(--auth-font-size);
}

/* SINGLE */

.select2-container--bootstrap-5 .select2-selection--single {
  display: flex;
  align-items: center;

  height: var(--auth-input-height);
}

/* RENDERED TEXT */

.select2-icon-wrapper
  .select2-container--bootstrap-5
  .select2-selection--single
  .select2-selection__rendered {
  display: flex;
  align-items: center;

  width: 100%;

  padding-left: 42px !important;
  padding-right: 32px !important;

  font-family: var(--auth-font);
  font-size: var(--auth-font-size);
  font-weight: 400;

  color: var(--text);
  line-height: 1.5;
}

/* PLACEHOLDER */

.select2-container--bootstrap-5 .select2-selection__placeholder {
  font-family: var(--auth-font);
  font-size: var(--auth-font-size);
  font-weight: 400;

  color: #adb7c2;
}

/* SELECTED TEXT */

.select2-container--bootstrap-5 .select2-selection__rendered {
  font-family: var(--auth-font);
  font-size: var(--auth-font-size);
  font-weight: 400;
}

/* ARROW */

.select2-container--bootstrap-5
  .select2-selection--single
  .select2-selection__arrow {
  height: 100%;
  top: 0;
  right: 8px;
}

/* =====================================================
   08.2 FOCUS
===================================================== */

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: var(--secondary);
  box-shadow: var(--auth-focus-shadow);
}

/* ICON FOCUS */

.select2-icon-wrapper:focus-within > .select2-icon {
  color: var(--secondary);
}

/* =====================================================
   08.3 DROPDOWN
===================================================== */

.select2-container--bootstrap-5 .select2-dropdown {
  border: 1px solid var(--border);
  border-radius: var(--auth-radius);
  overflow: hidden;

  background: var(--surface);

  font-family: var(--auth-font);
  font-size: var(--auth-font-size);
}

/* RESULTS CONTAINER */

.select2-container--bootstrap-5 .select2-dropdown .select2-results__options {
  font-family: var(--auth-font);
  font-size: var(--auth-font-size);
}

/* OPTIONS */

.select2-container--bootstrap-5
  .select2-dropdown
  .select2-results__options
  .select2-results__option {
  padding: 0.375rem 0.75rem;

  font-family: var(--auth-font);
  font-size: var(--auth-font-size);
  font-weight: 400;
  line-height: 1.5;

  color: var(--text);
}

/* HIGHLIGHT */

.select2-container--bootstrap-5 .select2-results__option--highlighted {
  background-color: var(--primary) !important;
  color: #fff !important;
}

/* SELECTED OPTION */

.select2-container--bootstrap-5 .select2-results__option--selected {
  background-color: #eaf3f9;
  color: var(--primary);
}

/* =====================================================
   08.4 SEARCH
===================================================== */

.select2-container--bootstrap-5
  .select2-search--dropdown
  .select2-search__field {
  width: 100%;

  padding: 8px 10px;

  border: 1px solid var(--border);
  border-radius: 8px;

  font-family: var(--auth-font);
  font-size: var(--auth-font-size);
  font-weight: 400;
  line-height: 1.5;

  color: var(--text);
}

/* SEARCH FOCUS */

.select2-container--bootstrap-5
  .select2-search--dropdown
  .select2-search__field:focus {
  border-color: var(--secondary);
  box-shadow: var(--auth-focus-shadow);
  outline: none;
}

/* SEARCH PLACEHOLDER */

.select2-container--bootstrap-5 .select2-search__field::placeholder {
  color: #adb7c2;
}

/* =====================================================
   08.5 VALIDATION
===================================================== */

.select2-icon-wrapper .select2-selection.is-invalid {
  border-color: var(--danger) !important;
}

/* =====================================================
   08.6 DISABLED
===================================================== */

.select2-container--bootstrap-5.select2-container--disabled .select2-selection {
  background-color: #f1f5f9;
}

/* =====================================================
   09. CAPTCHA
===================================================== */

.captcha-wrapper {
  max-width: 100%;
  overflow-x: auto;
}

/* =====================================================
   10. SUBMIT BUTTON
===================================================== */

.btn-submit {
  width: 100%;
  height: 51px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;

  border: 0;
  border-radius: var(--auth-radius);

  color: #fff;
  background: linear-gradient(110deg, var(--primary), var(--secondary));

  font-family: var(--auth-font);
  font-size: var(--auth-font-size-md);
  font-weight: 700;

  transition: 0.2s ease;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(18, 63, 103, 0.2);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* =====================================================
   11. REGISTER INFO
===================================================== */

.register-info {
  display: flex;
  gap: 10px;

  margin-top: 20px;
  padding: 13px;

  background: #edf6f7;
  border: 1px solid #d8eeee;
  border-radius: var(--auth-radius);

  color: #386c70;
  font-size: var(--auth-font-size-sm);
  line-height: 1.7;
}

.register-info i {
  flex-shrink: 0;
  font-size: 15px;
}

/* =====================================================
   12. BACK TO LOGIN
===================================================== */

.back-login {
  margin-top: 22px;

  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

.back-login a {
  color: var(--secondary);
  font-weight: 800;
  text-decoration: none;
}

.back-login a:hover {
  text-decoration: underline;
}

/* =====================================================
   13. SECURITY NOTE
===================================================== */

.security-note {
  margin-top: 22px;

  text-align: center;
  font-size: var(--auth-font-size-sm);
  color: #9aa5b1;
}

.security-note i {
  margin-right: 5px;
}

/* =====================================================
   14. LOADING OVERLAY
===================================================== */

.loading-overlay {
  display: none;

  position: fixed;
  inset: 0;
  z-index: 99999;

  align-items: center;
  justify-content: center;

  background: rgba(9, 35, 58, 0.72);
  backdrop-filter: blur(5px);
}

/* ACTIVE */

.loading-overlay.active {
  display: flex;
}

/* ARIA */

.loading-overlay[aria-hidden="true"] {
  display: none !important;
}

/* LOADING BOX */

.loading-box {
  width: min(90%, 350px);

  padding: 35px 28px;

  text-align: center;

  background: var(--surface);
  border-radius: 18px;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.loading-box strong {
  display: block;

  margin-top: 18px;

  font-size: 15px;
  color: var(--primary);
}

.loading-box p {
  margin: 9px 0 0;

  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
}

/* SPINNER */

.loader {
  display: inline-block;

  width: 42px;
  height: 42px;

  border: 4px solid #e6edf2;
  border-top-color: var(--secondary);

  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =====================================================
   15. RESPONSIVE - TABLET
===================================================== */

@media (max-width: 991px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    display: none;
  }

  .auth-form-wrap {
    padding: 35px 20px;
  }

  .form-card {
    max-width: 520px;
  }

  .mobile-brand {
    display: flex;
  }
}

/* =====================================================
   16. RESPONSIVE - MOBILE
===================================================== */

@media (max-width: 480px) {
  .auth-form-wrap {
    padding: 15px 12px;
  }

  .form-card {
    padding: 25px 19px;
    border-radius: 15px;
  }

  .form-card h2 {
    font-size: 23px;
  }

  .password-requirements {
    grid-template-columns: 1fr;
  }
}
