/* ============================================================
   ITA Advisors — Auth Pages (login, registrazione, recupero pw)
   Brand: navy #0F1F3D | verde #2ABF73
   Funziona in qualsiasi sottocartella del web server
   ============================================================ */

/* ── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #000000;
  --navy-mid:   #1A2E50;
  --navy-soft:  #EEF3F9;
  --green:      #2ABF73;
  --green-dark: #1E9659;
  --green-soft: #E8F7EF;
  --red:        #D63B3B;
  --red-soft:   #FEF0F0;
  --gold-soft:  #FDF5E6;
  --gold:       #C8973A;
  --text-1:     #0F1F3D;
  --text-2:     #4A5568;
  --text-3:     #9AA5B4;
  --border:     #E2E8F0;
  --bg:         #F7F8FA;
  --white:      #FFFFFF;
  --r-sm:  5px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  16px;
  --sh-xs: 0 1px 3px rgba(0,0,0,.07);
  --sh-sm: 0 2px 8px rgba(0,0,0,.09);
  --t: .17s ease;
}
@font-face {
    font-family: 'QontoSans-Regular';
    src: url('../font/QontoSans-Regular.woff2') format('woff2'),
         url('../font/QontoSans-Regular.woff') format('woff');
}
@font-face {
    font-family: 'QontoSans-RegularItalic';
    src: url('../font/QontoSans-RegularItalic.woff2') format('woff2'),
         url('../font/QontoSans-RegularItalic.woff') format('woff');
}
@font-face {
    font-family: 'QontoSans-Light';
    src: url('../font/QontoSans-Light.woff2') format('woff2'),
         url('../font/QontoSans-Light.woff') format('woff');
}
@font-face {
    font-family: 'QontoSans-SemiBold';
    src: url('../font/QontoSans-SemiBold.woff2') format('woff2'),
         url('../font/QontoSans-SemiBold.woff') format('woff');
}
@font-face {
    font-family: 'QontoSans-Bold';
    src: url('../font/QontoSans-Bold.woff2') format('woff2'),
         url('../font/QontoSans-Bold.woff') format('woff');
}
@font-face {
    font-family: 'QontoSans-Black';
    src: url('../font/QontoSans-Black.woff2') format('woff2'),
         url('../font/QontoSans-Black.woff') format('woff');
}
html { font-size: 16px; }

body {
 font-family: 'QontoSans-Regular';
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
}

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── PAGE WRAP ─────────────────────────────────────────── */
.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── HEADER ────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--sh-xs);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }

.logo-icon {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}

.logo-bar {
  width: 4px;
  border-radius: 2px;
  background: var(--navy);
}
.logo-bar:nth-child(1) { height: 12px; }
.logo-bar:nth-child(2) { height: 8px; }
.logo-bar:nth-child(3) { height: 18px; }
.logo-bar:nth-child(4) { height: 7px; }

.logo-wordmark {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.02em;
}
.logo-wordmark span { color: var(--green); }


/* Logo fallback (mostrato se img/logo.png manca) */
.logo-fallback {
  align-items: center;
  gap: 7px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-help { font-size: 13px; color: var(--text-3); }

.header-phone {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}
.header-phone:hover { text-decoration: underline; }
.header-phone svg { color: var(--green); flex-shrink: 0; }

/* ── MAIN ──────────────────────────────────────────────── */
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
}

/* ── AUTH CARD ─────────────────────────────────────────── */
.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2.25rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--sh-sm);
  animation: fadeUp .25s ease both;
}

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

/* ── AUTH HEADER ───────────────────────────────────────── */
.auth-head { margin-bottom: 1.75rem; }

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .4rem;
  line-height: 1.2;
}

.auth-sub {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
}

/* ── BACK LINK ─────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
  margin-bottom: 1.25rem;
  text-decoration: none;
  transition: color var(--t);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.back-link:hover { color: var(--navy); text-decoration: none; }

/* ── FORM ELEMENTS ─────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 1rem;
}

.form-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.form-input {
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: .625rem .875rem;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-1);
  background: var(--white);
  width: 100%;
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
}
.form-input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15,31,61,.08);
}
.form-input::placeholder { color: var(--text-3); }
.form-input.error { border-color: var(--red); }
.form-input.error:focus { box-shadow: 0 0 0 3px rgba(214,59,59,.1); }

/* Password field */
.pw-wrap { position: relative; }
.pw-wrap .form-input { padding-right: 2.75rem; }

.pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  display: flex;
  align-items: center;
  padding: 0;
  transition: color var(--t);
}
.pw-toggle:hover { color: var(--navy); }

/* Field hint */
.form-hint {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}

.form-hint.error { color: var(--red); font-weight: 600; }

/* ── REMEMBER + FORGOT ROW ─────────────────────────────── */
.row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 8px;
  flex-wrap: wrap;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}
.checkbox-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--navy);
  cursor: pointer;
  flex-shrink: 0;
}

.link-secondary {
  font-size: 13px;
  color: var(--navy);
  font-weight: 500;
  text-decoration: none;
}
.link-secondary:hover { text-decoration: underline; }

/* ── BUTTONS ───────────────────────────────────────────── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: .75rem;
  cursor: pointer;
  transition: all var(--t);
  border: none;
  letter-spacing: -.01em;
  line-height: 1;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--navy-mid);
  box-shadow: 0 3px 10px rgba(15,31,61,.18);
  transform: translateY(-1px);
}
.btn-primary:active { transform: scale(.98); }

.btn-primary:disabled {
  background: var(--border);
  color: var(--text-3);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── DIVIDER ───────────────────────────────────────────── */
.or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 1.25rem 0;
  font-size: 12px;
  color: var(--text-3);
}
.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── BOTTOM LINK ROW ───────────────────────────────────── */
.bottom-row {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 13px;
  color: var(--text-2);
}
.bottom-row a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}
.bottom-row a:hover { text-decoration: underline; }

/* ── INFO / FLASH BOXES ────────────────────────────────── */
.info-box,
.flash-box {
  border-radius: var(--r-md);
  padding: .8rem 1rem;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 1rem;
  display: flex;
  gap: 9px;
  align-items: flex-start;
  border: 1px solid transparent;
}

.info-box.navy,
.flash-box.flash-info {
  background: var(--navy-soft);
  border-color: rgba(15,31,61,.12);
  color: var(--navy);
}

.info-box.success,
.flash-box.flash-success {
  background: var(--green-soft);
  border-color: rgba(42,191,115,.25);
  color: #135C38;
}

.info-box.warning,
.flash-box.flash-warning {
  background: var(--gold-soft);
  border-color: rgba(200,151,58,.25);
  color: #7A5010;
}

.info-box.error,
.flash-box.flash-error {
  background: var(--red-soft);
  border-color: rgba(214,59,59,.25);
  color: #7A1C1C;
}

/* ── SUCCESS CIRCLE (pagine conferma) ──────────────────── */
.success-wrap {
  text-align: center;
  padding: .5rem 0 .25rem;
}

.success-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.success-circle.green { background: var(--green-soft); }
.success-circle.navy  { background: var(--navy-soft); }

/* ── FOOTER ────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  padding: .875rem 0;
  flex-shrink: 0;
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,.4);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  font-size: 12px;
  color: rgba(255,255,255,.45);
  text-decoration: none;
}
.footer-links a:hover { color: rgba(255,255,255,.8); }

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card   { padding: 1.75rem 1.25rem; border-radius: var(--r-lg); }
  .auth-title  { font-size: 19px; }
  .auth-main   { padding: 1.5rem 1rem; align-items: flex-start; }
  .header-help { display: none; }
  .row-meta    { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
