/* ===== LOGIN LAYOUT ===== */
.login-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.login-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* ===== CARD ===== */
.login-card {
  width: 100%;
  max-width: 420px;
  padding: 2.25rem 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
}

/* ===== BRAND ===== */
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.75rem;
  text-align: center;
}

.login-brand .tehillah-mark__svg {
  width: 3.4rem;
  height: 3.4rem;
}

.login-heading {
  margin: 0.8rem 0 0;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.15;
}

.login-sub {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

/* ===== FORM FIELDS ===== */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
}

.field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted-strong);
}

.field input {
  width: 100%;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-md);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
}

.field input::placeholder {
  color: var(--muted);
}

.field input:focus {
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Instrumentos/vozes (cadastro e perfil): o seletor fica em style.css */
.field--parts { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
.field--parts > legend {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted-strong);
  margin-bottom: 0.35rem;
}
.field--parts .field__hint { display: block; margin-bottom: 0.6rem; }

/* Aceite dos Termos e declaração de idade (P28) */
.field.field--check {
  display: flex;
  flex-direction: row;   /* .field empilha rótulo e campo; aqui a caixa fica ao lado do texto */
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0 0 0.9rem;
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--text);
  cursor: pointer;
}
.field.field--check input {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.12rem 0 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  appearance: auto;
  -webkit-appearance: checkbox;
  accent-color: var(--accent-bright);
}
.field--check a { color: var(--accent); text-underline-offset: 3px; }

/* ===== ERROR BANNER ===== */
.login-error {
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1rem;
  margin-bottom: 1.1rem;
  border: 1px solid rgba(184, 50, 50, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(184, 50, 50, 0.08);
  color: var(--danger);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.login-error.is-visible {
  display: flex;
}

[data-theme="dark"] .login-error {
  border-color: rgba(255, 138, 138, 0.26);
  background: rgba(255, 138, 138, 0.08);
}

/* ===== SUBMIT BUTTON ===== */
.btn--full {
  width: 100%;
  justify-content: center;
  padding: 0.75rem 1rem;
  margin-top: 0.4rem;
}

.btn[aria-busy="true"] {
  opacity: 0.72;
  pointer-events: none;
  cursor: not-allowed;
}

/* ===== FOOTER ===== */
.login-footer {
  text-align: center;
  padding: 1.4rem 1rem;
  color: var(--muted);
  font-size: var(--text-xs);
  border-top: 1px solid var(--border);
}

.login-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .login-card {
    padding: 2rem 1.25rem;
  }
}

/* ===== TELAS DE CONTA (cadastro, confirmação, senha, convite) ===== */
.field__hint {
  font-size: var(--text-xs);
  color: var(--muted);
}

.account-message {
  padding: 0.9rem 1rem;
  margin-bottom: 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.account-message--success {
  border-color: color-mix(in srgb, var(--success) 35%, transparent);
  background: color-mix(in srgb, var(--success) 9%, transparent);
}

.account-message--error {
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
  background: color-mix(in srgb, var(--danger) 8%, transparent);
  color: var(--danger);
}

.account-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.account-actions .btn { margin-top: 0; }

/* Ação secundária (as telas de conta não carregam musicians.css, onde fica .btn--ghost) */
.account-actions .btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.account-actions .btn--ghost:hover { background: var(--surface-hover); }

.account-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.25rem;
  margin-top: 1.1rem;
}

.account-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.account-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.account-note {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.55;
  text-align: center;
}

/* ===== MEU PERFIL ===== */
.profile-block {
  border: 0;
  padding: 0 0 1.4rem;
  margin: 0 0 1.4rem;
  border-bottom: 1px solid var(--border);
}

.profile-block__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted-strong);
  margin: 0 0 0.8rem;
}

.profile-photo { display: flex; align-items: center; gap: 1.1rem; }
.profile-photo__avatar { width: 4.5rem; height: 4.5rem; font-size: 1.35rem; flex: none; }
.profile-photo__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.1rem; }
.profile-photo__pick {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  cursor: pointer;
}
.profile-photo__pick:hover { background: var(--surface-hover); }
.profile-photo__pick[aria-busy="true"] { opacity: 0.72; pointer-events: none; }
#pf-remove[hidden] { display: none; }

.profile-status { margin: 0.7rem 0 0; font-size: var(--text-xs); line-height: 1.5; }
.profile-status:empty { display: none; }
.profile-status--success { color: var(--success); }
.profile-status--error { color: var(--danger); }
