/* ========================================================================
   HRWorkSpace — Enterprise Authentication Theme
   ======================================================================== */

/* ───── CSS Variables ───── */
:root {
    --auth-primary: #234B9B;
    --auth-secondary: #3D84C6;
    --auth-accent-green: #19C7A2;
    --auth-accent-white: #FFFFFF;
    --auth-accent-yellow: #F6C443;
    --auth-accent-orange: #F58634;
    --auth-bg: #F8FAFC;
    --auth-border: #E2E8F0;
    --auth-text: #1E293B;
    --auth-muted: #64748B;
    --auth-white: #FFFFFF;
    --auth-shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --auth-shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --auth-shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
    --auth-radius: 10px;
    --auth-radius-lg: 16px;
    --auth-transition: 0.2s ease;
    --auth-font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --auth-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ───── Base ───── */
.auth-body {
  margin: 0;
  padding: 0;
  font-family: var(--auth-font-body);
  color: var(--auth-text);
  background: var(--auth-bg);
  -webkit-font-smoothing: antialiased;
}

/* ───── Split Screen Layout ───── */
.auth-split {
  display: flex;
  min-height: 100vh;
}

.auth-split-left {
  flex: 0 0 60%;
  max-width: 60%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(160deg, #1a2a6c 0%, #234B9B 30%, #3D84C6 70%, #2c6faa 100%);
}

.auth-split-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255,255,255,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(25,199,162,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(246,196,67,0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.auth-split-left .auth-left-content {
  position: relative;
  z-index: 2;
  text-align: center;
  /*padding: 1rem 1rem;*/
  max-width: 580px;
  width: 100%;
}

.auth-split-right {
  flex: 0 0 40%;
  max-width: 40%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--auth-white);
  padding: 2rem;
}

/* ───── Illustration ───── */
.auth-illustration {
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto 0.5rem;
}

.auth-illustration svg {
  width: 80%;
  height: auto;
}

/* ───── Branding ───── */
.auth-brand {
  margin-bottom: 0.5rem;
}

.auth-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  /*margin-bottom: 1rem;*/
}

.auth-brand-logo img {
  height: 40px;
  width: auto;
}

.auth-brand-name {
  font-family: var(--auth-font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.auth-brand-subtitle {
  font-size: 0.92rem;
  color: rgba(255,255,255,1);
  font-weight: 400;
  margin: 0;
}

/* ───── Feature Grid ───── */
.auth-features {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  text-align: left;
}

.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: rgba(255,255,255,0.85);
  font-size: 0.8rem;
  font-weight: 500;
  transition: background var(--auth-transition);
}

.auth-feature-item i {
  font-size: 0.9rem;
  color: var(--auth-accent-white);
  flex-shrink: 0;
}

.auth-tagline {
  font-family: var(--auth-font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.5;
  margin: 0;
  opacity: 0.9;
}

.auth-tagline small {
  display: block;
  font-weight: 300;
  font-size: 0.85rem;
  opacity: 0.6;
  margin-top: 0.25rem;
}

/* ───── Right Panel ───── */
.auth-form-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 1rem;
}

.auth-form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-form-header .auth-mobile-logo {
  display: none;
  margin-bottom: 1.5rem;
}

.auth-form-header .auth-mobile-logo img {
  height: 32px;
}

.auth-form-header h1 {
  font-family: var(--auth-font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--auth-text);
  margin: 0 0 0.35rem;
  letter-spacing: -0.5px;
}

.auth-form-header p {
  font-size: 0.92rem;
  color: var(--auth-muted);
  margin: 0;
}

/* ───── Enterprise Form Controls ───── */
.auth-form .form-label {
  font-family: var(--auth-font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--auth-text);
  margin-bottom: 0.35rem;
}

.auth-form .input-group {
  position: relative;
  margin-bottom: 1.25rem;
}

.auth-form .input-group .form-control {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  background: var(--auth-white);
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
  font-family: var(--auth-font-body);
  font-size: 0.92rem;
  color: var(--auth-text);
  transition: border-color var(--auth-transition), box-shadow var(--auth-transition);
  box-shadow: var(--auth-shadow-sm);
  outline: none;
}

.auth-form .input-group .form-control::placeholder {
  color: #94a3b8;
}

.auth-form .input-group .form-control:focus {
  border-color: var(--auth-secondary);
  box-shadow: 0 0 0 3px rgba(61,132,198,0.1);
  background: var(--auth-white);
}

.auth-form .input-group .input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1.1rem;
  pointer-events: none;
  z-index: 4;
  line-height: 1;
}

.auth-form .input-group .form-control:focus ~ .input-icon {
  color: var(--auth-secondary);
}

.auth-form .password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.4rem;
  font-size: 1.1rem;
  z-index: 4;
  line-height: 1;
  transition: color var(--auth-transition);
}

.auth-form .password-toggle:hover {
  color: var(--auth-text);
}

/* ───── Button ───── */
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 50px;
  padding: 0 1.5rem;
  font-family: var(--auth-font-body);
  font-size: 0.92rem;
  font-weight: 600;
  border: none;
  border-radius: var(--auth-radius);
  color: #fff;
  background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-secondary) 100%);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--auth-shadow-sm);
  letter-spacing: 0.2px;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(35,75,155,0.25);
}

.auth-btn:active {
  transform: translateY(0);
}

