/* ==========================================================================
   AMANDA HRIS — Modern Split-Card Auth Design System
   Matches Infinity Model with Deep Maroon / Burgundy Theme
   Palet: #881337 (Rose 900) · #991B1B (Red 800) · Hover #7F1D1D · Soft #FEF2F2
   ========================================================================== */

:root {
  --amanda-red-primary: #881337;
  --amanda-red-dark: #7F1D1D;
  --amanda-red-deep: #4C0519;
  --amanda-red-light: #991B1B;
  --amanda-red-glow: rgba(136, 19, 55, 0.35);
  --amanda-red-subtle: #FEF2F2;
  --amanda-gold: #c99a4c;
  --amanda-dark: #1E293B;
  --amanda-muted: #64748B;
  --amanda-border: #E2E8F0;
  --amanda-bg: #F8FAFC;
  --amanda-card-radius: 24px;
}

html,
body.admin-login-modern {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background-color: var(--amanda-bg) !important;
  font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--amanda-dark);
  position: relative;
  overflow-x: hidden;
  box-sizing: border-box;
}

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

/* ─── Corner Abstract Decorative Curved Shapes (Deep Maroon / Burgundy) ─── */
.amanda-corner-shape-tl {
  position: fixed;
  top: -150px;
  left: -150px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: linear-gradient(135deg, #991B1B 0%, #881337 55%, #7F1D1D 100%);
  opacity: 0.95;
  z-index: 1;
  pointer-events: none;
  box-shadow: 0 15px 40px rgba(127, 29, 29, 0.25);
}

.amanda-corner-shape-tl::before {
  content: "";
  position: absolute;
  top: 90px;
  left: 90px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7F1D1D 0%, #4C0519 100%);
  opacity: 0.88;
}

.amanda-corner-shape-br {
  position: fixed;
  bottom: -160px;
  right: -160px;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: linear-gradient(135deg, #881337 0%, #7F1D1D 50%, #4C0519 100%);
  opacity: 0.94;
  z-index: 1;
  pointer-events: none;
  box-shadow: 0 -15px 40px rgba(76, 5, 25, 0.22);
}

.amanda-corner-shape-br::before {
  content: "";
  position: absolute;
  bottom: 80px;
  right: 80px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7F1D1D 0%, #4C0519 100%);
  opacity: 0.90;
}

/* ─── Central Canvas & Main Split Card ─── */
.admin-auth-canvas {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 40px);
}

.admin-auth-card {
  width: 100%;
  max-width: 980px;
  min-height: 560px;
  background: #ffffff;
  border-radius: var(--amanda-card-radius);
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.12), 0 6px 20px rgba(0, 0, 0, 0.04);
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1.05fr);
  overflow: hidden;
  transition: all 0.3s ease;
}

/* ─── LEFT SIDE: The Form Panel ─── */
.admin-auth-form-side {
  padding: clamp(34px, 4.5vw, 50px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
  text-align: center;
}

.amanda-auth-welcome {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: #8c9ba5;
  margin-bottom: 8px;
}

.amanda-auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
  color: var(--amanda-red-primary);
}

.amanda-auth-brand-logo {
  display: block;
  max-width: 210px;
  max-height: 62px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto 2px;
}

