/* ========================================
   SIGHO Auth Pages - Login & Register
   Matching Pencil design (split-screen)
   ======================================== */
:root {
  --accent-primary: #000066;
  --accent-secondary: #00008C;
  --surface-inverse: #05132E;
  --surface-primary: #FAFAFF;
  --surface-card: #FFFFFF;
  --foreground-primary: #05132E;
  --foreground-secondary: #4A5568;
  --foreground-muted: #718096;
  --foreground-inverse: #FFFFFF;
  --border-light: #E2E4F0;
  --accent-light: #E8E8FF;
  --rounded-lg: 8px;
  --rounded-xl: 12px;
  --rounded-2xl: 16px;
  --rounded-full: 9999px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background-color: var(--surface-primary);
  color: var(--foreground-primary);
  -webkit-font-smoothing: antialiased;
}

/* ========== Layout ========== */
.auth-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ========== Left Panel ========== */
.auth-panel {
  flex: 1;
  background-color: var(--surface-inverse);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 60px;
  gap: 20px;
  position: relative;
  overflow: hidden;
  /* Decorative circles */
}
.auth-panel::before, .auth-panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.auth-panel::before {
  width: 200px;
  height: 200px;
  background: rgba(0, 0, 102, 0.13);
  bottom: -40px;
  left: -60px;
}
.auth-panel::after {
  width: 120px;
  height: 120px;
  background: rgba(0, 0, 140, 0.1);
  top: -30px;
  right: -20px;
}
.auth-panel__logo {
  font-size: 28px;
  font-weight: 800;
  color: var(--foreground-inverse);
  text-decoration: none;
  display: block;
}
.auth-panel__headline {
  font-size: 36px;
  font-weight: 700;
  color: var(--foreground-inverse);
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin: 8px 0 0;
}
.auth-panel__subtitle {
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin: 0;
}
.auth-panel__features {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-panel__feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground-inverse);
}
.auth-panel__feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground-inverse);
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}
.auth-panel__stats {
  display: flex;
  gap: 40px;
  margin-top: 24px;
}
.auth-panel__stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--foreground-inverse);
  display: block;
}
.auth-panel__stat-label {
  font-size: 12px;
  font-weight: 400;
  color: var(--foreground-muted);
  display: block;
}

/* ========== Right Form Panel ========== */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 80px;
  background-color: var(--surface-primary);
}

.auth-form-container {
  width: 100%;
  max-width: 420px;
}

/* ========== Form Elements ========== */
.auth-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--foreground-primary);
  margin: 0 0 8px;
}

.auth-subtitle {
  font-size: 15px;
  font-weight: 400;
  color: var(--foreground-muted);
  line-height: 1.5;
  margin: 0 0 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-field-row {
  display: flex;
  gap: 16px;
}

.auth-field-row > .auth-field {
  flex: 1;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground-muted);
}

.auth-field input,
.auth-field textarea {
  height: 44px;
  border-radius: var(--rounded-lg);
  border: 1px solid var(--border-light);
  background: var(--surface-card);
  padding: 0 14px;
  font-size: 14px;
  font-family: "Poppins", sans-serif;
  color: var(--foreground-primary);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.auth-field input::placeholder,
.auth-field textarea::placeholder {
  color: #A0AEC0;
}
.auth-field input:focus,
.auth-field textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 102, 0.08);
}

.auth-field .is-invalid {
  border-color: #e53e3e;
}

.auth-field .invalid-feedback {
  font-size: 12px;
  color: #e53e3e;
  margin-top: 4px;
  display: block;
}

.auth-field--password {
  position: relative;
}
.auth-field--password input {
  padding-right: 44px;
}

.auth-btn-pass {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--foreground-muted);
  display: flex;
  align-items: center;
}
.auth-btn-pass svg {
  stroke: var(--foreground-muted);
}

.auth-forgot {
  text-align: right;
  margin-top: -8px;
}
.auth-forgot a {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-primary);
  text-decoration: none;
}
.auth-forgot a:hover {
  text-decoration: underline;
}

