:root{--primary:#24368c;--primary-dark:#1e2d73;--accent:#4962bd;--bg:#f5f7fb;--card:#fff;--text:#202226;--muted:#737b88;--line:#e3e7ef;--green:#2d8a61;--green-bg:#eaf7f0;--blue-bg:#edf1ff;--red:#b94b4b;--red-bg:#fff0f0;--shadow:0 14px 40px rgba(36,54,121,.08)}*{box-sizing:border-box}html{font-size:16px}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;-webkit-font-smoothing:antialiased}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}.app-shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:258px;background:#fff;border-right:1px solid var(--line);padding:22px 16px;display:flex;flex-direction:column;z-index:30}.brand{display:flex;align-items:center;gap:12px;padding:8px 10px 22px}.brand-mark{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(135deg,var(--primary),var(--accent));color:#fff;font-size:23px}.brand strong,.brand small{display:block}.brand strong{font-size:16px}.brand small{font-size:12px;color:var(--muted);margin-top:2px}.nav{display:flex;flex-direction:column;gap:6px}.nav a{padding:12px 14px;border-radius:12px;display:flex;align-items:center;gap:12px;color:#60717b;font-weight:700;font-size:14px}.nav a:hover,.nav a.active{background:#edf6f7;color:var(--primary)}.nav-label{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#9aa6ad;padding:18px 14px 6px}.sidebar-user{margin-top:auto;border-top:1px solid var(--line);padding:18px 10px 0;display:flex;align-items:center;justify-content:space-between}.sidebar-user strong,.sidebar-user small{display:block}.sidebar-user small{color:var(--muted);font-size:12px;margin-top:3px}.sidebar-user>a{font-size:22px;color:var(--muted)}.main{margin-left:258px;min-height:100vh}.topbar{height:76px;padding:0 30px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.86);backdrop-filter:blur(14px);display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:20}.topbar h1{font-size:20px;margin:0}.menu-toggle{display:none;border:0;background:transparent;font-size:24px}.avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#e9f3f5;color:var(--primary);font-weight:800}.content{max-width:1220px;margin:0 auto;padding:30px}.hero,.split-head,.agenda-heading,.panel-head,.date-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px}.hero{padding:28px 30px;background:linear-gradient(135deg,#fff,#edf6f7);border:1px solid var(--line);border-radius:24px;margin-bottom:20px}.hero h2,.agenda-heading h2,.panel h2{margin:4px 0}.hero p,.panel-head p,.panel>p{margin:5px 0 0;color:var(--muted)}.eyebrow{font-size:11px;letter-spacing:.12em;font-weight:900;color:var(--primary)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:12px;padding:11px 15px;font-weight:800;font-size:14px;cursor:pointer}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover{background:var(--primary-dark)}.btn-soft{background:#eaf3f5;color:var(--primary)}.btn-ghost{background:#fff;border:1px solid var(--line);color:#65757f}.btn-danger{background:var(--red-bg);color:var(--red)}.btn-block{width:100%;padding:14px}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px}.stat-card,.panel{background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow)}.stat-card{padding:22px}.stat-card span,.stat-card small{display:block;color:var(--muted)}.stat-card strong{font-size:32px;display:block;margin:8px 0}.panel{padding:24px;margin-bottom:20px}.panel-head{margin-bottom:20px}.panel-head h3,.panel h3{margin:0}.quick-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.quick-actions a{border:1px solid var(--line);border-radius:16px;padding:18px;display:flex;gap:14px;align-items:center}.quick-actions a>span:first-child{font-size:26px}.quick-actions strong,.quick-actions small{display:block}.quick-actions small{color:var(--muted);margin-top:4px}.date-toolbar{max-width:520px;margin:0 auto 22px}.icon-btn{width:42px;height:42px;border-radius:12px;border:1px solid var(--line);background:#fff;display:grid;place-items:center;font-size:24px;cursor:pointer}.icon-btn.danger{color:var(--red)}.date-picker{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);padding:8px 12px;border-radius:13px}.date-picker label{font-size:12px;color:var(--muted)}.date-picker input{border:0;padding:3px;background:transparent}.agenda-heading{margin-bottom:16px}.agenda-list{display:flex;flex-direction:column;gap:10px}.slot-card{display:grid;grid-template-columns:90px 1fr auto;gap:18px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px 18px;border-left:5px solid #cbd7dc}.slot-card.status-available{border-left-color:#4aa777}.slot-card.status-booked{border-left-color:var(--primary)}.slot-card.status-blocked{opacity:.78}.slot-time strong,.slot-time small{display:block}.slot-time strong{font-size:22px}.slot-time small{font-size:12px;color:var(--muted);margin-top:2px}.slot-main h3{margin:5px 0 2px}.slot-main p{margin:5px 0;color:var(--muted)}.phone{color:var(--primary);font-weight:700}.slot-actions{display:flex;gap:8px;align-items:center}.slot-actions form{margin:0}.status-pill{display:inline-flex;border:0;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.04em}.status-pill.free{background:var(--green-bg);color:var(--green)}.status-pill.booked{background:var(--blue-bg);color:var(--primary)}.status-pill.blocked{background:#eef1f2;color:#738087}.empty-state{text-align:center;background:#fff;border:1px dashed #cfdadd;border-radius:20px;padding:45px 20px}.empty-state strong{font-size:20px}.empty-state p{color:var(--muted)}.split-head{margin-bottom:18px}.search-box{display:flex;gap:10px;flex:1;max-width:650px}.search-box input,.form-stack input,.form-stack select,.form-stack textarea,.form-grid input,.form-grid select,.patient-search input{width:100%;border:1px solid #cedae0;border-radius:12px;padding:12px 13px;background:#fff;color:var(--text);outline:none}.search-box input:focus,.form-stack input:focus,.form-stack select:focus,.form-stack textarea:focus,.patient-search input:focus{border-color:#68aeba;box-shadow:0 0 0 3px rgba(22,105,122,.08)}label{display:block;font-size:12px;font-weight:800;margin-bottom:6px}.form-stack{display:flex;flex-direction:column;gap:15px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-grid.four{grid-template-columns:repeat(4,1fr)}.patient-list{display:flex;flex-direction:column;gap:10px}.patient-card,.user-row{background:#fff;border:1px solid var(--line);border-radius:15px;padding:14px 16px;display:grid;grid-template-columns:48px 1fr auto;gap:14px;align-items:center}.patient-card:hover{border-color:#b9d5dc}.patient-card h3{margin:0 0 4px}.patient-card p{margin:0;color:var(--muted);font-size:13px}.patient-initial{width:44px;height:44px;border-radius:13px;background:#e9f4f6;color:var(--primary);display:grid;place-items:center;font-weight:900}.patient-initial.large{width:66px;height:66px;font-size:24px;border-radius:18px}.patient-profile{display:flex;align-items:flex-start;gap:18px}.history-list>div{display:flex;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--line)}.booking-grid,.admin-grid{display:grid;grid-template-columns:minmax(260px,.75fr) minmax(0,1.5fr);gap:20px;align-items:start}.sticky-summary{position:sticky;top:96px}.big-time{font-size:48px;font-weight:900;color:var(--primary);line-height:1.1;margin:10px 0}.patient-search{position:relative;margin:18px 0}.search-results{position:absolute;left:0;right:0;top:calc(100% + 6px);background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 50px rgba(20,55,70,.14);z-index:10;overflow:hidden}.search-result{padding:12px 14px;display:flex;justify-content:space-between;gap:12px;cursor:pointer;border-bottom:1px solid var(--line)}.search-result:hover{background:#f5fafb}.search-result small{color:var(--muted)}.selected-patient{background:#ecf8f2;border:1px solid #c9ead8;color:#245d43;padding:12px 14px;border-radius:12px}.divider{display:flex;align-items:center;gap:12px;color:#9aa7ad;font-size:12px}.divider:before,.divider:after{content:"";height:1px;background:var(--line);flex:1}.hidden{display:none!important}.alert{padding:13px 15px;border-radius:12px;margin-bottom:16px}.alert-success{background:#eaf7f0;color:#226a49}.alert-error{background:var(--red-bg);color:#9b3f3f}.week-list{margin-top:22px}.week-day{display:grid;grid-template-columns:120px 1fr;gap:12px;padding:13px 0;border-top:1px solid var(--line)}.week-day>div{display:flex;flex-wrap:wrap;gap:8px}.period-chip{display:inline-flex;align-items:center;gap:7px;background:#eef6f7;border-radius:999px;padding:6px 8px 6px 11px}.period-chip button{width:22px;height:22px;border:0;border-radius:50%;background:#fff;color:var(--red);cursor:pointer}.closure-list,.user-list{display:flex;flex-direction:column;gap:9px;margin-top:18px}.closure-list form{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding-top:10px}.closure-list small,.user-row small{display:block;color:var(--muted);margin-top:3px}.muted-text{color:var(--muted);font-size:13px}.mobile-nav,.sidebar-overlay{display:none}.login-body{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at top,#eaf7f7,#f5f7f9 45%);padding:20px}.login-card{width:min(430px,100%);background:#fff;border:1px solid var(--line);border-radius:24px;padding:34px;box-shadow:0 24px 80px rgba(30,70,80,.12)}.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:28px}.login-brand>span{width:44px;height:44px;border-radius:14px;background:linear-gradient(135deg,var(--primary),var(--accent));color:#fff;display:grid;place-items:center;font-size:24px}.login-brand strong,.login-brand small{display:block}.login-brand small{color:var(--muted);margin-top:3px}.login-card h1{margin:0}.login-card>p{color:var(--muted);margin-top:6px;margin-bottom:22px}@media(max-width:1050px){.stats-grid{grid-template-columns:repeat(2,1fr)}.quick-actions{grid-template-columns:1fr}.form-grid.four{grid-template-columns:1fr 1fr}}@media(max-width:820px){body{padding-bottom:70px}.sidebar{transform:translateX(-105%);transition:.22s ease}.sidebar.open{transform:translateX(0)}.sidebar-overlay{position:fixed;inset:0;background:rgba(15,40,50,.35);z-index:25}.sidebar-overlay.show{display:block}.main{margin-left:0}.topbar{height:64px;padding:0 16px}.menu-toggle{display:block}.content{padding:18px 14px 26px}.mobile-nav{position:fixed;display:grid;grid-template-columns:repeat(4,1fr);left:0;right:0;bottom:0;height:68px;background:#fff;border-top:1px solid var(--line);z-index:24;padding-bottom:env(safe-area-inset-bottom)}.mobile-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:11px;color:#72818a}.mobile-nav a span{font-size:20px}.mobile-nav a.active{color:var(--primary);font-weight:800}.booking-grid,.admin-grid{grid-template-columns:1fr}.sticky-summary{position:static}.hero{padding:22px}.hero,.split-head{align-items:stretch;flex-direction:column}.slot-card{grid-template-columns:70px 1fr}.slot-actions{grid-column:1/-1;justify-content:flex-end;border-top:1px solid var(--line);padding-top:10px}.agenda-heading{align-items:flex-end}.week-day{grid-template-columns:1fr}.patient-profile{flex-direction:column}}@media(max-width:560px){.stats-grid{grid-template-columns:1fr 1fr;gap:10px}.stat-card{padding:16px}.stat-card strong{font-size:26px}.panel{padding:18px;border-radius:17px}.hero{border-radius:18px}.form-grid,.form-grid.four{grid-template-columns:1fr}.date-toolbar{gap:8px}.date-picker{flex:1}.date-picker input{width:100%}.agenda-heading h2{font-size:20px}.agenda-heading .btn{font-size:12px;padding:9px 11px}.slot-card{padding:14px 12px;gap:10px}.slot-time strong{font-size:20px}.slot-main h3{font-size:16px}.slot-actions .btn{flex:1}.search-box{flex-direction:column}.patient-card{grid-template-columns:42px 1fr auto;padding:12px}.login-card{padding:24px}.big-time{font-size:40px}}
/* Dashboard agenda settimanale - v1.1 */
.weekly-panel{overflow:hidden}.weekly-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:18px}.weekly-toolbar h3{font-size:22px;margin:4px 0}.weekly-toolbar p{margin:5px 0 0;color:var(--muted);font-size:13px}.week-navigation{display:flex;align-items:center;gap:8px;flex-shrink:0}.week-navigation .btn.is-current{box-shadow:inset 0 0 0 1px rgba(22,105,122,.08)}.weekly-scroll{overflow-x:auto;padding-bottom:6px;scrollbar-width:thin;scrollbar-color:#cbd8dc transparent}.weekly-grid{display:grid;grid-template-columns:repeat(7,minmax(135px,1fr));gap:10px;min-width:1030px}.week-column{background:#f8fafb;border:1px solid var(--line);border-radius:16px;overflow:hidden;min-height:280px}.week-column.is-today{border:2px solid rgba(22,105,122,.42);box-shadow:0 8px 28px rgba(22,105,122,.08)}.week-column.is-closed{background:#fbf8f8}.week-column-head{display:block;text-align:center;padding:12px 8px 10px;background:#fff;border-bottom:1px solid var(--line)}.week-column.is-today .week-column-head{background:#edf7f8}.week-column-head span,.week-column-head small,.week-column-head em{display:block}.week-column-head span{font-size:12px;font-weight:900;color:var(--primary);text-transform:uppercase;letter-spacing:.04em}.week-column-head strong{display:block;font-size:26px;line-height:1;margin:5px 0 3px}.week-column-head small{font-size:10px;color:var(--muted)}.week-column-head em{font-style:normal;margin-top:7px;font-size:10px;font-weight:900;color:var(--green);background:var(--green-bg);border-radius:999px;padding:4px 6px}.week-slots{display:flex;flex-direction:column;gap:6px;padding:8px}.week-slot{display:flex;align-items:center;gap:6px;padding:8px 8px;border-radius:10px;border:1px solid transparent;transition:transform .12s ease,border-color .12s ease,box-shadow .12s ease}.week-slot:hover{transform:translateY(-1px);box-shadow:0 5px 14px rgba(37,70,82,.08)}.week-slot strong{font-size:12px;min-width:36px}.week-slot span{font-size:10px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.week-slot.available{background:var(--green-bg);color:#246e4c;border-color:#cfe9da}.week-slot.booked{background:var(--blue-bg);color:var(--primary);border-color:#d4e8ef}.week-slot.blocked{background:#eef1f2;color:#758188;border-color:#e0e5e7}.week-empty{margin:10px 5px;padding:22px 8px;text-align:center;border:1px dashed #d6dfe2;border-radius:12px;color:var(--muted)}.week-empty strong,.week-empty small{display:block}.week-empty strong{font-size:12px;color:#697880}.week-empty small{font-size:10px;margin-top:4px}.week-empty.closed{background:var(--red-bg);border-color:#f0d8d8;color:var(--red)}.week-empty.closed strong{color:var(--red)}.weekly-mobile-hint{display:none;color:var(--muted);font-size:11px;margin-top:9px;text-align:right}
@media(max-width:1050px){.weekly-toolbar{align-items:flex-start;flex-direction:column}.weekly-grid{grid-template-columns:repeat(7,190px);min-width:max-content}.weekly-mobile-hint{display:block}}
@media(max-width:820px){.dashboard-hero .btn{width:100%}.weekly-panel{padding-left:14px;padding-right:14px}.weekly-scroll{margin-left:-4px;margin-right:-4px}.weekly-grid{grid-template-columns:repeat(7,205px);gap:9px}.week-column{min-height:250px}.week-navigation{width:100%;justify-content:space-between}.week-navigation .btn{flex:1}.weekly-toolbar h3{font-size:19px}}
@media(max-width:560px){.weekly-grid{grid-template-columns:repeat(7,190px)}.week-column-head{padding:10px 7px 9px}.week-column-head strong{font-size:23px}.week-slot{padding:8px 7px}.week-slot strong{font-size:12px}.week-slot span{font-size:10px}}
/* Sicurezza applicativa - v1.2 */
.security-divider{height:1px;background:var(--line);margin:26px 0}.security-value{font-size:22px!important}.security-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.security-checks>div{border:1px solid var(--line);border-radius:14px;padding:15px;background:#fbfcfd}.security-checks strong,.security-checks span{display:block}.security-checks strong{color:var(--primary);margin-bottom:5px}.security-checks span{font-size:13px;color:var(--muted);line-height:1.45}.audit-table-wrap{overflow-x:auto}.audit-table{width:100%;border-collapse:collapse;min-width:720px}.audit-table th,.audit-table td{text-align:left;padding:11px 10px;border-bottom:1px solid var(--line);font-size:13px}.audit-table th{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.05em}.security-stats .stat-card small{line-height:1.35}@media(max-width:820px){.security-checks{grid-template-columns:1fr}}@media(max-width:560px){.security-value{font-size:19px!important}}

/* v1.3 - Orari settimanali ed eccezioni per intervallo */
.schedule-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(330px,.8fr);gap:20px;align-items:start}.schedule-scroll{overflow-x:auto;padding-bottom:4px}.schedule-add-form,.schedule-table{min-width:690px}.schedule-grid{display:grid;grid-template-columns:minmax(150px,1.25fr) minmax(105px,.8fr) minmax(105px,.8fr) minmax(150px,1fr) 76px;gap:10px;align-items:center}.schedule-grid-head{padding:0 10px 8px;color:var(--muted);font-size:11px;font-weight:900;letter-spacing:.06em}.schedule-grid-inputs{padding:10px;background:#f7fafb;border:1px solid var(--line);border-radius:14px;margin-bottom:14px}.schedule-grid-inputs input,.schedule-grid-inputs select{width:100%;border:1px solid #cedae0;border-radius:10px;padding:10px 11px;background:#fff}.schedule-add-btn{width:100%}.schedule-row{padding:11px 10px;border-top:1px solid var(--line);font-size:14px}.schedule-row:hover{background:#fafcfd}.schedule-row-empty{color:var(--muted)}.schedule-day-name{font-weight:850;color:var(--text)}.schedule-remove{width:36px;height:36px;font-size:20px;margin-left:auto}.exception-form select,.exception-time-fields input,.exception-time-fields select{width:100%;border:1px solid #cedae0;border-radius:12px;padding:12px 13px;background:#fff;color:var(--text)}.exception-time-fields{display:grid;grid-template-columns:1fr 1fr 1.15fr;gap:12px}.exception-time-fields.is-hidden{display:none}.exception-list{display:flex;flex-direction:column;gap:10px;margin-top:20px}.exception-card{display:flex;align-items:center;justify-content:space-between;gap:14px;border-top:1px solid var(--line);padding-top:12px}.exception-card-main{display:flex;flex-wrap:wrap;align-items:center;gap:7px 10px;min-width:0}.exception-card-main strong{font-size:14px}.exception-card-main span{font-size:13px;color:var(--primary);font-weight:800}.exception-card-main small{flex-basis:100%;color:var(--muted)}.exception-badge{font-size:10px;font-weight:900;letter-spacing:.05em;border-radius:999px;padding:5px 8px}.exception-badge.closed{background:var(--red-bg);color:var(--red)}.exception-badge.custom{background:var(--blue-bg);color:var(--primary)}
@media(max-width:1050px){.schedule-layout{grid-template-columns:1fr}.exception-time-fields{grid-template-columns:1fr 1fr 1fr}}
@media(max-width:560px){.schedule-grid-head{font-size:10px}.exception-time-fields{grid-template-columns:1fr}.exception-card{align-items:flex-start}}

/* v1.4 - Spostamento appuntamenti con verifica slot */
.appointment-reschedule-box{border:1px solid #d8e5e9;background:#f8fbfc;border-radius:16px;padding:18px}.compact-head{margin-bottom:14px}.compact-head h3{margin-top:3px}.field-help{display:block;color:var(--muted);font-size:11px;margin-top:6px;line-height:1.4}.appointment-reschedule-box select:disabled{opacity:.7;cursor:wait}@media(max-width:560px){.appointment-reschedule-box{padding:14px}}

/* v1.5 - Importazione pazienti MioDottore */
.import-hero{align-items:flex-end}.import-grid{grid-template-columns:minmax(320px,.85fr) minmax(0,1.15fr)}.csv-dropbox{position:relative;border:1px dashed #b9cdd3;background:#f7fbfc;border-radius:16px;padding:18px;display:grid;grid-template-columns:54px 1fr;gap:14px;align-items:center}.csv-dropbox .csv-icon{width:52px;height:52px;border-radius:14px;display:grid;place-items:center;background:#e9f4f6;color:var(--primary);font-size:13px;font-weight:950}.csv-dropbox strong,.csv-dropbox small{display:block}.csv-dropbox small{color:var(--muted);margin-top:4px;line-height:1.35}.csv-dropbox input[type=file]{grid-column:1/-1;width:100%;border:1px solid var(--line);border-radius:12px;background:#fff;padding:10px}.import-stats{margin-bottom:18px}.import-result-panel .import-stats{margin-top:6px}.import-warning{background:#fff7e8;color:#7b5a18;border:1px solid #f1dfb8}.import-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:14px}.import-table{min-width:820px;margin:0}.import-table td strong{display:block}.table-note{display:block;color:var(--muted);font-size:11px;margin-top:3px;max-width:380px}.import-status{display:inline-flex;align-items:center;border-radius:999px;padding:5px 8px;font-size:10px;font-weight:900;letter-spacing:.03em;white-space:nowrap}.import-status.new{background:var(--green-bg);color:var(--green)}.import-status.duplicate_db,.import-status.duplicate_file{background:#eef1f2;color:#68777f}.import-status.review{background:#fff5dc;color:#806018}.import-status.invalid{background:var(--red-bg);color:var(--red)}.import-confirm-box{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(220px,.6fr);gap:12px;margin-top:18px;padding:16px;border:1px solid var(--line);border-radius:15px;background:#fafcfd}.check-row{display:flex!important;align-items:flex-start;gap:10px;margin:0!important;padding:3px 0}.check-row input{width:18px;height:18px;margin:2px 0 0;flex:0 0 auto}.check-row strong,.check-row small{display:block}.check-row small{color:var(--muted);font-weight:500;margin-top:4px;line-height:1.4}.import-confirm-box form:last-child{align-self:end}
@media(max-width:820px){.import-grid{grid-template-columns:1fr}.import-hero{align-items:stretch}.import-confirm-box{grid-template-columns:1fr}.import-confirm-box form:last-child{align-self:auto}}
@media(max-width:560px){.csv-dropbox{grid-template-columns:46px 1fr;padding:14px}.csv-dropbox .csv-icon{width:44px;height:44px}.import-stats{grid-template-columns:1fr 1fr}}

/* v1.6 - Ricerca istantanea e ordinamento liste */
.live-search-toolbar,.list-toolbar{display:flex;align-items:center;gap:10px;width:100%}.live-search-toolbar{max-width:760px}.live-search-field{position:relative;display:flex;align-items:center;flex:1;min-width:0}.live-search-field input{width:100%;border:1px solid #cedae0;border-radius:12px;padding:12px 42px 12px 39px;background:#fff;color:var(--text);outline:none}.live-search-field input:focus{border-color:#68aeba;box-shadow:0 0 0 3px rgba(22,105,122,.08)}.search-icon{position:absolute;left:13px;color:var(--muted);font-size:18px;pointer-events:none}.live-search-status{position:absolute;right:12px;color:var(--muted);font-size:11px;font-weight:800}.sort-select{border:1px solid #cedae0;border-radius:12px;padding:11px 36px 11px 12px;background:#fff;color:var(--text);font-weight:800;min-width:105px;outline:none}.sort-select:focus{border-color:#68aeba;box-shadow:0 0 0 3px rgba(22,105,122,.08)}.sort-select.compact{min-width:94px;padding-top:12px;padding-bottom:12px}.list-summary{font-size:12px;color:var(--muted);margin:4px 0 12px}.list-summary span{font-weight:900;color:var(--primary)}.patient-list.is-loading{opacity:.55;pointer-events:none;transition:opacity .12s ease}.patient-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.patient-search-row input{min-width:0}.search-message{cursor:default}.search-message:hover{background:#fff}.list-toolbar{margin:0 0 8px}.compact-empty{padding:20px 14px;border-radius:14px}.audit-table tr[hidden],.user-row[hidden]{display:none!important}.audit-table [data-list-empty] td{text-align:center;color:var(--muted);padding:24px}.patients-head{align-items:center}
@media(max-width:820px){.live-search-toolbar,.list-toolbar{align-items:stretch}.patients-head .live-search-toolbar{max-width:none}.sort-select{min-width:104px}}
@media(max-width:560px){.live-search-toolbar,.list-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 92px;gap:8px}.patients-head{gap:10px}.patients-head .btn{width:100%}.live-search-field input{padding-right:38px}.sort-select{width:100%;min-width:0;padding-left:9px;padding-right:28px}.patient-search-row{grid-template-columns:minmax(0,1fr) 88px}.sort-select.compact{min-width:0}.list-summary{margin-top:2px}.audit-table-wrap .list-toolbar{min-width:0}}


/* v1.7 - Branding Dott. Alberto Alini */
.doctor-brand{display:flex;flex-direction:column;align-items:center;gap:8px;padding:4px 8px 20px;border-bottom:1px solid var(--line);margin-bottom:10px}.doctor-brand img{display:block;width:188px;max-width:100%;height:auto;object-fit:contain}.doctor-brand-caption{font-size:10px;line-height:1;text-transform:uppercase;letter-spacing:.12em;font-weight:900;color:#7a8392}.topbar-mobile-logo{display:none}.nav a:hover,.nav a.active{background:#eef1ff;color:var(--primary)}.avatar{background:#eef1ff;color:var(--primary)}.hero{background:linear-gradient(135deg,#fff,#f0f3ff)}.btn-primary{box-shadow:0 8px 20px rgba(36,54,140,.16)}
.login-body{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 50% 0,#eef1ff 0,#f7f8fb 48%,#f2f4f8 100%);padding:24px}.login-card{width:min(455px,100%);background:rgba(255,255,255,.97);border:1px solid #e1e5ee;border-radius:28px;padding:34px 38px 30px;box-shadow:0 28px 90px rgba(32,39,72,.14)}.login-doctor-brand{display:flex;justify-content:center;padding:0 6px 24px;margin-bottom:24px;border-bottom:1px solid var(--line)}.login-doctor-brand img{display:block;width:min(285px,86%);height:auto;object-fit:contain}.login-heading{text-align:center;margin-bottom:22px}.login-kicker{display:inline-block;font-size:10px;letter-spacing:.16em;font-weight:950;color:var(--primary);margin-bottom:8px}.login-heading h1{font-size:25px;line-height:1.15;margin:0;color:#22252b}.login-heading p{color:var(--muted);margin:8px 0 0;font-size:14px}.login-footer-brand{text-align:center;color:#9198a4;font-size:11px;margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}.login-card .form-stack label{font-weight:800;color:#414752}.login-card .form-stack input{border-color:#d7dce6;background:#fbfcfe}.login-card .form-stack input:focus{border-color:#7e8ed0;box-shadow:0 0 0 3px rgba(36,54,140,.09);outline:none}
@media(max-width:820px){.doctor-brand img{width:182px}.topbar{display:grid;grid-template-columns:42px 1fr 42px;gap:8px}.topbar-mobile-logo{display:flex;align-items:center;justify-content:center;min-width:0}.topbar-mobile-logo img{width:92px;max-height:48px;object-fit:contain}.topbar-title{display:none}.menu-toggle{justify-self:start}.avatar{justify-self:end}}
@media(max-width:560px){.login-body{padding:14px}.login-card{padding:26px 20px 24px;border-radius:22px}.login-doctor-brand{padding-bottom:20px;margin-bottom:20px}.login-doctor-brand img{width:min(250px,90%)}.login-heading h1{font-size:22px}.doctor-brand img{width:174px}.topbar-mobile-logo img{width:84px}}
