/* =============================================================
   Authelia → Infosyscap "Clerkly" skin v4.1
   Palette ricavata da www.infosyscap.net (sezione #contatti
   in index.html, classi .contact-form-card / .cf-input).
   ============================================================= */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/_skin/fonts/QGYvz_MVcBeNP4NJtEtq.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/_skin/fonts/QGYvz_MVcBeNP4NJuktqQ4E.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --cp:        #7c4dff;
  --cp-hover:  #6835e8;
  --cp-soft:   #ede7ff;
  --cp-bg:     #f3efff;
  --green:     #2e7d32;
  --green-soft:#e8f5e9;
  --ink:       #1a1a2e;
  --ink-mid:   #555;
  --ink-soft:  #888;
  --bg:        #f4f3fb;
  --input-bg:  #fafafa;
  --border:    #e5e5ee;
}

/* ── Body / sfondo ───────────────────────────────────────── */
html, body {
  background: var(--bg) !important;
  color: var(--ink) !important;
  min-height: 100vh;
  margin: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", sans-serif !important;
  overflow-x: hidden;
}
#root,
#root *,
.MuiTypography-root,
.MuiButton-root,
.MuiInputBase-input,
.MuiInputLabel-root,
.MuiFormLabel-root,
.MuiFormControlLabel-label,
.MuiLink-root,
input, button, textarea, select, label {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", sans-serif !important;
}
body[data-theme] { background-color: transparent !important; }

#root,
#root > div,
#root > div > div,
#root .MuiContainer-root,
#root .MuiBox-root,
#root .MuiGrid-root,
#root .MuiGrid2-root {
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}
#root { position: relative; z-index: 1; min-height: 100vh; }
#root header.MuiAppBar-root,
#root .MuiPaper-root.MuiAppBar-root { display: none !important; }
#root > div.hidden { display: none !important; }

/* ── Stage centratura ─────────────────────────────────────── */
#root [id$="-stage"] {
  min-height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}
#root [id$="-stage"] .MuiContainer-root {
  width: 100% !important;
  max-width: 460px !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  padding: 0 !important;
}

/* ── Card: bianca, radius 24, ombra accentuata ───────────── */
#root [id$="-stage"] .MuiContainer-root > .MuiGrid2-container {
  position: relative;
  z-index: 2;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  background: #ffffff !important;
  border: none !important;
  border-radius: 24px !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35) !important;
  padding: 32px 36px 26px !important;
  color: var(--ink) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  animation: clkCardIn 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}
#root [id$="-stage"] .MuiContainer-root > .MuiGrid2-grid-xs-12 {
  margin-top: 14px !important;
  text-align: center !important;
}
#root [id$="-stage"] .MuiContainer-root > .MuiGrid2-grid-xs-12 a {
  font-size: 0.72rem !important;
  color: var(--ink-soft) !important;
  opacity: 0.75;
}
@keyframes clkCardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Brand block ──────────────────────────────────────────── */
.clerkly-brand { text-align: center; margin: -2px 0 8px; }
.clerkly-brand img { width: 44px; height: 44px; }
.clerkly-brand .b-name {
  font-size: 1.2rem; font-weight: 800; color: var(--cp);
  margin-top: 4px; letter-spacing: -0.01em;
}
.clerkly-brand .b-tag { font-size: 0.72rem; color: var(--ink-soft); margin-top: 1px; }

/* ── Tipografia ───────────────────────────────────────────── */
.MuiTypography-root,
.MuiTypography-h5,
.MuiTypography-h6,
.MuiTypography-subtitle1,
.MuiTypography-subtitle2,
.MuiFormLabel-root,
.MuiInputLabel-root,
.MuiFormHelperText-root,
.MuiCheckbox-root + span,
label {
  color: var(--ink) !important;
}
.MuiTypography-h5,
.MuiTypography-h6 {
  font-weight: 800 !important;
  font-size: 1.15rem !important;
  text-align: center;
  color: var(--ink) !important;
  margin: 4px 0 8px !important;
}
.MuiTypography-subtitle1,
.MuiTypography-subtitle2 {
  color: var(--ink-soft) !important;
  font-size: 0.82rem !important;
  text-align: center;
}

/* ── Input full-width ─────────────────────────────────────── */
#root [id$="-stage"] form,
#root [id$="-stage"] .MuiBox-root,
#root [id$="-stage"] .MuiTextField-root,
#root [id$="-stage"] .MuiFormControl-root,
#root [id$="-stage"] .MuiInputBase-root,
#root [id$="-stage"] .MuiOutlinedInput-root {
  width: 100% !important;
  max-width: 100% !important;
}
#root [id$="-stage"] .MuiGrid2-container > .MuiGrid2-root,
#root [id$="-stage"] .MuiGrid2-container > div:not(.clerkly-brand):not(.clerkly-reset-row):not(.clerkly-signup-row) {
  width: 100% !important;
  flex-basis: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ── Input fields stile cf-input ──────────────────────────── */
.MuiOutlinedInput-root,
.MuiFilledInput-root,
.MuiInput-root {
  background: var(--input-bg) !important;
  border-radius: 10px !important;
  color: var(--ink) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}