/* Logos are sourced from active Company Master records on every login page. */
.company-login-logo-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(100%, 340px);
  margin: 0 auto 10px;
}
.company-login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 130px;
  width: 130px;
  max-width: 140px;
  min-width: 90px;
  height: 52px;
  max-height: 52px;
  padding: 6px 12px;
  overflow: hidden;
  border: 1px solid #e6ebf1;
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
}
.company-login-logo img {
  display: block !important;
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}
.company-login-carousel { width: min(100%, 350px); margin: 0 auto 20px; }
.company-login-logo-grid--hero { width: 100%; margin-bottom: 8px; }
.company-login-logo-grid--hero .company-login-logo {
  border-color: rgba(255,255,255,.34);
  background: rgba(255,255,255,.96);
  box-shadow: 0 5px 14px rgba(76,5,25,.16);
}
.company-login-carousel__controls { display: none; justify-content: center; gap: 6px; }
.company-login-carousel.has-controls .company-login-carousel__controls { display: flex; }
.company-login-carousel__controls button { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; border: 1px solid rgba(255,255,255,.42); border-radius: 50%; color: #881337; background: rgba(255,255,255,.94); font-size: 13px; }
.company-login-carousel__controls button:hover,.company-login-carousel__controls button:focus { color: #fff; background: #881337; }
.company-login-carousel.is-carousel-ready .company-login-logo-grid--hero .company-login-logo { display: none; }
.company-login-carousel.is-carousel-ready .company-login-logo-grid--hero .company-login-logo.is-visible { display: inline-flex; }

.amanda-auth-infinity-icon {
  width: 44px;
  height: 24px;
  color: var(--amanda-red-primary);
}

.amanda-auth-brand-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--amanda-red-primary);
  text-transform: uppercase;
}

.amanda-auth-subtitle {
  font-size: 13px;
  line-height: 1.55;
  color: var(--amanda-muted);
  max-width: 100%;
  margin: 0 auto 24px;
}

/* Alerts & Notices */
.admin-login-alert,
.admin-login-status .alert {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 16px;
  text-align: left;
  border: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-login-alert.alert-warning {
  background: #fff8e6;
  color: #8c6b1f;
  border-left: 3px solid #f59e0b;
}

.admin-login-status .alert-danger {
  background: #fff1f1;
  color: #b91c1c;
  border-left: 3px solid #dc2626;
}

.admin-login-status .alert-info {
  display: none !important;
}

/* ─── Pill Form Inputs ─── */
.amanda-auth-input-pill {
  position: relative;
  margin-bottom: 16px;
  text-align: left;
}

.amanda-auth-pill-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
  font-size: 15px;
  pointer-events: none;
  z-index: 2;
  transition: color 0.2s ease;
}

.amanda-auth-input-pill .form-control {
  width: 100%;
  height: 48px;
  border-radius: 50px !important;
  border: 1.5px solid var(--amanda-border);
  background: #ffffff;
  padding: 10px 44px 10px 46px;
  font-size: 13.5px;
  color: var(--amanda-dark);
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.amanda-auth-input-pill .form-control::placeholder {
  color: #a0aec0;
  font-size: 13px;
  font-weight: 400;
}

.amanda-auth-input-pill .form-control:focus {
  border-color: var(--amanda-red-primary);
  box-shadow: 0 0 0 3.5px var(--amanda-red-subtle);
  outline: none;
}

.amanda-auth-input-pill .form-control:focus ~ .amanda-auth-pill-icon {
  color: var(--amanda-red-primary);
}

/* Eye / Question helper button on the right edge */
.amanda-auth-eye-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #a0aec0;
  font-size: 15px;
  cursor: pointer;
  padding: 6px;
  z-index: 3;
  outline: none;
  transition: color 0.15s ease;
}

.amanda-auth-eye-btn:hover,
.amanda-auth-eye-btn:focus {
  color: var(--amanda-red-primary);
  outline: none;
}

/* Helper note & Recovery Guide for forgot password */
.amanda-auth-helper-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--amanda-muted);
  background: #f8fafc;
  border: 1px solid #edf2f7;
  padding: 10px 14px;
  border-radius: 12px;
  margin: -4px 0 16px;
  text-align: left;
}

.amanda-auth-recovery {
  width: 100%;
}

.amanda-auth-recovery-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 18px;
  text-align: left;
}

.amanda-auth-recovery-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  color: #1E293B;
  font-size: 13px;
  line-height: 1.35;
}

.amanda-auth-recovery-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #FFF1F4;
  border: 1px solid #FECDD3;
  color: #881337;
  font-size: 14px;
}

.amanda-auth-recovery-lead {
  margin: 0 0 10px;
  color: #475569;
  font-size: 12.25px;
  line-height: 1.55;
}

.amanda-auth-recovery-steps {
  margin: 0;
  padding-left: 18px;
  color: #334155;
  font-size: 12px;
  line-height: 1.55;
}

