:root{--ink:#161c28;--light:#f5f7fa;--coral:#ff5c6b;--border:#e5e9ef;--soft:#6c7787}*{box-sizing:border-box}body{margin:0;background:var(--light);color:var(--ink);font:17px 'Titillium Web',sans-serif}a{text-decoration:none;color:inherit}.wrap{max-width:1120px;margin:auto;padding-left:24px;padding-right:24px}.top{background:white;border-bottom:1px solid var(--border)}.nav{min-height:82px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center}.brand-logo{display:block;height:29px;width:auto;max-width:100%}nav{display:flex;align-items:center;flex-wrap:wrap;gap:22px;font-weight:600}nav a:hover,.back:hover{color:var(--coral)}.identity{color:var(--soft)}.muted{color:var(--soft)}.heading{margin:44px 0 25px}.eyebrow{color:var(--coral);font-size:12px;letter-spacing:2px;font-weight:700}.heading h1{font-size:29px;margin:8px 0 0;line-height:1.12}.panel{padding:30px;background:white;border:1px solid var(--border);border-radius:17px;box-shadow:0 6px 28px #27314406;margin-bottom:24px}.narrow{max-width:540px}.panel p{color:#606b79}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 20px}label{display:block;font-weight:600;font-size:15px;margin:0 0 19px}input,textarea,select{display:block;margin-top:7px;background:white;width:100%;border:1px solid #d5dce5;border-radius:9px;padding:12px 14px;font:inherit;font-size:16px;color:var(--ink)}textarea{resize:vertical}input:focus,textarea:focus,select:focus{outline:2px solid #ff5c6b35;border-color:var(--coral)}input[type=file]{font-size:14px}.btn{border:none;background:var(--coral);color:white;display:inline-flex;align-items:center;justify-content:center;border-radius:9px;padding:12px 19px;font:700 16px 'Titillium Web';cursor:pointer}.btn:hover{background:#f14356}.btn.secondary{background:white;color:var(--ink);border:1px solid var(--border)}.btn.tiny{padding:7px 14px;font-size:14px}.actions{display:flex;gap:10px;flex-wrap:wrap}.hero{background:white;border-radius:20px;border:1px solid var(--border);padding:60px;display:grid;grid-template-columns:1.3fr 1fr;gap:30px;align-items:center}.hero h2{font-size:55px;line-height:1.07;margin:15px 0}.hero p{font-size:20px;color:var(--soft);max-width:490px;margin:0 0 27px}.hero-art{min-height:300px;background:#181d29;border-radius:16px;color:white;padding:30px;display:flex;flex-direction:column;justify-content:center}.hero-art span{color:var(--coral);font-size:60px;line-height:1}.hero-art strong{font-size:45px;line-height:1.05}.hero-art small{color:#aab5c4;margin-top:18px}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:18px}.tabs{display:flex;gap:7px;flex-wrap:wrap}.tabs a{padding:7px 12px;border-radius:8px;font-size:15px;font-weight:600;color:#627083}.tabs .active{background:#19202c;color:white}.list{padding:5px 24px}.ticket-row{display:flex;align-items:center;gap:20px;justify-content:space-between;padding:22px 5px;border-bottom:1px solid var(--border)}.ticket-row:last-child{border:0}.ticket-row>div{flex:1}.row-title{font-size:18px;font-weight:700}.row-sub{font-size:14px;color:var(--soft);margin-top:4px}.pill{display:inline-block;font-size:13px;font-weight:700;padding:5px 12px;white-space:nowrap;border-radius:20px;background:#edf2f7;color:#44515f}.pill.open{background:#fff0e3;color:#99521f}.pill.working{background:#eaf1ff;color:#345bb4}.pill.waiting_customer{background:#eeeaff;color:#6944a3}.pill.closed{background:#e8f7eb;color:#247842}.arrow{font-size:22px;color:var(--coral)}.empty{text-align:center;padding:70px 20px}.empty span{font-size:45px;color:var(--coral)}.empty h3{margin:8px 0 0}.back{display:inline-block;margin-bottom:17px;font-weight:600}.ticket-header{display:flex;justify-content:space-between;gap:20px;align-items:center}.ticket-header h2{margin:9px 0;font-size:29px}.status-form{display:flex;align-items:end;gap:12px;margin-bottom:25px}.status-form label{margin:0;max-width:260px}.thread{display:flex;flex-direction:column;gap:15px;margin:20px 0 27px}.message{background:white;border:1px solid var(--border);border-radius:14px;padding:23px;max-width:86%;align-self:flex-start;width:100%}.message.staff{border-left:4px solid var(--coral);align-self:flex-end}.message-top{display:flex;justify-content:space-between;gap:12px;align-items:center;border-bottom:1px solid var(--border);padding-bottom:12px;margin-bottom:14px}.message-top span{font-size:13px;color:var(--soft)}.message-text{white-space:normal;overflow-wrap:anywhere}.attachment{display:inline-block;color:#d74659;margin-top:15px;font-weight:700}.foot{color:#84909e;font-size:13px;padding-top:40px;padding-bottom:30px}.alert,.error{padding:13px 17px;border-radius:8px;margin-bottom:20px;background:#e8f6ec;color:#28723f}.error{background:#ffebeb;color:#9d2b32}.small{font-size:14px}@media(max-width:740px){.nav{align-items:flex-start;padding-top:16px;padding-bottom:15px;flex-direction:column;gap:9px}.brand-logo{height:34px}nav{gap:13px}.wrap{padding-left:17px;padding-right:17px}.heading{margin:30px 0 17px}.heading h1{font-size:31px}.hero{padding:26px;grid-template-columns:1fr}.hero h2{font-size:41px}.hero-art{min-height:190px}.hero-art strong{font-size:35px}.grid{grid-template-columns:1fr;gap:0}.panel{padding:20px}.toolbar{align-items:flex-start;flex-direction:column}.ticket-row{gap:9px}.row-title{font-size:16px}.ticket-row .arrow{display:none}.pill{font-size:11px;padding:5px 8px}.message{max-width:97%;padding:15px}.message-top{align-items:start;flex-direction:column}.ticket-header{align-items:start;flex-direction:column}.status-form{flex-wrap:wrap}}

/* Versione 1.1 */
.ticket-main{display:flex;align-items:center;justify-content:space-between;gap:18px;flex:1;min-width:0}.ticket-main>div{flex:1;min-width:0}.ticket-main:hover .row-title{color:var(--coral)}.inline-delete{margin:0;flex:none}.delete-icon{width:38px;height:38px;border:1px solid #fac9cd;background:#fff5f5;color:#c43a4a;border-radius:9px;cursor:pointer;font-size:17px}.delete-icon:hover{background:#ffdfe2}.admin-tools,.email-tools{background:#fff;border:1px solid var(--border);border-radius:14px;margin-bottom:20px;padding:18px 22px;display:flex;justify-content:space-between;align-items:center;gap:20px}.admin-tools p,.email-tools p{margin:3px 0 0}.email-tools form{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.email-tools input{margin:0;width:240px}.btn.danger{background:#ac3042}.btn.danger:hover{background:#862638}.btn:disabled{opacity:.55;cursor:default}.upload-wrap{position:relative;display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:12px 0 23px;cursor:pointer}.upload-wrap .upload-button{background:linear-gradient(135deg,#ff5c6b,#ec435b);color:white;border-radius:12px;box-shadow:0 8px 16px #ff5c6b33;display:inline-block;padding:14px 20px;font-weight:700}.upload-wrap:hover .upload-button{filter:brightness(.96);transform:translateY(-1px)}.upload-wrap .file-name{font-size:14px;color:var(--soft);font-weight:500;overflow-wrap:anywhere}.upload-wrap input[type=file]{position:absolute;left:0;top:0;width:195px;height:52px;opacity:0;cursor:pointer;margin:0;padding:0}.upload-wrap input[type=file]:focus-visible+.upload-button{outline:2px solid var(--coral)}@media(max-width:740px){.admin-tools,.email-tools{align-items:stretch;flex-direction:column}.email-tools input{width:100%}.ticket-main{gap:8px}.delete-icon{width:33px;height:33px}}

/* Supporto Privato 1.2 */
.foot{text-align:center}
.upload-wrap .upload-button{display:inline-flex;align-items:center;gap:9px}
.upload-button .clip-white{color:#fff;stroke:#fff;flex:none}
.alert{transition:opacity .5s ease,transform .5s ease}
.alert.alert-fade{opacity:0;transform:translateY(-5px);pointer-events:none}

/* Supporto Privato 1.4 - Test email su unica riga (desktop) */
@media(min-width: 1100px){
  .email-tools{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:20px;}
  .email-tools>div{min-width:0;}
  .email-tools p{font-size:13px;line-height:1.3;}
  .email-tools form{display:flex;align-items:center;flex-wrap:nowrap;gap:10px;margin:0;white-space:nowrap;}
  .email-tools input[type=email]{width:235px;min-width:0;margin:0;}
  .email-tools button{white-space:nowrap;}
}
@media(min-width:741px) and (max-width:1099px){
  .email-tools{align-items:flex-start;}
  .email-tools form{flex-wrap:nowrap;flex-shrink:0;gap:8px;}
  .email-tools input[type=email]{width:200px;}
  .email-tools button{white-space:nowrap;}
}

/* 1.5: il testo del pulsante Registrati resta bianco */
nav a.btn,nav a.btn:hover,nav a.btn:focus-visible,nav a.btn:active{color:#fff;}

/* Versione 1.6 — gestione utenti amministratore */
.users-table .user-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 0;border-bottom:1px solid var(--border)}
.users-table .user-row:last-child{border-bottom:0}
.user-row strong{font-size:19px}
.user-columns{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.user-columns .panel{min-width:0}
.user-danger{border-color:#f7c3c9}
@media(max-width:780px){.user-columns{grid-template-columns:1fr}.users-table .user-row{flex-direction:column;align-items:flex-start}nav{gap:12px}}


/* Versione 1.8 — logo personalizzato nell'header */
.brand-logo{object-fit:contain}


/* Versione 1.9 — scelta servizio con menu interno personalizzato (fallback select nativo). */
.field-block{min-width:0;margin:0 0 19px}
.field-block>label{margin:0 0 7px}
.custom-select-root{position:relative;min-width:0;font-family:'Titillium Web',sans-serif}
.custom-select-root.is-enhanced>select{display:none}
.custom-select-root.is-open{z-index:40}
.custom-select-trigger{
  width:100%;min-height:51px;padding:12px 44px 12px 15px;
  display:flex;align-items:center;position:relative;text-align:left;
  font:600 16px/1.35 'Titillium Web',sans-serif;
  border:1px solid #d5dce5;border-radius:10px;
  background:#fff;color:var(--ink);cursor:pointer;
  transition:border-color .16s, box-shadow .16s, background-color .16s;
}
.custom-select-trigger:hover{border-color:#ff9eaa;background:#fffafb}
.custom-select-trigger:focus-visible,.custom-select-root.is-open .custom-select-trigger{
  outline:none;border-color:var(--coral);box-shadow:0 0 0 3px #ff5c6b25;
}
.custom-select-trigger.is-placeholder{color:#778294;font-weight:500}
.custom-select-trigger:after{
  content:"";position:absolute;right:19px;top:calc(50% - 4px);
  width:9px;height:9px;border-right:2px solid #798393;
  border-bottom:2px solid #798393;transform:rotate(45deg);
  transition:transform .16s,top .16s;
}
.custom-select-root.is-open .custom-select-trigger:after{
  top:calc(50% + 1px);transform:rotate(225deg);border-color:var(--coral);
}
.custom-select-menu{
  display:none;position:absolute;z-index:45;left:0;right:0;top:calc(100% + 7px);
  padding:7px;max-height:min(360px,55vh);overflow-y:auto;overscroll-behavior:contain;
  border:1px solid #e3e7ed;border-radius:13px;background:#fff;
  box-shadow:0 16px 45px #20283a21,0 3px 12px #20283a0b;
}
.custom-select-root.is-open .custom-select-menu{display:block}
.custom-select-root.open-above .custom-select-menu{top:auto;bottom:calc(100% + 7px)}
.custom-select-option{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  width:100%;min-height:39px;padding:8px 12px;text-align:left;
  background:transparent;border:0;border-radius:8px;color:#232d3b;
  font:600 16px/1.35 'Titillium Web',sans-serif;cursor:pointer;
  transition:background-color .12s,color .12s;
}
.custom-select-option:hover,.custom-select-option:focus-visible{
  background:#fff0f2;color:#d9344d;outline:none;
}
.custom-select-option[aria-selected="true"]{background:#ffeff1;color:#d93650;font-weight:700}
.custom-select-option[aria-selected="true"]:after{content:"✓";font-weight:700}
.custom-select-error{display:none;color:#bd3449;font-size:14px;margin-top:7px;font-weight:600}
.custom-select-root.has-error .custom-select-error{display:block}
.custom-select-root.has-error .custom-select-trigger{border-color:#d93650}
@media (max-width:740px){
 .custom-select-trigger{min-height:49px;font-size:16px}
 .custom-select-option{min-height:44px;font-size:16px}
 .custom-select-menu{max-height:min(320px,48vh)}
}
