/* Peter AI - account: pagine di accesso (au-*) e Impostazioni (st-*). Blocco B6.
   Si carica DOPO app.css (token e font) e, nello shell, dopo shell.css. Niente colori propri: solo i token del design system
   (--action bianco su fondo pieno, --c-ring per focus, --c-danger per errori). Nessun giallo, nessun indaco. */

.au-sr, .st-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ======================= pagine di accesso ======================= */
.au-body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--c-bg); color: var(--c-text); font-family: var(--font-text); }
.au-top { display: flex; justify-content: flex-end; padding: .75rem 1rem 0; }
.au-top .btn { border: 0; }
.au-box { width: 100%; max-width: 26rem; margin: 0 auto; padding: 1rem 1rem 3rem; }
.au-brand { display: flex; justify-content: center; margin: 1rem 0 2rem; }
.au-logo { display: block; width: 200px; max-width: 100%; height: auto; }
.au-gtech { display: flex; justify-content: center; margin-top: 1.5rem; opacity: .85; }
.au-gtech:hover { opacity: 1; }
.au-logo-dark { display: none; }
:root[data-theme='dark'] .au-logo-light { display: none; }
:root[data-theme='dark'] .au-logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) .au-logo-light { display: none; }
    :root:not([data-theme='light']) .au-logo-dark { display: block; }
}
.au-card h1 { font-family: var(--font-sans); font-size: 1.5rem; font-weight: 600; margin: 0 0 .5rem; }
.au-lead { margin: 0 0 1.5rem; color: var(--c-muted); font-size: .95rem; }
.au-form { display: flex; flex-direction: column; gap: 1rem; }
.au-field { display: flex; flex-direction: column; gap: .25rem; }
.au-field label { font-family: var(--font-sans); font-weight: 500; font-size: .875rem; }
.au-field .input { font-size: 1rem; }
.au-help { margin: 0; color: var(--c-muted); font-size: .8rem; }
.au-err { margin: 0; color: var(--c-danger); font-size: .85rem; font-weight: 500; }
.au-check { display: flex; align-items: flex-start; gap: .75rem; font-size: .9rem; line-height: 1.45; }
.au-check input { width: 1.25rem; height: 1.25rem; margin-top: .25rem; flex: none; accent-color: var(--action); }
.au-check label { font-weight: 400; font-family: var(--font-text); }
.au-submit { width: 100%; margin-top: .25rem; }
.au-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 1.5rem; font-size: .9rem; }
.au-links a, .au-card a:not(.btn), .au-foot a { color: var(--c-brand); text-underline-offset: 3px; }
.au-links a:hover, .au-card a:not(.btn):hover, .au-foot a:hover { color: var(--c-brand-hover); }
.au-links a, .au-foot a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.au-alert { padding: .75rem 1rem; border-radius: .625rem; border: 1px solid var(--c-border); background: var(--c-surface-2); font-size: .9rem; margin-bottom: 1.5rem; }
.au-alert.is-error { border-color: var(--c-danger); color: var(--c-danger); background: transparent; }
.au-alert.is-ok { border-color: var(--c-ok); color: var(--c-ok); background: transparent; }
.au-foot { display: flex; justify-content: center; flex-wrap: wrap; gap: .25rem 1.5rem; margin-top: 3rem; font-size: .8rem; }
.au-hide { display: none !important; }
.au-actions { display: flex; flex-direction: column; gap: .75rem; margin-top: 1.5rem; }
.au-mail { display: block; margin: 0 0 1.5rem; padding: .75rem 1rem; border: 1px solid var(--c-border); border-radius: .625rem; background: var(--c-surface-2); font-family: var(--font-sans); font-weight: 500; overflow-wrap: anywhere; }
.au-details { margin-top: 1.5rem; border-top: 1px solid var(--c-border); padding-top: .5rem; }
.au-details summary { cursor: pointer; display: flex; align-items: center; min-height: 2.75rem; color: var(--c-brand); font-family: var(--font-sans); font-size: .9rem; }
.au-details summary:hover { color: var(--c-brand-hover); }
.au-details[open] summary { margin-bottom: .75rem; }
.au-steps { margin: 1.5rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.au-steps li { display: flex; gap: .75rem; align-items: flex-start; }
.au-steps svg { flex: none; color: var(--c-ring); margin-top: .25rem; }
.au-steps strong { display: block; font-family: var(--font-sans); font-weight: 500; font-size: .95rem; }
.au-steps span { color: var(--c-muted); font-size: .9rem; }
.au-welcome-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }

