/* LeadsHacking — stili operativi */
#blazor-error-ui { display: none; background: #fff3cd; border-top: 1px solid #ffc107; bottom: 0; left: 0; padding: .6rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
*, *::before, *::after { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 14px; color: #1a1a1a; margin: 0; background: #f5f6f8; }

.lh-layout { display: flex; min-height: 100vh; }
.lh-sidebar { width: 220px; background: #1a2744; color: #e0e6f0; padding: 1.5rem 1rem; flex-shrink: 0; display: flex; flex-direction: column; gap: .3rem; }
.lh-brand { font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: 1.5rem; }
.lh-nav-item { display: block; padding: .6rem .8rem; border-radius: 6px; color: #b8c5e0; text-decoration: none; }
.lh-nav-item:hover, .lh-nav-item.active { background: #2a3a62; color: #fff; }
.lh-nav-logout { margin-top: auto; background: none; border: 1px solid #3a4a72; color: #b8c5e0; padding: .5rem; border-radius: 6px; cursor: pointer; width: 100%; }
.lh-main { flex: 1; padding: 2rem; overflow-y: auto; }

.lh-card { background: #fff; border-radius: 8px; padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.lh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }

.lh-btn { background: #1a6fa8; color: #fff; border: none; padding: .65rem 1.2rem; border-radius: 6px; cursor: pointer; font-size: .9rem; }
.lh-btn:hover { background: #155d8f; }
.lh-btn:disabled { opacity: .5; cursor: not-allowed; }
.lh-btn-secondary { background: #6c757d; }
.lh-btn-sm { background: #1a6fa8; color: #fff; border: none; padding: .35rem .8rem; border-radius: 4px; cursor: pointer; font-size: .8rem; margin-right: .4rem; text-decoration: none; display: inline-block; }
.lh-btn-row { display: flex; gap: .5rem; margin: 1rem 0; }

label { display: block; font-weight: 600; margin: .8rem 0 .3rem; font-size: .85rem; color: #444; }
input, textarea, select { width: 100%; padding: .5rem .7rem; border: 1px solid #d0d5dd; border-radius: 5px; font-size: .9rem; font-family: inherit; }
input:focus, textarea:focus, select:focus { outline: 2px solid #1a6fa8; border-color: #1a6fa8; }

.lh-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.lh-table th { text-align: left; padding: .6rem .8rem; background: #f0f2f5; font-weight: 600; font-size: .8rem; text-transform: uppercase; color: #555; }
.lh-table td { padding: .6rem .8rem; border-top: 1px solid #eee; }
.lh-table tr:hover td { background: #fafbfc; }

.lh-badge { display: inline-block; background: #e8f0fe; color: #1a4fa8; padding: .2rem .6rem; border-radius: 4px; font-size: .75rem; font-weight: 600; margin: 0 .3rem; }

.lh-progress-wrap { background: #e9ecef; border-radius: 20px; height: 8px; margin: .5rem 0; overflow: hidden; }
.lh-progress { background: #1a6fa8; height: 100%; border-radius: 20px; transition: width .3s; }

.lh-success { color: #155724; background: #d4edda; padding: .5rem .8rem; border-radius: 4px; margin-top: .5rem; }
.lh-error { color: #721c24; background: #f8d7da; padding: .5rem .8rem; border-radius: 4px; margin-top: .5rem; }

.lh-bozza { background: #fff; border: 1px solid #e0e4ea; border-radius: 6px; padding: .8rem 1rem; margin-bottom: .5rem; cursor: pointer; }
.lh-bozza:hover { border-color: #1a6fa8; }
.lh-bozza-sel { border-color: #1a6fa8; box-shadow: 0 0 0 2px rgba(26,111,168,.2); }
.lh-bozza-header { display: flex; justify-content: space-between; align-items: center; }
.lh-bozza-detail { margin-top: 1.5rem; }

.lh-tabs { display: flex; gap: .5rem; margin-bottom: 1.5rem; }
.lh-tab { background: #e9ecef; border: none; padding: .6rem 1.2rem; border-radius: 6px; cursor: pointer; font-size: .9rem; }
.lh-tab-active { background: #1a6fa8; color: #fff; }

.lh-login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lh-login-wrap h1 { margin-bottom: 2rem; color: #1a2744; }
.lh-login-wrap button { margin-top: 1rem; width: 100%; }

.lh-search-bar { display: flex; gap: .5rem; margin-bottom: 1.5rem; }
.lh-search-bar input { max-width: 250px; }

h1 { font-size: 1.6rem; margin-bottom: 1.5rem; }
h3 { margin-top: 0; }

/* ── Popup selezione geografica (comuni/province) ── */
.geo-overlay { position:fixed; inset:0; background:rgba(15,23,42,.55); z-index:600;
    display:flex; align-items:center; justify-content:center; backdrop-filter:blur(2px); }
.geo-modal { background:#fff; border-radius:12px; width:min(720px,96vw); max-height:88vh;
    display:flex; flex-direction:column; box-shadow:0 20px 60px rgba(0,0,0,.35); overflow:hidden; }

.geo-header { display:flex; justify-content:space-between; align-items:center;
    padding:1rem 1.25rem; border-bottom:1px solid #eef0f3; flex-shrink:0; }
.geo-title { font-size:1.05rem; font-weight:700; color:#1e293b; }
.geo-subtitle { font-size:.8rem; color:#64748b; margin-top:.1rem; }
.geo-header-actions { display:flex; gap:.5rem; align-items:center; }
.geo-apply { background:#2980b9 !important; border-color:#2980b9 !important; color:#fff !important; }
.geo-close { background:#f1f5f9; border:none; width:30px; height:30px; border-radius:8px;
    cursor:pointer; color:#475569; font-size:.95rem; transition:background .15s; }
.geo-close:hover { background:#e2e8f0; }

.geo-capbar { display:flex; gap:.5rem; align-items:center; margin:.85rem 1.25rem;
    background:#f0f7ff; padding:.5rem .75rem; border-radius:8px; border:1px solid #d6e8fb; flex-shrink:0; }
.geo-caplabel { font-size:.82rem; font-weight:600; color:#2980b9; white-space:nowrap; }
.geo-capbar input { flex:1; padding:.4rem .65rem; border:1px solid #cbd5e1; border-radius:6px;
    font-size:.88rem; outline:none; }
.geo-capbar input:focus { border-color:#2980b9; box-shadow:0 0 0 2px rgba(41,128,185,.15); }
.geo-capclear { background:none; border:none; cursor:pointer; color:#94a3b8; font-size:.85rem; }
.geo-capcount { font-size:.78rem; color:#64748b; white-space:nowrap; }

.geo-tree { overflow-y:auto; flex:1; padding:0 1.25rem 1rem; }
.geo-tree summary { list-style:none; }
.geo-tree summary::-webkit-details-marker { display:none; }

.geo-row { display:flex; align-items:center; gap:.55rem; cursor:pointer;
    padding:.4rem .55rem; border-radius:7px; user-select:none; }
.geo-row:hover { background:#f8fafc; }
.geo-cb { accent-color:#2980b9; width:15px; height:15px; cursor:pointer; flex-shrink:0; margin:0; }
.geo-name { flex:1; color:#334155; }
.geo-name.geo-full { color:#16a34a; font-weight:600; }
.geo-name.geo-partial { color:#ea7317; font-weight:600; }
.geo-sigla { color:#94a3b8; font-weight:400; font-size:.82em; }

.geo-caret { width:.55rem; height:.55rem; border-right:2px solid #94a3b8;
    border-bottom:2px solid #94a3b8; transform:rotate(-45deg); transition:transform .15s; flex-shrink:0;
    margin-right:.1rem; }
details[open] > summary > .geo-caret { transform:rotate(45deg); }

.geo-badge { font-size:.72rem; color:#64748b; background:#f1f5f9; padding:.1rem .45rem;
    border-radius:10px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.geo-badge-full { background:#dcfce7; color:#16a34a; }
.geo-badge-partial { background:#fef3e2; color:#ea7317; }

.geo-row-area .geo-name { font-size:.95rem; font-weight:700; color:#1e293b; }
.geo-row-area .geo-name.geo-full { color:#16a34a; }
.geo-row-area .geo-name.geo-partial { color:#ea7317; }
.geo-row-reg .geo-name { font-size:.88rem; font-weight:600; }
.geo-row-prov .geo-name { font-size:.84rem; font-weight:500; }

.geo-children { padding-left:1.1rem; margin-left:.55rem; border-left:1px solid #eef0f3; }
.geo-area { margin-bottom:.35rem; }

.geo-comuni { display:flex; flex-wrap:wrap; gap:.3rem .4rem; padding:.35rem 0 .6rem .6rem; }
.geo-comune { display:inline-flex; align-items:center; gap:.35rem; padding:.25rem .55rem;
    border:1px solid #e2e8f0; border-radius:7px; cursor:pointer; font-size:.81rem;
    color:#475569; white-space:nowrap; background:#fff; transition:all .12s; width:auto; flex:0 0 auto; }
.geo-comune:hover { border-color:#cbd5e1; background:#f8fafc; }
.geo-comune.sel { background:#eff6ff; border-color:#bfdbfe; color:#1e40af; }
/* reset checkbox: annulla la regola globale input{width:100%;padding;border} */
.geo-modal input[type=checkbox] { width:auto; height:auto; padding:0; border:none;
    border-radius:0; box-shadow:none; accent-color:#2980b9; cursor:pointer; flex-shrink:0; }
.geo-cb { width:15px; height:15px; margin:0; }
.geo-comune input { margin:0; }
.geo-comune-nome { white-space:nowrap; }
.geo-cap { color:#b8c2cf; font-size:.72rem; font-variant-numeric:tabular-nums; }
.geo-comune.sel .geo-cap { color:#93c5fd; }
