/* =========================================================
   TPM System: the marketing site's header and logo on the app's guest pages (login, register, password reset, 2FA).
   Since 25 Nov 2026. Lives in the app at public/assets/css/guest-header.css, loaded by
   resources/views/layouts/guest.blade.php (source: laravel/ in the marketing repo).
   Every rule is scoped to .tpm-gh / .tpm-gh-brand, because the guest pages also load Bootstrap, the old template's
   main.css and Tailwind, and none of them should change it.
   Same look as the header in style.css (colours, sizes, breakpoint 1024px).
   ========================================================= */
.tpm-gh, .tpm-gh *, .tpm-gh-brand, .tpm-gh-brand * { box-sizing: border-box; }
.tpm-gh {
  --ink: #0f1a2e; --ink-2: #2c3a52; --line: #e2e8f1; --soft: #f4f7fc; --blue: #2457e6; --blue-700: #1a43bd; --blue-100: #dbe5ff;
  --shadow: 0 2px 4px rgb(15 26 46 / .04), 0 12px 32px -8px rgb(15 26 46 / .16);
  position: sticky; top: 0; z-index: 1030; height: 64px;
  background: rgb(255 255 255 / .92); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.5; color: var(--ink);
}
.tpm-gh-in { max-width: 1232px; height: 100%; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 12px; }
.tpm-gh a { text-decoration: none; }
.tpm-gh ul { list-style: none; margin: 0; padding: 0; }
.tpm-gh .ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* the logo: the round check mark and the name, as on the marketing site */
.tpm-gh .tpm-gh-logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-right: auto; white-space: nowrap; color: var(--ink); font-weight: 800; font-size: 1.1875rem; letter-spacing: -0.02em; }
.tpm-gh .tpm-gh-logo:hover { color: var(--ink); }
.tpm-gh .brand-mark { width: 34px; height: 34px; flex: none; }

/* buttons */
.tpm-gh .tpm-gh-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1.5px solid transparent;
  font-weight: 700; font-size: .9375rem; white-space: nowrap; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .2s; }
