/* ============================================
   CertifyEZ Auth Styles
   ============================================ */

:root {
  --ce-teal-50: #effefb;
  --ce-teal-100: #c8fff3;
  --ce-teal-200: #91fee8;
  --ce-teal-300: #52f5d9;
  --ce-teal-400: #1edfc5;
  --ce-teal-500: #06c3ac;
  --ce-teal-600: #029d8d;
  --ce-teal-700: #077d72;
  --ce-teal-800: #0b635c;
  --ce-teal-900: #0e524c;
  --ce-teal-950: #003330;

  --ce-slate-50: #f8fafc;
  --ce-slate-100: #f1f5f9;
  --ce-slate-200: #e2e8f0;
  --ce-slate-300: #cbd5e1;
  --ce-slate-400: #94a3b8;
  --ce-slate-500: #64748b;
  --ce-slate-600: #475569;
  --ce-slate-700: #334155;
  --ce-slate-800: #1e293b;
  --ce-slate-900: #0f172a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ce-slate-800);
  background: var(--ce-slate-50);
  -webkit-font-smoothing: antialiased;
}

@keyframes authFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes authPulseGlow {

  0%,
  100% {
    box-shadow: 0 14px 34px rgba(3, 105, 161, 0.08);
  }

  50% {
    box-shadow: 0 18px 42px rgba(6, 195, 172, 0.16);
  }
}

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

/* Left branded panel */
.auth-brand {
  display: none;
  width: 48%;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #065f56 0%, #053b35 100%);
  color: #fff;
  animation: authFadeUp 0.7s ease-out;
}

@media (min-width: 1024px) {
  .auth-brand {
    display: flex;
  }
}

.auth-brand::before {
  content: '';
  position: absolute;
  bottom: -8rem;
  right: -8rem;
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-brand::after {
  content: '';
  position: absolute;
  top: -5rem;
  right: -5rem;
  width: 15rem;
  height: 15rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
  /* animation: authFadeUp 0.7s ease-out; */
}

.brand-logo-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.85rem;
  /* background: rgba(255, 255, 255, 0.16); */
  background-color: #077d72;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem;
  /* animation: authFloat 4s ease-in-out infinite; */
}

.brand-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-tagline {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
}

.brand-content {
  position: relative;
  z-index: 1;
  animation: authFadeUp 0.85s ease-out;
}

.brand-heading {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.brand-description {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 26rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.highlights-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.75rem;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  animation: authFadeUp 0.95s ease-out;
}

.highlight-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.highlight-icon svg {
  width: 1rem;
  height: 1rem;
  stroke: rgba(255, 255, 255, 0.75);
  fill: none;
  stroke-width: 2;
}

.highlight-text {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
}

.brand-footer {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.25);
  position: relative;
  z-index: 1;
}

/* Right form panel */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--ce-slate-50);
  animation: authFadeUp 0.75s ease-out;
}

@media (min-width: 640px) {
  .auth-form-panel {
    padding: 2.5rem;
  }
}

.auth-form-container {
  width: 100%;
  max-width: 28rem;
  animation: authFadeUp 0.85s ease-out;
}

/* Mobile logo */
.mobile-logo {
  text-align: center;
  margin-bottom: 0.5rem;
}

.mobile-logo-image {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  margin: 0 auto 0.75rem;
  animation: authFloat 4s ease-in-out infinite;
}

.mobile-logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ce-slate-800);
}

.mobile-logo p {
  font-size: 0.75rem;
  color: var(--ce-slate-500);
}

@media (min-width: 1024px) {
  .mobile-logo {
    display: none;
  }
}

/* Form header */
.form-header {
  margin-bottom: 1.5rem;
  animation: authFadeUp 0.9s ease-out;
}

.form-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ce-slate-800);
  margin-bottom: 0.25rem;
}

.form-subtitle {
  font-size: 0.875rem;
  color: var(--ce-slate-500);
}

/* Alert */
.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.alert-error p {
  font-size: 0.8125rem;
  color: #dc2626;
  font-weight: 500;
}

.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.alert-success p {
  font-size: 0.8125rem;
  color: #16a34a;
  font-weight: 500;
}

/* Form elements */
.form-group {
  margin-bottom: 1rem;
  animation: authFadeUp 1s ease-out;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .form-row .full-width {
    grid-column: 1 / -1;
  }
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ce-slate-700);
  margin-bottom: 0.375rem;
}

.form-input,
.form-select {
  width: 100%;
  height: 2.625rem;
  border: 1px solid var(--ce-slate-200);
  border-radius: 0.625rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  color: var(--ce-slate-800);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.form-input::placeholder {
  color: var(--ce-slate-400);
}

.form-input:focus,
.form-select:focus {
  border-color: var(--ce-teal-500);
  box-shadow: 0 0 0 3px rgba(6, 195, 172, 0.1);
}

.form-input.is-invalid,
.form-select.is-invalid {
  border-color: #fca5a5;
}

.form-input.is-invalid:focus,
.form-select.is-invalid:focus {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
}

.field-error {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.25rem;
}

/* Password wrapper */
.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ce-slate-400);
  transition: color 0.15s;
  padding: 0;
  display: flex;
  align-items: center;
}

.password-toggle:hover {
  color: var(--ce-slate-600);
}

.password-toggle svg {
  width: 1.125rem;
  height: 1.125rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.password-wrapper .form-input {
  padding-right: 2.75rem;
}

/* Captcha row */
.captcha-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.captcha-row .form-input {
  flex: 1;
}

.captcha-display {
  height: 2.625rem;
  min-width: 6rem;
  border-radius: 0.625rem;
  background: var(--ce-slate-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.15em;
  color: var(--ce-slate-700);
  user-select: none;
  animation: authPulseGlow 3.2s ease-in-out infinite;
}

/* Remember + forgot */
.form-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.remember-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.remember-check input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--ce-teal-600);
  cursor: pointer;
}

.remember-check span {
  font-size: 0.8125rem;
  color: var(--ce-slate-600);
}

.forgot-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ce-teal-700);
  text-decoration: none;
  transition: color 0.15s;
}

.forgot-link:hover {
  color: var(--ce-teal-800);
  text-decoration: underline;
}

/* Submit button */
.btn-submit {
  width: 100%;
  height: 2.875rem;
  border: none;
  border-radius: 0.625rem;
  background: linear-gradient(135deg, var(--ce-teal-700), var(--ce-teal-800));
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: opacity 0.15s, transform 0.1s;
  margin-top: 0.25rem;
  animation: authFadeUp 1.05s ease-out;
}

.btn-submit:hover {
  opacity: 0.92;
}

.btn-submit:active {
  transform: scale(0.99);
}

.btn-submit svg {
  width: 1.125rem;
  height: 1.125rem;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
}

/* Footer link */
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--ce-slate-500);
}

.auth-footer a {
  font-weight: 500;
  color: var(--ce-teal-700);
  text-decoration: none;
  transition: color 0.15s;
}

.auth-footer a:hover {
  color: var(--ce-teal-800);
  text-decoration: underline;
}