.MuiOutlinedInput-notchedOutline {
  border: 1.5px solid var(--border) !important;
  border-radius: 10px !important;
}
.MuiOutlinedInput-root.Mui-focused {
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.1) !important;
}
.MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline,
.MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline {
  border-color: var(--cp) !important;
  border-width: 1.5px !important;
}
.MuiOutlinedInput-root.Mui-error .MuiOutlinedInput-notchedOutline {
  border-color: #c62828 !important;
}
.MuiInputBase-input {
  font-size: 0.9rem !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  color: var(--ink) !important;
}
.MuiInputBase-input::placeholder {
  color: #aaa !important;
  opacity: 1;
}
.MuiInputLabel-root {
  font-size: 0.9rem !important;
  color: var(--ink-mid) !important;
  font-weight: 500 !important;
}
.MuiInputLabel-root.Mui-focused { color: var(--cp) !important; }
.MuiInputLabel-outlined:not(.MuiInputLabel-shrink) {
  transform: translate(14px, 11px) scale(1) !important;
}
.MuiInputLabel-shrink {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  transform: translate(14px, -7px) scale(0.85) !important;
  background: #fff !important;
  padding: 0 6px !important;
  margin-left: -2px;
  border-radius: 4px;
}
.MuiOutlinedInput-notchedOutline legend { max-width: 100% !important; }
.MuiOutlinedInput-notchedOutline legend > span {
  padding-left: 6px !important;
  padding-right: 6px !important;
  display: inline-block !important;
}

/* ── Pulsanti stile cf-submit ─────────────────────────────── */
.MuiButton-root {
  text-transform: none !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  letter-spacing: 0 !important;
  font-size: 0.95rem !important;
  padding: 11px 16px !important;
}
.MuiButton-contained,
.MuiButton-containedPrimary {
  background: var(--cp) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: none !important;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
}
.MuiButton-contained:hover,
.MuiButton-containedPrimary:hover {
  background: var(--cp-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 77, 255, 0.35) !important;
}
.MuiButton-text,
.MuiButton-outlined {
  color: var(--cp) !important;
  border-color: var(--cp-soft) !important;
}
.MuiButton-text:hover,
.MuiButton-outlined:hover {
  background: var(--cp-bg) !important;
  border-color: var(--cp) !important;
}

/* ── Link ─────────────────────────────────────────────────── */
a, .MuiLink-root {
  color: var(--cp) !important;
  text-decoration: none !important;
}
a:hover, .MuiLink-root:hover { text-decoration: underline !important; }

/* ── Checkbox / Radio ─────────────────────────────────────── */
.MuiCheckbox-root.Mui-checked,
.MuiRadio-root.Mui-checked { color: var(--cp) !important; }
.MuiFormControlLabel-label { font-size: 0.84rem !important; color: var(--ink-mid) !important; }
.MuiCheckbox-root svg { width: 18px !important; height: 18px !important; }

/* ── Alert (allineato a cf-alert) ─────────────────────────── */
.MuiAlert-root {
  border-radius: 10px !important;
  border: 1px solid;
  font-size: 0.88rem !important;
}
.MuiAlert-standardError {
  background: #fff0f0 !important;
  border-color: #ffcdd2 !important;
  color: #c62828 !important;
}
.MuiAlert-standardWarning {
  background: #fff8e1 !important;
  border-color: #ffe082 !important;
  color: #ef6c00 !important;
}
.MuiAlert-standardSuccess {
  background: #edf7ed !important;
  border-color: #c8e6c9 !important;
  color: var(--green) !important;
}

/* ── Progress / loader ───────────────────────────────────── */
.MuiCircularProgress-circle,
.MuiCircularProgress-svg { color: var(--cp) !important; stroke: var(--cp) !important; }
.MuiLinearProgress-bar { background: var(--cp) !important; }

/* ── Footer caption ──────────────────────────────────────── */
footer, .MuiTypography-caption {
  color: var(--ink-soft) !important;
  text-align: center;
}

/* ── Reset password link ─────────────────────────────────── */
a.clerkly-reset-link,
.MuiLink-root.clerkly-reset-link {
  display: inline !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: none !important;
  color: var(--cp) !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  letter-spacing: 0 !important;
}
a.clerkly-reset-link:hover,
.MuiLink-root.clerkly-reset-link:hover {
  text-decoration: underline !important;
  background: none !important;
  transform: none !important;
}
.clerkly-reset-row {
  display: flex !important;
  width: 100% !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  text-align: center !important;
}

/* ── Signup link sotto la card ───────────────────────────── */
.clerkly-signup-row {
  display: block !important;
  width: 100% !important;
  flex: 1 0 100% !important;
  flex-basis: 100% !important;
  grid-column: 1 / -1 !important;
  box-sizing: border-box !important;
  text-align: center !important;
  font-size: 0.78rem !important;
  color: var(--ink-soft) !important;
  margin: 12px 0 0 !important;
  padding: 10px 0 0 !important;
  border-top: 1px solid var(--border) !important;
}
.clerkly-signup-row .clerkly-signup-link {
  color: var(--cp) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  margin-left: 4px !important;
}
.clerkly-signup-row .clerkly-signup-link:hover { text-decoration: underline !important; }

/* ── Default logo ─────────────────────────────────────────── */
img[alt="Logo"], img[alt="logo"],
img[src*="logo.png"], img[src*="logo.svg"] {
  max-width: 56px;
  height: auto;
}