.auth-btn-submit {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--rounded-full);
  background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: var(--foreground-inverse);
  font-size: 16px;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: opacity 0.2s;
}
.auth-btn-submit:hover {
  opacity: 0.9;
}
.auth-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
}
.auth-divider__line {
  flex: 1;
  height: 1px;
  background-color: var(--border-light);
}
.auth-divider__text {
  font-size: 12px;
  font-weight: 400;
  color: var(--foreground-muted);
  white-space: nowrap;
}

.auth-btn-google {
  width: 100%;
  height: 44px;
  border-radius: var(--rounded-full);
  border: 1px solid var(--border-light);
  background: var(--surface-card);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground-primary);
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
.auth-btn-google:hover {
  background: #f7f7ff;
  color: var(--foreground-primary);
}
.auth-btn-google .google-g {
  font-weight: 700;
  font-size: 18px;
}

.auth-footer-link {
  text-align: center;
  font-size: 13px;
  color: var(--foreground-muted);
  margin: 0;
}
.auth-footer-link a {
  font-weight: 600;
  color: var(--accent-primary);
  text-decoration: none;
}
.auth-footer-link a:hover {
  text-decoration: underline;
}

.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.auth-terms input[type=checkbox] {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--border-light);
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent-primary);
}
.auth-terms label, .auth-terms span {
  font-size: 12px;
  font-weight: 400;
  color: var(--foreground-muted);
  line-height: 1.4;
}
.auth-terms a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}
.auth-terms a:hover {
  text-decoration: underline;
}

.auth-password-meter {
  display: flex;
  gap: 6px;
  margin-top: -12px;
}
.auth-password-meter .value-password {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border-light);
  transition: background 0.3s;
}
.auth-password-meter .value-password.check {
  background: var(--accent-primary);
}

.auth-password-hint {
  font-size: 12px;
  color: var(--foreground-muted);
  margin-top: -12px;
}

/* Error alerts */
.auth-alert {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
  border-radius: var(--rounded-lg);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 4px;
}
.auth-alert--success {
  background: #E6FFE6;
  border-color: #B2F5B2;
  color: #2D7A2D;
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-alert--success svg {
  flex-shrink: 0;
}

/* Centered form variant (verify-email, confirm-password) */
.auth-form-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}
.auth-form-centered .auth-form {
  width: 100%;
}
.auth-form-centered .auth-divider,
.auth-form-centered .auth-footer-link {
  width: 100%;
}

.auth-title--center {
  text-align: center;
}

.auth-subtitle--center {
  text-align: center;
}

/* Icon circle (verify-email, confirm-password) */
.auth-icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Readonly email field (reset-password) */
.auth-field__readonly {
  background-color: #F0F1FA !important;
  color: var(--foreground-muted) !important;
  cursor: default;
}
.auth-field__readonly:focus {
  border-color: var(--border-light) !important;
  box-shadow: none !important;
}

/* Back footer link with arrow */
.auth-footer-link--back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.auth-footer-link--back svg {
  color: var(--foreground-muted);
}

/* intl-tel-input override */
.iti {
  width: 100%;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 991.98px) {
  .auth-wrapper {
    flex-direction: column;
  }
  .auth-panel {
    flex: none;
    padding: 36px 24px;
    align-items: center;
    text-align: center;
    gap: 10px;
    min-height: auto;
  }
  .auth-panel__headline {
    font-size: 22px;
    margin: 4px 0 0;
  }
  .auth-panel__subtitle {
    font-size: 13px;
  }
  .auth-panel__features {
    display: none;
  }
  .auth-panel__stats {
    display: none;
  }
  .auth-form-panel {
    padding: 28px 24px 24px;
  }
  .auth-form-container {
    max-width: 100%;
  }
  .auth-title {
    font-size: 22px;
  }
  .auth-field input {
    height: 48px;
  }
  .auth-btn-submit {
    height: 48px;
  }
  .auth-btn-google {
    height: 48px;
  }
  .auth-field-row {
    gap: 12px;
  }
}
@media (max-width: 575.98px) {
  .auth-panel {
    padding: 32px 20px;
  }
  .auth-form-panel {
    padding: 24px 20px 20px;
  }
}
