:root{--bg:#0b0d12;--panel:#121620;--panel2:#171c29;--text:#f5f7fb;--muted:#aab2c3;--soft:#768099;--red:#e30613;--red2:#ff2b36;--line:rgba(255,255,255,.1);--line2:rgba(255,255,255,.16);--ok:#28c76f;--warn:#ffb020;--info:#57a8ff;--danger:#ff6170;--radius:24px;--shadow:0 24px 80px rgba(0,0,0,.35)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:radial-gradient(circle at 20% 0%,rgba(227,6,19,.18),transparent 28%),radial-gradient(circle at 90% 10%,rgba(87,168,255,.12),transparent 25%),var(--bg);color:var(--text);min-height:100vh}a{color:inherit;text-decoration:none}img{max-width:100%;display:block}button,input,select,textarea{font:inherit}.login-body{min-height:100vh;display:grid;place-items:center;padding:24px}.login-card{width:min(1080px,94vw);display:grid;grid-template-columns:.95fr 1.05fr;border:1px solid var(--line);border-radius:34px;overflow:hidden;background:linear-gradient(145deg,rgba(255,255,255,.09),rgba(255,255,255,.035));box-shadow:var(--shadow)}.login-side{padding:42px;background:#10141f;display:flex;flex-direction:column;justify-content:space-between;gap:30px}.login-side img{width:190px;background:#fff;border-radius:24px;padding:12px}.login-side h1{font-size:clamp(38px,5vw,64px);line-height:.95;margin:28px 0 15px;letter-spacing:-.055em}.login-side p{color:var(--muted);line-height:1.6}.login-form{padding:44px}.login-form h2{font-size:36px;margin:0 0 8px}.login-form p{color:var(--muted);line-height:1.55}.app{display:grid;grid-template-columns:286px 1fr;min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;padding:22px;border-right:1px solid var(--line);background:rgba(8,10,15,.74);backdrop-filter:blur(20px);display:flex;flex-direction:column;gap:20px}.brand{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:22px;background:linear-gradient(145deg,rgba(255,255,255,.08),rgba(255,255,255,.03))}.brand img{width:56px;height:56px;object-fit:contain;border-radius:16px;background:#fff;padding:4px}.brand strong{display:block;font-size:17px}.brand span{font-size:12px;color:var(--muted)}.nav{display:flex;flex-direction:column;gap:8px}.nav a{padding:12px 13px;border-radius:16px;color:var(--muted);display:flex;align-items:center;justify-content:space-between;border:1px solid transparent;font-weight:750}.nav a:hover,.nav a.active{background:rgba(255,255,255,.08);border-color:var(--line);color:#fff}.nav a[data-admin-only]{display:none}.admin-role .nav a[data-admin-only]{display:flex}.quickbox{margin-top:auto;border:1px solid rgba(227,6,19,.28);background:linear-gradient(145deg,rgba(227,6,19,.16),rgba(255,255,255,.04));border-radius:22px;padding:16px}.quickbox p{margin:7px 0 14px;color:var(--muted);font-size:13px;line-height:1.45}.main{min-width:0}.topbar{position:sticky;top:0;z-index:20;background:rgba(11,13,18,.72);backdrop-filter:blur(18px);border-bottom:1px solid var(--line);padding:16px 28px;display:flex;justify-content:space-between;align-items:center;gap:14px}.userbox{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.06);padding:7px 10px}.userbox small{display:block;color:var(--muted);font-size:12px}.page{padding:32px;max-width:1280px;margin:0 auto}.actions,.card-actions{display:flex;gap:10px;flex-wrap:wrap}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 14px;border-radius:999px;border:1px solid var(--line2);background:rgba(255,255,255,.06);color:#fff;font-weight:850;font-size:14px;cursor:pointer}.btn:hover{border-color:rgba(255,255,255,.28);transform:translateY(-1px)}.btn.primary,.btn.red{background:linear-gradient(135deg,var(--red),var(--red2));border-color:rgba(255,255,255,.08)}.btn.ghost{background:transparent}.btn.soft{background:rgba(255,255,255,.08)}.btn.danger{background:rgba(255,97,112,.14);border-color:rgba(255,97,112,.28)}.hero{display:grid;grid-template-columns:minmax(0,1.3fr) 390px;gap:24px;align-items:stretch}.hero-card{position:relative;overflow:hidden;border:1px solid var(--line);border-radius:34px;background:linear-gradient(145deg,rgba(255,255,255,.09),rgba(255,255,255,.035));padding:34px;box-shadow:var(--shadow)}.hero-card:after{content:"";position:absolute;right:-80px;top:-90px;width:260px;height:260px;background:rgba(227,6,19,.22);filter:blur(10px);border-radius:50%}.eyebrow{display:inline-flex;align-items:center;gap:8px;color:#fff;border:1px solid rgba(227,6,19,.35);background:rgba(227,6,19,.14);border-radius:999px;padding:7px 12px;font-size:13px;font-weight:900}.hero h1{font-size:clamp(34px,5vw,68px);line-height:.98;margin:22px 0 18px;letter-spacing:-.055em}.hero p,.lead{font-size:18px;color:var(--muted);line-height:1.6;margin:0}.profile{border:1px solid var(--line);border-radius:34px;background:#10141f;padding:22px;box-shadow:var(--shadow)}.profile-head{display:flex;gap:14px;align-items:center;margin-bottom:16px}.avatar{width:58px;height:58px;border-radius:20px;background:linear-gradient(135deg,var(--red),#5e0610);display:grid;place-items:center;font-weight:900;font-size:20px;color:#fff;flex:0 0 auto}.profile h3{margin:0 0 4px}.profile p{margin:0;color:var(--muted)}.profile-list{display:grid;gap:10px;margin-top:16px}.profile-row{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding-top:10px;color:var(--muted);font-size:14px}.profile-row strong{color:#fff;text-align:right}.section{margin-top:28px}.section-head{display:flex;justify-content:space-between;align-items:end;gap:18px;margin-bottom:16px}.section-head h2{margin:0;font-size:28px;letter-spacing:-.035em}.section-head p{margin:5px 0 0;color:var(--muted)}.grid{display:grid;gap:16px}.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.card{border:1px solid var(--line);border-radius:26px;background:linear-gradient(145deg,rgba(255,255,255,.075),rgba(255,255,255,.028));padding:22px;min-height:150px}.card h3{margin:0 0 9px;font-size:22px}.card p{margin:0;color:var(--muted);line-height:1.55}.status{display:inline-flex;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:900;margin-bottom:16px;border:1px solid var(--line2)}.status.ok{background:rgba(40,199,111,.12);color:#80e2aa;border-color:rgba(40,199,111,.3)}.status.beta{background:rgba(255,176,32,.12);color:#ffd88a;border-color:rgba(255,176,32,.32)}.status.future{background:rgba(87,168,255,.12);color:#9fcbff;border-color:rgba(87,168,255,.32)}.status.off{background:rgba(255,97,112,.12);color:#ff9aa5;border-color:rgba(255,97,112,.32)}.list{display:grid;gap:10px}.item{padding:15px;border-radius:18px;border:1px solid var(--line);background:rgba(255,255,255,.045);display:flex;justify-content:space-between;gap:16px;align-items:center}.item small{display:block;color:var(--muted);margin-top:4px}.faq{display:grid;gap:12px}.faq details,.release details{border:1px solid var(--line);border-radius:22px;background:rgba(255,255,255,.045);padding:16px}.faq summary,.release summary{cursor:pointer;font-weight:900}.faq p,.release p,.release li{color:var(--muted);line-height:1.55}.table{width:100%;border-collapse:collapse;border:1px solid var(--line);border-radius:22px;overflow:hidden;display:table}.table th,.table td{padding:14px;border-bottom:1px solid var(--line);text-align:left;color:var(--muted);vertical-align:top}.table th{color:#fff;background:rgba(255,255,255,.06)}.form-panel{border:1px solid var(--line);border-radius:26px;background:rgba(255,255,255,.045);padding:22px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field{display:grid;gap:7px}.field.full{grid-column:1/-1}.field label{font-weight:850;color:#fff;font-size:13px}.field input,.field select,.field textarea{width:100%;border:1px solid var(--line2);border-radius:14px;background:rgba(0,0,0,.24);color:#fff;padding:12px}.field textarea{min-height:110px;resize:vertical}.note{border-left:4px solid var(--red);padding:16px 18px;background:rgba(227,6,19,.1);border-radius:18px;color:var(--muted);line-height:1.55}.kbd,.code{font-family:ui-monospace,Menlo,Consolas,monospace;background:rgba(255,255,255,.08);border:1px solid var(--line);border-radius:8px;padding:2px 7px;color:#fff}.footer{padding:28px 32px;color:var(--soft);border-top:1px solid var(--line);margin-top:32px}.hidden{display:none!important}.admin-only{display:none}.admin-role .admin-only{display:block}.admin-role .admin-only.flex{display:flex}.empty{border:1px dashed var(--line2);border-radius:24px;padding:26px;text-align:center;color:var(--muted);background:rgba(255,255,255,.035)}
@media(max-width:1080px){.app{grid-template-columns:1fr}.sidebar{position:relative;height:auto;border-right:0;border-bottom:1px solid var(--line)}.nav{display:grid;grid-template-columns:repeat(3,1fr)}.hero{grid-template-columns:1fr}.cols-4{grid-template-columns:repeat(2,1fr)}.cols-3{grid-template-columns:repeat(2,1fr)}.login-card{grid-template-columns:1fr}.login-side{padding:28px}.form-grid{grid-template-columns:1fr}}
@media(max-width:720px){.topbar{padding:14px 16px;align-items:flex-start;flex-direction:column}.page{padding:18px}.nav{grid-template-columns:1fr}.cols-2,.cols-3,.cols-4{grid-template-columns:1fr}.section-head{display:block}.hero-card{padding:24px}.hero h1{font-size:38px}.sidebar{padding:16px}.item{display:block}.item .btn{margin-top:12px}.table{display:block;overflow-x:auto}.profile-row{display:block}.profile-row strong{display:block;text-align:left;margin-top:3px}.userbox{width:100%;border-radius:20px;flex-wrap:wrap}.login-form{padding:28px}.login-side img{width:150px}}

body.light{--bg:#f5f6f8;--panel:#ffffff;--panel2:#f0f2f5;--text:#111827;--muted:#5b6475;--soft:#7b8494;--line:rgba(17,24,39,.12);--line2:rgba(17,24,39,.18);--shadow:0 24px 70px rgba(12,20,35,.12);background:radial-gradient(circle at 20% 0%,rgba(227,6,19,.12),transparent 28%),radial-gradient(circle at 90% 10%,rgba(87,168,255,.12),transparent 25%),var(--bg);color:var(--text)}
body.light .login-side,body.light .profile{background:#fff}body.light .sidebar,body.light .topbar{background:rgba(255,255,255,.82)}body.light .nav a:hover,body.light .nav a.active{color:#111827;background:rgba(17,24,39,.06)}body.light .btn{color:#111827}body.light .btn.primary,body.light .btn.red{color:#fff}body.light .field input,body.light .field select,body.light .field textarea{background:#fff;color:#111827}body.light .profile-row strong,body.light .field label,body.light .section-head h2,body.light .card h3,body.light .table th{color:#111827}body.light .hero-card,body.light .card,body.light .form-panel,body.light .item,body.light .faq details,body.light .release details{background:rgba(255,255,255,.88)}
.login-side-actions{display:flex;gap:10px;flex-wrap:wrap}.login-actions{margin-top:16px}.login-form form{display:grid;gap:14px}.photo-avatar{width:86px;height:86px;border-radius:26px;object-fit:cover;border:1px solid var(--line);background:#fff}.avatar-wrap{position:relative}.avatar-wrap img+div{display:none}.profile-edit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.profile-edit-grid .full{grid-column:1/-1}.topbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.userbox-wrap{display:flex;gap:10px;align-items:center;flex-wrap:wrap}@media(max-width:720px){.profile-edit-grid{grid-template-columns:1fr}.login-side-actions .btn,.login-actions .btn{width:100%}.userbox-wrap{width:100%}.topbar-actions{width:100%}.topbar-actions .btn{flex:1}.login-card{width:min(560px,94vw)}}

/* --- v9: correzioni tema chiaro e foto profilo --- */
.avatar-wrap{width:58px;height:58px;border-radius:20px;position:relative;overflow:hidden;display:grid;place-items:center;flex:0 0 58px;background:linear-gradient(135deg,var(--red),#5e0610);color:#fff}
.avatar-wrap .photo-avatar{position:absolute;inset:0;width:100%;height:100%;border-radius:20px;object-fit:cover;border:0;background:#fff;padding:0;display:none}
.avatar-wrap>div[data-user-initials]{position:relative;z-index:1;display:grid;place-items:center;width:100%;height:100%;font-weight:900;font-size:20px;color:#fff}
.avatar-wrap.has-photo .photo-avatar{display:block}
.avatar-wrap.has-photo>div[data-user-initials]{display:none}
.profile .avatar-wrap{width:86px;height:86px;border-radius:26px;flex-basis:86px}
.profile .avatar-wrap .photo-avatar{border-radius:26px}
.profile .avatar-wrap>div[data-user-initials]{font-size:26px}
.profile-head{align-items:center}.profile-head>div:last-child{min-width:0}.profile-head h3,.profile-head p{overflow-wrap:anywhere}.profile-row strong{overflow-wrap:anywhere;max-width:58%}.profile-edit-grid button{width:max-content}.userbox{min-width:0}.userbox>div:last-child{min-width:0}.userbox strong,.userbox small{overflow-wrap:anywhere}

body.light .login-side{background:linear-gradient(145deg,#ffffff,#f2f4f8);color:#111827}
body.light .login-card,body.light .hero-card,body.light .card,body.light .form-panel,body.light .profile,body.light .item,body.light .faq details,body.light .release details,body.light .empty{background:#ffffff;color:#111827;border-color:rgba(17,24,39,.12)}
body.light .sidebar{background:rgba(255,255,255,.94);color:#111827;border-color:rgba(17,24,39,.12)}
body.light .topbar{background:rgba(255,255,255,.92);color:#111827;border-color:rgba(17,24,39,.12)}
body.light .brand{background:#ffffff;color:#111827;border-color:rgba(17,24,39,.12)}
body.light .quickbox{background:linear-gradient(145deg,rgba(227,6,19,.08),#ffffff);border-color:rgba(227,6,19,.22);color:#111827}
body.light .userbox{background:#ffffff;color:#111827;border-color:rgba(17,24,39,.14)}
body.light .nav a{color:#4b5565}body.light .nav a:hover,body.light .nav a.active{color:#111827;background:#f1f3f6;border-color:rgba(17,24,39,.12)}
body.light .btn{background:#ffffff;color:#111827;border-color:rgba(17,24,39,.18);box-shadow:0 8px 22px rgba(12,20,35,.06)}
body.light .btn:hover{border-color:rgba(17,24,39,.30);background:#f7f8fa}body.light .btn.primary,body.light .btn.red{color:#fff;background:linear-gradient(135deg,var(--red),var(--red2));border-color:transparent}body.light .btn.ghost{background:transparent;color:#111827}body.light .btn.soft{background:#f1f3f6;color:#111827}
body.light .eyebrow{color:#9a0610;background:rgba(227,6,19,.08);border-color:rgba(227,6,19,.22)}
body.light .hero-card:after{background:rgba(227,6,19,.10)}
body.light .field input,body.light .field select,body.light .field textarea{background:#ffffff;color:#111827;border-color:rgba(17,24,39,.18)}
body.light .field input::placeholder,body.light .field textarea::placeholder{color:#8b95a7}body.light .field label{color:#111827}
body.light .table{border-color:rgba(17,24,39,.12)}body.light .table th{background:#f1f3f6;color:#111827}body.light .table td{color:#4b5565;border-color:rgba(17,24,39,.10)}
body.light .profile-row{border-color:rgba(17,24,39,.10);color:#5b6475}body.light .profile-row strong{color:#111827}
body.light .note{background:rgba(227,6,19,.07);color:#4b5565}body.light .kbd,body.light .code{background:#f1f3f6;color:#111827;border-color:rgba(17,24,39,.12)}
body.light .status.ok{background:rgba(40,199,111,.13);color:#137a42;border-color:rgba(40,199,111,.28)}body.light .status.beta{background:rgba(255,176,32,.16);color:#8a5a00;border-color:rgba(255,176,32,.35)}body.light .status.future{background:rgba(87,168,255,.13);color:#0f5ca8;border-color:rgba(87,168,255,.30)}body.light .status.off{background:rgba(255,97,112,.13);color:#a8192b;border-color:rgba(255,97,112,.30)}
body.light .footer{color:#6b7280;border-color:rgba(17,24,39,.10)}
@media(max-width:720px){.profile .avatar-wrap{width:74px;height:74px;border-radius:22px;flex-basis:74px}.profile .avatar-wrap .photo-avatar{border-radius:22px}.profile-row strong{max-width:100%}.profile-edit-grid button{width:100%}}
.note.error{border-left-color:#ff6170;background:rgba(255,97,112,.12);color:#ffb5bd}
body.light .note.error{background:rgba(255,97,112,.10);color:#8a1f2c}
