/* Login page — matches site minimal teal language */
body.page-login {
  --shell-teal: #024442;
  --shell-teal-mid: #0a514d;
  --shell-teal-deep: #013a3a;
  --shell-ink: #1c3331;
  --shell-muted: #6b7d7a;
  --shell-line: #dde6e4;
  --shell-line-strong: #c5d2cf;
  --shell-soft: #f4f7f6;
  --shell-white: #ffffff;
  margin: 0;
  min-height: 100vh;
  font-family: Vazirmatn, IRANSans, Tahoma, Arial, sans-serif;
  background:
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(2, 68, 66, 0.08), transparent 55%),
    radial-gradient(ellipse 45% 40% at 0% 100%, rgba(2, 68, 66, 0.05), transparent 50%),
    var(--shell-soft);
  color: var(--shell-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  -webkit-font-smoothing: antialiased;
}

body.page-login .login-shell {
  width: min(440px, 100%);
}

body.page-login .login-card {
  padding: 36px 32px;
  border-radius: 28px;
  background: var(--shell-white);
  border: 1px solid rgba(213, 223, 221, 0.85);
  box-shadow: 0 18px 48px rgba(15, 62, 59, 0.08);
}

body.page-login .brand-header {
  text-align: center;
  margin-bottom: 28px;
}

body.page-login .brand-logo img {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(2, 68, 66, 0.15);
  margin-bottom: 14px;
}

body.page-login .brand-title {
  margin: 0 0 6px;
  color: var(--shell-teal);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

body.page-login .brand-subtitle {
  margin: 0;
  color: var(--shell-muted);
  font-size: 0.92rem;
}

body.page-login .auth-toggle {
  display: flex;
  gap: 6px;
  padding: 6px;
  margin-bottom: 24px;
  border-radius: 16px;
  background: var(--shell-soft);
}

body.page-login .toggle-btn {
  flex: 1;
  min-height: 42px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--shell-muted);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

body.page-login .toggle-btn.active {
  background: var(--shell-white);
  color: var(--shell-teal-mid);
  box-shadow: 0 4px 14px rgba(2, 68, 66, 0.08);
}

body.page-login .auth-form { display: none; }
body.page-login .auth-form.active { display: block; }

body.page-login .form-group { margin-bottom: 16px; }

body.page-login .form-label {
  display: block;
  margin-bottom: 7px;
  color: var(--shell-teal-mid);
  font-size: 0.88rem;
  font-weight: 700;
}

body.page-login .input-container {
  position: relative;
}

body.page-login .form-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 44px 12px 44px;
  border: 1.5px solid var(--shell-line-strong);
  border-radius: 14px;
  background: var(--shell-soft);
  color: var(--shell-ink);
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body.page-login .form-input:focus {
  outline: none;
  background: #fff;
  border-color: rgba(2, 68, 66, 0.45);
  box-shadow: 0 0 0 4px rgba(2, 68, 66, 0.08);
}

body.page-login .input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--shell-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

body.page-login .password-toggle {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--shell-muted);
  cursor: pointer;
}

body.page-login .btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  margin-top: 8px;
  border: none;
  border-radius: 999px;
  background: var(--shell-teal);
  color: #fff;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(2, 68, 66, 0.2);
  transition: transform 0.2s ease, background 0.2s ease;
}

body.page-login .btn-submit:hover:not(:disabled) {
  background: var(--shell-teal-deep);
  transform: translateY(-1px);
}

body.page-login .btn-submit:disabled {
  opacity: 0.75;
  cursor: wait;
}

body.page-login .alert {
  display: none;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
}

body.page-login .alert.show { display: block; }
body.page-login .alert-success {
  background: #e8f5ef;
  color: #0a514d;
  border: 1px solid #c5e0d4;
}
body.page-login .alert-error {
  background: #fdeeee;
  color: #8b2e2e;
  border: 1px solid #f0c9c9;
}

body.page-login .strength-meter {
  display: none;
  height: 4px;
  margin-top: 8px;
  border-radius: 4px;
  background: var(--shell-line);
  overflow: hidden;
}
body.page-login .strength-meter.show { display: block; }
body.page-login .strength-bar {
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: width 0.25s ease, background 0.25s ease;
}
body.page-login .strength-bar.weak { width: 33%; background: #e57373; }
body.page-login .strength-bar.medium { width: 66%; background: #f0b429; }
body.page-login .strength-bar.strong { width: 100%; background: #2f9e7b; }

body.page-login .card-footer {
  margin-top: 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

body.page-login .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--shell-teal-mid);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

body.page-login .mode-switch {
  margin-top: 14px;
  text-align: center;
}

body.page-login .step-hint {
  margin: 0 0 16px;
  color: var(--shell-muted);
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.6;
}

body.page-login .terms-note {
  margin: 0 0 16px;
  color: var(--shell-muted);
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.55;
}

body.page-login .auth-form[hidden] {
  display: none !important;
}

body.page-login .link-btn {
  background: none;
  border: none;
  color: var(--shell-teal-mid);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.page-login .link-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  text-decoration: none;
}

body.page-login .admin-entry {
  color: var(--shell-muted);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
}

body.page-login .admin-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 40, 38, 0.45);
}

body.page-login .admin-modal[hidden] {
  display: none;
}

body.page-login .admin-modal-card {
  width: min(400px, 100%);
  padding: 28px 24px;
  border-radius: 22px;
  background: var(--shell-white);
  border: 1px solid var(--shell-line);
  box-shadow: 0 20px 48px rgba(15, 62, 59, 0.18);
}

body.page-login .admin-modal-card h2 {
  margin: 0 0 18px;
  color: var(--shell-teal);
  font-size: 1.15rem;
  font-weight: 800;
  text-align: center;
}

body.page-login .quick-continue {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #eef5f2;
  border: 1px solid rgba(10, 81, 77, 0.12);
  text-align: center;
}

body.page-login .quick-continue-text {
  margin: 0 0 12px;
  color: var(--shell-muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

body.page-login .quick-continue-text strong {
  color: var(--shell-teal-mid);
  font-weight: 800;
}

body.page-login .btn-quick-portal {
  width: 100%;
  margin-bottom: 8px;
}

@media (max-width: 480px) {
  body.page-login .login-card {
    padding: 28px 20px;
  }
}