/* ======================= impostazioni ======================= */
.st-head { margin: .5rem 0 1.5rem; }
.st-head h1 { font-size: 1.5rem; font-weight: 600; margin: 0; }
.st-head p { margin: .25rem 0 0; color: var(--c-muted); font-size: .95rem; }
.st-tabs { margin-bottom: 1.5rem; }
.st-body { max-width: none; }
.st-section { padding: 1.5rem 0; border-top: 1px solid var(--c-border); }
.st-section:first-child, .sh-tabs + .st-section, .st-flash + .st-section { border-top: 0; padding-top: 0; }
.st-section > h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 .25rem; }
.st-section > p.st-text { margin: 0 0 1rem; color: var(--c-muted); font-size: .92rem; }
.st-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }
.st-grid2 { display: grid; gap: 1rem 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .st-grid2 { grid-template-columns: 1fr 1fr; } }
.st-grid2 .is-full { grid-column: 1 / -1; }
.st-form { display: flex; flex-direction: column; gap: 1rem; }
.st-field { display: flex; flex-direction: column; gap: .25rem; }
.st-field > label, .st-field > .st-label { font-family: var(--font-sans); font-weight: 500; font-size: .875rem; }
.st-help { margin: 0; color: var(--c-muted); font-size: .8rem; }
.st-err { margin: 0; color: var(--c-danger); font-size: .85rem; font-weight: 500; }
.st-flash { margin-bottom: 1.5rem; }
.st-flash ul { margin: .25rem 0 0; padding-left: 1rem; list-style: disc; }
.st-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.st-muted { color: var(--c-muted); }
.st-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; word-break: break-all; }
.st-qr { display: inline-block; padding: .75rem; background: #fff; border: 1px solid var(--c-border); border-radius: .75rem; line-height: 0; }
.st-qr svg { width: 11rem; height: 11rem; }
.st-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: .5rem; margin: .75rem 0; padding: 0; list-style: none; }
.st-codes li { padding: .5rem .75rem; border: 1px solid var(--c-border); border-radius: .5rem; background: var(--c-surface-2); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; white-space: nowrap; overflow-x: auto; }
.st-status { display: inline-flex; align-items: center; gap: .5rem; }
.st-radio { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.st-radio label { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; font-weight: 400; font-family: var(--font-text); font-size: .95rem; }
.st-radio input { width: 1.15rem; height: 1.15rem; accent-color: var(--action); }
.st-switch { display: flex; align-items: flex-start; gap: .75rem; min-height: 2.75rem; padding: .25rem 0; }
.st-switch input { width: 1.25rem; height: 1.25rem; margin-top: .25rem; flex: none; accent-color: var(--action); }
.st-switch label { font-family: var(--font-text); font-weight: 400; font-size: .95rem; line-height: 1.4; }
.st-switch label small { display: block; color: var(--c-muted); font-size: .82rem; margin-top: .25rem; }
.st-abilities { display: grid; gap: .25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .st-abilities { grid-template-columns: 1fr 1fr; } }
.st-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--c-border); }
.st-list > li { display: flex; align-items: center; gap: .75rem 1rem; flex-wrap: wrap; padding: .75rem .25rem; border-bottom: 1px solid var(--c-border); min-height: 3.5rem; }
.st-list .st-grow { flex: 1 1 14rem; min-width: 0; }
.st-list .st-title { font-weight: 500; font-family: var(--font-sans); font-size: .95rem; overflow-wrap: anywhere; }
.st-list .st-meta { color: var(--c-muted); font-size: .85rem; }
.st-inline { display: inline; }
.st-inline-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.st-unread { font-weight: 600; }
.st-dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 999px; background: var(--c-ring); margin-right: .5rem; flex: none; }
.st-perms { display: grid; gap: .25rem; grid-template-columns: 1fr; margin: .5rem 0 .75rem; }
@media (min-width: 640px) { .st-perms { grid-template-columns: 1fr 1fr; } }
.st-table-wrap { overflow-x: auto; }
.st-danger { border: 1px solid color-mix(in srgb, var(--c-danger) 45%, var(--c-border)); border-radius: .75rem; padding: 1rem 1.5rem; }
.st-danger h2 { margin: 0 0 .25rem; font-size: 1.05rem; }
.st-blockers { margin: .5rem 0 1rem; padding-left: 1rem; list-style: disc; color: var(--c-danger); font-size: .92rem; }
.st-inline-pager nav { margin-top: 1rem; }

@media (max-width: 767.98px) {
    .st-tabs { margin-inline: -1rem; padding-inline: 1rem; }
}
.au-details .au-help { margin-bottom: .75rem; }
fieldset.st-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.st-field input[name='country'] { text-transform: uppercase; }
.st-form.is-narrow { max-width: 24rem; }
.sh-callout + .st-actions, .st-section > .st-actions { margin-top: 1rem; }
.st-row .st-text { margin-bottom: 0 !important; }
.st-inline-form .input { width: auto; min-width: 12rem; }
select.input { padding-right: 2rem; }
.st-field.is-narrow { max-width: 20rem; }
.st-section > p.st-text + form.st-inline-form { margin-top: 0; }
form.st-form[action*='/invitations'] { margin-top: 1rem; }
.st-section > h2 + form, .st-section > h2 + .st-form { margin-top: .75rem; }
.au-links .btn-text { padding-left: 0; }
.st-list a.st-title { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--c-brand); text-decoration: none; }
.st-list a.st-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.st-section > p { margin-top: 0; margin-bottom: .75rem; }
.st-section > h1 { font-size: 1.5rem; font-weight: 600; margin: 0 0 .75rem; }
