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

:root {
  --auth-bg: #060a14;
  --auth-cyan: #22d3ee;
  --auth-gold: #fbbf24;
  --auth-violet: #a78bfa;
  --auth-card: rgba(12, 20, 38, 0.82);
  --auth-border: rgba(148, 163, 184, 0.2);
  --auth-calm-bg: #eef2f7;
  --auth-calm-surface: #ffffff;
  --auth-calm-text: #1e293b;
  --auth-calm-muted: #64748b;
  --auth-calm-border: #e2e8f0;
  --auth-calm-accent: #0ea5e9;
}

.auth-body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  color: #e2e8f0;
  direction: rtl;
  background: var(--auth-bg);
}


/* طµظپط­ط§طھ ط§ظ„ط¥ط¯ط§ط±ط© ط§ظ„ط¹ظ„ظٹط§ / ط§ظ„ط£ظ…ط§ظ† â€” طھظˆط³ظٹط¹ */
.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 1.5rem;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-container-wide {
  max-width: 520px;
}

.auth-form-skip {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--auth-calm-border, #e2e8f0);
}

.auth-form-skip .auth-field-hint {
  margin-top: 0.5rem;
  text-align: center;
}

.auth-btn-secondary {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.auth-body-calm .auth-btn-secondary {
  background: #64748b;
  width: 100%;
}

.auth-body-calm .auth-btn-secondary:hover {
  background: #475569;
}

.auth-warning {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fcd34d;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.auth-danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.auth-danger code {
  font-family: ui-monospace, monospace;
  color: #fecaca;
}

.auth-card-danger { border-color: rgba(239, 68, 68, 0.45); }

.auth-hint-block {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.auth-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #cbd5e1;
  cursor: pointer;
}

.auth-checkbox-row input { margin-top: 0.2rem; accent-color: #ef4444; }

.auth-btn-danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
}

.auth-setting-row {
  padding: 0.85rem 0;
  border-bottom: 1px solid #334155;
}

.auth-switch {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  cursor: pointer;
  user-select: none;
}

.auth-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.auth-switch-track {
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  background: #475569;
  border-radius: 999px;
  position: relative;
  margin-top: 2px;
}

.auth-switch-thumb {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  background: #f1f5f9;
  border-radius: 50%;
  transition: transform 0.2s;
}

.auth-switch input:checked + .auth-switch-track { background: #0ea5e9; }
.auth-switch input:checked + .auth-switch-track .auth-switch-thumb { transform: translateX(-20px); }

.auth-switch-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: #e2e8f0;
}

.auth-switch-label strong { font-size: 0.95rem; }
.auth-switch-label small { font-size: 0.78rem; color: #94a3b8; font-weight: normal; }

.auth-select { cursor: pointer; }
.auth-hint { font-size: 0.78rem; color: #94a3b8; margin-top: 0.35rem; }
.auth-hint a { color: #38bdf8; }

.auth-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.auth-footer-sep { color: #64748b; }
.auth-footer-muted { font-size: 0.8rem; color: #64748b !important; font-weight: 500 !important; }


/* â€”â€”â€” طھط³ط¬ظٹظ„ / طµظپط­ط§طھ ظ‚ط¯ظٹظ…ط© â€”â€”â€” */
.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  max-width: 980px;
  margin: 0 auto;
  padding: 1.5rem;
  gap: 1.25rem;
  align-items: center;
}

.auth-shell-register {
  max-width: 1040px;
}

.auth-brand {
  padding: 2rem 1.5rem;
}

.auth-brand-kicker {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #38bdf8;
  margin-bottom: 0.75rem;
}

.auth-brand-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.25;
  margin-bottom: 0.65rem;
}

.auth-brand-lead {
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.6;
  max-width: 22rem;
}

.auth-main {
  display: flex;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
}

.auth-card-register {
  max-width: 480px;
}

.auth-header {
  margin-bottom: 1.5rem;
}

.auth-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.2);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
  margin-bottom: 0.55rem;
}

.auth-badge-register {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.35);
}

.auth-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 0.3rem;
}

.auth-subtitle {
  font-size: 0.82rem;
  color: #94a3b8;
}

.auth-login-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  min-width: 0;
  height: 100%;
  width: 100%;
}

