/* Stili per la pagina di autenticazione in linea con il nuovo tema */

body {
  background: radial-gradient(circle at top left, rgba(49, 107, 255, 0.12), transparent 45%), var(--bg-main);
  color: var(--text-primary);
  padding-bottom: 0;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.auth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.16s ease, transform 0.12s ease;
}

.back-button:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

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

.card {
  background: var(--main-card-gradient);
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  width: min(520px, 100%);
  padding: 24px 22px 20px;
  position: relative;
}

.tab-header {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
}

.tab-header button {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 10px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.tab-header button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #f9fbff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.7);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  font-size: 13px;
  color: var(--text-secondary);
}

input {
  width: 100%;
  padding: 10px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.light-theme input {
  background: #fff;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.8);
  background: var(--bg-elevated-soft);
}

.btn-primary {
  width: 100%;
}

.extra {
  display: flex;
  justify-content: flex-end;
  font-size: 13px;
}

.extra a {
  color: var(--accent);
  text-decoration: none;
}

.extra a:hover {
  text-decoration: underline;
}

.helper-text {
  min-height: 18px;
  font-size: 12px;
  color: #fca5a5;
}

footer {
  text-align: center;
  padding: 14px;
  color: var(--text-secondary);
  font-size: 13px;
}

.auth-message {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 12px;
  font-size: 13px;
}

.auth-message.success {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: #22c55e;
}

.auth-message.danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

@media (max-width: 600px) {
  .auth-page {
    padding: 16px;
  }

  .card {
    padding: 18px 16px;
  }

  body {
    padding-bottom: 0;
  }
}