.tpm-gh .tpm-gh-btn--primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px -8px rgb(36 87 230 / .6); }
.tpm-gh .tpm-gh-btn--primary:hover { background: var(--blue-700); color: #fff; transform: translateY(-1px); }
.tpm-gh .tpm-gh-btn--ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.tpm-gh .tpm-gh-btn--ghost:hover, .tpm-gh .tpm-gh-btn--ghost[aria-current="page"] { border-color: var(--ink-2); color: var(--ink); }

/* phones and tablets: the menu opens below the bar */
.tpm-gh-toggle { display: inline-grid; place-items: center; width: 48px; height: 48px; margin-right: -6px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer; }
.tpm-gh-toggle .ic { width: 26px; height: 26px; }
.tpm-gh-toggle[aria-expanded="true"] .i-open, .tpm-gh-toggle[aria-expanded="false"] .i-close { display: none; }
.tpm-gh-nav { position: fixed; top: 64px; left: 0; right: 0; z-index: 1029; max-height: calc(100dvh - 64px); overflow: auto; padding: 8px 16px 20px;
  background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s; }
.tpm-gh-nav.is-open { opacity: 1; visibility: visible; transform: none; }
.tpm-gh-nav > ul > li > a, .tpm-gh-parent > a { display: flex; align-items: center; min-height: 52px; padding: 0 4px; color: var(--ink); font-weight: 600; font-size: 1rem; border-bottom: 1px solid var(--line); }
.tpm-gh-nav a:hover { color: var(--blue); }
.tpm-gh-sub-li { border-bottom: 1px solid var(--line); }
.tpm-gh-parent { display: flex; align-items: center; }
.tpm-gh-parent > a { flex: 1; border-bottom: 0; }
.tpm-gh-subtoggle { display: none; }
.tpm-gh-sub { margin: -4px 0 12px 6px !important; padding-left: 12px !important; border-left: 2px solid var(--blue-100); }
.tpm-gh-sub a { display: flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: .9375rem; color: var(--ink-2); }
.tpm-gh-actions { display: grid; gap: 10px; margin-top: 16px; }
.tpm-gh-actions .tpm-gh-btn { min-height: 48px; }
.tpm-gh .tpm-gh-cta { padding: 0 14px; }
@media (max-width: 389px) { .tpm-gh .tpm-gh-logo { font-size: 1.0625rem; gap: 8px; } .tpm-gh .brand-mark { width: 30px; height: 30px; } }

/* computers: everything in the bar, sectors in a small panel under "Per chi è" */
@media (min-width: 1024px) {
  .tpm-gh-toggle, .tpm-gh .tpm-gh-cta { display: none !important; }
  .tpm-gh .tpm-gh-logo { margin-right: 0; }
  .tpm-gh-nav { position: static; display: flex; align-items: center; gap: 28px; flex: 1; max-height: none; overflow: visible; padding: 0;
    background: transparent; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
  .tpm-gh-nav > ul { display: flex; gap: 2px; margin-inline: auto; }
  .tpm-gh-nav > ul > li > a, .tpm-gh-parent > a { min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; font-size: .9375rem; color: var(--ink-2); }
  .tpm-gh-nav > ul > li > a:hover { background: var(--soft); color: var(--ink); }
  .tpm-gh-sub-li { position: relative; border: 0; }
  .tpm-gh-parent { border-radius: 10px; transition: background-color .15s; }
  .tpm-gh-parent > a { padding-right: 4px; }
  .tpm-gh-parent > a:hover { background: transparent; color: var(--ink); }
  .tpm-gh-subtoggle { display: inline-grid; place-items: center; width: 26px; height: 44px; margin-left: -2px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; }
  .tpm-gh-subtoggle .ic { width: 16px; height: 16px; transition: transform .2s; }
  .tpm-gh-sub-li:hover .tpm-gh-parent, .tpm-gh-sub-li.is-open .tpm-gh-parent { background: var(--soft); }
  .tpm-gh-sub-li:hover .tpm-gh-subtoggle .ic, .tpm-gh-sub-li.is-open .tpm-gh-subtoggle .ic { transform: rotate(180deg); }
  .tpm-gh-sub-li::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
  .tpm-gh-sub { position: absolute; top: calc(100% + 8px); left: -8px; z-index: 1031; display: grid; gap: 2px; min-width: 250px; margin: 0 !important; padding: 8px !important;
    border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .18s, transform .18s, visibility .18s; }
  .tpm-gh-sub-li:hover .tpm-gh-sub, .tpm-gh-sub-li.is-open .tpm-gh-sub, .tpm-gh-sub-li:focus-within .tpm-gh-sub { opacity: 1; visibility: visible; transform: none; }
  .tpm-gh-sub a { padding: 0 12px; border-radius: 10px; white-space: nowrap; }
  .tpm-gh-sub a:hover { background: var(--soft); color: var(--ink); }
  .tpm-gh-actions { display: flex; gap: 8px; margin: 0; }
  .tpm-gh-actions .tpm-gh-btn { min-height: 44px; }
}

/* ---------- The guest pages themselves (25 Nov 2026 redesign): form card + brand panel ---------- */
.tpm-auth, .tpm-auth * { box-sizing: border-box; }
.tpm-auth {
  --ink: #0f1a2e; --ink-2: #2c3a52; --muted: #586379; --line: #e2e8f1; --soft: #f4f7fc; --blue: #2457e6; --blue-700: #1a43bd; --blue-50: #edf2ff; --blue-100: #dbe5ff;
  --red-ink: #b42318;
  min-height: calc(100vh - 64px); padding: 24px 16px 48px;
  background: radial-gradient(60rem 30rem at 0% 0%, #dfe8ff 0%, transparent 60%), radial-gradient(50rem 30rem at 100% 100%, #e3f6ee 0%, transparent 55%), var(--soft);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); line-height: 1.5;
}
.tpm-auth-grid { max-width: 1080px; margin: 0 auto; display: grid; gap: 24px; }
.tpm-auth-card { width: 100%; max-width: 480px; margin: 0 auto; padding: 28px 22px; border-radius: 24px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 2px 4px rgb(15 26 46 / .04), 0 24px 48px -20px rgb(15 26 46 / .22); }

/* headings and text inside the card */
.tpm-auth-card .tpm-auth-head { margin-bottom: 22px; }
.tpm-auth-card .tpm-auth-eyebrow { display: inline-flex; margin: 0 0 10px; padding: 4px 12px; border-radius: 999px; background: var(--blue-50); color: var(--blue); font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.tpm-auth-card h1, .tpm-auth-card h2 { margin: 0 0 6px; font-family: inherit; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; color: var(--ink); }
.tpm-auth-card p { margin: 0; color: var(--muted); font-size: .9375rem; }
.tpm-auth-card a { color: var(--blue); font-weight: 700; text-decoration: none; }
.tpm-auth-card a:hover { color: var(--blue-700); text-decoration: underline; }

/* fields: also styles the Breeze components (x-input-label, x-text-input) used by the other guest pages */
.tpm-auth-card .tpm-field { margin-top: 16px; }
.tpm-auth-card label:not(.tpm-check) { display: block; margin-bottom: 6px; color: var(--ink-2) !important; font-size: .875rem !important; font-weight: 700 !important; }
.tpm-auth-card input:not([type="checkbox"]):not([type="hidden"]) {
  display: block; width: 100%; height: 52px; margin-top: 0; padding: 0 16px; border: 1.5px solid var(--line) !important; border-radius: 12px !important; background: #fff;
  color: var(--ink); font: inherit; font-size: 1rem; box-shadow: none !important; transition: border-color .15s, box-shadow .15s; }
.tpm-auth-card input:not([type="checkbox"]):not([type="hidden"])::placeholder { color: #98a2b3; }
.tpm-auth-card input:not([type="checkbox"]):not([type="hidden"]):focus { outline: 0; border-color: var(--blue) !important; box-shadow: 0 0 0 4px var(--blue-100) !important; }
.tpm-auth-card input[aria-invalid="true"] { border-color: #f04438 !important; }
.tpm-auth-card ul.text-red-600 { margin: 6px 0 0; padding: 0; list-style: none; color: var(--red-ink) !important; font-size: .8125rem; font-weight: 600; }

/* password with a show / hide button */
.tpm-auth-card .tpm-pass { position: relative; }
.tpm-auth-card .tpm-pass input { padding-right: 52px; }
.tpm-auth-card .tpm-eye { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.tpm-auth-card .tpm-eye:hover { background: var(--soft); color: var(--ink); }
.tpm-auth-card .tpm-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tpm-auth-card .tpm-eye[aria-pressed="true"] .eye-open, .tpm-auth-card .tpm-eye[aria-pressed="false"] .eye-shut { display: none; }

/* a field with a button beside it (email + "Invia codice") */
.tpm-auth-card .tpm-inline { display: flex; gap: 8px; }
.tpm-auth-card .tpm-inline input { flex: 1; min-width: 0; }
.tpm-auth-card .tpm-inline .tpm-btn { flex: none; min-height: 52px; padding: 0 16px; }

/* remember me + forgot password */
.tpm-auth-card .tpm-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin-top: 12px; }
.tpm-auth-card .tpm-check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; color: var(--ink-2); font-size: .9375rem; font-weight: 600; cursor: pointer; }
.tpm-auth-card .tpm-check input { width: 20px; height: 20px; margin: 0; border-radius: 6px; accent-color: var(--blue); }
.tpm-auth-card .tpm-row a { font-size: .9375rem; }

/* buttons: also the Breeze ones (x-primary-button) on the other guest pages */
.tpm-auth-card .tpm-btn, .tpm-auth-card button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border: 1.5px solid transparent; border-radius: 14px;
  background: var(--blue) !important; color: #fff !important; font: inherit; font-size: 1rem !important; font-weight: 700 !important; letter-spacing: 0 !important; text-transform: none !important;
  box-shadow: 0 8px 20px -8px rgb(36 87 230 / .6); cursor: pointer; transition: background-color .2s, transform .2s, opacity .2s; }
.tpm-auth-card .tpm-btn:hover, .tpm-auth-card button[type="submit"]:hover { background: var(--blue-700) !important; transform: translateY(-1px); }
.tpm-auth-card .tpm-btn:disabled, .tpm-auth-card button[type="submit"]:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.tpm-auth-card .tpm-btn--ghost { background: #fff !important; color: var(--ink) !important; border-color: var(--line); box-shadow: none; }
.tpm-auth-card .tpm-btn--ghost:hover { background: var(--soft) !important; border-color: var(--ink-2); }
.tpm-auth-card .tpm-btn--block { width: 100%; margin-top: 22px; }
.tpm-auth-card .tpm-hint { margin-top: 8px; font-size: .8125rem; color: var(--muted); }
.tpm-auth-card .tpm-hint.is-ok { color: #0a7550; font-weight: 600; }
.tpm-auth-card .tpm-hint.is-error { color: var(--red-ink); font-weight: 600; }

/* boxes: status (green) and the summary of errors (red) */
.tpm-auth-card .tpm-note { margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; font-size: .875rem; font-weight: 600; }
.tpm-auth-card .tpm-note--ok { background: #e6f7f0; color: #0a7550; }
.tpm-auth-card .tpm-note--error { margin: 18px 0 0; background: #fef3f2; color: var(--red-ink); }
.tpm-auth-card .tpm-note--error ul { margin: 0; padding-left: 18px; }

/* the line under the form ("Non hai ancora un account? ...") */
.tpm-auth-card .tpm-auth-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; font-size: .9375rem; }

/* the dark panel: computers only */
.tpm-auth-side { display: none; }
@media (min-width: 560px) { .tpm-auth-card { padding: 40px 40px 36px; } .tpm-auth { padding-top: 48px; } }
@media (min-width: 1024px) {
  .tpm-auth { display: flex; align-items: center; padding: 56px 24px; }
  .tpm-auth-grid { width: 100%; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; gap: 0; border-radius: 28px; overflow: hidden;
    box-shadow: 0 30px 80px -24px rgb(25 55 140 / .35), 0 8px 24px -12px rgb(15 26 46 / .18); background: #fff; }
  .tpm-auth-card { max-width: none; margin: 0; padding: 56px 56px 48px; border: 0; border-radius: 0; box-shadow: none; display: flex; flex-direction: column; justify-content: center; }
  .tpm-auth-side { position: relative; display: block; overflow: hidden; min-height: 600px; padding: 56px 48px 0; color: #fff;
    background: radial-gradient(40rem 24rem at 100% 0%, rgb(36 87 230 / .55), transparent 60%), radial-gradient(30rem 20rem at 0% 100%, rgb(24 180 125 / .35), transparent 60%), #0f1a2e; }
  .tpm-auth-pill { display: inline-flex; margin: 0 0 18px; padding: 6px 14px; border-radius: 999px; background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .18); color: #dbe5ff; font-size: .8125rem; font-weight: 700; }
  .tpm-auth-side h2 { margin: 0 0 22px; font-family: inherit; font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; color: #fff; }
  .tpm-auth-side h2 em { font-style: normal; color: #7fa2ff; }
  .tpm-auth-side ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
  .tpm-auth-side li { display: flex; gap: 12px; align-items: flex-start; color: #c9d3e6; font-size: .9375rem; font-weight: 500; }
  .tpm-auth-side li span { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #18b47d; color: #fff; font-size: .75rem; font-weight: 800; }
  /* the phone stands at the bottom of the panel, cut by its edge, so the panel stays as tall as the form */
  .tpm-auth-side img { position: absolute; left: 50%; bottom: 0; width: 46%; max-width: 250px; height: auto; transform: translate(-50%, 46%); filter: drop-shadow(0 30px 40px rgb(0 0 0 / .45)); }
}