.auth-member-stat {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  user-select: none;
}

.auth-member-stat-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 11.5rem;
  height: 11.5rem;
  padding: 1rem;
  border-radius: 50%;
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
  border: 3px solid #d4a017;
  box-shadow:
    0 0 0 1px rgba(212, 160, 23, 0.35),
    0 0 10px rgba(212, 160, 23, 0.2),
    0 8px 24px rgba(15, 23, 42, 0.06);
  animation: auth-member-ring-glow 2.5s ease-in-out infinite;
}

@keyframes auth-member-ring-glow {
  0%,
  100% {
    border-color: #c9a227;
    box-shadow:
      0 0 0 1px rgba(201, 162, 39, 0.3),
      0 0 8px rgba(212, 160, 23, 0.15),
      0 8px 24px rgba(15, 23, 42, 0.06);
  }
  50% {
    border-color: #f5d565;
    box-shadow:
      0 0 0 3px rgba(245, 213, 101, 0.5),
      0 0 20px rgba(251, 191, 36, 0.55),
      0 0 34px rgba(212, 160, 23, 0.35),
      0 8px 24px rgba(15, 23, 42, 0.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-member-stat-ring {
    animation: none;
  }
}

.auth-member-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  margin-bottom: 0.15rem;
  color: #64748b;
}

.auth-member-stat-icon svg {
  width: 100%;
  height: 100%;
}

.auth-member-stat-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #64748b;
  line-height: 1.35;
  max-width: 8.5rem;
}

