/* Portale MYT — cornice Dashboard (approvata 20/11/2026), pagina di accesso e pagine di servizio.
   Colori, caratteri e misure vengono solo dal design system MYT (tokens dell'11/11/2026).
   Caratteri ospitati qui (OFL): nessuna richiesta a servizi esterni. */

@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/fraunces-latin-400-normal.15ccd91d7a8f.woff2") format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/fraunces-latin-500-normal.2285bacdef39.woff2") format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/fraunces-latin-400-italic.b02d32cd59dc.woff2") format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.da03732a27e1.woff2") format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500-normal.51205681a1ba.woff2") format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.2ede57db1a3a.woff2") format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.8ca0a5155296.woff2") format('woff2'); }

:root {
  --myt-dark: #11545B;
  --myt-strong: #000000;
  --myt-body: #565656;
  --myt-bg: #F0F0F0;
  --myt-white: #FFFFFF;
  --myt-line: #CFCFCF;
  --myt-cta: #FFB841;
  --myt-error: #CB0000;
  --myt-display: 'Fraunces', Georgia, serif;
  --myt-text: 'Inter', -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --myt-sidebar-w: 248px;
  --myt-topbar-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--myt-bg);
  color: var(--myt-body);
  font-family: var(--myt-text);
  font-size: 18px;
  line-height: 30px;
}

/* Salto al contenuto: si vede solo da tastiera */
.myt-salta {
  position: absolute; left: 8px; top: -64px; z-index: 20;
  padding: 12px 16px; background: var(--myt-white); color: var(--myt-strong);
  border: 1.5px solid var(--myt-dark); border-radius: 6px;
  font-size: 16px; line-height: 24px; font-weight: 600; text-decoration: none;
}
.myt-salta:focus { top: 8px; }

/* ---------- Cornice ---------- */
#myt-app {
  display: flex;
  min-height: 100vh; min-height: 100dvh;
  background: var(--myt-bg);
}

/* Menu laterale (desktop) */
#myt-sidebar {
  flex: 0 0 var(--myt-sidebar-w);
  width: var(--myt-sidebar-w);
  position: sticky; top: 0; align-self: flex-start;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  padding: 32px 16px 24px;
  background: var(--myt-white);
  border-right: 1px solid var(--myt-line);
  overflow-y: auto;
}
#myt-app .myt-brand { padding: 0 12px 32px; }
#myt-app .myt-brand img { display: block; width: 56px; height: 56px; object-fit: contain; margin: 0 0 12px; }
#myt-app .myt-wordmark {
  font-family: var(--myt-display); font-weight: 500; font-size: 22px; line-height: 28px;
  color: var(--myt-dark); letter-spacing: 0;
}
#myt-app .myt-brand .myt-wordmark { display: block; }
#myt-app .myt-wordmark sup { font-size: 10px; line-height: 0; vertical-align: super; margin-left: 2px; }

#myt-app .myt-nav { list-style: none; margin: 0; padding: 0; }
#myt-app .myt-nav li { margin: 0 0 4px; padding: 0; }
#myt-app .myt-nav form { margin: 0; }
#myt-app .myt-nav-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--myt-line); }

#myt-app .myt-voce {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 0; min-height: 44px;
  padding: 10px 16px;
  background: transparent; border: 0; border-radius: 6px; box-shadow: none;
  font-family: var(--myt-text); font-size: 16px; line-height: 24px; font-weight: 500;
  letter-spacing: 0; text-transform: none; text-align: left; text-decoration: none; white-space: normal;
  color: var(--myt-body);
  -webkit-appearance: none; appearance: none;
}
#myt-app a.myt-voce, #myt-app button.myt-voce { cursor: pointer; }
#myt-app .myt-ico { flex: 0 0 20px; width: 20px; height: 20px; display: block; color: inherit; }
#myt-app .myt-voce.is-active .myt-ico { color: var(--myt-dark); }
#myt-app a.myt-voce:hover, #myt-app button.myt-voce:hover { background: var(--myt-bg); color: var(--myt-strong); }
#myt-app .myt-voce.is-active {
  background: var(--myt-bg); color: var(--myt-strong); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--myt-dark);
}
#myt-app .myt-voce.is-soon { cursor: default; padding-top: 6px; padding-bottom: 6px; }
#myt-app .myt-voce-testo { display: flex; flex-direction: column; min-width: 0; }
#myt-app .myt-voce-testo > span:first-child { align-self: flex-start; }
#myt-app .myt-presto { display: block; font-size: 13px; line-height: 16px; font-weight: 400; color: var(--myt-body); }
#myt-app .myt-voce:focus-visible,
#myt-app #myt-menu-btn:focus-visible { outline: 2px solid var(--myt-dark); outline-offset: 2px; }

/* Contenuto */
#myt-content { flex: 1 1 auto; min-width: 0; padding: 56px 48px 96px; background: var(--myt-bg); }
#myt-content:focus { outline: none; }
.myt-colonna { max-width: 760px; }

.myt-h1 {
  margin: 0 0 16px;
  font-family: var(--myt-display); font-weight: 400; font-size: 40px; line-height: 52px;
  color: var(--myt-strong);
}
.myt-lead { margin: 0 0 24px; font-size: 20px; line-height: 32px; color: var(--myt-body); }
.myt-testo { margin: 0 0 16px; font-size: 18px; line-height: 30px; color: var(--myt-body); }

