@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700;800&display=swap');

/* ========================================
   BASE & LAYOUT
   ======================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: url("/static/ui/assets/images/auth/back-obra.png") center center / cover no-repeat;
  font-family: "Rubik", sans-serif;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

.auth-overlay {
  height: 100vh;
  background: rgba(8, 13, 20, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

/* ========================================
   STEPS INDICATOR
   ======================================== */

.steps {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 10px;
  margin-bottom: 30px;
}

.step {
  text-align: center;
  color: #6f7785;
  font-size: 0.78rem;
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #303746;
  color: #9aa3b5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  font-size: 0.82rem;
}

.step.active {
  color: #FF5300;
}

.step.active .step-number {
  background: #FF5300;
  color: #fff;
  box-shadow: 0 0 22px rgba(255, 83, 0, 0.35);
}

.step.done .step-number {
  background: #1ec97f;
  color: #fff;
}

/* ========================================
   SHARED COMPONENTS
   ======================================== */

/* --- Spinner --- */

.mdi-spin {
  animation: mdi-spin 0.8s linear infinite;
}

@keyframes mdi-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.btn-spinner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* --- Modal --- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}

.modal-card {
  background: #1e2330;
  border-radius: 0.25rem;
  padding: 32px 28px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  color: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-icon {
  margin-bottom: 16px;
}

.modal-icon i {
  font-size: 48px;
  color: #f96868;
}

.modal-card h4 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.modal-card p {
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 22px;
}

.btn-modal-close {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 0.1875rem;
  background: #0088cc;
  color: #fff;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-modal-close:hover {
  background-color: #269ad4;
  border-color: #1a94d1;
}

/* --- Logo --- */

.logo {
  text-align: center;
  margin-bottom: 20px;
}

.logo img {
  width: 56px;
}

/* --- Subtitle --- */

.subtitle {
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.45;
  margin-bottom: 20px;
}

/* --- Back link --- */

.back {
  font-size: 0.8rem;
}

.back a {
  color: #0088cc;
}

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

.back--success {
  margin-top: 22px;
}

.back--expired {
  margin-top: 24px;
}

/* --- Reset card (base) --- */

.reset-card {
  width: 100%;
  background: #191c20;
  color: #fff;
}

.reset-card--request {
  max-width: 420px;
  border-radius: 0.25rem;
  padding: 32px 36px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
}

.reset-card--password {
  max-width: 400px;
  border-radius: 0.25rem;
  padding: 28px 32px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

/* --- Form group --- */

.form-group label {
  color: #ffffff;
  display: block;
}

.form-group--request {
  margin-bottom: 16px;
}

.form-group--request label {
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.form-group--password {
  margin-bottom: 14px;
}

.form-group--password label {
  font-size: 0.82rem;
  margin-bottom: 8px;
}

/* --- Input icon --- */

.input-icon {
  position: relative;
}

.input-icon input {
  width: 100%;
  background: #2A3038 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  font-size: 0.875rem;
}

.input-icon input:focus {
  border-color: #0088cc !important;
}

.input-icon--request i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8b94a6;
  font-size: 18px;
  z-index: 2;
}

.input-icon--request input {
  height: 45px;
  border-radius: 2px;
  padding-left: 44px !important;
}

.input-icon--request input:focus {
  box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.25);
}

.input-icon--password .left-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #8b94a6;
  font-size: 16px;
}

.input-icon--password input {
  height: 40px;
  border-radius: 2px;
  padding-left: 38px !important;
  padding-right: 38px !important;
}

.input-icon--password input:focus {
  box-shadow: 0 0 0 2px rgba(0, 136, 204, 0.25);
}

/* --- Reset button --- */

.btn-reset {
  width: 100%;
  background-color: #0088cc;
  border: 1px solid #0088cc;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.btn-icon {
  font-size: 1.1em;
  line-height: 1;
}

.btn-reset:hover {
  background-color: #269ad4;
  border-color: #1a94d1;
  color: #fff;
}

.btn-reset:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-reset--request {
  height: 45px;
  border-radius: 0.1875rem;
  font-size: 0.82rem;
  margin-top: 2px;
}

.btn-reset--password {
  height: 40px;
  border-radius: 0.1875rem;
  font-size: 0.82rem;
  margin-top: 2px;
}

/* ========================================
   REQUEST PAGE
   ======================================== */

.logo-wrapper {
  text-align: center;
  margin-bottom: 24px;
}

.logo-wrapper img {
  width: 60px;
  height: auto;
}