.auth-btn:disabled,
.auth-btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.auth-btn .spinner-border {
  width: 1.1rem;
  height: 1.1rem;
  border-width: 2px;
}

/* ─── Secondary / Outline Button ─── */
.auth-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 44px;
  padding: 0 1.25rem;
  font-family: var(--auth-font-body);
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
  color: var(--auth-text);
  background: var(--auth-white);
  cursor: pointer;
  transition: border-color var(--auth-transition), box-shadow var(--auth-transition);
  text-decoration: none;
}

.auth-btn-outline:hover {
  border-color: var(--auth-secondary);
  color: var(--auth-secondary);
  text-decoration: none;
}

/* ───── Checkbox ───── */
.auth-form .form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0;
  min-height: auto;
}

.auth-form .form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  background: var(--auth-white);
  border: 1px solid var(--auth-border);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.auth-form .form-check-input:checked {
  background-color: var(--auth-primary);
  border-color: var(--auth-primary);
}

.auth-form .form-check-label {
  font-size: 0.88rem;
  color: var(--auth-muted);
  cursor: pointer;
  user-select: none;
}

/* ───── Links ───── */
.auth-link {
  color: var(--auth-secondary);
  font-size: 0.88rem;
  text-decoration: none;
  font-weight: 500;
  transition: color var(--auth-transition);
}

.auth-link:hover {
  color: var(--auth-primary);
  text-decoration: underline;
}

.auth-link-muted {
    color: var(--auth-accent-yellow);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color var(--auth-transition);
}
#account > div.input-group.auth-animate.auth-animate-delay-2 > div > a {
    margin-left: 13rem;
}
.auth-link-muted:hover {
    color: var(--auth-text);
    text-decoration: underline;
}

/* ───── Flex Utilities ───── */
.auth-space-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ───── Validation ───── */
.auth-validation {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: var(--auth-radius);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.auth-validation ul {
  margin: 0;
  padding-left: 1.25rem;
}

.auth-validation li {
  margin-bottom: 0.15rem;
}

.auth-validation li:last-child {
  margin-bottom: 0;
}

.auth-field-error {
  color: #dc2626;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: block;
}

/* ───── Status / Success Message ───── */
.auth-status {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: var(--auth-radius);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.auth-status i {
  margin-right: 0.4rem;
}

/* ───── Footer ───── */
.auth-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--auth-border);
}

.auth-footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

.auth-footer-links a {
  color: var(--auth-muted);
  font-size: 0.78rem;
  text-decoration: none;
  transition: color var(--auth-transition);
}

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

.auth-footer-info {
  font-size: 0.75rem;
  color: var(--auth-muted);
  margin: 0;
  line-height: 1.6;
}

.auth-footer-info .badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 500;
  background: #f1f5f9;
  color: var(--auth-muted);
  border-radius: 4px;
  margin-left: 0.25rem;
}

/* ───── Alert / Message Pages (AccessDenied, Lockout, Confirm) ───── */
.auth-message {
  text-align: center;
  padding: 2rem 0;
}

.auth-message-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  border-radius: 50%;
}

.auth-message-icon.danger {
  background: #fef2f2;
  color: #dc2626;
}

.auth-message-icon.success {
  background: #f0fdf4;
  color: #16a34a;
}

.auth-message-icon.warning {
  background: #fffbeb;
  color: #d97706;
}

.auth-message-icon.info {
  background: #eff6ff;
  color: #2563eb;
}

.auth-message h2 {
  font-family: var(--auth-font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--auth-text);
  margin: 0 0 0.5rem;
}

.auth-message p {
  font-size: 0.92rem;
  color: var(--auth-muted);
  margin: 0 0 1.5rem;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.auth-message .auth-btn {
  max-width: 240px;
}

/* ───── Two Factor ───── */
.auth-2fa-info {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--auth-radius);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #92400e;
  margin-bottom: 1.25rem;
}

/* ───── Animation ───── */
@keyframes authFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-animate {
  animation: authFadeUp 0.4s ease forwards;
}

.auth-animate-delay-1 { animation-delay: 0.05s; }
.auth-animate-delay-2 { animation-delay: 0.1s; }
.auth-animate-delay-3 { animation-delay: 0.15s; }
.auth-animate-delay-4 { animation-delay: 0.2s; }

/* ───── Responsive ───── */

/* Tablet: 768px–991px */
@media (max-width: 991.98px) {
  .auth-split-left {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .auth-split-right {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .auth-split-left .auth-left-content {
    padding: 2rem;
  }
  .auth-features {
    grid-template-columns: 1fr 1fr;
  }
  .auth-illustration {
    max-width: 320px;
  }
}

/* Mobile: <768px */
@media (max-width: 767.98px) {
  .auth-split-left {
    display: none;
  }
  .auth-split-right {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 1.5rem 1rem;
    min-height: 100vh;
    align-items: flex-start;
    padding-top: 3rem;
  }
  .auth-form-header .auth-mobile-logo {
    display: block;
  }
  .auth-form-wrapper {
    max-width: 100%;
  }
  .auth-form-header h1 {
    font-size: 1.4rem;
  }
  .auth-footer-links {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .auth-features {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .auth-form-wrapper {
    padding: 0;
  }
  .auth-form .input-group .form-control {
    padding: 0.75rem 0.85rem 0.75rem 2.5rem;
    font-size: 0.88rem;
  }
  .auth-btn {
    height: 46px;
    font-size: 0.88rem;
  }
}