.amanda-auth-recovery-steps li + li {
  margin-top: 5px;
}

.amanda-auth-recovery-steps strong {
  color: #0F172A;
  font-weight: 600;
}

/* ─── Submit Action Pill Button ─── */
.amanda-auth-submit-pill.btn {
  width: 100%;
  height: 48px;
  border-radius: 50px !important;
  border: none;
  background: linear-gradient(135deg, #881337 0%, #991B1B 100%);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  box-shadow: 0 8px 22px var(--amanda-red-glow);
  margin-top: 4px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none !important;
}

.amanda-auth-submit-pill.btn:hover,
.amanda-auth-submit-pill.btn:focus {
  color: #ffffff;
  background: linear-gradient(135deg, #7F1D1D 0%, #4C0519 100%);
  box-shadow: 0 12px 26px rgba(127, 29, 29, 0.46);
  transform: translateY(-2px);
  outline: none;
}

.amanda-auth-submit-pill.btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px var(--amanda-red-glow);
}

.amanda-auth-submit-pill.is-loading,
.amanda-auth-submit-pill[disabled] {
  cursor: wait;
  opacity: 0.75;
  transform: none;
}

/* ─── Secondary Links ─── */
.amanda-auth-sublinks {
  font-size: 12.5px;
  color: var(--amanda-muted);
  margin-bottom: 14px;
}

.amanda-auth-sublinks a {
  color: var(--amanda-red-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.amanda-auth-sublinks a:hover {
  color: var(--amanda-red-dark);
  text-decoration: underline;
}

/* ─── Divider ("Or") ─── */
.amanda-auth-divider {
  display: flex;
  align-items: center;
  margin: 6px 0 16px;
  color: #a0aec0;
  font-size: 12px;
}

.amanda-auth-divider::before,
.amanda-auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.amanda-auth-divider span {
  padding: 0 14px;
  font-weight: 500;
  font-size: 11.5px;
  color: #a0aec0;
}

/* ─── Social / Quick Access Round Icons ─── */
.amanda-auth-social-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 2px;
}

.amanda-auth-circle-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #718096;
  font-size: 14px;
  text-decoration: none;
  background: #ffffff;
  transition: all 0.2s ease;
}

.amanda-auth-circle-icon:hover {
  border-color: var(--amanda-red-primary);
  color: var(--amanda-red-primary);
  background: #fff5f5;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(197, 34, 39, 0.14);
}

/* Footer info */
.amanda-auth-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid #edf2f7;
  font-size: 11px;
  color: #a0aec0;
}

/* Hide old default password-visibility label in the new layout */
.password-visibility-toggle {
  display: none !important;
}

/* ─── RIGHT SIDE: Hero Cityscape Banner with Amanda Red Gradient ─── */
.admin-auth-hero-side {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(136, 19, 55, 0.90) 0%, rgba(127, 29, 29, 0.94) 50%, rgba(76, 5, 25, 0.97) 100%),
    url("../img/login-banner-city.jpg") center center / cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 32px 24px;
  text-align: center;
  color: #ffffff;
  border-top-right-radius: var(--amanda-card-radius);
  border-bottom-right-radius: var(--amanda-card-radius);
}

.amanda-auth-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 390px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.admin-auth-hero-side .company-login-carousel {
  width: min(100%, 350px);
  margin: auto 0;
  padding: 18px 0;
}

.amanda-auth-hero-bottom {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.amanda-auth-hero-logo {
  display: block;
  max-width: 280px;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0 auto 16px;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.32));
}

.amanda-auth-hero-emblem {
  width: 76px;
  height: 38px;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

.amanda-auth-hero-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 16px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.20);
}

.amanda-auth-hero-desc {
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  max-width: 380px;
  margin: 0 0 10px;
  text-wrap: balance;
}

.amanda-auth-hero-badge {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.20);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(4px);
}

