/* ==========================================================================
   MediaSun Dark Luxury Glassmorphic Login Screen
   Palette: Dark Olive (#1b1e0e) & Muted Gold Accent (#e6d48e)
   ========================================================================== */

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(circle at 50% 40%, rgba(30, 34, 16, 0.98), #0e1007);
  transition: opacity .4s ease, visibility .4s ease;
  overflow-y: auto;
}

.login-overlay:not(.active) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-container {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: auto;
  z-index: 2;
}

/* Ambient blur blobs inside login overlay */
.login-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: -1;
}
.lb1 {
  width: 280px;
  height: 280px;
  background: #8fa35a;
  top: -60px;
  right: -50px;
  opacity: .5;
}
.lb2 {
  width: 240px;
  height: 240px;
  background: #e3d3a0;
  bottom: -60px;
  left: -40px;
  opacity: .35;
}

/* Luxury Glassmorphic Login Card */
.login-card {
  position: relative;
  width: 100%;
  padding: 32px 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, .05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .55);
  pointer-events: auto !important;
}

.login-card .edge {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  pointer-events: none !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .15);
}

.login-card .blur {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  pointer-events: none !important;
  z-index: -1;
}

.login-content {
  position: relative;
  width: 100%;
  z-index: 2;
  pointer-events: auto !important;
}

.login-form,
.login-form *,
.input-with-icon,
.input-with-icon input,
.btn-login-submit,
.pwd-eye-btn {
  pointer-events: auto !important;
}

.input-with-icon .input-icon {
  pointer-events: none !important;
}

/* Brand header */
.login-brand {
  text-align: center;
  margin-bottom: 24px;
}

.brand-monogram {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 22px;
  background: linear-gradient(135deg, #eadfae, #8fa35a 60%, #c9a94e);
  color: #1b1e0e;
  font-weight: 900;
  font-size: 1.9rem;
  letter-spacing: -0.05em;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(201, 169, 78, .3),
              inset 0 1px 2px rgba(255, 255, 255, .6);
}

.login-brand h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--fg);
}

.login-brand p {
  margin: 0;
  font-size: .84rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Error message banner */
.login-error-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(214, 69, 69, .15);
  border: 1px solid rgba(214, 69, 69, .4);
  color: #ff9d9d;
  font-size: .84rem;
  margin-bottom: 18px;
  animation: in .25s ease both;
}
.login-error-alert svg {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: #ff9d9d;
  fill: none;
  stroke-width: 2;
}

/* Form controls */
.login-form .form-group {
  margin-bottom: 16px;
}

.login-form label {
  display: block;
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .input-icon {
  position: absolute;
  right: 14px;
  width: 20px;
  height: 20px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 1.8;
  pointer-events: none;
}

.input-with-icon input {
  width: 100%;
  height: 50px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--line);
  padding: 0 44px 0 14px;
  color: var(--fg);
  font: 500 15px "Vazirmatn", Tahoma, sans-serif;
  transition: border-color .2s, box-shadow .2s;
}

.input-with-icon input#login-password {
  padding-right: 76px;
  padding-left: 14px;
}

.input-with-icon input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230, 212, 142, .2);
  outline: none;
}

.pwd-eye-btn {
  position: absolute;
  right: 42px;
  left: auto;
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: var(--muted);
  display: grid;
  place-items: center;
  border-radius: 8px;
  z-index: 3;
  transition: color .2s;
}
.pwd-eye-btn:hover {
  color: var(--accent);
}
.pwd-eye-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.login-footer {
  display: none !important;
}

/* Form extra row: Remember me */
.form-extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 20px;
  font-size: .82rem;
  color: var(--muted);
}
.remember-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.remember-label input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Submit button */
.btn-login-submit {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  background: var(--accent);
  color: #1b1e0e;
  font: 800 1.05rem "Vazirmatn", sans-serif;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(230, 212, 142, .25);
  transition: transform .2s, box-shadow .2s, opacity .2s;
}
.btn-login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(230, 212, 142, .35);
}
.btn-login-submit:active {
  transform: translateY(0);
}
.btn-login-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}
.btn-login-submit svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
}

/* Spinner inside button */
.btn-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(27, 30, 14, 0.3);
  border-top-color: #1b1e0e;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* Demo Quick-Fill Pills for Rapid Testing */
.demo-accounts-section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.demo-accounts-title {
  font-size: .76rem;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.demo-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.demo-pill {
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 5px 11px;
  font-size: .74rem;
  color: var(--fg);
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
}
.demo-pill:hover {
  background: rgba(230, 212, 142, .15);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Footer security badge */
.login-footer {
  margin-top: 20px;
  text-align: center;
}
.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .73rem;
  color: var(--muted);
  opacity: .85;
}
.security-badge svg {
  width: 15px;
  height: 15px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  flex: none;
}


/* Brand Login Logo Medal */
.brand-logo-img {
  width: 86px;
  height: 86px;
  margin: 0 auto 14px;
  display: block;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(201, 169, 78, 0.35);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.brand-logo-img:hover {
  transform: scale(1.06) rotate(3deg);
  box-shadow: 0 14px 34px rgba(201, 169, 78, 0.55);
}