.auth-member-stat-value {
  font-size: clamp(2.65rem, 4.5vw, 3.35rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(128deg, #06b6d4 0%, #3b82f6 38%, #8b5cf6 72%, #d946ef 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.auth-member-stat-value--updated {
  animation: auth-member-count-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes auth-member-count-pop {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  45% {
    transform: scale(1.12);
    filter: brightness(1.15);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.auth-login-wrap > .auth-panel {
  min-width: 0;
  width: 100%;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 0.75rem;
}

.auth-field-span2 {
  grid-column: 1 / -1;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
}

.auth-input {
  padding: 0.72rem 0.9rem;
  border: 1px solid #475569;
  border-radius: 10px;
  background: #0f172a;
  color: #f1f5f9;
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.auth-input-code {
  font-family: ui-monospace, Consolas, monospace;
  letter-spacing: 0.12em;
  text-align: center;
}

.auth-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.auth-input::placeholder {
  color: #64748b;
}

.auth-field-hint {
  font-size: 0.72rem;
  color: #64748b;
}

.auth-role-fieldset {
  border: none;
  padding: 0;
  margin: 0.25rem 0 0;
}

.auth-role-fieldset .auth-label {
  margin-bottom: 0.45rem;
}

.auth-role-options {
  display: flex;
  gap: 0.5rem;
}

.auth-role-options-3 {
  flex-wrap: wrap;
}

.auth-role-options-3 .auth-role-option {
  flex: 1 1 30%;
  min-width: 5.5rem;
}

.auth-role-option {
  flex: 1;
  cursor: pointer;
  position: relative;
}

.auth-role-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  inset: 0;
  pointer-events: none;
}

.auth-role-pill {
  display: block;
  text-align: center;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #475569;
  background: #0f172a;
  font-size: 0.88rem;
  font-weight: 700;
  color: #94a3b8;
  transition: all 0.15s ease;
}

.auth-role-option input:checked + .auth-role-pill {
  border-color: #38bdf8;
  background: rgba(14, 165, 233, 0.15);
  color: #e0f2fe;
}

.auth-role-option input:checked + .auth-role-pill-admin {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  color: #d1fae5;
}

.auth-role-option input:checked + .auth-role-pill-super {
  border-color: #a78bfa;
  background: rgba(124, 58, 237, 0.15);
  color: #ede9fe;
}

.auth-btn {
  padding: 0.82rem 1.5rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
  margin-top: 0.35rem;
}

.auth-btn:hover {
  box-shadow: 0 6px 24px rgba(14, 165, 233, 0.35);
}

.auth-btn:active {
  transform: scale(0.98);
}

.auth-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 1.35rem;
  font-size: 0.85rem;
  color: #94a3b8;
  position: relative;
  z-index: 2;
}

.auth-footer a {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 700;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 0.5rem;
}


/* â€”â€”â€” ط§ظ„ط¯ط®ظˆظ„ ظˆط§ظ„طھط³ط¬ظٹظ„: ظ…ط±ظٹط­ ظˆظ…ظˆط­ظ‘ط¯ â€”â€”â€” */
.auth-body-calm,
.auth-body-login {
  overflow-x: hidden;
  color: var(--auth-calm-text);
  background:
    radial-gradient(1200px 520px at 5% -10%, rgba(14, 165, 233, 0.2), transparent 65%),
    radial-gradient(1000px 520px at 100% 0%, rgba(59, 130, 246, 0.18), transparent 62%),
    linear-gradient(180deg, #eef4ff 0%, #f8fbff 46%, #edf3fc 100%);
}

.auth-body-calm .auth-card,
.auth-body-calm .auth-card-glow,
.auth-body-login .auth-card,
.auth-body-login .auth-card-glow {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.9) 0%, rgba(246, 250, 255, 0.8) 100%);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 20px;
  box-shadow:
    0 22px 50px rgba(15, 23, 42, 0.12),
    0 6px 16px rgba(14, 165, 233, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

.auth-body-calm .auth-card-glow::before,
.auth-body-login .auth-card-glow::before {
  display: block;
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(56, 189, 248, 0.26), rgba(255, 255, 255, 0.05), rgba(125, 211, 252, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
}

.auth-body-calm .auth-badge,
.auth-body-login .auth-badge {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
  font-weight: 600;
}

.auth-body-calm .auth-title,
.auth-body-login .auth-title {
  color: var(--auth-calm-text);
  font-weight: 800;
}

.auth-body-calm .auth-subtitle,
.auth-body-login .auth-subtitle {
  color: var(--auth-calm-muted);
}

.auth-body-calm .auth-member-stat-ring,
.auth-body-login .auth-member-stat-ring {
  background: rgba(255, 255, 255, 0.72);
  border-color: #c9a227;
}

.auth-body-calm .auth-member-stat-label,
.auth-body-login .auth-member-stat-label {
  color: var(--auth-calm-muted);
}

.auth-body-calm .auth-member-stat-icon,
.auth-body-login .auth-member-stat-icon {
  color: #64748b;
}

.auth-body-calm .auth-member-stat-value,
.auth-body-login .auth-member-stat-value {
  background: linear-gradient(128deg, #06b6d4 0%, #3b82f6 38%, #8b5cf6 72%, #d946ef 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-body-calm .auth-label,
.auth-body-login .auth-label {
  color: #475569;
  font-weight: 600;
}

.auth-body-calm .auth-input,
.auth-body-login .auth-input {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--auth-calm-border);
  color: var(--auth-calm-text);
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
}

.auth-body-calm .auth-input:focus,
.auth-body-login .auth-input:focus {
  border-color: var(--auth-calm-accent);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
  background: #fff;
}

.auth-body-calm .auth-input::placeholder,
.auth-body-login .auth-input::placeholder {
  color: #94a3b8;
}

.auth-body-calm .auth-field-hint,
.auth-body-login .auth-field-hint {
  color: var(--auth-calm-muted);
}

.auth-body-calm .auth-btn,
.auth-body-calm .auth-btn-shine,
.auth-body-login .auth-btn,
.auth-body-login .auth-btn-shine {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 50%, #38bdf8 100%);
  margin-top: 0.5rem;
  padding: 0.85rem 1.25rem;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(14, 165, 233, 0.2);
}

.auth-body-calm .auth-btn:hover,
.auth-body-calm .auth-btn-shine:hover,
.auth-body-login .auth-btn:hover,
.auth-body-login .auth-btn-shine:hover {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 45%, #0ea5e9 100%);
  box-shadow: 0 14px 24px rgba(14, 165, 233, 0.28);
}

.auth-body-calm .auth-btn-shine::after,
.auth-body-login .auth-btn-shine::after {
  display: none;
}

.auth-body-calm .auth-footer,
.auth-body-login .auth-footer {
  color: var(--auth-calm-muted);
}

.auth-body-calm .auth-footer a,
.auth-body-login .auth-footer a {
  color: #0369a1;
}

.auth-body-calm .auth-error,
.auth-body-login .auth-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.auth-body-calm .auth-success,
.auth-body-login .auth-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.auth-body-calm .auth-form,
.auth-body-login .auth-form {
  gap: 1.15rem;
}

.auth-body-calm .auth-badge-register {
  background: #f0fdf4;
  color: #047857;
  border-color: #bbf7d0;
}

.auth-body-calm .auth-role-pill {
  background: #f8fafc;
  border-color: var(--auth-calm-border);
  color: var(--auth-calm-muted);
}

.auth-body-calm .auth-role-option input:checked + .auth-role-pill {
  border-color: var(--auth-calm-accent);
  background: #f0f9ff;
  color: #0369a1;
}

.auth-body-calm .auth-role-option input:checked + .auth-role-pill-admin {
  border-color: #10b981;
  background: #f0fdf4;
  color: #047857;
}

.auth-body-calm .auth-role-option input:checked + .auth-role-pill-super {
  border-color: #7c3aed;
  background: #f5f3ff;
  color: #5b21b6;
}

.auth-body-calm .auth-role-fieldset {
  margin-top: 0.25rem;
}

.auth-body-calm .auth-form-register {
  gap: 1rem;
}


.auth-ambient {
  display: none;
}

.auth-landing {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 400px);
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  align-items: center;
}

.auth-showcase-inner {
  max-width: 34rem;
}

.auth-logo-block {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.auth-page-login .auth-logo-block-hero {
  justify-content: center;
}

.auth-logo-mark {
  flex-shrink: 0;
  min-width: 2.5rem;
  padding: 0.5rem 0.65rem 0.45rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  background: var(--auth-calm-accent);
  border-radius: 12px;
  line-height: 1;
}

.auth-logo-mark-main {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.5;
  color: #11262a;
}

.auth-logo-mark-sub {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.00em;
  text-transform: lowercase;
  color: #0d3051;
}

.auth-page-login .auth-logo-mark,
.auth-page-register .auth-logo-mark {
  position: relative;
  overflow: hidden;
  width: 3.75rem;
  height: 3.75rem;
  min-width: 3.75rem;
  padding: 0;
  gap: 0.06rem;
  border-radius: 14px;
  box-sizing: border-box;
  flex-shrink: 0;
  background:
    radial-gradient(135% 120% at 28% 18%, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 46%),
    linear-gradient(155deg, #56657c 0%, #45546a 50%, #2c3a4d 100%);
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.32),
    0 3px 8px rgba(15, 23, 42, 0.24),
    inset 0 1px 1px rgba(255, 255, 255, 0.22),
    inset 0 -3px 8px rgba(2, 6, 23, 0.3);
  border: 1px solid rgba(203, 213, 225, 0.3);
}

.auth-page-login .auth-logo-mark::before,
.auth-page-register .auth-logo-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 50%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 32%);
  pointer-events: none;
}

.auth-page-login .auth-logo-mark::after,
.auth-page-register .auth-logo-mark::after {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: calc(14px - 4px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(2, 6, 23, 0.12);
  pointer-events: none;
}

@keyframes auth-logo-text-shine {
  0% { background-position: 200% 50%; }
  100% { background-position: -200% 50%; }
}

.auth-page-login .auth-logo-mark-main,
.auth-page-login .auth-logo-mark-sub,
.auth-page-register .auth-logo-mark-main,
.auth-page-register .auth-logo-mark-sub {
  position: relative;
  z-index: 1;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: initial;
  animation: none;
  text-shadow: none;
}

.auth-page-login .auth-logo-mark-main,
.auth-page-register .auth-logo-mark-main {
  font-size: 1.28rem;
  line-height: 1;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(2, 6, 23, 0.4);
}

.auth-page-login .auth-logo-mark-sub,
.auth-page-register .auth-logo-mark-sub {
  font-size: 0.58rem;
  line-height: 1;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: #7dd3fc;
  text-shadow: 0 1px 2px rgba(2, 6, 23, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .auth-page-login .auth-logo-mark-main,
  .auth-page-login .auth-logo-mark-sub {
    animation: none;
  }

  .auth-page-login .auth-logo-mark-main {
    color: #ffffff;
  }

  .auth-page-login .auth-logo-mark-sub {
    color: #7dd3fc;
  }
}

.auth-logo-tag {
  font-size: 2rem;
  font-weight: 600;
  color: var(--auth-calm-muted);
  letter-spacing: 0;
  margin-bottom: 0.2rem;
}

.auth-logo-title {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 800;
  line-height: 1.35;
  color: var(--auth-calm-text);
  background: none;
  -webkit-text-fill-color: inherit;
}

.auth-showcase-lead {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--auth-calm-muted);
  margin-bottom: 1.75rem;
}

.auth-showcase-intro {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-showcase-intro-lead {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--auth-calm-text);
  font-weight: 500;
}

.auth-showcase-intro-lead strong {
  font-weight: 800;
  color: var(--auth-calm-text);
}

.auth-showcase-highlight {
  font-weight: 700;
  color: var(--auth-calm-accent);
}

.auth-showcase-problems {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
}

.auth-showcase-problems li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 0.9rem;
  border-radius: 10px;
  background: var(--auth-calm-surface);
  border: 1px solid var(--auth-calm-border);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--auth-calm-text);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.auth-showcase-problems li::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--auth-calm-accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}

.auth-showcase-problems li:hover {
  border-color: #7dd3fc;
  background: linear-gradient(140deg, #ffffff 0%, #f0f9ff 100%);
}

.auth-logo-block-hero {
  justify-content: center;
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.auth-logo-block-small {
  justify-content: flex-start;
  align-items: stretch;
  gap: 0.65rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.auth-logo-side-box {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: linear-gradient(145deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
}

.auth-logo-side-box-mark {
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.85rem;
}

.auth-logo-side-text {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--auth-calm-muted);
  font-weight: 500;
}

.auth-logo-side-text strong {
  color: var(--auth-calm-text);
  font-weight: 800;
}

.auth-logo-side-brand {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(14, 165, 233, 0.22);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0369a1;
  text-transform: lowercase;
}

.auth-page-login .auth-logo-mark-hero {
  width: clamp(10.5rem, 28vw, 16rem);
  height: clamp(10.5rem, 28vw, 16rem);
  min-width: clamp(10.5rem, 28vw, 16rem);
  gap: 0.4rem;
  border-radius: clamp(22px, 3.5vw, 34px);
  box-shadow:
    0 26px 60px rgba(15, 23, 42, 0.34),
    0 10px 24px rgba(15, 23, 42, 0.22),
    inset 0 2px 2px rgba(255, 255, 255, 0.2),
    inset 0 -6px 16px rgba(2, 6, 23, 0.32);
}

.auth-page-login .auth-logo-mark-hero::after {
  inset: 5%;
  border-radius: clamp(16px, 2.8vw, 26px);
}

.auth-page-login .auth-logo-mark-hero .auth-logo-mark-main {
  font-size: clamp(3.4rem, 8vw, 5.5rem);
}

.auth-page-login .auth-logo-mark-hero .auth-logo-mark-sub {
  font-size: clamp(1.2rem, 2.8vw, 1.85rem);
  letter-spacing: 0.22em;
  padding-top: 0.35rem;
  margin-top: 0.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.auth-feature-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.auth-feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--auth-calm-border);
  background: var(--auth-calm-surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.auth-feature-card:hover {
  border-color: var(--auth-calm-border);
  transform: none;
}

.auth-feature-card-accent {
  border-color: #bae6fd;
  background: #f0f9ff;
}

.auth-feature-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.auth-feature-card strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--auth-calm-text);
}

.auth-feature-card span:last-child {
  font-size: 0.8rem;
  color: var(--auth-calm-muted);
  line-height: 1.55;
}

.auth-flow-strip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--auth-calm-surface);
  border: 1px solid var(--auth-calm-border);
}

.auth-flow-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--auth-calm-muted);
}

.auth-flow-steps {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.auth-flow-steps li {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--auth-calm-text);
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  background: #f1f5f9;
  position: static;
}

.auth-flow-steps li::before {
  content: none;
}

.auth-showcase-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.auth-pill {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid var(--auth-calm-border);
  color: var(--auth-calm-muted);
}

.auth-landing {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 400px);
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  align-items: center;
}

.auth-panel {
  display: flex;
  justify-content: center;
}

/* â€”â€”â€” طµظپط­ط© ط§ظ„ط¯ط®ظˆظ„: ظ‚ظپظ„ ط§ظ„ط§ط±طھظپط§ط¹ ط¨ط¯ظˆظ† ط´ط±ظٹط· طھظ…ط±ظٹط± â€”â€”â€” */
html.auth-page-login,
html.auth-page-login body.auth-body-calm {
  height: 100%;
  overflow: hidden;
}

.auth-page-login .auth-landing {
  min-height: 0;
  height: 100vh;
  height: 100dvh;
  max-width: min(1320px, 100%);
  overflow: hidden;
  align-items: center;
  padding: clamp(1rem, 2.5vh, 2rem) clamp(1.25rem, 3vw, 2.5rem);
  gap: clamp(1rem, 2.5vw, 2rem);
}

.auth-page-login .auth-landing > .auth-showcase,
.auth-page-login .auth-landing > .auth-login-wrap,
.auth-page-login .auth-landing > .auth-panel-users {
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: visible;
}

.auth-page-login .auth-landing:not(.auth-landing-login-split) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  max-width: min(1320px, 100%);
  align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem);
}