.reset-title {
  text-align: center;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.reset-subtitle {
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

.security-box {
  margin-top: 22px;
  padding: 14px;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.025);
}

.security-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.security-item:last-child {
  margin-bottom: 0;
}

.security-icon {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 6px;
  background: rgba(255, 83, 0, 0.13);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FF5300;
  font-size: 17px;
}

.security-text__title {
  display: block;
  color: #fff;
  font-size: 0.82rem;
  margin-bottom: 2px;
}

.security-text span {
  font-size: 0.78rem;
  line-height: 1.4;
}

.back-login {
  border-top: 1px solid #343b49;
  margin-top: 22px;
  padding-top: 16px;
  text-align: center;
  font-size: 0.82rem;
}

.back-login a {
  color: #0088cc;
}

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

/* ========================================
   PASSWORD PAGE
   ======================================== */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0088cc;
  text-decoration: underline;
  font-size: 0.78rem;
  margin-bottom: 16px;
}

.back-link:hover {
  color: #0088cc;
}

.reset-card--password h3 {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #8b94a6;
  font-size: 16px;
  cursor: pointer;
}

.rules-box {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.25rem;
}

.rule {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  margin-bottom: 6px;
}

.rule:last-child {
  margin-bottom: 0;
}

.rule i {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 50%;
  background: #384153;
  color: #9aa3b5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.rule.valid {
  color: #19c77a;
}

.rule.valid i {
  background: #19c77a;
  color: #fff;
}

.rule.invalid {
  color: #9aa3b5;
}

.rule.invalid i {
  background: #384153;
  color: #9aa3b5;
}

.strength-bar-container {
  margin-top: 12px;
  display: none;
}

.strength-track {
  height: 6px;
  background: #384153;
  border-radius: 3px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease, background 0.3s ease;
  width: 0;
}

.strength-fill.strength-weak {
  background: #f96868;
  width: 25%;
}

.strength-fill.strength-medium {
  background: #ffab00;
  width: 55%;
}

.strength-fill.strength-strong {
  background: #19c77a;
  width: 100%;
}

.strength-label {
  display: inline-block;
  margin-top: 5px;
  font-size: 0.75rem;
}

.strength-text-weak {
  color: #f96868;
}

.strength-text-medium {
  color: #ffab00;
}

.strength-text-strong {
  color: #19c77a;
}

.match-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.75rem;
}

.match-indicator.match-valid {
  color: #19c77a;
}

.match-indicator.match-valid i {
  color: #19c77a;
  font-size: 18px;
}

.match-indicator.match-invalid {
  color: #f96868;
}

.match-indicator.match-invalid i {
  color: #f96868;
  font-size: 18px;
}

/* ========================================
   SUCCESS PAGE (.card-reset)
   ======================================== */

.card-reset {
  width: 100%;
  max-width: 400px;
  background: #191c20;
  border-radius: 0.25rem;
  padding: 32px 30px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  text-align: center;
  color: #fff;
}

.card-reset .logo img {
  width: 56px;
  margin-bottom: 20px;
}

.icon-mail {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: rgba(255, 83, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 18px auto;
  font-size: 24px;
  color: #FF5300;
}

.check {
  color: #1ec97f;
  font-size: 24px;
  margin-top: 8px;
}

.card-reset h3 {
  font-size: 1.1rem;
  margin: 14px 0;
}

.card-reset .subtitle {
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 22px;
}

.info-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.6rem;

  padding: 14px 16px;
  margin-bottom: 20px;

  text-align: left;
  font-size: 0.8rem;
  line-height: 1.5;

  cursor: default;
}

.info-box__title {
  display: block;
  margin-bottom: 4px;
  font-size: 0.82rem;
}

.resend {
  margin: 16px 0;
}

