/* ── Garanzie Rotondi — Public CSS ── */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600&family=Barlow+Condensed:wght@600;700&display=swap');

:root{
  --gr-blu:#0d2fff;--gr-viola:#7b1fa2;--gr-verde:#2e7d32;--gr-rosso:#c62828;--gr-arancio:#e65100;
  --gr-bg:#f4f7ff;--gr-bianco:#fff;--gr-bordo:#e0e8ff;--gr-testo:#1a1a2e;--gr-muted:#666;
}
.gr-wrap{font-family:'Barlow',sans-serif;color:var(--gr-testo);line-height:1.6}

/* NOTICE */
.gr-notice{padding:12px 16px;border-radius:8px;font-size:13px;margin:10px 0;border:1px solid}
.gr-notice-info{background:#e3f2fd;border-color:#90caf9;color:#0d47a1}
.gr-notice-success{background:#e8f5e9;border-color:#a5d6a7;color:var(--gr-verde)}
.gr-notice-warning{background:#fff3e0;border-color:#ffcc80;color:var(--gr-arancio)}
.gr-notice-error{background:#ffebee;border-color:#ef9a9a;color:var(--gr-rosso)}
.gr-login-required{background:var(--gr-bg);border:1.5px solid var(--gr-bordo);border-radius:10px;padding:2rem;text-align:center}
.gr-login-required a{color:var(--gr-blu);font-weight:600}

/* FORM */
.gr-form-wrap{max-width:600px;margin:0 auto}
.gr-form-section{background:#fff;border:1.5px solid var(--gr-bordo);border-radius:12px;padding:1.5rem;margin-bottom:1.25rem}
.gr-form-section-title{font-family:'Barlow Condensed',sans-serif;font-size:16px;font-weight:700;color:var(--gr-blu);margin-bottom:1rem;padding-bottom:8px;border-bottom:1px solid var(--gr-bordo)}
.gr-field{margin-bottom:14px}
.gr-field label{display:block;font-size:12px;font-weight:600;color:var(--gr-muted);text-transform:uppercase;letter-spacing:.5px;margin-bottom:5px}
.gr-field input,.gr-field select,.gr-field textarea{width:100%;border:1.5px solid var(--gr-bordo);border-radius:7px;padding:10px 13px;font-size:14px;font-family:'Barlow',sans-serif;color:var(--gr-testo);background:#fff;transition:border-color .15s}
.gr-field input:focus,.gr-field select:focus,.gr-field textarea:focus{outline:none;border-color:var(--gr-blu)}
.gr-field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.gr-required{color:var(--gr-rosso)}
.gr-gdpr-check{display:flex;align-items:flex-start;gap:10px;padding:12px;background:#f4f7ff;border-radius:7px;border:1.5px solid var(--gr-bordo)}
.gr-gdpr-check input[type=checkbox]{width:18px;height:18px;accent-color:var(--gr-blu);flex-shrink:0;margin-top:2px}
.gr-gdpr-check label{font-size:13px;color:var(--gr-muted);margin:0}
.gr-gdpr-check a{color:var(--gr-blu)}
.gr-btn-submit{width:100%;background:var(--gr-blu);color:#fff;border:none;border-radius:8px;padding:13px;font-size:15px;font-weight:600;cursor:pointer;font-family:'Barlow',sans-serif;letter-spacing:.3px;transition:background .15s;margin-top:8px}
.gr-btn-submit:hover{background:#2979ff}
.gr-btn-submit:disabled{opacity:.5;cursor:not-allowed}

/* CHAT FLAVIO */
.gr-flavio-wrap{border:1.5px solid var(--gr-bordo);border-radius:12px;overflow:hidden;background:#fff;box-shadow:0 4px 20px rgba(13,47,255,.08);max-width:680px;margin:0 auto}
.gr-flavio-head{background:var(--gr-blu);padding:13px 16px;display:flex;align-items:center;gap:10px}
.gr-flavio-av{width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.2);color:#fff;font-family:'Barlow Condensed',sans-serif;font-size:14px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.gr-flavio-name{font-size:14px;font-weight:600;color:#fff}
.gr-flavio-sub{font-size:11px;color:rgba(255,255,255,.65)}
.gr-flavio-badge{font-size:9px;font-weight:700;padding:2px 8px;border-radius:10px;background:#e8f5e9;color:var(--gr-verde);margin-left:auto}
.gr-msgs{padding:1rem;min-height:200px;max-height:420px;overflow-y:auto;background:#f8faff;display:flex;flex-direction:column;gap:10px}
.gr-msgs::-webkit-scrollbar{width:3px}
.gr-msgs::-webkit-scrollbar-thumb{background:#c5d0ff;border-radius:2px}
.gr-msg{display:flex;gap:8px;align-items:flex-start}
.gr-msg.gr-user{flex-direction:row-reverse}
.gr-msg-av{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;flex-shrink:0}
.gr-msg.gr-bot .gr-msg-av{background:var(--gr-blu);color:#fff}
.gr-msg.gr-user .gr-msg-av{background:var(--gr-arancio);color:#fff}
.gr-bub{max-width:80%;padding:10px 13px;border-radius:12px;font-size:13px;line-height:1.6}
.gr-msg.gr-bot .gr-bub{background:#fff;border:1.5px solid var(--gr-bordo);border-radius:2px 12px 12px 12px;color:var(--gr-testo);box-shadow:0 2px 6px rgba(13,47,255,.05)}
.gr-msg.gr-user .gr-bub{background:var(--gr-blu);color:#fff;border-radius:12px 2px 12px 12px}
.gr-action-card{background:#fff;border:1.5px solid var(--gr-bordo);border-radius:10px;padding:11px 13px;margin-left:36px;margin-top:5px;max-width:84%}
.gr-action-title{font-size:10px;font-weight:700;color:#888;letter-spacing:1px;text-transform:uppercase;margin-bottom:7px}
.gr-action-btn{display:flex;align-items:center;gap:8px;padding:9px 14px;border-radius:7px;font-size:12px;font-weight:600;text-decoration:none;color:#fff;margin-bottom:5px;transition:opacity .15s;border:none;cursor:pointer;font-family:inherit}
.gr-action-btn:hover{opacity:.85}
.gr-action-btn:last-child{margin-bottom:0}
.gr-action-btn.tg{background:#0088cc}
.gr-action-btn.web{background:var(--gr-verde)}
.gr-action-btn.phone{background:var(--gr-blu)}
.gr-action-btn.silvana{background:var(--gr-viola)}
.gr-quick-btns{padding:8px 12px;display:flex;gap:5px;flex-wrap:wrap;border-top:1px solid var(--gr-bordo);background:#fafbff}
.gr-quick-btn{background:#fff;border:1.5px solid var(--gr-bordo);border-radius:20px;padding:5px 13px;font-size:11px;font-weight:500;cursor:pointer;color:#444;font-family:inherit;transition:all .15s}
.gr-quick-btn:hover{background:var(--gr-blu);color:#fff;border-color:var(--gr-blu)}
.gr-inp-area{padding:10px 12px;border-top:1.5px solid var(--gr-bordo);display:flex;gap:7px;align-items:flex-end;background:#fff}
.gr-inp-area textarea{flex:1;resize:none;border:1.5px solid var(--gr-bordo);border-radius:8px;padding:9px 12px;font-size:13px;font-family:'Barlow',sans-serif;min-height:38px;max-height:100px;line-height:1.4;color:var(--gr-testo);background:#f8faff}
.gr-inp-area textarea:focus{outline:none;border-color:var(--gr-blu);background:#fff}
.gr-send-btn{background:var(--gr-blu);color:#fff;border:none;border-radius:8px;width:38px;height:38px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.gr-send-btn:disabled{opacity:.3;cursor:not-allowed}
.gr-send-btn svg{width:15px;height:15px;stroke:#fff;fill:none;stroke-width:2.5}
.gr-typing span{width:6px;height:6px;border-radius:50%;background:var(--gr-blu);opacity:.4;animation:gr-bounce 1.2s infinite;display:inline-block;margin:0 2px}
.gr-typing span:nth-child(2){animation-delay:.2s}
.gr-typing span:nth-child(3){animation-delay:.4s}
@keyframes gr-bounce{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-5px)}}

/* AREA CLIENTI */
.gr-area-clienti{max-width:860px;margin:0 auto}
.gr-welcome-band{background:var(--gr-blu);border-radius:10px;padding:1.25rem;margin-bottom:1.25rem;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}
.gr-welcome-name{font-family:'Barlow Condensed',sans-serif;font-size:18px;font-weight:700;color:#fff}
.gr-welcome-sub{font-size:12px;color:rgba(255,255,255,.65);margin-top:3px}
.gr-welcome-tipo{background:rgba(255,255,255,.15);color:#fff;font-size:10px;font-weight:700;padding:4px 12px;border-radius:20px}
.gr-cards-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:1.25rem}
.gr-card-pub{background:#fff;border:1.5px solid var(--gr-bordo);border-radius:10px;padding:1.25rem}
.gr-card-pub h3{font-family:'Barlow Condensed',sans-serif;font-size:16px;font-weight:700;color:var(--gr-testo);margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid var(--gr-bordo)}
.gr-mac-row{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid #f4f7ff}
.gr-mac-row:last-child{border-bottom:none}
.gr-mac-info{flex:1}
.gr-mac-name{font-size:13px;font-weight:600;color:var(--gr-testo)}
.gr-mac-serial{font-size:11px;color:#888;margin-top:1px}
.gr-mac-badge{font-size:10px;font-weight:700;padding:2px 9px;border-radius:20px;margin-left:auto}
.gr-mac-badge.attiva{background:#e8f5e9;color:var(--gr-verde)}
.gr-mac-badge.in_scadenza{background:#fff3e0;color:var(--gr-arancio)}
.gr-mac-badge.scaduta{background:#ffebee;color:var(--gr-rosso)}

/* VERIFICA GARANZIA */
.gr-verifica-wrap{max-width:480px;margin:0 auto;padding:1.5rem;background:#fff;border-radius:12px;border:1.5px solid var(--gr-bordo)}
.gr-verifica-wrap h3{font-family:'Barlow Condensed',sans-serif;font-size:20px;font-weight:700;color:var(--gr-blu);margin-bottom:8px}
.gr-verifica-input{width:100%;padding:11px 14px;border:1.5px solid var(--gr-bordo);border-radius:8px;font-size:14px;margin-bottom:8px;font-family:'Barlow',sans-serif;text-transform:uppercase;color:var(--gr-testo)}
.gr-verifica-btn{width:100%;background:var(--gr-blu);color:#fff;border:none;border-radius:8px;padding:11px;font-size:14px;font-weight:600;cursor:pointer;font-family:'Barlow',sans-serif}
.gr-verifica-result{margin-top:1rem;padding:12px 14px;border-radius:8px;font-size:13px;line-height:1.7}
.gr-verifica-result.attiva{background:#e8f5e9;border:1.5px solid #a5d6a7}
.gr-verifica-result.in_scadenza{background:#fff3e0;border:1.5px solid #ffcc80}
.gr-verifica-result.scaduta{background:#ffebee;border:1.5px solid #ef9a9a}

/* LOGIN */
.gr-login-wrap{max-width:400px;margin:2rem auto}
.gr-login-card{background:#fff;border:1.5px solid var(--gr-bordo);border-radius:12px;overflow:hidden;box-shadow:0 4px 20px rgba(13,47,255,.08)}
.gr-login-head{background:var(--gr-blu);padding:1.5rem;text-align:center}
.gr-login-head-logo{font-family:'Barlow Condensed',sans-serif;font-size:22px;font-weight:700;color:#fff;letter-spacing:2px}
.gr-login-head-logo span{color:#00e5ff}
.gr-login-head-sub{font-size:12px;color:rgba(255,255,255,.65);margin-top:4px}
.gr-login-body{padding:1.5rem}
.gr-login-err{font-size:12px;color:var(--gr-rosso);text-align:center;margin:6px 0}
.gr-login-links{font-size:12px;color:var(--gr-muted);text-align:center;margin-top:12px}
.gr-login-links a{color:var(--gr-blu);font-weight:600}

@media(max-width:600px){
  .gr-cards-grid{grid-template-columns:1fr}
  .gr-field-row{grid-template-columns:1fr}
  .gr-flavio-wrap{border-radius:0}
}
