/* =====================================================
   Store MS — Login Page
   Colors pulled from the application design system:
     Navy dark : #162d44  (sidebar background)
     Navy mid  : #2a5298  (active nav / accent)
     Error     : #dc3545
     Neutral bg: #f4f6f9
   ===================================================== */

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

html, body {
  height: 100%;
  font-family: 'Source Sans Pro', Arial, Helvetica, sans-serif;
  background: #f4f6f9;
  color: #2b2b2b;
}

/* ─── OUTER WRAPPER ──────────────────────────────── */
.login-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ─── LEFT / BRAND PANEL ─────────────────────────── */
.login-brand {
  position: relative;
  flex: 0 0 55%;
  background: linear-gradient(145deg, #162d44 0%, #1d3a5f 40%, #2a5298 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Subtle dot grid overlay — CSS only, no images */
.login-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.07) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  pointer-events: none;
}

/* Large decorative circle in background — adds depth */
.login-brand::after {
  content: '';
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  bottom: -140px;
  right: -120px;
  pointer-events: none;
}

.login-brand-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 48px;
  max-width: 400px;
}

.login-logo {
  width: 72px;
  height: auto;
  display: block;
  margin: 0 auto 20px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.login-brand-name {
  font-size: 2.4rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

.login-tagline {
  font-size: 1.05rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

/* Subtle accent line beneath tagline */
.login-brand-inner::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  margin: 28px auto 0;
}

/* ─── RIGHT / FORM PANEL ─────────────────────────── */
.login-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: #ffffff;
  overflow-y: auto;
}

.login-form-card {
  width: 100%;
  max-width: 380px;
}

.login-heading {
  font-size: 1.7rem;
  font-weight: 700;
  color: #162d44;
  margin-bottom: 4px;
}

.login-subheading {
  font-size: 0.95rem;
  color: #6c757d;
  margin-bottom: 36px;
}

/* ─── FORM LABELS ────────────────────────────────── */
.login-form-card label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #495057;
  margin-bottom: 6px;
}

/* ─── INPUT WITH ICON ────────────────────────────── */
.input-icon-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #adb5bd;
  font-size: 0.88rem;
  pointer-events: none;
  transition: color 0.2s;
}

.login-input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 40px;
  border: 1.5px solid #dee2e6;
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
  color: #2b2b2b;
  background: #fafbfc;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-input::placeholder {
  color: #ced4da;
}

.login-input:focus {
  border-color: #2a5298;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.12);
}

/* icon glows when input is focused */
.input-icon-wrap:focus-within .input-icon {
  color: #2a5298;
}

/* Bootstrap is-invalid integration */
.login-input.is-invalid {
  border-color: #dc3545;
  background: #fff8f8;
}

.login-input.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

.invalid-feedback {
  display: block;
  font-size: 0.8rem;
  color: #dc3545;
  margin-top: 5px;
}

/* ─── SHOW / HIDE PASSWORD BUTTON ────────────────── */
.pwd-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #adb5bd;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.pwd-toggle:hover,
.pwd-toggle:focus {
  color: #2a5298;
  outline: none;
}

/* ─── FORM GROUP SPACING ─────────────────────────── */
.login-form-card .form-group {
  margin-bottom: 22px;
}

/* ─── REMEMBER ME ────────────────────────────────── */
.custom-control-label {
  font-size: 0.87rem;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: #495057;
  cursor: pointer;
}

.custom-control-input:checked ~ .custom-control-label::before {
  background-color: #2a5298;
  border-color: #2a5298;
}

.custom-control-input:focus ~ .custom-control-label::before {
  box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.15);
}

/* ─── LOGIN BUTTON ───────────────────────────────── */
.login-btn {
  display: block;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #162d44 0%, #2a5298 100%);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  margin-top: 8px;
}

.login-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(42, 82, 152, 0.32);
}

.login-btn:active {
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 1px 6px rgba(42, 82, 152, 0.25);
}

/* ─── MOBILE LOGO (shown above form on small screens) */
.login-mobile-logo {
  display: none;
  text-align: center;
  margin-bottom: 32px;
}

.login-mobile-logo img {
  width: 52px;
  height: auto;
  margin-bottom: 10px;
}

.login-mobile-logo h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #162d44;
  margin: 0;
}

/* ─── RESPONSIVE ─────────────────────────────────── */

/* Tablet: shrink left panel */
@media (max-width: 1024px) and (min-width: 769px) {
  .login-brand {
    flex: 0 0 45%;
  }
}

/* Mobile: hide left panel, show form only */
@media (max-width: 768px) {
  .login-brand {
    display: none;
  }

  .login-form-panel {
    background: #f4f6f9;
    align-items: flex-start;
    padding: 48px 20px 40px;
  }

  .login-form-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  }

  .login-mobile-logo {
    display: block;
  }
}

@media (max-width: 400px) {
  .login-form-card {
    padding: 28px 20px;
  }

  .login-heading {
    font-size: 1.45rem;
  }
}