.resend button {
  width: 100%;
  height: 40px;
  border-radius: 0.1875rem;
  border: 1px solid #0088cc;
  background: #0088cc;
  color: #fff;
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.resend button:hover:not(:disabled) {
  background-color: #269ad4;
  border-color: #1a94d1;
}

.resend button:disabled {
  background: #2A3038;
  border-color: #2A3038;
  color: #6f7785;
  cursor: not-allowed;
}

/* ========================================
   EXPIRED PAGE (.card-expired)
   ======================================== */

.card-expired {
  width: 100%;
  max-width: 400px;
  background: #191c20;
  border-radius: 0.25rem;
  padding: 32px 30px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  text-align: center;
  color: #fff;
}

.card-expired .logo img {
  width: 56px;
  margin-bottom: 20px;
}

.icon-expired {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: rgba(249, 104, 104, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 18px auto;
  font-size: 24px;
  color: #f96868;
}

.card-expired h3 {
  font-size: 1.1rem;
  margin: 14px 0;
}

.card-expired .subtitle {
  font-size: 0.82rem;
  color: #ffffff;
  margin-bottom: 10px;
  line-height: 1.5;
}

.card-expired .description {
  font-size: 0.78rem;
  color: #9aa3b5;
  line-height: 1.5;
  margin-bottom: 24px;
}

.btn-new-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  border-radius: 0.1875rem;
  background: #0088cc;
  color: #fff;
  font-size: 0.82rem;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.2s;
}


.btn-new-link:hover {
  background-color: #269ad4;
  border-color: #1a94d1;
  color: #fff;
  text-decoration: none;
}

/* ========================================
   RESPONSIVE: max-width 768px
   ======================================== */

@media (max-width: 768px) {

  /* --- Common --- */

  .auth-overlay {
    padding: 16px;
  }

  .steps {
    gap: 20px;
    margin-bottom: 24px;
  }

  /* --- Request page --- */

  .reset-card--request {
    padding: 28px 24px;
  }

  .logo-wrapper img {
    width: 56px;
  }

  .reset-title {
    font-size: 1.1rem;
  }

  .reset-subtitle {
    font-size: 0.8rem;
    margin-bottom: 20px;
  }

  .input-icon--request input {
    height: 42px;
  }

  .btn-reset--request {
    height: 42px;
  }

  .security-text__title {
    font-size: 0.78rem;
  }

  .security-text span {
    font-size: 0.75rem;
  }

  /* --- Password page --- */

  .reset-card--password {
    padding: 24px 22px;
  }

  .reset-card--password h3 {
    font-size: 1.05rem;
  }

  .subtitle {
    font-size: 0.78rem;
  }

  .rule {
    font-size: 0.72rem;
  }

  .input-icon--password input {
    height: 38px;
    font-size: 0.85rem;
  }

  .btn-reset--password {
    height: 38px;
  }

  /* --- Success page --- */

  .card-reset {
    padding: 28px 22px;
  }

  .card-reset h3 {
    font-size: 1.05rem;
  }

  .card-reset .subtitle {
    font-size: 0.78rem;
  }

  .info-box {
    font-size: 0.78rem;
    padding: 12px;
  }

  /* --- Expired page --- */

  .card-expired {
    padding: 28px 22px;
  }

  .card-expired h3 {
    font-size: 1.05rem;
  }

  .card-expired .subtitle {
    font-size: 0.78rem;
  }

  .card-expired .description {
    font-size: 0.75rem;
  }

  .btn-new-link {
    height: 40px;
    line-height: 40px;
    font-size: 0.78rem;
  }
}

/* ========================================
   RESPONSIVE: max-width 400px
   ======================================== */

@media (max-width: 400px) {

  /* --- Common --- */

  .auth-overlay {
    padding: 10px;
  }

  .steps {
    gap: 14px;
  }

  .back {
    font-size: 0.75rem;
  }

  .modal-card {
    padding: 20px 14px;
  }

  /* --- Request page --- */

  .reset-card--request {
    padding: 24px 18px;
  }

  .logo-wrapper {
    margin-bottom: 18px;
  }

  .logo-wrapper img {
    width: 50px;
  }

  .reset-title {
    font-size: 1rem;
  }

  .reset-subtitle {
    font-size: 0.75rem;
    margin-bottom: 18px;
  }

  .security-box {
    padding: 10px;
  }

  /* --- Password page --- */

  .reset-card--password {
    padding: 22px 16px;
  }

  .logo img {
    width: 48px;
  }

  .reset-card--password h3 {
    font-size: 1rem;
  }

  .subtitle {
    font-size: 0.72rem;
    margin-bottom: 16px;
  }

  .form-group--password label {
    font-size: 0.75rem;
  }

  .rules-box {
    padding: 8px 10px;
  }

  .rule {
    font-size: 0.7rem;
    gap: 6px;
    margin-bottom: 4px;
  }

  .rule i {
    width: 16px;
    height: 16px;
    min-width: 16px;
    font-size: 9px;
  }

  .match-indicator {
    font-size: 0.7rem;
  }

  /* --- Success page --- */

  .card-reset {
    padding: 24px 16px;
  }

  .card-reset .logo img {
    width: 48px;
  }

  .icon-mail {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .card-reset h3 {
    font-size: 1rem;
  }

  .card-reset .subtitle {
    font-size: 0.72rem;
  }

  .info-box {
    font-size: 0.72rem;
    padding: 10px;
  }

  .resend button {
    height: 36px;
    font-size: 0.75rem;
  }

  /* --- Expired page --- */

  .card-expired {
    padding: 24px 16px;
  }

  .card-expired .logo img {
    width: 48px;
  }

  .icon-expired {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .card-expired h3 {
    font-size: 1rem;
  }

  .card-expired .subtitle {
    font-size: 0.75rem;
  }

  .card-expired .description {
    font-size: 0.72rem;
  }
}
