/* PragaWeb – area clienti */
:root {
  --c-primary: #640190; --c-secondary: #4200BC; --c-ink: #1A0B2E; --c-paper: #FBFAFE; --c-surface: #F1EAFB; --c-deep: #2B0748;
  --f-display: system-ui, sans-serif; --f-body: system-ui, sans-serif; --w-display: 500; --fs-base: 1rem; --r: 18px;
  --muted: #5B5368; --line: #E4DDEE; --card: #fff; --ok: #0F6B3A; --ok-bg: #DCF2E4; --err: #A4231B; --err-bg: #FCE4E2; --warn: #7A4A00; --warn-bg: #FFF0D6;
  --rs: min(var(--r), 14px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--c-paper); color: var(--c-ink); font-family: var(--f-body); font-size: var(--fs-base); line-height: 1.55; }
a { color: var(--c-primary); text-underline-offset: .18em; }
a:hover { color: var(--c-secondary); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-family: var(--f-display); font-weight: var(--w-display); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); letter-spacing: -.01em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
p:last-child { margin-bottom: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--c-surface); padding: .15em .45em; border-radius: 6px; word-break: break-all; }
:focus-visible { outline: 3px solid var(--c-secondary); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; top: -80px; left: 12px; z-index: 99; background: var(--c-ink); color: #fff; padding: .6rem 1rem; border-radius: 10px; }
.skip:focus { top: 12px; color: #fff; }
.pt-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .pt-wrap { padding: 0 28px; } }

/* Testata */
.pt-admin { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: center; padding: .55rem 16px; background: #FFF0D6; color: #5A3700; font-size: .92rem; text-align: center; }
.pt-admin p { margin: 0; }
.pt-admin button { font: inherit; font-weight: 600; background: #5A3700; color: #fff; border: 0; border-radius: 8px; padding: .3rem .8rem; cursor: pointer; }
.pt-hdr { background: #fff; border-bottom: 1px solid var(--line); }
.pt-hdr__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; min-height: 72px; padding-top: .6rem; padding-bottom: .6rem; }
.pt-brand { display: flex; align-items: center; gap: .7rem; color: var(--c-ink); text-decoration: none; }
.pt-brand > span { display: flex; flex-direction: column; line-height: 1.15; }
.pt-brand__site { font-family: var(--f-display); font-weight: var(--w-display); font-size: 1.05rem; }
.pt-brand__area { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.brand__mark, .brand__img { width: 38px; height: 38px; flex: none; }
.brand__mark .lg-a { stroke: var(--c-primary); }
.brand__mark .lg-b { stroke: var(--c-secondary); }
.pt-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
.pt-nav a, .pt-linkbtn { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem .85rem; border-radius: 10px; color: var(--c-ink); text-decoration: none; font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer; }
.pt-nav a:hover, .pt-linkbtn:hover { background: var(--c-surface); color: var(--c-ink); }
.pt-nav a[aria-current] { background: var(--c-surface); color: var(--c-primary); }
.pt-nav form { margin: 0; }
.pt-langs { display: flex; gap: .2rem; }
.pt-langs a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--muted); }
.pt-langs a:hover { background: var(--c-surface); color: var(--c-ink); }
.pt-langs a[aria-current] { color: var(--c-primary); background: var(--c-surface); }

/* Struttura */
.pt-main { flex: 1; padding: 1.75rem 0 3.5rem; }
.pt-main:focus { outline: none; }
.pt--bare .pt-main { display: flex; align-items: center; }
.pt-ftr { border-top: 1px solid var(--line); background: #fff; font-size: .92rem; color: var(--muted); }
.pt-ftr__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.pt-ftr p { margin: 0; }
.pt-crumbs ol { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; font-size: .92rem; color: var(--muted); }
.pt-crumbs li + li::before { content: '/'; margin-right: .35rem; color: var(--line); }
.pt-head { margin-bottom: 1.5rem; }
.pt-head__row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.pt-head .pt-muted { margin-top: .35rem; }
.pt-desc { margin-top: .75rem; max-width: 70ch; color: var(--muted); }
.pt-h2 { font-family: var(--f-display); font-weight: var(--w-display); font-size: 1.3rem; margin: 0 0 .5rem; }
.pt-intro { margin-bottom: 1.1rem; max-width: 70ch; }
.pt-muted { color: var(--muted); }
.pt-small { font-size: .9rem; }
.pt-center { text-align: center; }
.pt-cols { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .pt-cols { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; } }

/* Riquadri */
.pt-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem; margin-bottom: 1rem; }
@media (min-width: 700px) { .pt-card { padding: 1.6rem; } }
.pt-card > h2 { margin-bottom: .9rem; display: flex; align-items: center; gap: .5rem; }
.pt-card--narrow { width: 100%; max-width: 460px; margin: 0 auto; }
.pt-card--accent { border-color: color-mix(in oklab, var(--c-primary) 30%, var(--line)); background: linear-gradient(135deg, #fff, var(--c-surface)); }
.pt-auth h1 { font-size: 1.6rem; margin-bottom: .6rem; }
.pt-auth .pt-small { margin-top: 1rem; text-align: center; }
.pt-empty { border: 1.5px dashed var(--line); border-radius: var(--rs); padding: 1.1rem 1.25rem; color: var(--muted); margin-bottom: 1rem; }
.pt-notice { border-radius: var(--rs); padding: .8rem 1rem; margin-bottom: 1rem; border: 1px solid; }
.pt-notice--ok { background: var(--ok-bg); color: #0B4D2A; border-color: #A8DDBC; }
.pt-notice--err { background: var(--err-bg); color: #7A1A14; border-color: #F2B4AF; }

/* Pulsanti */
.pt-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 46px; padding: .6rem 1.2rem; border: 1.5px solid var(--c-primary); border-radius: 12px; background: var(--c-primary); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.pt-btn:hover { background: var(--c-secondary); border-color: var(--c-secondary); color: #fff; }
.pt-btn--ghost { background: #fff; color: var(--c-ink); border-color: var(--line); }
.pt-btn--ghost:hover { background: var(--c-surface); color: var(--c-ink); border-color: var(--c-primary); }
.pt-btn--ok { background: var(--ok); border-color: var(--ok); }
.pt-btn--ok:hover { background: #0A5530; border-color: #0A5530; }
.pt-btn--sm { min-height: 40px; padding: .4rem .9rem; font-size: .93rem; }
.pt-btn--full { width: 100%; }
.pt-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.pt-copy { font: inherit; font-size: .85rem; font-weight: 600; min-height: 32px; padding: .2rem .65rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--c-ink); cursor: pointer; }
.pt-copy:hover { border-color: var(--c-primary); color: var(--c-primary); }

/* Etichette */
.pt-pill { display: inline-flex; align-items: center; padding: .1rem .6rem; border-radius: 99px; background: #EEEAF3; color: #3E3650; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.pt-pill--active { background: var(--c-surface); color: var(--c-primary); }
.pt-pill--review { background: var(--warn-bg); color: var(--warn); }
.pt-pill--paused { background: #FDE7E4; color: #8E2A20; }
.pt-pill--done { background: var(--ok-bg); color: var(--ok); }
.pt-pill--new { background: var(--c-primary); color: #fff; }
.pt-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em; padding: 0 .4em; border-radius: 99px; background: var(--c-surface); color: var(--c-primary); font-size: .8rem; font-weight: 700; }

/* Moduli */
.pt-form { display: grid; gap: 1rem; }
.pt-field { display: grid; gap: .3rem; }
.pt-field > label, .pt-label, .pt-fieldset legend { font-weight: 600; font-size: .95rem; }
.pt-opt { font-weight: 400; color: var(--muted); }
.pt-hint { margin: 0; font-size: .88rem; color: var(--muted); }
.pt-err { margin: 0; font-size: .9rem; color: var(--err); font-weight: 600; }
.pt-static { margin: 0; }
input[type=text], input[type=email], input[type=password], input:not([type]), select, textarea { width: 100%; min-height: 46px; padding: .6rem .8rem; border: 1.5px solid #CFC6DC; border-radius: 10px; background: #fff; color: var(--c-ink); font: inherit; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--c-primary); outline: 3px solid color-mix(in oklab, var(--c-primary) 22%, transparent); outline-offset: 0; }
[aria-invalid=true] { border-color: var(--err) !important; }
input[type=file] { font: inherit; padding: .5rem; border: 1.5px dashed #CFC6DC; border-radius: 10px; background: #fff; width: 100%; }
.pt-code { font-size: 1.5rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.pt-fieldset { border: 1px solid var(--line); border-radius: var(--rs); padding: 1rem; margin: 0; display: grid; gap: 1rem; }
.pt-fieldset legend { padding: 0 .4rem; }

/* Bacheca */
.pt-list { margin: 0; padding-left: 1.15rem; display: grid; gap: .45rem; }
.pt-list--plain { list-style: none; padding: 0; }
.pt-projects { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.pt-proj { position: relative; display: flex; flex-direction: column; gap: .55rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem; transition: border-color .15s, box-shadow .15s, transform .15s; }
.pt-proj:hover { border-color: color-mix(in oklab, var(--c-primary) 45%, var(--line)); box-shadow: 0 10px 30px -18px color-mix(in oklab, var(--c-primary) 60%, transparent); }
@media (prefers-reduced-motion: no-preference) { .pt-proj:hover { transform: translateY(-2px); } }
.pt-proj__top { display: flex; flex-wrap: wrap; gap: .35rem; }
.pt-proj h3 { font-size: 1.15rem; }
.pt-proj h3 a { color: var(--c-ink); text-decoration: none; }
.pt-stretch::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.pt-proj:focus-within { outline: 3px solid var(--c-secondary); outline-offset: 2px; }
.pt-proj a:focus-visible { outline: none; }
.pt-proj__counts { list-style: none; margin: auto 0 0; padding: .75rem 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .9rem; color: var(--muted); }
.pt-proj__counts strong { color: var(--c-ink); }

/* Schede del progetto */
.pt-tabs__nav { position: sticky; top: 0; z-index: 5; background: var(--c-paper); margin: 0 -16px 1.25rem; padding: .5rem 16px; border-bottom: 1px solid var(--line); }
.pt-tabs__list { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: thin; }
.pt-tabs__list a { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .45rem .9rem; border-radius: 10px; white-space: nowrap; color: var(--c-ink); text-decoration: none; font-weight: 600; }
.pt-tabs__list a:hover { background: var(--c-surface); }
.pt-tabs__list a[aria-selected=true], .pt-tabs__list a[aria-current] { background: var(--c-ink); color: #fff; }
.pt-tabs__list a[aria-selected=true] .pt-count { background: rgba(255, 255, 255, .2); color: #fff; }
.pt-panel { margin-bottom: 2.5rem; scroll-margin-top: 80px; }
.pt-panel:focus { outline: none; }
.js .pt-tabs.is-ready .pt-panel { margin-bottom: 0; }

.pt-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.pt-item { display: grid; gap: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem; scroll-margin-top: 80px; }
@media (min-width: 760px) { .pt-item--preview:has(.pt-thumb) { grid-template-columns: 260px minmax(0, 1fr); } }
.pt-item:target { border-color: var(--c-primary); box-shadow: 0 0 0 3px color-mix(in oklab, var(--c-primary) 20%, transparent); }
.pt-item__top { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-bottom: .4rem; }
.pt-thumb { display: block; border-radius: var(--rs); overflow: hidden; border: 1px solid var(--line); background: var(--c-surface); aspect-ratio: 4 / 3; }
.pt-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pt-approve { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .5rem; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.pt-approve form { margin: 0; }
.pt-details { flex: 1 1 260px; }
.pt-details summary { display: inline-flex; align-items: center; min-height: 40px; padding: .4rem .9rem; border: 1.5px solid var(--line); border-radius: 12px; font-weight: 600; font-size: .93rem; cursor: pointer; list-style: none; background: #fff; }
.pt-details summary::-webkit-details-marker { display: none; }
.pt-details summary:hover { border-color: var(--c-primary); }
.pt-details[open] summary { margin-bottom: .75rem; }

.pt-files { list-style: none; margin: 0 0 1.25rem; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden; }
.pt-file { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem 1rem; align-items: center; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.pt-file:last-child { border-bottom: 0; }
.pt-file:target { background: var(--c-surface); }
.pt-file__ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--c-surface); color: var(--c-primary); font-weight: 800; font-size: .72rem; letter-spacing: .02em; }
.pt-file__main h3 { font-size: 1rem; word-break: break-word; }
.pt-file__main p { margin: .2rem 0 0; }
.pt-file .pt-actions { grid-column: 1 / -1; margin-top: 0; }
@media (min-width: 760px) { .pt-file { grid-template-columns: auto minmax(0, 1fr) auto; } .pt-file .pt-actions { grid-column: auto; justify-content: flex-end; } }
.pt-upload summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: .5rem; min-height: 32px; }
.pt-upload summary::before { content: '+'; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--c-primary); color: #fff; font-weight: 700; }
.pt-upload[open] summary { margin-bottom: 1rem; }
.pt-upload[open] summary::before { content: '−'; }

.pt-cred { display: grid; gap: .5rem; margin: .5rem 0 .75rem; padding: .85rem 1rem; background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--rs); }
.pt-cred div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .5rem; align-items: center; }
.pt-cred dt { color: var(--muted); font-size: .9rem; }
.pt-cred dd { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.js [data-secret].is-masked { -webkit-text-security: disc; letter-spacing: .1em; }

.pt-thread { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .75rem; }
.pt-msg { max-width: 760px; padding: .9rem 1.1rem; border-radius: var(--r); border: 1px solid var(--line); background: #fff; }
.pt-msg--client { margin-left: auto; background: var(--c-surface); border-color: transparent; }
.pt-msg__meta { margin-bottom: .35rem; display: flex; flex-wrap: wrap; gap: .25rem .6rem; font-size: .92rem; }
.pt-msg__body { word-break: break-word; }

@media print { .pt-hdr, .pt-ftr, .pt-tabs__nav, .pt-actions, .pt-approve, .pt-upload, form { display: none !important; } .pt-panel[hidden] { display: block !important; } }

/* Account unico: prodotti, licenze, registrazione */
.pt-sec { margin-bottom: 1.75rem; }
.pt-lics { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.pt-lic { display: flex; flex-direction: column; gap: .5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem; }
.pt-lic__top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.pt-lic h3 { font-size: 1.12rem; margin: 0; }
.pt-lic p { margin: 0; }
.pt-lic__info { background: var(--c-surface); border-radius: var(--rs); padding: .7rem .85rem; font-size: .93rem; overflow-wrap: anywhere; }
.pt-req summary { list-style: none; width: fit-content; }
.pt-req summary::-webkit-details-marker { display: none; }
.pt-req[open] summary { margin-bottom: .75rem; }
.pt-check { display: grid; grid-template-columns: auto 1fr; gap: .55rem; align-items: start; font-size: .93rem; }
.pt-check input { width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; accent-color: var(--c-primary); }
.pt-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pt-danger { border-color: #F2B4AF; }
.pt-btn--danger { background: #fff; color: #9B1C14; border-color: #E59C96; }
.pt-btn--danger:hover { background: var(--err-bg); color: #7A1A14; border-color: #9B1C14; }
