/* ── Reset & Tokens ─────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue: #2f81f7;
  --blue-dim: #1a4a8a;
  --blue-glow: rgba(47, 129, 247, 0.15);
  --green: #39d353;
  --green-dim: #1a6b2a;
  --red: #f85149;
  --red-dim: #3d0f0d;
  --yellow: #d29922;
  --bg: #0d1117;
  --panel: #161b22;
  --panel-2: #1c2128;
  --border: #30363d;
  --border-2: #21262d;
  --text: #e6edf3;
  --text-2: #8b949e;
  --text-3: #484f58;
  --font-ui: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100dvh;
  padding: 40px 16px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(
      ellipse 70% 40% at 10% 0%,
      rgba(47, 129, 247, 0.05) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 50% 60% at 90% 100%,
      rgba(57, 211, 83, 0.03) 0%,
      transparent 60%
    );
  pointer-events: none;
}

.wrapper {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
}

/* ── Logo & Titolo ──────────────────────────────────────── */
.aria-logo {
  text-align: center;
  margin-bottom: 8px;
}

.aria-logo img {
  max-height: 48px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.aria-title {
  font-family: var(--font-mono);
  font-size: clamp(22px, 5vw, 30px);
  color: var(--blue);
  text-align: center;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 4px;
}

.aria-subtitle {
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 36px;
  font-family: var(--font-mono);
}

/* ── Card ───────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
}

.card h2 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h2 i {
  color: var(--blue);
  font-size: 14px;
}

/* ── Form ───────────────────────────────────────────────── */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.row {
  display: flex;
  gap: 12px;
}
.row .form-group {
  flex: 1;
}
.row .form-group.small {
  flex: 0 0 110px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="file"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 12px;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 129, 247, 0.12);
}

input::placeholder {
  color: var(--text-3);
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-block;
  width: 100%;
  padding: 10px 20px;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  margin-top: 8px;
  text-align: center;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-primary:hover {
  background: #388bfd;
  box-shadow: 0 0 12px rgba(47, 129, 247, 0.35);
}

.btn-test {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue-dim);
}
.btn-test:hover {
  background: var(--blue-glow);
  border-color: var(--blue);
}

.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: rgba(248, 81, 73, 0.4);
}
.btn-danger:hover {
  background: rgba(248, 81, 73, 0.1);
  border-color: var(--red);
}

.btn-outline {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--text-2);
  color: var(--text);
}

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-top: 12px;
  line-height: 1.6;
}
.alert-ok {
  background: rgba(57, 211, 83, 0.08);
  border: 1px solid var(--green-dim);
  color: var(--green);
}
.alert-ko {
  background: rgba(248, 81, 73, 0.08);
  border: 1px solid rgba(248, 81, 73, 0.4);
  color: var(--red);
}
.alert-warn {
  background: rgba(210, 153, 34, 0.08);
  border: 1px solid rgba(210, 153, 34, 0.4);
  color: var(--yellow);
}

/* ── Alert floating ─────────────────────────────────────── */
.alert-floating {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel-2);
  border: 1px solid var(--red);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 999;
  max-width: calc(100vw - 32px);
  text-align: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
.fadeOut {
  animation: fadeOut 0.8s ease forwards;
}
@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
}

/* ── Divider ────────────────────────────────────────────── */
.divider {
  height: 1px;
  margin: 20px 0;
  background: var(--border-2);
}

/* ── Info text ──────────────────────────────────────────── */
.info {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 16px;
  line-height: 1.7;
}

/* ── Link ───────────────────────────────────────────────── */
.aria-link {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
  margin-top: 14px;
  transition: color 0.15s;
  letter-spacing: 0.03em;
}
.aria-link:hover {
  color: #79c0ff;
  text-decoration: underline;
}

/* ── Input con occhio ───────────────────────────────────── */
.input-eye {
  position: relative;
}
.input-eye input {
  padding-right: 42px;
}
.eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.4;
  padding: 0;
  color: var(--text-2);
  transition: opacity 0.15s;
}
.eye-btn:hover {
  opacity: 0.9;
}

/* ── Profilo ────────────────────────────────────────────── */
.profilo-dati {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.profilo-riga {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-2);
}
.profilo-riga:last-child {
  border-bottom: none;
}
.profilo-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-width: 80px;
}
.profilo-valore {
  font-size: 14px;
  color: var(--text);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
  body {
    padding: 24px 12px;
  }
  .row {
    flex-direction: column;
    gap: 0;
  }
  .row .form-group.small {
    flex: 1;
  }
}
