/* Pagina d'accesso all'area riservata: stessi colori e carattere del configuratore. */
@font-face {
  font-family: 'Red Hat Display Variable';
  src: url('/accesso/red-hat-display.woff2') format('woff2-variations');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --navy: #0b1761;
  --navy-hover: #081150;
  --navy-soft: #f4f5fb;
  --gold-line: #d9c68a;
  --surface: #ffffff;
  --border: #d5d9e5;
  --text: #1b2340;
  --text-2: #4a5270;
  --err: #b42318;
  --err-bg: #fef3f2;
  --font: 'Red Hat Display Variable', 'Red Hat Display', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.acc {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(400px, 1fr);
  min-height: 100dvh;
}

/* Lato sinistro: la Pergòblade in linee, come nei disegni del listino. */
.acc-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 56px;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
}

.acc-art {
  position: absolute;
  top: 9%;
  left: 7%;
  width: 86%;
  height: auto;
}

.acc-claim {
  position: relative;
  margin: 0;
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.acc-sub {
  position: relative;
  margin: 0;
  max-width: 34ch;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.74);
}

.acc-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 24px;
}

.acc-box {
  width: 100%;
  max-width: 380px;
  margin: auto 0;
}

.acc-logo {
  display: block;
  width: 196px;
  height: auto;
  margin-bottom: 36px;
}

h1 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.acc-intro {
  margin: 0 0 28px;
  font-size: 15px;
  color: var(--text-2);
}

form {
  display: grid;
  gap: 8px;
}

label {
  font-size: 14px;
  font-weight: 600;
}

input[type='email'],
input[type='password'],
input[type='text'] {
  width: 100%;
  height: 48px;
  margin: 0 0 10px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 16px; /* sotto i 16px iOS ingrandisce la pagina */
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

input:focus-visible {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11, 23, 97, 0.14);
}

.acc-pw {
  position: relative;
}

.acc-pw input {
  padding-right: 52px;
}

.acc-eye {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-2);
  cursor: pointer;
}

.acc-eye:hover {
  background: var(--navy-soft);
  color: var(--navy);
}

.acc-eye:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}

.acc-eye .off,
.acc-eye[aria-pressed='true'] .on {
  display: none;
}

.acc-eye[aria-pressed='true'] .off {
  display: block;
}

.acc-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
}

.acc-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--navy);
}

.acc-err {
  margin: 2px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--err-bg);
  color: var(--err);
  font-size: 14px;
  font-weight: 500;
}

.acc-btn {
  height: 50px;
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    transform 160ms var(--ease-out);
}

.acc-btn:hover {
  background: var(--navy-hover);
}

.acc-btn:active {
  transform: scale(0.98);
}

.acc-btn:disabled {
  opacity: 0.72;
  cursor: progress;
}

.acc-btn:focus-visible {
  outline: 3px solid var(--gold-line);
  outline-offset: 2px;
}

.acc-help {
  margin: 22px 0 0;
  font-size: 14px;
  color: var(--text-2);
}

.acc-foot {
  margin: 24px 0 0;
  font-size: 13px;
  color: var(--text-2);
}

.acc-foot a {
  color: inherit;
  font-weight: 600;
}

@media (max-width: 860px) {
  .acc {
    grid-template-columns: 1fr;
  }

  .acc-visual {
    display: none;
  }

  .acc-panel {
    padding: 32px 20px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
