:root{--navy:#091a35;--navy2:#122a4d;--ink:#1a2942;--muted:#7889a3;--line:#e4eaf2;--canvas:#f4f7fb;--surface:#fff;--blue:#3477f6;--blue-dark:#2563dd;--lightblue:#edf4ff;--green:#148b70;--amber:#b76b11;--red:#d74755;--shadow:0 10px 35px rgba(36,59,103,.055);--radius:16px}*{box-sizing:border-box}html{font-size:14px}body{margin:0;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--canvas);-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}a{text-decoration:none;color:inherit}img{max-width:100%}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #9dc0ff;outline-offset:2px}.boot-screen{min-height:100vh;display:grid;place-content:center;text-align:center;gap:24px;color:var(--muted)}.boot-logo{width:180px;height:90px;object-fit:contain;margin:auto}.spinner{border:3px solid #dbe8fb;border-top-color:var(--blue);width:32px;height:32px;border-radius:50%;animation:spin .8s linear infinite;margin:auto}@keyframes spin{to{transform:rotate(360deg)}}.login-page{min-height:100vh;display:grid;grid-template-columns:1.05fr 1fr;background:#fff}.login-showcase{background:radial-gradient(circle at 83% 12%,#255799 0,transparent 43%),linear-gradient(125deg,#091935,#18345f);padding:60px 9%;color:white;display:flex;flex-direction:column;position:relative;overflow:hidden}.login-showcase:after{content:"";position:absolute;width:550px;height:550px;border:1px solid #ffffff25;border-radius:50%;right:-220px;bottom:-270px;box-shadow:0 0 0 70px #ffffff09,0 0 0 150px #ffffff07;pointer-events:none}.login-brand{display:flex;align-items:center;gap:12px;font-size:15px;font-weight:800;letter-spacing:.04em;z-index:1}.logo-symbol{height:36px;width:36px;object-fit:contain;filter:invert(1)}.login-text{margin:auto 0;max-width:520px;position:relative;z-index:1}.eyebrow{font-size:11px;letter-spacing:.19em;text-transform:uppercase;font-weight:800;color:#82b9ff}.login-text h1{font-size:clamp(35px,4vw,64px);letter-spacing:-.05em;line-height:1.1;margin:18px 0 23px}.login-text p{font-size:17px;line-height:1.7;color:#c1d3ee}.login-chip-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:30px}.login-chip{padding:9px 14px;background:#ffffff12;border:1px solid #ffffff24;border-radius:8px;color:#d9e8ff;font-weight:600}.login-footer{z-index:1;color:#9bb3d3;font-size:12px}.login-form-col{display:flex;justify-content:center;align-items:center;padding:34px}.login-card{width:100%;max-width:430px}.login-card .mobile-logo{display:none}.login-card h2{font-size:30px;letter-spacing:-.04em;margin:0 0 8px}.login-card .subtitle{color:var(--muted);line-height:1.6;margin:0 0 38px}.label{font-size:12px;font-weight:750;display:block;margin-bottom:9px;color:#3a4d68}.input{width:100%;border:1px solid #dbe4f1;border-radius:11px;padding:12px 14px;background:#fff;min-height:44px;color:var(--ink);outline:none;transition:border-color .15s,box-shadow .15s}.input:focus{border-color:#75a2fa;box-shadow:0 0 0 3px #3477f61a}.input::placeholder{color:#9aa9ba}.field{margin-bottom:20px}.field-help{font-size:11px;color:var(--muted);margin:6px 0 0}.btn{border:1px solid transparent;border-radius:10px;padding:10px 15px;display:inline-flex;align-items:center;gap:8px;justify-content:center;font-weight:700;line-height:1.15;min-height:38px;white-space:nowrap;transition:background .15s,box-shadow .15s}.btn-primary{background:var(--blue);color:white;box-shadow:0 5px 12px #3477f626}.btn-primary:hover{background:var(--blue-dark)}.btn-subtle{color:#435675;border-color:var(--line);background:#fff}.btn-subtle:hover{background:#f2f6ff}.btn-danger{color:var(--red);border-color:#ffd9dc;background:#fff}.btn-danger:hover{background:#fff3f3}.btn-ghost{background:transparent;color:#5f7594}.btn-ghost:hover{background:#eaf0f9}.btn-block{width:100%}.btn-sm{min-height:31px;padding:7px 10px;border-radius:8px;font-size:12px}.login-submit{height:48px;margin-top:7px;font-size:14px}.lock-info{color:#8394aa;font-size:12px;text-align:center;margin-top:24px}.error-inline{background:#fff0f1;color:#b33143;border-radius:9px;padding:11px 13px;margin:4px 0 18px;border:1px solid #ffdadd}.layout{display:grid;grid-template-columns:250px minmax(0,1fr);min-height:100vh}.sidebar{background:var(--navy);color:#afc0da;display:flex;flex-direction:column;min-width:0;position:sticky;top:0;height:100vh;overflow-y:auto;z-index:25}.sidebar-head{padding:28px 24px 31px}.brand-line{display:flex;align-items:center;gap:10px;color:#fff;letter-spacing:.015em;font-size:18px;font-weight:800}.sidebar-mark{width:36px;height:36px;object-fit:contain;filter:invert(1)}.brand-sub{font-size:10px;color:#7295c9;letter-spacing:.19em;margin:4px 0 0 46px;font-weight:750}.nav-section{padding:0 13px 24px}.nav-title{font-size:10px;letter-spacing:.17em;font-weight:800;color:#6683ad;margin:14px 12px 12px;text-transform:uppercase}.nav-link{width:100%;text-align:left;border:0;color:#b9c9e2;background:transparent;padding:13px 14px;display:flex;gap:13px;align-items:center;border-radius:10px;font-size:13px;font-weight:650;margin:3px 0}.nav-link:hover{background:#1b3355;color:#fff}.nav-link.active{background:linear-gradient(90deg,#2a5292,#243d64);color:white;box-shadow:inset 3px 0 #6fafff}.nav-ico{font-size:17px;width:21px;text-align:center;opacity:.92}.sidebar-bottom{margin-top:auto;padding:24px;border-top:1px solid #29405e}.sidebar-person{display:flex;gap:10px;align-items:center;color:#e1e9f9}.avatar{display:inline-grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#2b5da3;color:white;font-weight:800;flex-shrink:0}.small-name{font-weight:750;font-size:12px;overflow:hidden;text-overflow:ellipsis;max-width:150px;white-space:nowrap}.small-role{color:#8ca4c5;font-size:11px;margin-top:3px}.sidebar-logout{width:100%;margin-top:15px;color:#b7c9df;font-size:12px;text-align:left}.workspace{min-width:0}.topbar{position:sticky;top:0;z-index:20;background:#ffffffeb;backdrop-filter:blur(16px);height:77px;border-bottom:1px solid #e5ebf3;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(22px,3vw,47px)}.top-left{display:flex;align-items:center;gap:17px}.top-title{font-size:16px;font-weight:800;letter-spacing:-.02em}.top-path{font-size:12px;color:#99aac0;margin-top:5px}.top-right{display:flex;gap:14px;align-items:center}.top-pill{border:1px solid #dce8f3;color:#516681;background:white;padding:8px 11px;border-radius:9px;font-size:11px;font-weight:750}.status-dot{height:7px;width:7px;display:inline-block;background:#12b981;border-radius:50%;margin-right:6px}.mobile-toggle{display:none;border:0;background:transparent;font-size:20px}.main{max-width:1480px;margin:0 auto;padding:30px clamp(20px,3vw,47px) 80px}.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:24px}.section-head h1{font-size:25px;letter-spacing:-.035em;margin:0 0 8px;font-weight:800}.section-head p{color:var(--muted);margin:0;line-height:1.5}.head-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.page-tag{color:#4c79c5;background:#edf4ff;padding:9px 12px;border-radius:8px;font-size:12px;font-weight:700}.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:25px}.kpi{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:22px 22px 19px;box-shadow:var(--shadow);min-width:0}.kpi-head{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:12px;color:#637995;font-weight:650}.kpi-ico{width:36px;height:36px;border-radius:10px;background:var(--lightblue);color:var(--blue);display:grid;place-items:center;font-size:18px}.kpi-num{font-size:33px;line-height:1.4;font-weight:850;letter-spacing:-.05em;margin-top:8px}.kpi-hint{font-size:11px;color:#9aaac0;margin-top:4px}.content-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);gap:20px}.panel{background:white;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;min-width:0}.panel-head{padding:20px 22px;border-bottom:1px solid #edf1f7;display:flex;justify-content:space-between;gap:14px;align-items:center;flex-wrap:wrap}.panel-heading{font-size:14px;font-weight:800;letter-spacing:-.01em}.panel-desc{font-size:11px;color:#9bacbe;margin-top:5px}.panel-body{padding:22px}.empty{padding:50px 24px;text-align:center;color:#97a7bb;font-size:13px}.empty-ico{font-size:33px;margin-bottom:13px}.subtle{color:var(--muted)}.table-wrap{overflow:auto;max-width:100%}.data-table{width:100%;border-collapse:collapse;white-space:nowrap;text-align:left;font-size:12px}.data-table th{background:#f9fbfe;font-size:10px;letter-spacing:.075em;color:#8b9cb0;text-transform:uppercase;font-weight:800;padding:13px 17px;position:sticky;top:0}.data-table td{padding:13px 17px;border-top:1px solid #f0f3f8;vertical-align:middle;max-width:340px;overflow:hidden;text-overflow:ellipsis}.data-table tr:hover td{background:#fbfdff}.cell-title{font-weight:750;color:#223859}.cell-sub{font-size:11px;color:#95a5b8;margin-top:4px}.truncate{max-width:270px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.badge{display:inline-flex;align-items:center;font-size:10px;font-weight:750;white-space:nowrap;border-radius:7px;padding:5px 8px;background:#f0f4f9;color:#63758e}.badge-blue{background:#eaf2ff;color:#3976d1}.badge-green{background:#e7f9f2;color:#129371}.badge-red{background:#fff0f1;color:#d54d5d}.badge-amber{background:#fff5e3;color:#a97721}.badge-outline{border:1px solid #dce6f2;background:white;color:#6c809a}.device-id{font-variant-numeric:tabular-nums;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;color:#7487a2}.list-slim{margin:0;padding:0;list-style:none}.list-slim li{padding:13px 0;border-bottom:1px solid #edf2f7;display:flex;gap:12px;align-items:flex-start}.list-slim li:last-child{border:0}.event-icon{width:33px;height:33px;display:grid;place-items:center;flex:none;border-radius:10px;background:#fff1f0;color:#cf5864}.event-icon.info{background:#eaf3ff;color:#5081d0}.row-between{display:flex;justify-content:space-between;gap:10px}.event-title{font-size:12px;font-weight:750}.event-sub{color:#95a7b8;font-size:11px;margin-top:6px}.cards-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(295px,1fr));gap:18px}.device-card{border:1px solid #e4eaf3;background:#fff;border-radius:16px;padding:20px;box-shadow:var(--shadow);transition:transform .16s,box-shadow .16s}.device-card:hover{transform:translateY(-2px);box-shadow:0 13px 30px #233a5c12}.device-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.device-avatar{width:43px;height:43px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(145deg,#edf5ff,#dceafd);color:#3a72cc;font-size:20px}.device-card h3{font-size:16px;letter-spacing:-.025em;margin:16px 0 5px}.device-code{font-size:11px;color:#8da0b6;font-family:ui-monospace,Menlo,monospace}.device-meta{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:19px 0;border-top:1px solid #f0f3f7;padding-top:15px}.meta-label{color:#98a9bb;font-size:10px;margin-bottom:5px}.meta-value{font-size:12px;font-weight:750}.device-actions{display:flex;gap:8px}.filterbar{display:flex;gap:11px;align-items:center;flex-wrap:wrap;margin-bottom:17px}.searchbox{position:relative;max-width:380px;width:100%;flex:1 1 220px}.searchbox input{padding-left:39px}.searchbox:before{content:'⌕';position:absolute;left:13px;top:8px;font-size:21px;color:#90a3bb}.filter-select{min-width:145px;max-width:240px}.group-tags{display:flex;gap:5px;flex-wrap:wrap;margin-top:10px}.info-strip{display:flex;align-items:center;gap:11px;border-radius:12px;background:#edf5ff;color:#5376a8;border:1px solid #dce9fb;padding:14px 16px;font-size:12px;margin-bottom:20px;line-height:1.5}.config-card{border:1px solid var(--line);border-radius:14px;background:#fff;overflow:hidden;margin-bottom:16px}.config-top{padding:17px 21px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px}.config-body{border-top:1px solid var(--line);padding:17px 20px}.config-stats{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.codebox{border-radius:10px;background:#0d1d34;color:#cfdded;max-height:400px;overflow:auto;padding:18px;font-family:ui-monospace,Menlo,monospace;font-size:11px;line-height:1.6;white-space:pre;tab-size:2}.codebox.small{max-height:190px}.disclosure{border:none;background:transparent;color:var(--blue-dark);font-size:12px;font-weight:800;padding:9px 0}.mac-name{font-weight:750}.mac-row{display:flex;align-items:center;gap:10px}.mac-dot{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;color:#3d7aeb;background:#eaf2ff;font-size:16px}.group-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:23px}.group-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:15px}.group-card h3{font-size:17px;margin:0}.group-device-row{display:flex;justify-content:space-between;align-items:center;gap:10px;border-top:1px solid #edf1f7;padding:11px 0;font-size:12px}.group-device-row:first-child{border:0}.group-device-name{overflow:hidden;text-overflow:ellipsis}.role-marker{display:inline-flex;align-items:center;gap:7px}.tiny-circle{width:23px;height:23px;background:#e6eefb;color:#5c83ca;border-radius:7px;display:inline-grid;place-items:center;font-size:11px;font-weight:800}.small-actions{display:flex;gap:7px;align-items:center}.pager{display:flex;justify-content:space-between;align-items:center;padding:17px 22px;border-top:1px solid var(--line);color:#8494aa;font-size:12px}.archive-table td{max-width:250px}.archive-table td:first-child{font-weight:750}.archive-controls{display:flex;align-items:center;gap:9px;margin-bottom:16px;flex-wrap:wrap}.archive-title{font-size:15px;font-weight:750;margin-top:4px}.modal-backdrop{position:fixed;inset:0;z-index:100;background:#0c1d3b96;display:flex;justify-content:center;align-items:center;padding:25px;backdrop-filter:blur(4px)}.modal{width:min(680px,100%);max-height:min(91vh,950px);background:#fff;box-shadow:0 26px 85px #071b3e55;border-radius:18px;display:flex;flex-direction:column;overflow:hidden}.modal.modal-lg{width:min(1050px,100%)}.modal-head{padding:21px 25px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:14px}.modal-head h2{margin:0;font-size:18px;letter-spacing:-.02em}.icon-button{border:none;background:#f1f4f9;color:#647c9a;border-radius:8px;width:33px;height:33px;display:grid;place-items:center;font-size:20px}.modal-content{overflow:auto;padding:24px 25px}.modal-foot{border-top:1px solid var(--line);padding:16px 25px;display:flex;justify-content:flex-end;gap:10px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.form-grid .field{margin:0}.field.full{grid-column:1/-1}.textarea{resize:vertical;min-height:100px;font-family:ui-monospace,Menlo,monospace;font-size:12px;line-height:1.5}.checkline{display:flex;gap:9px;align-items:center;font-size:12px;color:#4e6079;cursor:pointer;padding:8px 0}.checkline input{width:16px;height:16px;accent-color:var(--blue)}.checkbox-panel{max-height:220px;overflow:auto;border:1px solid var(--line);padding:12px 15px;border-radius:12px;display:grid;grid-template-columns:1fr 1fr;gap:5px}.tab-row{display:flex;gap:7px;overflow:auto;padding-bottom:5px;margin-bottom:18px}.tab{border:1px solid #e0e8f2;background:#fff;border-radius:9px;padding:9px 12px;font-weight:750;font-size:12px;color:#768ba3}.tab.active{background:var(--lightblue);color:#3274e5;border-color:#c7ddff}.stat-row{display:flex;gap:15px;flex-wrap:wrap;align-items:center}.detail-headline{display:flex;align-items:center;gap:13px}.detail-name{font-weight:850;font-size:21px;letter-spacing:-.02em}.detail-sub{font-size:11px;color:#91a3b9;margin-top:5px}.detail-tiny{padding:13px 15px;border-radius:10px;background:#f4f7fc;color:#667b97;font-size:12px}.alert-note{color:#8a5925;background:#fff6e7;border:1px solid #ffe4b5;border-radius:10px;padding:12px 14px;font-size:12px;line-height:1.6;margin-bottom:18px}.refresh-note{color:#97a8bd;font-size:11px}.grid-view{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:15px 0}.datum{background:#f5f8fc;padding:12px;border-radius:10px;min-width:0}.datum-name{font-size:10px;color:#8ea0b5;margin-bottom:6px}.datum-value{font-size:12px;font-weight:750;overflow-wrap:anywhere}.toast{position:fixed;right:22px;bottom:20px;z-index:200;max-width:460px;background:#0c284c;color:#fff;box-shadow:0 12px 45px #0a1f4170;border-radius:12px;padding:14px 18px;font-size:12px;line-height:1.5}.toast.error{background:#b53748}.loading-card{display:grid;place-items:center;min-height:300px;color:#8fa1b5;gap:12px}.loading-card .spinner{width:25px;height:25px}.mobile-dim{display:none}.hidden{display:none!important}@media(max-width:1250px){.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.content-grid{grid-template-columns:1fr}}@media(max-width:900px){.layout{grid-template-columns:1fr}.sidebar{position:fixed;left:0;top:0;transform:translateX(-100%);transition:transform .2s;width:260px}.sidebar.open{transform:translateX(0)}.mobile-dim.visible{display:block;position:fixed;inset:0;background:#03152f88;z-index:24}.mobile-toggle{display:block}.topbar{padding:0 20px}.login-page{grid-template-columns:1fr}.login-showcase{display:none}.login-card .mobile-logo{display:block;width:160px;margin:0 auto 50px}.login-form-col{min-height:100vh}.main{padding:27px 22px 65px}}@media(max-width:600px){.kpi-grid{grid-template-columns:1fr 1fr;gap:10px}.kpi{padding:16px}.kpi-num{font-size:27px}.kpi-head{font-size:11px}.kpi-ico{width:29px;height:29px}.main{padding:24px 14px 60px}.top-pill{display:none}.section-head h1{font-size:21px}.panel-head{padding:16px}.panel-body{padding:16px}.data-table td,.data-table th{padding:11px 12px}.cards-grid{grid-template-columns:1fr}.modal-backdrop{padding:9px}.modal{max-height:96vh}.modal-head,.modal-content{padding:17px}.modal-foot{padding:12px 17px}.form-grid,.checkbox-panel{grid-template-columns:1fr}.topbar{height:63px}.content-grid{gap:13px}.grid-view{grid-template-columns:1fr 1fr}}

/* Elenchi MAC completi, espandibili per ciascun Twig/configurazione. */
.cards-grid{align-items:start}
.device-mac-section{border-top:1px solid #edf1f7;margin-top:16px;padding-top:13px}
.device-mac-heading{color:#90a1b7;font-size:10px;font-weight:750;letter-spacing:.025em;margin-bottom:10px}
.config-mac-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:17px 0 16px}
.device-mac-section .mac-disclosure+.mac-disclosure{margin-top:8px}
.mac-disclosure{min-width:0;border:1px solid #dfe8f3;border-radius:11px;background:#fbfdff;overflow:hidden}
.mac-disclosure-toggle{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px;min-height:46px;color:#263d5c;font-size:12px}
.mac-disclosure-toggle::-webkit-details-marker{display:none}
.mac-disclosure-toggle::marker{content:""}
.mac-disclosure-toggle:focus-visible{outline:3px solid #9dc0ff;outline-offset:-3px;border-radius:11px}
.mac-disclosure-title{display:flex;align-items:center;gap:7px;min-width:0;white-space:nowrap}
.mac-disclosure-title .badge{font-size:10px;padding:3px 6px}
.mac-chevron{font-size:20px;color:#5d85c8;font-weight:600;display:inline-block;line-height:1;transition:transform .16s}
.mac-disclosure[open] .mac-chevron{transform:rotate(90deg)}
.mac-disclosure-label{font-size:11px;color:#3b74cc;font-weight:750;white-space:nowrap}
.mac-open-label{display:none}.mac-disclosure[open] .mac-open-label{display:inline}.mac-disclosure[open] .mac-closed-label{display:none}
.mac-disclosure-body{border-top:1px solid #e4ebf5;padding:11px;background:#fff}
.mac-list-caption{font-size:10px;color:#8da0b6;margin:0 0 10px}
.mac-entries{max-height:355px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.mac-entry{display:flex;justify-content:space-between;align-items:center;gap:9px;padding:10px 0;border-bottom:1px solid #ecf0f6}
.mac-entry:first-child{padding-top:2px}.mac-entry:last-child{border-bottom:0;padding-bottom:2px}
.mac-entry-info{flex:1;min-width:0;overflow-wrap:anywhere}
.mac-entry-name{font-size:11px;color:#263b5a;line-height:1.45;font-weight:750}
.mac-unnamed{font-weight:500;color:#95a5b8;font-style:italic}
.mac-entry-address{margin-top:5px;font-size:10px;color:#647d9e;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;white-space:nowrap;letter-spacing:.015em}
.mac-entry .btn{font-size:10px;padding:6px 8px;min-height:27px;flex:none}
.mac-no-addresses{font-size:11px;color:#8c9fb7;margin:0;line-height:1.5}
@media(max-width:800px){.config-mac-sections{grid-template-columns:1fr}}

/* v3: schede Twig ordinate e accesso agli indirizzi in un pannello dedicato. */
.cards-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:stretch}
.device-card{display:flex;flex-direction:column;min-width:0;min-height:408px;padding:21px 22px 18px;border-color:#e0e7f0;border-radius:16px;box-shadow:0 4px 19px rgba(28,57,102,.045);transform:none}
.device-card:hover{transform:none;box-shadow:0 10px 28px rgba(26,54,97,.09);border-color:#d2e0f4}
.device-card-top{min-height:42px}
.device-avatar{background:#edf4ff;border-radius:12px;width:41px;height:41px;color:#3771d6}
.device-identity{margin-top:14px;min-height:73px}
.device-eyebrow{font-size:9px;letter-spacing:.11em;color:#98a8bc;font-weight:800;margin-bottom:7px}
.device-card h3{font-size:16px;line-height:1.26;letter-spacing:-.027em;font-weight:800;margin:0 0 7px;overflow-wrap:anywhere}
.device-code{font-size:11px;color:#7388a6;font-weight:500;letter-spacing:.01em}
.device-card .group-tags{margin:12px 0 0;gap:5px}
.device-card .group-tags .badge{max-width:100%;overflow:hidden;text-overflow:ellipsis}
.device-card .device-meta{margin:17px 0 0;padding-top:15px;gap:15px 10px;grid-template-columns:repeat(2,minmax(0,1fr))}
.device-card .meta-label{font-size:10px;line-height:1.2;margin:0 0 7px;letter-spacing:.025em}
.device-card .meta-value{font-size:12px;line-height:1.35;overflow-wrap:anywhere}
.device-card .device-mac-section{border-top:1px solid #edf1f7;margin:18px 0 0;padding:16px 0 0}
.device-mac-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#6e8099;font-size:10px;font-weight:850;letter-spacing:.06em;margin-bottom:10px}
.device-mac-heading span{font-weight:600;letter-spacing:0;color:#9aabc1;font-size:10px;text-align:right}
.device-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:auto;padding-top:15px}
.device-actions .btn{min-width:0;padding:10px 7px;font-size:11px;white-space:normal;text-align:center;min-height:37px}
.device-actions .btn-primary{box-shadow:none}
.mac-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.mac-shortcut{border:1px solid #dde7f4;border-radius:11px;background:#f8fbff;padding:11px;display:flex;align-items:center;gap:9px;min-width:0;min-height:64px;text-align:left;color:#284365;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease;cursor:pointer}
.mac-shortcut:hover{background:#ecf4ff;border-color:#a8c9f9;box-shadow:0 4px 12px rgba(51,103,188,.09)}
.mac-shortcut:focus-visible{outline:3px solid #9dc0ff;outline-offset:2px}
.mac-shortcut-wifi{background:#fffaf2;border-color:#f4e9d7;color:#7d6338}
.mac-shortcut-wifi:hover{background:#fff4dd;border-color:#e8cca0}
.mac-shortcut-icon{flex:0 0 27px;height:27px;display:grid;place-items:center;border-radius:8px;background:#e5efff;color:#3374df;font-size:14px;font-weight:800}
.mac-shortcut-wifi .mac-shortcut-icon{background:#fff0d8;color:#ba842d}
.mac-shortcut-copy{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.mac-shortcut-type{color:#5e7492;font-size:10px;font-weight:700;line-height:1.2;white-space:nowrap}
.mac-shortcut-number{color:#263d5c;font-size:15px;font-weight:850;line-height:1.15;white-space:nowrap}
.mac-shortcut-number small{font-size:10px;color:#889ab0;font-weight:650}
.mac-shortcut-arrow{align-self:flex-start;color:#98aed0;font-size:15px;line-height:1;font-weight:700}
.config-mac-sections{display:block;margin:15px 0}
.config-mac-sections .mac-shortcuts{max-width:520px;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.config-mac-sections .mac-shortcut{min-height:69px;padding:12px 16px}
.config-card .config-stats{margin:0}
.config-card .config-body{padding:17px 20px 13px}
.config-card .config-top{padding:17px 20px}
#mac-explorer-root:empty{display:none}
.mac-explorer-shell{position:fixed;inset:0;z-index:110;display:flex;justify-content:flex-end}
.mac-explorer-backdrop{position:absolute;inset:0;border:0;background:rgba(5,18,40,.56);width:100%;height:100%;cursor:default;backdrop-filter:blur(2px)}
.mac-explorer-panel{position:relative;height:100vh;height:100dvh;width:min(780px,calc(100vw - 36px));display:flex;flex-direction:column;background:#fff;box-shadow:-16px 0 65px rgba(2,13,32,.22);animation:mac-panel-in .18s ease-out;overflow:hidden}
@keyframes mac-panel-in{from{transform:translateX(18px);opacity:.85}to{transform:translateX(0);opacity:1}}
.mac-explorer-header{padding:29px 34px 23px;display:flex;justify-content:space-between;align-items:flex-start;gap:17px;border-bottom:1px solid #e8edf5}
.mac-explorer-kicker{color:#6389c4;letter-spacing:.14em;font-size:10px;font-weight:850;margin-bottom:9px}
.mac-explorer-heading{min-width:0}
.mac-explorer-heading h2{font-size:27px;letter-spacing:-.04em;font-weight:850;line-height:1.2;margin:0;display:flex;align-items:center;gap:11px}
.mac-explorer-total{font-size:12px;letter-spacing:0;background:#eaf2ff;color:#3471d5;font-weight:850;border-radius:8px;padding:6px 10px}
.mac-explorer-heading p{display:flex;gap:9px;flex-wrap:wrap;color:#8191a8;font-size:12px;margin:11px 0 0;line-height:1.5}
.mac-explorer-heading p strong{color:#455a76;font-weight:750}
.mac-explorer-separator{color:#c3d0e0}
.mac-explorer-close{display:grid;place-items:center;flex:none;border:1px solid #e6ecf4;border-radius:11px;background:#f7f9fd;color:#67809e;width:38px;height:38px;font-size:24px;line-height:1;cursor:pointer}
.mac-explorer-close:hover{background:#edf3fc;color:#2d4e79}
.mac-explorer-controls{padding:18px 34px;display:flex;gap:14px;align-items:center;justify-content:space-between}
.mac-explorer-search{position:relative;display:block;flex:1;max-width:480px;min-width:0}
.mac-explorer-search span{position:absolute;left:13px;top:9px;font-size:23px;color:#8ca2be;pointer-events:none}
.mac-explorer-search input{border:1px solid #dce5f0;background:#f9fbfe;border-radius:11px;padding:12px 14px 12px 40px;height:43px;width:100%;color:#213b5b;outline:none;font-size:12px}
.mac-explorer-search input:focus{border-color:#83acee;box-shadow:0 0 0 3px #edf4ff;background:#fff}
.mac-explorer-config{font-size:11px;color:#8598b0;white-space:nowrap}
.mac-explorer-config strong{color:#4c6484;font-weight:850}
.mac-explorer-table-scroll{flex:1;overflow:auto;scrollbar-width:thin;overscroll-behavior:contain;border-top:1px solid #eef1f6;border-bottom:1px solid #eef1f6}
.mac-explorer-table{width:100%;border-collapse:separate;border-spacing:0;text-align:left;table-layout:fixed}
.mac-explorer-table thead{position:sticky;top:0;z-index:1;box-shadow:0 1px 0 #e8edf4}
.mac-explorer-table th{background:#f6f9fd;color:#8093ac;padding:13px 16px;text-align:left;font-size:10px;font-weight:850;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap}
.mac-explorer-table td{padding:13px 16px;border-bottom:1px solid #edf1f7;vertical-align:middle;color:#334965;font-size:12px;line-height:1.4}
.mac-explorer-table tr:last-child td{border-bottom:0}
.mac-explorer-table tbody tr:hover td{background:#fafcff}
.mac-explorer-table .mac-explorer-index{width:52px;text-align:center;color:#97a8be;font-size:11px}
.mac-explorer-table th:nth-child(2){width:43%}
.mac-explorer-table th:nth-child(3){width:30%}
.mac-explorer-table .mac-explorer-actions{width:118px;text-align:right}
.mac-explorer-table .mac-explorer-actions .btn{font-size:11px;font-weight:750;white-space:nowrap;border-radius:8px;min-height:31px}
.mac-explorer-name{font-weight:750;overflow-wrap:anywhere;color:#253a58}
.mac-explorer-code{display:inline-block;color:#5b7293;background:#f2f6fb;border:1px solid #e8eef6;border-radius:6px;padding:7px 8px;white-space:nowrap;font-size:11px;font-weight:650}
.mac-unnamed{font-weight:500;color:#9cabc0;font-style:italic}
.mac-explorer-empty{text-align:center!important;color:#8396ad!important;padding:60px 18px!important}
.mac-explorer-footer{padding:16px 34px;display:flex;align-items:center;justify-content:space-between;gap:16px;color:#98a9bc;font-size:11px;line-height:1.5;flex-wrap:wrap;background:#fff}
.mac-explorer-footer span:first-child{font-weight:800;color:#607a9b}
body.mac-explorer-active{overflow:hidden}
body.mac-explorer-active .modal-backdrop{z-index:130}
@media(max-width:1330px){.cards-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.cards-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.cards-grid{grid-template-columns:1fr}.device-card{min-height:unset;padding:19px}.device-actions .btn{min-height:41px}.mac-explorer-panel{width:100vw}.mac-explorer-header{padding:22px 18px}.mac-explorer-heading h2{font-size:22px}.mac-explorer-controls{padding:14px 18px;display:block}.mac-explorer-config{margin:12px 2px 0}.mac-explorer-table{table-layout:auto;min-width:565px}.mac-explorer-table th,.mac-explorer-table td{padding:11px 12px}.mac-explorer-table .mac-explorer-index{display:none}.mac-explorer-footer{padding:13px 18px}.config-mac-sections .mac-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Mobile: righe dell'inventario impilate, MAC e Rinomina sempre visibili. */
@media(max-width:680px){
  .mac-explorer-panel{width:100%;max-width:none}
  .mac-explorer-table-scroll{overflow-y:auto;overflow-x:hidden}
  .mac-explorer-table{display:block;min-width:0;width:100%;table-layout:auto}
  .mac-explorer-table thead{display:none}
  .mac-explorer-table tbody{display:block;width:100%}
  .mac-explorer-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:10px;row-gap:9px;align-items:center;padding:14px 18px;border-bottom:1px solid #e8eef6}
  .mac-explorer-table tbody tr td{padding:0;border:0;background:transparent!important;min-width:0}
  .mac-explorer-table tbody tr td:nth-child(2){grid-column:1/-1;grid-row:1}
  .mac-explorer-table tbody tr td:nth-child(3){grid-column:1;grid-row:2}
  .mac-explorer-table tbody tr td:nth-child(4){grid-column:2;grid-row:2;width:auto}
  .mac-explorer-table .mac-explorer-code{font-size:10px;padding:8px 9px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
  .mac-explorer-table tbody tr:has(.mac-explorer-empty){display:block}
  .mac-explorer-heading p{gap:6px}
}