/* Barra in alto e fondale: nascosti su desktop */
#myt-topbar, #myt-backdrop { display: none; }

/* Telefono e tablet in verticale: la barra sostituisce il menu fisso */
@media (max-width: 960px) {
  #myt-app { flex-direction: column; }

  #myt-topbar {
    display: flex; align-items: center; gap: 12px; flex: 0 0 var(--myt-topbar-h);
    position: sticky; top: 0; z-index: 5;
    height: var(--myt-topbar-h); padding: 0 16px;
    background: var(--myt-white); border-bottom: 1px solid var(--myt-line);
  }
  #myt-topbar img { width: 32px; height: 32px; object-fit: contain; display: block; }
  #myt-topbar .myt-wordmark { flex: 1 1 auto; font-size: 18px; line-height: 24px; }
  #myt-app #myt-menu-btn {
    flex: 0 0 auto; min-height: 44px; min-width: 76px; margin: 0; padding: 8px 16px;
    background: var(--myt-white); color: var(--myt-dark);
    border: 1.5px solid var(--myt-dark); border-radius: 6px; box-shadow: none;
    font-family: var(--myt-text); font-size: 16px; line-height: 24px; font-weight: 600;
    letter-spacing: 0; text-transform: none; cursor: pointer;
    -webkit-appearance: none; appearance: none;
  }
  #myt-app #myt-menu-btn:hover { background: var(--myt-bg); color: var(--myt-dark); }

  #myt-sidebar {
    position: fixed; top: var(--myt-topbar-h); bottom: 0; left: 0; z-index: 4;
    width: min(86vw, 320px); flex: none; height: auto; align-self: auto;
    padding: 16px 16px 24px;
    visibility: hidden; transform: translateX(-100%);
    transition: transform .25s ease, visibility 0s linear .25s;
  }
  #myt-app.is-menu-open #myt-sidebar { visibility: visible; transform: none; transition: transform .25s ease; }
  #myt-app .myt-brand { display: none; }

  #myt-app.is-menu-open #myt-backdrop {
    display: block; position: fixed; top: var(--myt-topbar-h); right: 0; bottom: 0; left: 0; z-index: 3;
    background: rgba(0, 0, 0, .4);
  }
  #myt-content { flex: 1 1 auto; width: 100%; padding: 24px 24px 56px; }
}
@media (max-width: 960px) and (prefers-reduced-motion: reduce) {
  #myt-sidebar, #myt-app.is-menu-open #myt-sidebar { transition: none; }
}

/* ---------- Pagine senza cornice: accesso, accesso sospeso, errori ---------- */
body.myt-ospite {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; min-height: 100dvh; padding: 24px;
}
.myt-scheda {
  width: 100%; max-width: 440px;
  padding: 24px;
  background: var(--myt-white);
  border: 1px solid var(--myt-line); border-radius: 12px;
  text-align: center;
}
@media (min-width: 521px) { .myt-scheda { padding: 48px; } }
.myt-scheda-logo { display: block; width: 96px; height: 96px; object-fit: contain; margin: 0 auto 24px; }
.myt-titolo-scheda {
  margin: 0 0 24px;
  font-family: var(--myt-display); font-weight: 400; font-size: 28px; line-height: 36px;
  color: var(--myt-strong);
}
.myt-testo-scheda { margin: 0 0 24px; font-size: 18px; line-height: 30px; color: var(--myt-body); }
.myt-link {
  color: var(--myt-dark); font-size: 16px; line-height: 24px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
}
.myt-link:focus-visible { outline: 2px solid var(--myt-dark); outline-offset: 2px; }

.myt-scheda form { text-align: left; }
.myt-campo { margin: 0 0 24px; }
.myt-campo label {
  display: block; margin: 0 0 8px;
  font-size: 14px; line-height: 20px; font-weight: 500; color: var(--myt-strong);
}
.myt-input {
  display: block; width: 100%; min-height: 48px; margin: 0; padding: 8px 16px;
  background: var(--myt-white); color: var(--myt-strong);
  border: 1.5px solid var(--myt-body); border-radius: 4px; box-shadow: none;
  font-family: var(--myt-text); font-size: 16px; line-height: 24px; font-weight: 400;
  -webkit-appearance: none; appearance: none;
}
.myt-input:focus { outline: 2px solid var(--myt-dark); outline-offset: 2px; border-color: var(--myt-dark); }
.myt-input[aria-invalid="true"] { border-color: var(--myt-error); }
.myt-errore { margin: 0 0 16px; font-size: 16px; line-height: 24px; color: var(--myt-error); }
.myt-campo .myt-errore { margin: 8px 0 0; }

/* L'unica call to action della pagina */
.myt-cta {
  display: block; width: 100%; min-height: 56px; margin: 0; padding: 16px;
  background: var(--myt-cta); color: var(--myt-strong);
  border: 0; border-radius: 6px; box-shadow: none;
  font-family: var(--myt-text); font-size: 22px; line-height: 28px; font-weight: 700;
  letter-spacing: 0; text-transform: none; text-align: center; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.myt-cta:hover { box-shadow: inset 0 0 0 2px var(--myt-dark); }
.myt-cta:focus-visible { outline: 2px solid var(--myt-dark); outline-offset: 2px; }