/* ─── Responsive Media Queries ─── */
@media (max-width: 860px) {
  .admin-auth-card {
    grid-template-columns: 1fr;
    max-width: 480px;
    min-height: auto;
    border-radius: 20px;
  }
  .admin-auth-hero-side {
    display: none;
  }
  .admin-auth-form-side {
    padding: 36px 28px;
  }
  .amanda-corner-shape-tl {
    width: 320px;
    height: 320px;
    top: -100px;
    left: -100px;
  }
  .amanda-corner-shape-br {
    width: 300px;
    height: 300px;
    bottom: -100px;
    right: -100px;
  }
}

@media (max-width: 440px) {
  .admin-auth-canvas {
    padding: 14px;
  }
  .admin-auth-form-side {
    padding: 30px 20px;
  }
  .amanda-auth-brand-name {
    font-size: 23px;
  }
  .amanda-auth-input-pill .form-control {
    height: 46px;
    font-size: 13px;
  }
  .amanda-auth-submit-pill.btn {
    height: 46px;
    font-size: 13px;
  }
  .amanda-auth-footer {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
}

/* ==========================================================================
   FORCE DEEP MAROON / BURGUNDY — Override brown/gold btn-primary from admin custom.css
   Theme: Primary #881337 · Primary Alt #991B1B · Hover #7F1D1D · Soft #FEF2F2
   Must come LAST in this file so it wins the cascade.
   ========================================================================== */

/* Submit pill buttons: override .btn-primary brownish gradient from custom.css */
body.admin-login-modern .amanda-auth-submit-pill.btn,
body.admin-login-modern .amanda-auth-submit-pill.btn-primary,
body.admin-login-modern .btn-primary.amanda-auth-submit-pill {
  background: linear-gradient(135deg, #881337 0%, #991B1B 100%) !important;
  background-color: #881337 !important;
  border-color: #881337 !important;
  color: #ffffff !important;
  border-radius: 50px !important;
  box-shadow: 0 8px 22px rgba(136, 19, 55, 0.35) !important;
}

body.admin-login-modern .amanda-auth-submit-pill.btn:hover,
body.admin-login-modern .amanda-auth-submit-pill.btn:focus,
body.admin-login-modern .amanda-auth-submit-pill.btn:active,
body.admin-login-modern .amanda-auth-submit-pill.btn-primary:hover,
body.admin-login-modern .amanda-auth-submit-pill.btn-primary:focus,
body.admin-login-modern .amanda-auth-submit-pill.btn-primary:active {
  background: linear-gradient(135deg, #7F1D1D 0%, #4C0519 100%) !important;
  background-color: #7F1D1D !important;
  border-color: #7F1D1D !important;
  color: #ffffff !important;
  box-shadow: 0 12px 26px rgba(127, 29, 29, 0.45) !important;
  transform: translateY(-2px);
}

/* Circle quick-access icons: override brown icon color from custom.css */
body.admin-login-modern .amanda-auth-circle-icon {
  color: #64748B !important;
  border-color: #E2E8F0 !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body.admin-login-modern .amanda-auth-circle-icon:hover,
body.admin-login-modern .amanda-auth-circle-icon:focus {
  color: #881337 !important;
  border-color: #881337 !important;
  background: #FEF2F2 !important;
  box-shadow: 0 5px 12px rgba(136, 19, 55, 0.16) !important;
}

/* Links & sublinks: Deep Maroon */
body.admin-login-modern .amanda-auth-sublinks a {
  color: #881337 !important;
}
body.admin-login-modern .amanda-auth-sublinks a:hover {
  color: #7F1D1D !important;
}

/* Input focus border: Deep Maroon */
body.admin-login-modern .amanda-auth-input-pill .form-control:focus {
  border-color: #881337 !important;
  box-shadow: 0 0 0 3px rgba(136, 19, 55, 0.12) !important;
}
body.admin-login-modern .amanda-auth-input-pill .form-control:focus ~ .amanda-auth-pill-icon,
body.admin-login-modern .amanda-auth-eye-btn:hover,
body.admin-login-modern .amanda-auth-eye-btn:focus {
  color: #881337 !important;
}
