/* Pantalla de login (coherente con app: DM Sans, teal, modo oscuro) */

.login-body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  position: relative;
  overflow-x: hidden;
}

.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(13, 148, 136, 0.22), transparent 55%),
    radial-gradient(ellipse 90% 60% at 100% 50%, rgba(13, 148, 136, 0.08), transparent 45%),
    radial-gradient(ellipse 70% 50% at 0% 80%, rgba(5, 150, 105, 0.06), transparent 40%),
    var(--bg);
  pointer-events: none;
}

html[data-theme="dark"] .login-bg {
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(45, 212, 191, 0.12), transparent 55%),
    radial-gradient(ellipse 90% 60% at 100% 40%, rgba(45, 212, 191, 0.06), transparent 45%),
    var(--bg);
}

.login-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.login-brand {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0 0.25rem;
}

.login-brand__mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #0f766e);
  flex-shrink: 0;
  box-shadow: 0 8px 28px rgba(13, 148, 136, 0.35);
}

html[data-theme="dark"] .login-brand__mark {
  box-shadow: 0 8px 28px rgba(45, 212, 191, 0.2);
}

.login-brand__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.login-brand__sub {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.06),
    0 20px 50px rgba(15, 23, 42, 0.1);
  padding: 1.65rem 1.5rem 1.5rem;
}

html[data-theme="dark"] .login-card {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.login-card__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-card__lead {
  margin: 0.4rem 0 1.35rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.login-field__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.login-field__input {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-field__input::placeholder {
  color: var(--muted);
  opacity: 0.65;
}

.login-field__input:hover {
  border-color: rgba(13, 148, 136, 0.35);
}

html[data-theme="dark"] .login-field__input:hover {
  border-color: rgba(45, 212, 191, 0.3);
}

.login-field__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

html[data-theme="dark"] .login-field__input:focus {
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12);
}

.login-error {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--danger);
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

html[data-theme="dark"] .login-error {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.25);
}

.login-submit {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  min-height: 48px;
}

.login-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.login-hint {
  margin: 1.25rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--line);
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--muted);
}

.login-hint code {
  font-size: 0.72rem;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.login-theme--floating {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  user-select: none;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.4rem 0.65rem 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.login-theme--floating .theme-switch {
  cursor: pointer;
}

@media (max-width: 380px) {
  .login-theme__text {
    display: none;
  }
}
