/* ================================================================
   MUSUROI — Auth Screens (login, no-access)
   Standalone CSS — nu depinde de main.css al SPA-ului.
   Minimal, own-branded, mobile-first.
   ================================================================ */

/* ─── Design tokens — Alt Nivel: gri + negru ─── */
.musuroi-auth {
  --accent:        #0a0a0a;
  --accent-hover:  #2d2d2d;
  --accent-soft:   rgba(10, 10, 10, 0.06);
  --accent-border: rgba(10, 10, 10, 0.18);

  --text:          #0a0a0a;
  --text-soft:     #404040;
  --text-muted:    #737373;
  --text-ghost:    #a3a3a3;

  --bg:            #f4f4f5;
  --surface:       #ffffff;
  --border:        #e4e4e7;
  --border-strong: #d4d4d8;

  --success:       #10b981;
  --success-soft:  #d1fae5;
  --danger:        #f43f5e;
  --danger-soft:   #ffe4e6;

  --radius:        0.5rem;
  --radius-lg:     0.75rem;
  --shadow-sm:     0 1px 2px rgba(10,10,10,0.04);
  --shadow-md:     0 4px 12px rgba(10,10,10,0.06);
  --shadow-lg:     0 20px 40px -12px rgba(10,10,10,0.08);

  --font-sans:     'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  font-family: var(--font-sans);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Reset scoped ─── */
.musuroi-auth *,
.musuroi-auth *::before,
.musuroi-auth *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── Layout ─── */
.musuroi-auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: var(--bg);
}

body.admin-bar .musuroi-auth {
  min-height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
  body.admin-bar .musuroi-auth {
    min-height: calc(100vh - 46px);
  }
}

/* ─── Brand header ─── */
.musuroi-auth__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.musuroi-auth__logo {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.musuroi-auth__logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

.musuroi-auth__wordmark {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.musuroi-auth__tagline {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ─── Card ─── */
.musuroi-auth__card {
  width: 100%;
  max-width: 28rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 480px) {
  .musuroi-auth__card {
    padding: 2.5rem;
  }
}

.musuroi-auth__title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.musuroi-auth__subtitle {
  font-size: 0.875rem;
  color: var(--text-soft);
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

.musuroi-auth__subtitle strong {
  color: var(--text);
  font-weight: 600;
}

/* ─── Form ─── */
.musuroi-auth__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.musuroi-auth__field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.musuroi-auth__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
}

.musuroi-auth__input {
  width: 100%;
  padding: 0.75rem 0.875rem;
  /* 16px, nu 15px — sub prag Safari/iOS face auto-zoom la focus și pagina
     rămâne mărită după (audit Faza 4, 2026-08-14). */
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.musuroi-auth__input::placeholder {
  color: var(--text-ghost);
}

.musuroi-auth__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.musuroi-auth__input:disabled {
  background: var(--bg);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* ─── Buttons ─── */
.musuroi-auth__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.8125rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
}

.musuroi-auth__btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.18);
}

.musuroi-auth__btn--primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 8px 20px rgba(10, 10, 10, 0.28);
  transform: translateY(-2px);
}

.musuroi-auth__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.musuroi-auth__btn--primary:active:not(:disabled) {
  transform: translateY(0);
}

.musuroi-auth__btn--primary:disabled {
  background: var(--text-ghost);
  cursor: not-allowed;
  box-shadow: none;
}

.musuroi-auth__btn--ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--border);
}

.musuroi-auth__btn--ghost:hover {
  background: var(--accent-soft);
  color: var(--text);
  border-color: var(--accent-border);
  box-shadow: 0 4px 12px rgba(10, 10, 10, 0.1);
  transform: translateY(-1px);
}

.musuroi-auth__btn__spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: musuroi-spin 0.7s linear infinite;
  display: none;
}

.musuroi-auth__btn.is-loading .musuroi-auth__btn__spinner {
  display: inline-block;
}

.musuroi-auth__btn.is-loading .musuroi-auth__btn__label {
  opacity: 0.7;
}

@keyframes musuroi-spin {
  to { transform: rotate(360deg); }
}

/* ─── Divider ─── */
.musuroi-auth__divider {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.musuroi-auth__divider::before,
.musuroi-auth__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── Toggle to password mode ─── */
.musuroi-auth__toggle {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  padding: 0.5rem;
  margin: 0 auto;
  display: block;
  text-decoration: none;
}

.musuroi-auth__toggle:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ─── Message boxes ─── */
.musuroi-auth__message {
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  display: none;
}

.musuroi-auth__message.is-visible {
  display: block;
}

.musuroi-auth__message--success {
  background: var(--success-soft);
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.musuroi-auth__message--error {
  background: var(--danger-soft);
  color: #9f1239;
  border: 1px solid #fda4af;
}

.musuroi-auth__message--info {
  background: var(--accent-soft);
  color: #3730a3;
  border: 1px solid var(--accent-border);
}

/* ─── Mode switcher ─── */
.musuroi-auth__mode {
  display: none;
}

.musuroi-auth__mode.is-active {
  display: block;
}

/* ─── Footer links ─── */
.musuroi-auth__footer {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.musuroi-auth__footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.musuroi-auth__footer a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.musuroi-auth__footer-row {
  margin-bottom: 0.5rem;
}

.musuroi-auth__footer-row:last-child {
  margin-bottom: 0;
}

/* 2026-08-15 — rândul „nu ai cont" din /profil/: titlu + explicație + link
   spre evenimente, unul sub altul, nu înghesuite pe același rând ca restul
   footer-ului (care e o singură propoziție scurtă). */
.musuroi-auth__footer-row--stack {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.musuroi-auth__footer-row--stack strong {
  color: var(--text, inherit);
  font-weight: 600;
}

/* ─── No-access specific ─── */
.musuroi-auth__no-access-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin: 0 auto 1.25rem;
  font-size: 1.5rem;
}

.musuroi-auth__no-access-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.musuroi-auth__welcome {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.musuroi-auth__welcome strong {
  color: var(--text);
  font-weight: 600;
}

/* ─── Outside-world link ─── */
.musuroi-auth__back {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: all 0.15s ease;
}

.musuroi-auth__back:hover {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

body.admin-bar .musuroi-auth__back {
  top: calc(1.5rem + 32px);
}

@media screen and (max-width: 782px) {
  body.admin-bar .musuroi-auth__back {
    top: calc(1.5rem + 46px);
  }
}

/* ─── WordPress login errors (displayed after failed wp-login redirect) ─── */
.musuroi-auth__wp-error {
  padding: 0.875rem 1rem;
  background: var(--danger-soft);
  color: #9f1239;
  border: 1px solid #fda4af;
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}
