﻿/* ==============================================
   ACTIMEFY — GLOBAL AUTH STYLES (Login/Reset/etc.)
   ============================================== */

.login-container {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: var(--darker-bg, #050812);
  color: var(--text-primary, #fff);
  overflow: hidden;
}

  .login-container::before {
    content: "";
    position: absolute;
    inset: -15%;
    z-index: 0;
    background: radial-gradient(60% 40% at 20% 20%, rgba(126,28,187,.20) 0%, transparent 60%), radial-gradient(50% 40% at 80% 30%, rgba(35,147,226,.18) 0%, transparent 60%), radial-gradient(60% 35% at 40% 80%, rgba(255,68,102,.12) 0%, transparent 70%);
    filter: blur(52px) saturate(120%);
  }

.login-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 960px;
  min-height: 600px;
  border-radius: 20px;
  border: 1px solid var(--card-border, rgba(255,255,255,.08));
  background: var(--card-bg, rgba(255,255,255,.04));
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.login-form-section {
  flex: 1;
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--card-bg, rgba(255,255,255,.04));
  border-right: 1px solid var(--card-border, rgba(255,255,255,.08));
}

.login-welcome-section {
  flex: 1;
  background: linear-gradient(135deg, var(--primary-purple, #7e1cbb), var(--primary-blue, #2393e2));
  color: #fff;
  padding: 56px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

  .login-welcome-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(255,255,255,.18), transparent 55%);
    pointer-events: none;
  }

.login-title {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 6px;
  text-align: center;
  color: var(--text-primary, #fff);
}

.login-subtitle {
  text-align: center;
  color: var(--text-secondary, #b0b8d4);
  margin-bottom: 28px;
  font-size: 1.05rem;
}

.welcome-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.welcome-text {
  font-size: 1rem;
  opacity: .95;
  line-height: 1.7;
  max-width: 520px;
}

/* Form */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: .9rem;
  color: var(--text-primary, #fff);
  letter-spacing: .02em;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  border-radius: 12px;
  border: 1px solid var(--card-border, rgba(255,255,255,.08));
  background: rgba(255,255,255,.05);
  color: var(--text-primary, #fff);
  transition: all .25s ease;
  outline: none;
}

html[data-theme="light"] .form-input {
  background: rgba(10,14,26,.06);
  border-color: rgba(10,14,26,.12);
  color: #d4d4d4;
}

.form-input::placeholder {
  color: rgba(176,184,212,.55);
}

html[data-theme="light"] .form-input::placeholder {
  color: rgba(60,60,60,.55);
}

.form-input:focus {
  border-color: var(--primary-blue, #2393e2);
  background: rgba(255,255,255,.10);
  box-shadow: 0 0 0 3px rgba(35,147,226,.25);
  color: var(--text-primary, #fff);
}

html[data-theme="light"] .form-input:focus {
  background: rgba(10,14,26,.10);
  border-color: var(--primary-blue, #2393e2);
  box-shadow: 0 0 0 3px rgba(35,147,226,.25);
}

/* Checkbox */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.checkbox-input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-blue, #2393e2);
  cursor: pointer;
}

.checkbox-label {
  font-size: .95rem;
  color: var(--text-secondary, #b0b8d4);
  cursor: pointer;
}

/* Buttons */
.login-button,
.auth-button {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-purple, #7e1cbb), var(--primary-blue, #2393e2));
  box-shadow: 0 6px 20px rgba(35,147,226,.28);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

  .login-button:hover, .auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(126,28,187,.4);
  }

  .login-button:active, .auth-button:active {
    transform: translateY(0);
  }

/* Links */
.links-section {
  margin-top: 24px;
  text-align: center;
}

.auth-link {
  color: var(--primary-blue, #2393e2);
  text-decoration: none;
  font-size: .95rem;
  margin: 4px 12px;
  transition: color .2s ease;
  cursor: pointer;
}

  .auth-link:hover, .auth-link:focus {
    color: var(--text-primary, #fff);
    text-decoration: none;
  }

/* Errors */
.error-message {
  background: rgba(239,68,68,.14);
  color: #fecaca;
  padding: 12px 14px;
  border-radius: 10px;
  border-left: 4px solid rgba(239,68,68,.9);
  border: 1px solid rgba(239,68,68,.35);
  margin-bottom: 16px;
  font-size: .95rem;
}

.validation-message {
  color: #f87171;
  font-size: .85rem;
  margin-top: 6px;
  display: block;
}

html[data-theme="light"] .error-message {
  background: #fee2e2;
  color: #7f1d1d;
  border-color: #fecaca;
  border-left-color: #dc2626;
}

/* Responsive */
@media (max-width: 768px) {
  .login-card {
    flex-direction: column-reverse;
    min-height: auto;
  }

  .login-form-section, .login-welcome-section {
    padding: 36px 24px;
  }

  .welcome-text {
    max-width: 460px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* Autofill protections (dark + light) */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary, #fff) !important;
  transition: background-color 99999s ease-in-out 0s !important;
  box-shadow: 0 0 0 1000px rgba(255,255,255,.10) inset !important;
}

html[data-theme="light"] .form-input:-webkit-autofill,
html[data-theme="light"] .form-input:-webkit-autofill:hover,
html[data-theme="light"] .form-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #d4d4d4 !important;
  box-shadow: 0 0 0 1000px rgba(10,14,26,.10) inset !important;
}

.form-input:-moz-autofill {
  box-shadow: 0 0 0 1000px rgba(255,255,255,.10) inset !important;
  -moz-text-fill-color: var(--text-primary, #fff) !important;
}

html[data-theme="light"] .form-input:-moz-autofill {
  box-shadow: 0 0 0 1000px rgba(10,14,26,.10) inset !important;
  -moz-text-fill-color: #d4d4d4 !important;
}

.form-input:valid, .form-input:invalid {
  background-clip: padding-box !important;
  background-image: none !important;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 20px;
}

/* Hide the native checkbox */
.checkbox-input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 5px;
  background-color: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
  display: inline-block;
}

  /* Checked state */
  .checkbox-input:checked {
    background-color: #2393E2; /* your accent color */
    border-color: #2393E2;
  }

    /* Checkmark pseudo-element */
    .checkbox-input:checked::after {
      content: "";
      position: absolute;
      top: 2px;
      left: 6px;
      width: 5px;
      height: 10px;
      border: solid white;
      border-width: 0 2px 2px 0;
      transform: rotate(45deg);
    }

  /* Hover + focus states */
  .checkbox-input:hover {
    border-color: #2393E2;
  }

  .checkbox-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(35,147,226,0.3);
  }

.checkbox-label {
  font-size: 0.95rem;
  color: #d1d5db;
  cursor: pointer;
  user-select: none;
}

html[data-theme="light"] .checkbox-input {
  border-color: rgba(0,0,0,0.3);
}

html[data-theme="light"] .checkbox-label {
  color: #bcbcbc;
}


/* ===== Lockout Page polish (fits existing variables) ===== */
.lockout-header {
  text-align: center;
  margin-bottom: 18px;
}

.lockout-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
  color: var(--danger, #ef4444);
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.32);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

.lockout-details {
  display: grid;
  gap: 12px;
  margin: 18px 0 26px;
}

.ap-chip.danger {
  border-color: rgba(239,68,68,.32);
  background: linear-gradient(180deg, rgba(239,68,68,.18), rgba(239,68,68,.12));
  color: #fecaca;
}

.lockout-note {
  color: var(--text-secondary, #b0b8d4);
  font-size: .95rem;
  line-height: 1.6;
  text-align: center;
}

.lockout-actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

@media (max-width: 768px) {
  .lockout-actions {
    gap: 8px;
  }
}