.auth-page-login .auth-landing:not(.auth-landing-login-split) > .auth-showcase,
.auth-page-login .auth-landing:not(.auth-landing-login-split) > .auth-login-wrap {
  min-width: 0;
  height: auto;
}

.auth-page-login .auth-landing:not(.auth-landing-login-split) > .auth-login-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}

.auth-page-login .auth-landing:not(.auth-landing-login-split) > .auth-showcase {
  display: flex;
  align-items: center;
}

.auth-page-login .auth-landing:not(.auth-landing-login-split) > .auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-page-login .auth-landing:not(.auth-landing-login-split) .auth-card {
  width: 100%;
  max-width: none;
  min-width: 0;
  height: auto;
  max-height: none;
  padding: clamp(1.5rem, 2.5vh, 2.1rem) clamp(1.35rem, 2.5vw, 2rem);
  display: block;
}

.auth-page-login .auth-login-wrap {
  height: auto;
}

.auth-page-login .auth-logo-block-hero {
  margin-bottom: 0.85rem;
}

.auth-page-login .auth-showcase-intro {
  gap: 0.75rem;
}

.auth-page-login .auth-showcase-problems li {
  padding: 0.5rem 0.8rem;
  font-size: 0.88rem;
}

.auth-page-login .auth-logo-mark-hero {
  width: clamp(8.5rem, 22vw, 12.5rem);
  height: clamp(8.5rem, 22vw, 12.5rem);
  min-width: clamp(8.5rem, 22vw, 12.5rem);
}

.auth-page-login .auth-logo-mark-hero .auth-logo-mark-main {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
}

.auth-page-login .auth-logo-mark-hero .auth-logo-mark-sub {
  font-size: clamp(1rem, 2.2vw, 1.45rem);
}

.auth-page-login .auth-member-stat-ring {
  width: 9.5rem;
  height: 9.5rem;
  padding: 0.85rem;
}

.auth-page-login .auth-member-stat-value {
  font-size: clamp(2.25rem, 3.5vw, 2.85rem);
}


@media (max-width: 960px) {
  html.auth-page-login,
  html.auth-page-login body.auth-body-calm {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .auth-page-login .auth-landing {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .auth-landing,
  .auth-page-login .auth-landing:not(.auth-landing-login-split) {
    grid-template-columns: 1fr;
    padding: 1.25rem 1rem 2rem;
    gap: 1.25rem;
  }

  .auth-showcase-inner {
    max-width: none;
  }

  .auth-login-wrap {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .auth-member-stat {
    order: -1;
    width: 100%;
  }

  .auth-member-stat-ring {
    width: 10.5rem;
    height: 10.5rem;
    margin: 0 auto;
  }

  .auth-member-stat-value {
    font-size: clamp(2.5rem, 14vw, 3.1rem);
  }

  .auth-feature-grid {
    grid-template-columns: 1fr;
  }

  .auth-logo-mark {
    min-width: 4.75rem;
  }

  .auth-logo-mark-main {
    font-size: 1.65rem;
  }

  .auth-logo-mark-sub {
    font-size: 0.68rem;
  }

  .auth-page-login .auth-logo-mark:not(.auth-logo-mark-hero) {
    width: 4rem;
    height: 4rem;
    min-width: 4rem;
  }

  .auth-page-login .auth-logo-mark:not(.auth-logo-mark-hero) .auth-logo-mark-main {
    font-size: 1.35rem;
  }

  .auth-page-login .auth-logo-mark:not(.auth-logo-mark-hero) .auth-logo-mark-sub {
    font-size: 0.62rem;
  }

  .auth-page-login .auth-logo-mark-hero {
    width: clamp(9rem, 44vw, 12.5rem);
    height: clamp(9rem, 44vw, 12.5rem);
    min-width: clamp(9rem, 44vw, 12.5rem);
  }

  .auth-page-login .auth-logo-mark-hero .auth-logo-mark-main {
    font-size: clamp(2.8rem, 13vw, 4.2rem);
  }

  .auth-page-login .auth-logo-mark-hero .auth-logo-mark-sub {
    font-size: clamp(1.1rem, 5vw, 1.7rem);
  }
}

@media (max-width: 768px) {
  .auth-shell {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .auth-brand {
    display: none;
  }

  .auth-form-grid {
    grid-template-columns: 1fr;
  }

  .auth-field-span2 {
    grid-column: auto;
  }
}


/* Login form area â€” notices, hints, footer */
.auth-notices {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.auth-notices .auth-success,
.auth-notices .auth-error {
  margin: 0;
  border-radius: 12px;
}

.auth-login-mode {
  margin: 0 0 0.9rem;
  padding: 0.65rem 0.8rem;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.auth-login-mode .auth-field-hint {
  margin: 0;
  font-size: 0.92rem;
}

.auth-form-main .auth-btn {
  margin-top: 0.35rem;
}

.auth-divider {
  position: relative;
  margin: 1rem 0 0.8rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.8rem;
}

.auth-divider::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 50%;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  transform: translateY(-50%);
}

.auth-divider span {
  position: relative;
  padding: 0 0.7rem;
  background: rgba(14, 16, 26, 0.95);
}

.auth-footer {
  margin-top: 1rem;
}

.auth-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.35rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.auth-footer a:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

/* CSP-safe auth layout helpers */
.auth-shell-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.auth-card-narrow {
  max-width: 420px;
  width: 100%;
}
.auth-card-md {
  max-width: 440px;
  width: 100%;
}
.auth-qr-panel {
  text-align: center;
  margin: 1rem 0;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.auth-mt-sm { margin-top: 0.75rem; }
.auth-mt-md { margin-top: 1.5rem; }
.auth-secret-code {
  word-break: break-all;
  font-size: 0.85rem;
}
.auth-warning-box {
  margin: 1rem 0;
  padding: 1rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
}
.auth-plain-list {
  list-style: none;
  margin-top: 0.5rem;
}
