:root{
  --green:#214f43;
  --green-2:#2d6b59;
  --bg:#f6f8f6;
  --card:#ffffff;
  --border:#e1e7ed;
  --muted:#667085;
  --text:#142033;
  --blue:#1478d4;
  --orange:#f28c28;
  --red:#e8525f;
  --ok:#1f9d61;
  --soft:#eaf3ee;
  --shadow:0 18px 48px rgba(16,32,51,.08);
  --shadow-sm:0 10px 26px rgba(16,32,51,.055);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}
a{color:inherit;text-decoration:none}.hidden{display:none!important}.muted{color:var(--muted)}.small{font-size:12px}.nowrap{white-space:nowrap}.right{text-align:right}.center{text-align:center}
.login-page{min-height:100vh;display:grid;grid-template-columns:1.15fr .85fr;background:radial-gradient(circle at 0 0,rgba(221,240,228,.9),transparent 36%),linear-gradient(135deg,#f0f7f2,#fff 45%,#f6f8f6)}
.login-brand{display:flex;align-items:center;justify-content:center;padding:50px}.login-hero{max-width:620px}.login-logo-box{background:#fff;border:1px solid var(--border);border-radius:28px;box-shadow:var(--shadow);padding:24px;display:inline-flex;max-width:420px}.login-logo-box img{width:100%;max-width:360px;height:auto;display:block;object-fit:contain}.login-hero h1{font-size:54px;line-height:.98;letter-spacing:-.06em;color:var(--green);margin:38px 0 16px}.login-hero p{font-size:18px;color:var(--muted);line-height:1.45}.login-pills{display:flex;flex-wrap:wrap;gap:10px;margin-top:30px}.pill{display:inline-flex;align-items:center;gap:8px;background:var(--soft);color:var(--green);border:1px solid var(--border);border-radius:999px;padding:9px 14px;font-weight:900;font-size:13px}.icon-svg{width:18px;height:18px;display:block;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}.login-form-wrap{display:grid;place-items:center;padding:40px}.login-card{width:min(430px,92vw);background:#fff;border:1px solid var(--border);border-radius:28px;padding:34px;box-shadow:var(--shadow)}.login-card h2{font-size:30px;color:var(--green);margin:0 0 8px}.login-card p{margin:0 0 22px;color:var(--muted);line-height:1.4}.form-row{display:grid;gap:8px;margin:14px 0}.form-row label,label.form-label{font-size:12px;font-weight:950;color:#526071;letter-spacing:.02em}input,select,textarea{width:100%;min-height:44px;border:1px solid var(--border);border-radius:14px;padding:0 13px;font:inherit;font-weight:750;background:#fff;color:var(--text);outline:none}textarea{padding:12px 13px;min-height:88px;resize:vertical}input:focus,select:focus,textarea:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(33,79,67,.12)}.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.field-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.field-grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--border);background:#fff;color:var(--green);height:44px;border-radius:14px;padding:0 16px;font-weight:950;cursor:pointer;box-shadow:0 7px 14px rgba(16,32,51,.04);white-space:nowrap}.btn:hover{transform:translateY(-1px)}.btn.primary{background:var(--green);border-color:var(--green);color:#fff;box-shadow:0 14px 26px rgba(33,79,67,.22)}.btn.blue{background:var(--blue);border-color:var(--blue);color:#fff}.btn.red{background:#fff6f6;color:#b42330;border-color:#f3c9ce}.btn.green{background:#eef7f1;color:var(--green);border-color:#cfe4d7}.btn.full{width:100%}.btn.small{height:34px;border-radius:11px;padding:0 11px;font-size:12px}.btn.icon{width:44px;padding:0}.alert{border-radius:16px;padding:14px 16px;margin:0 0 18px;font-weight:850}.alert.err{background:#fff1f3;color:#b42330;border:1px solid #f3c9ce}.alert.ok{background:#eef7f1;color:var(--green);border:1px solid #cfe4d7}.app-shell{display:grid;grid-template-columns:260px 1fr;min-height:100vh}.sidebar{background:#fff;border-right:1px solid var(--border);padding:22px 16px;position:sticky;top:0;height:100vh;overflow:auto;box-shadow:10px 0 34px rgba(16,32,51,.035);z-index:5}.side-logo{height:118px;border:1px solid var(--border);border-radius:22px;display:grid;place-items:center;padding:10px;background:#fff;box-shadow:var(--shadow-sm);margin-bottom:14px}.side-logo img{max-width:100%;max-height:100%;object-fit:contain}.side-app{font-weight:950;color:var(--green);font-size:18px;text-align:center;line-height:1.1}.side-sub{font-size:12px;color:var(--muted);font-weight:800;text-align:center;margin:4px 0 18px}.toggle{display:flex;align-items:center;justify-content:center;margin:0 auto 16px;width:44px;height:44px;border-radius:14px;border:1px solid var(--border);background:#fff;color:var(--green);cursor:pointer}.hamb{width:21px;height:16px;display:flex;flex-direction:column;justify-content:space-between}.hamb span{display:block;height:2.2px;border-radius:99px;background:var(--green)}.nav-title{font-size:11px;color:var(--muted);font-weight:950;letter-spacing:.16em;text-transform:uppercase;margin:18px 10px 9px}.nav{display:grid;gap:6px}.nav a{display:flex;align-items:center;gap:11px;min-height:46px;border-radius:14px;padding:0 12px;font-weight:900;color:#1d2939}.nav a span.ico{width:24px;display:flex;align-items:center;justify-content:center;text-align:center}.nav a.active,.nav a:hover{background:var(--soft);color:var(--green)}.side-panel{margin-top:20px;border:1px solid var(--border);border-radius:18px;padding:14px;background:#fbfcfd;color:var(--muted);font-size:12px}.side-panel b{display:block;color:var(--green);font-size:14px;margin-top:4px}.collapsed .app-shell{grid-template-columns:86px 1fr}.collapsed .sidebar{padding-left:13px;padding-right:13px}.collapsed .side-logo{height:58px;border-radius:18px}.collapsed .side-app,.collapsed .side-sub,.collapsed .nav-title,.collapsed .side-panel{display:none}.collapsed .nav a{justify-content:center;padding:0}.collapsed .nav a .label{display:none}.main{padding:28px;min-width:0}.topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:22px}.title-row{display:flex;align-items:center;gap:16px}.head-logo{width:86px;height:62px;border:1px solid var(--border);border-radius:18px;background:#fff;display:grid;place-items:center;padding:6px;box-shadow:var(--shadow-sm);flex:0 0 86px}.head-logo img{max-width:100%;max-height:100%;object-fit:contain}.time{font-size:14px;color:var(--muted);font-weight:800;margin-bottom:8px}.topbar h1{font-size:34px;line-height:1.05;color:var(--green);letter-spacing:-.8px;margin:0;font-weight:950}.subtitle{font-size:16px;color:var(--muted);margin-top:7px}.actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}.kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin:18px 0 22px}.kpi{background:#fff;border:1px solid var(--border);border-radius:20px;box-shadow:var(--shadow-sm);padding:16px;display:flex;align-items:center;gap:13px;min-height:92px}.kpi-ico{width:48px;height:48px;border-radius:16px;background:var(--soft);color:var(--green);display:grid;place-items:center;font-size:22px;flex:0 0 48px}.kpi-ico .icon-svg{width:24px;height:24px}.kpi strong{display:block;color:var(--green);font-size:30px;line-height:1}.kpi span{display:block;color:var(--muted);font-size:12px;font-weight:900;margin-top:3px}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px}.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.panel{background:#fff;border:1px solid var(--border);border-radius:22px;box-shadow:var(--shadow);padding:20px;margin-bottom:18px}.panel.blue-line{border-left:7px solid var(--blue);border-top:3px solid #4c9ff0}.panel.green-line{border-left:7px solid var(--green)}.panel.orange-line{border-left:7px solid var(--orange)}.panel h2{margin:0 0 14px;color:var(--green);font-size:22px;line-height:1.15}.panel.blue-line h2{color:var(--blue)}.panel.orange-line h2{color:var(--orange)}.chart-wrap{height:320px;position:relative;display:grid;place-items:center}.chart-wrap canvas{width:100%;height:100%}.table-wrap{overflow:auto;border:1px solid var(--border);border-radius:16px}.table{width:100%;border-collapse:separate;border-spacing:0;background:#fff}.table th,.table td{padding:12px 13px;border-bottom:1px solid var(--border);font-size:13px;text-align:left;vertical-align:middle}.table th{background:#f8fbfa;color:#344054;font-weight:950;position:sticky;top:0;z-index:1}.table tr:last-child td{border-bottom:0}.status{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 10px;font-weight:950;font-size:12px}.status.ok{background:#e7f7ee;color:#087443}.status.open{background:#fff4e5;color:#b54708}.status.wait{background:#edf4ff;color:#175cd3}.status.bad{background:#fff1f3;color:#b42330}.status.gray{background:#eef2f6;color:#475467}.mobile-card{max-width:560px;margin:0 auto;background:#fff;border:1px solid var(--border);border-radius:30px;box-shadow:var(--shadow);padding:26px;text-align:center}.mobile-card .logo{height:110px;margin:0 auto 10px}.mobile-card .logo img{height:100%;max-width:260px;object-fit:contain}.timer{font-size:48px;letter-spacing:-.05em;color:var(--green);font-weight:950;margin:20px 0}.stamp-meta{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0}.stamp-meta div{background:#f8fbfa;border:1px solid var(--border);border-radius:16px;padding:12px}.stamp-meta b{display:block;color:var(--green)}.planner-wrap{overflow:auto;border:1px solid var(--border);border-radius:18px;background:#fff}.planner{border-collapse:separate;border-spacing:0;min-width:980px;width:100%}.planner th,.planner td{border-bottom:1px solid var(--border);border-right:1px solid var(--border);padding:8px;text-align:center;font-size:12px;min-width:38px}.planner th:first-child,.planner td:first-child{position:sticky;left:0;background:#fff;text-align:left;min-width:190px;z-index:2;font-weight:950}.planner th{background:#f8fbfa;color:#344054;position:sticky;top:0;z-index:3}.mark{border-radius:8px;padding:4px 6px;font-weight:950;color:#fff;display:inline-block;min-width:28px}.mark.ferie{background:var(--ok)}.mark.permesso{background:var(--orange)}.mark.rol{background:var(--blue)}.mark.attesa{background:#98a2b3}.qr-box{display:grid;grid-template-columns:320px 1fr;gap:24px;align-items:center}.qr-img{width:300px;height:300px;border:1px solid var(--border);border-radius:24px;padding:20px;background:#fff;box-shadow:var(--shadow-sm)}.qr-img img{width:100%;height:100%;object-fit:contain}.footer-note{color:var(--muted);font-size:12px;font-weight:800;margin-top:18px}.btn .icon-svg{width:18px;height:18px}.pill .icon-svg{width:16px;height:16px}.print-only{display:none}
@media(max-width:1100px){.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-2,.grid-3{grid-template-columns:1fr}.field-grid-3,.field-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.qr-box{grid-template-columns:1fr}.login-page{grid-template-columns:1fr}.login-brand{padding-bottom:0}.login-hero h1{font-size:42px}.app-shell{grid-template-columns:1fr}.sidebar{position:relative;height:auto}.collapsed .app-shell{grid-template-columns:1fr}.main{padding:18px}.topbar{flex-direction:column}.actions{margin-top:0}}
@media(max-width:620px){.field-grid,.field-grid-3,.field-grid-4{grid-template-columns:1fr}.kpis{grid-template-columns:1fr}.stamp-meta{grid-template-columns:1fr}.timer{font-size:38px}.topbar h1{font-size:28px}.head-logo{display:none}.login-brand{display:none}.login-page{display:grid;place-items:center}.login-card{margin:20px 0}.chart-wrap{height:250px}}
@media print{.sidebar,.topbar .actions,.btn,.nav,.side-panel{display:none!important}.app-shell{display:block}.main{padding:0}.panel{box-shadow:none}.print-only{display:block}}

.employee-shell{display:flex;justify-content:center}.employee-hero{width:min(760px,100%);position:relative;border-radius:34px;overflow:hidden;background:linear-gradient(180deg,#16181d 0 110px,#f2f3f5 110px 100%);box-shadow:0 22px 52px rgba(16,32,51,.12);border:1px solid #dbe2e8}.employee-hero::after{content:"";position:absolute;inset:110px 0 0 0;background-image:radial-gradient(circle at 12% 20%,rgba(0,0,0,.03) 0 2px,transparent 3px),radial-gradient(circle at 60% 32%,rgba(0,0,0,.03) 0 2px,transparent 3px),linear-gradient(120deg,transparent 0 16%,rgba(0,0,0,.025) 16% 17%,transparent 17% 34%,rgba(0,0,0,.025) 34% 35%,transparent 35% 52%,rgba(0,0,0,.025) 52% 53%,transparent 53% 70%,rgba(0,0,0,.025) 70% 71%,transparent 71% 100%),linear-gradient(30deg,transparent 0 20%,rgba(0,0,0,.02) 20% 21%,transparent 21% 44%,rgba(0,0,0,.02) 44% 45%,transparent 45% 68%,rgba(0,0,0,.02) 68% 69%,transparent 69% 100%);opacity:.8;pointer-events:none}.employee-topbar,.employee-place,.employee-center{position:relative;z-index:1}.employee-topbar{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;color:#fff}.employee-brand{display:flex;align-items:center;gap:12px}.employee-brand-dot{width:42px;height:42px;border-radius:14px;background:rgba(255,255,255,.12);display:grid;place-items:center;color:#fff}.employee-brand-dot .icon-svg{width:20px;height:20px}.employee-brand .micro{display:block;font-size:12px;font-weight:800;opacity:.78;letter-spacing:.03em}.employee-brand strong{display:block;font-size:24px;line-height:1.05}.employee-now{font-size:30px;font-weight:950;color:#ffdf4c;letter-spacing:-.04em}.employee-place{display:flex;align-items:center;gap:16px;padding:18px 24px 16px;background:rgba(255,255,255,.96);border-bottom:1px solid #e4e7ec}.employee-place .pin{width:42px;height:42px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(145deg,#f00067,#ff5132);color:#fff;flex:0 0 42px;box-shadow:0 8px 20px rgba(240,0,103,.22)}.employee-place strong{display:block;font-size:18px;color:#344054;line-height:1.1}.employee-place span{display:block;color:#98a2b3;font-weight:700;margin-top:3px}.employee-center{padding:28px 28px 24px;min-height:820px;text-align:center}.pulse-row{display:flex;justify-content:center;align-items:center;gap:52px;margin:22px 0 10px}.pulse-row span{display:block;width:46px;height:46px;border-radius:50%;background:linear-gradient(145deg,#f00067,#ff5132);box-shadow:0 10px 22px rgba(240,0,103,.18)}.pulse-row span.big{width:80px;height:80px}.employee-date{font-size:18px;font-weight:900;color:#6f7782;letter-spacing:.02em}.employee-time-big{font-size:78px;line-height:1;font-weight:950;color:#21242b;letter-spacing:-.06em;margin-top:8px}.employee-name{font-size:18px;font-weight:800;color:#475467;margin-top:12px}.employee-subline{font-size:15px;color:#98a2b3;font-weight:800;margin-top:4px}.employee-status{display:inline-flex;align-items:center;gap:8px;border-radius:999px;padding:10px 18px;font-size:14px;font-weight:950;margin-top:22px}.employee-status.live{background:rgba(240,0,103,.12);color:#c80060}.employee-status.idle{background:#eef2f6;color:#475467}.employee-meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:22px auto 0;max-width:620px}.meta-chip{background:rgba(255,255,255,.88);border:1px solid #e1e7ed;border-radius:24px;padding:16px 18px;text-align:left;box-shadow:0 10px 22px rgba(16,32,51,.05)}.meta-chip span{display:block;color:#98a2b3;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.04em}.meta-chip b{display:block;color:#21242b;font-size:19px;line-height:1.25;margin-top:6px}.meta-chip.wide{grid-column:1/-1}.employee-arrow{font-size:260px;line-height:1;margin:16px 0 12px;background:linear-gradient(145deg,#f00067,#ff5132);-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:0 12px 24px rgba(255,81,50,.12)}.employee-arrow.stop{transform:rotate(180deg)}.employee-actions{display:grid;grid-template-columns:1fr 1fr;gap:18px;max-width:680px;margin:0 auto}.action-form{margin:0}.action-btn{width:100%;min-height:88px;border:none;border-radius:28px;display:flex;align-items:center;justify-content:center;gap:14px;font:inherit;font-weight:950;font-size:28px;letter-spacing:-.03em;cursor:pointer;box-shadow:0 16px 34px rgba(16,32,51,.08);text-decoration:none}.action-btn.primary,.action-btn.danger{background:linear-gradient(145deg,#f00067,#ff5132);color:#fff}.action-btn.secondary{background:#6d6f74;color:#fff}.action-btn .action-ico{display:flex;align-items:center;justify-content:center}.action-btn .action-ico .icon-svg{width:30px;height:30px}.employee-summary{margin:26px auto 0;max-width:680px;background:#fff;border-radius:28px;border:1px solid #e1e7ed;box-shadow:0 16px 32px rgba(16,32,51,.06);padding:20px;text-align:left}.employee-summary h3{margin:0 0 16px;color:#1d2939;font-size:22px}.summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.summary-grid span{display:block;color:#98a2b3;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.04em}.summary-grid b{display:block;color:#21242b;font-size:18px;margin-top:5px}.employee-footnote{max-width:680px;margin:20px auto 6px;color:#667085;font-weight:800;font-size:13px}
@media(max-width:900px){.employee-center{min-height:auto}.employee-time-big{font-size:60px}.employee-arrow{font-size:220px}.action-btn{font-size:24px;min-height:78px}}
@media(max-width:620px){.employee-hero{border-radius:0;min-height:100dvh;border:none}.employee-topbar{padding:16px 18px}.employee-brand strong{font-size:17px}.employee-now{font-size:26px}.employee-place{padding:14px 18px}.employee-place strong{font-size:16px}.employee-center{padding:18px 18px 22px}.pulse-row{gap:28px}.pulse-row span{width:34px;height:34px}.pulse-row span.big{width:62px;height:62px}.employee-time-big{font-size:58px}.employee-meta-grid,.summary-grid,.employee-actions{grid-template-columns:1fr}.employee-arrow{font-size:170px;margin-top:8px}.action-btn{font-size:20px;min-height:74px;border-radius:24px}.employee-shell{margin:-28px}.employee-footnote{padding:0 6px 12px}}


/* v4 - Mobile dipendente solo timbratura QR */
.employee-mode{margin:0;background:#111318;min-height:100vh;overscroll-behavior:none}
.employee-mode .employee-main{padding:0;min-height:100vh;background:#111318}
.employee-mode .alert{position:fixed;left:14px;right:14px;top:12px;z-index:30;margin:0;box-shadow:0 12px 28px rgba(16,32,51,.16)}
.employee-mode .employee-shell{margin:0;display:block}
.employee-mode .employee-hero{width:100%;min-height:100vh;border:0;border-radius:0;box-shadow:none;background:linear-gradient(180deg,#252525 0 92px,#f3f4f5 92px 100%)}
.employee-mode .employee-hero::after{inset:92px 0 0 0;background-image:linear-gradient(120deg,transparent 0 14%,rgba(0,0,0,.03) 14% 15%,transparent 15% 35%,rgba(0,0,0,.03) 35% 36%,transparent 36% 58%,rgba(0,0,0,.025) 58% 59%,transparent 59% 100%),linear-gradient(30deg,transparent 0 21%,rgba(0,0,0,.025) 21% 22%,transparent 22% 45%,rgba(0,0,0,.025) 45% 46%,transparent 46% 72%,rgba(0,0,0,.025) 72% 73%,transparent 73% 100%)}
.employee-mode .employee-topbar{padding:18px 20px 14px}
.employee-mode .employee-brand strong{font-size:19px}
.employee-logout{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:rgba(255,255,255,.12);color:#fff;text-decoration:none}
.employee-logout .icon-svg{width:20px;height:20px}
.employee-mode .employee-place{padding:14px 18px;background:rgba(255,255,255,.96)}
.employee-mode .employee-place .pin{background:var(--green);box-shadow:0 8px 20px rgba(33,79,67,.18)}
.employee-mode .employee-now{margin-left:auto;font-size:22px;color:var(--green);letter-spacing:-.04em}
.employee-logo-mini{height:58px;display:flex;justify-content:center;align-items:center;margin:10px auto 8px}
.employee-logo-mini img{max-height:100%;max-width:220px;object-fit:contain}
.scan-ring{width:128px;height:128px;border-radius:50%;margin:10px auto 14px;display:grid;place-items:center;background:conic-gradient(#d0d5dd 0 25%,transparent 25% 35%,#d0d5dd 35% 60%,transparent 60% 70%,#d0d5dd 70% 100%);position:relative}
.scan-ring::before{content:"";position:absolute;inset:10px;border-radius:50%;background:#fff;box-shadow:0 14px 32px rgba(16,32,51,.08)}
.scan-ring::after{content:"";position:absolute;inset:-5px;border-radius:50%;border:2px dashed rgba(33,79,67,.28)}
.scan-ring.scan-ok{background:conic-gradient(var(--green),#32a071,var(--green))}
.scan-ring.scan-ok::after{border-color:rgba(33,79,67,.65);animation:spinQr 1.2s linear infinite}
.scan-inner{position:relative;z-index:1;width:76px;height:76px;border-radius:24px;background:#f8fbfa;display:grid;place-items:center;color:var(--green)}
.scan-inner .icon-svg{width:42px;height:42px}
@keyframes spinQr{to{transform:rotate(360deg)}}
.qr-ribbon{display:inline-flex;align-items:center;justify-content:center;max-width:640px;border-radius:999px;background:#eef2f6;color:#475467;padding:11px 18px;margin:16px auto 0;font-weight:950;font-size:14px}
.qr-ribbon.ok{background:#e7f7ee;color:#087443}
.employee-mode .employee-center{padding:14px 18px 26px;min-height:calc(100vh - 168px)}
.employee-mode .employee-date{font-size:16px}
.employee-mode .employee-time-big{font-size:64px;margin-top:4px}
.employee-mode .employee-name{font-size:22px;font-weight:950;color:#1d2939}
.employee-mode .employee-subline{font-size:14px}
.employee-mode .employee-status{margin-top:16px}
.employee-mode .employee-meta-grid{max-width:640px;margin-top:16px}
.qr-instruction{max-width:640px;margin:22px auto 0;border-radius:30px;background:#fff;border:1px solid #e1e7ed;box-shadow:0 16px 34px rgba(16,32,51,.07);padding:22px;text-align:center}
.qr-instruction b{display:block;color:var(--green);font-size:22px;margin-bottom:6px}
.qr-instruction span{display:block;color:#667085;font-weight:800;line-height:1.35}
.qr-auto-form{max-width:640px;margin:22px auto 0;display:grid;gap:12px}
.auto-message{border-radius:22px;background:#fff4e5;color:#b54708;border:1px solid #fedf89;padding:14px 16px;font-weight:950;text-align:center}
.qr-auto-form .action-btn{min-height:76px;font-size:24px;border-radius:24px}
.employee-qr-only .employee-footnote{margin-top:18px;max-width:640px}
@media(max-width:620px){
  .employee-mode .employee-topbar{padding-top:calc(14px + env(safe-area-inset-top))}
  .employee-mode .employee-brand .micro{font-size:11px}
  .employee-mode .employee-brand strong{font-size:16px}
  .employee-logout{width:40px;height:40px}
  .employee-mode .employee-place{display:grid;grid-template-columns:42px 1fr auto;gap:12px;align-items:center}
  .employee-mode .employee-place strong{font-size:15px}
  .employee-mode .employee-place span{font-size:12px}
  .employee-mode .employee-now{font-size:18px}
  .employee-logo-mini{height:46px}
  .scan-ring{width:112px;height:112px}
  .scan-inner{width:68px;height:68px;border-radius:22px}
  .scan-inner .icon-svg{width:36px;height:36px}
  .employee-mode .employee-time-big{font-size:52px}
  .employee-mode .employee-meta-grid{grid-template-columns:1fr;gap:10px}
  .meta-chip{border-radius:20px;padding:14px}
  .meta-chip b{font-size:16px}
  .qr-instruction{padding:20px 16px;border-radius:26px}
  .qr-instruction b{font-size:20px}
  .qr-auto-form .action-btn{min-height:72px;font-size:22px}
  .employee-summary{border-radius:24px}
}

/* v5 - Flusso corretto: pulsante START/STOP apre scanner QR interno */
.employee-mode .employee-hero.employee-compact{background:linear-gradient(180deg,#202124 0 92px,#f7f8fa 92px 100%)}
.employee-mode .employee-hero.employee-compact .employee-center{display:flex;flex-direction:column;justify-content:flex-start;min-height:calc(100vh - 164px);padding-bottom:calc(22px + env(safe-area-inset-bottom))}
.employee-main-action{max-width:640px;margin:22px auto 0;min-height:92px;border-radius:30px;font-size:34px;text-transform:uppercase;letter-spacing:.01em}
.qr-scan-submit-form{max-width:640px;margin:0 auto;width:100%}
.qr-action-copy{max-width:640px;margin:22px auto 0;border-radius:28px;background:#fff;border:1px solid #e1e7ed;box-shadow:0 16px 34px rgba(16,32,51,.07);padding:20px;text-align:center}
.qr-action-copy b{display:block;color:var(--green);font-size:22px;margin-bottom:5px}
.qr-action-copy span{display:block;color:#667085;font-weight:850;line-height:1.35}
.employee-meta-grid.compact{margin-top:16px}
.qr-modal[hidden]{display:none!important}
.qr-modal{position:fixed;inset:0;background:rgba(0,0,0,.74);z-index:1000;display:flex;align-items:center;justify-content:center;padding:16px}
.qr-modal-card{width:min(560px,100%);background:#fff;border-radius:30px;overflow:hidden;box-shadow:0 24px 70px rgba(0,0,0,.35);border:1px solid rgba(255,255,255,.25)}
.qr-modal-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;background:#202124;color:#fff}
.qr-modal-head b{display:block;font-size:21px;line-height:1.1}.qr-modal-head span{display:block;color:#d0d5dd;font-weight:800;font-size:13px;margin-top:4px}
.qr-modal-close{width:42px;height:42px;border:0;border-radius:14px;background:rgba(255,255,255,.12);color:#fff;font-size:30px;line-height:1;cursor:pointer}
.qr-video-wrap{position:relative;background:#000;aspect-ratio:3/4;max-height:65vh;display:grid;place-items:center;overflow:hidden}
.qr-video-wrap video{width:100%;height:100%;object-fit:cover}
.qr-frame{position:absolute;inset:18%;border-radius:28px;pointer-events:none}
.qr-frame span{position:absolute;width:54px;height:54px;border-color:#fff;border-style:solid;filter:drop-shadow(0 2px 7px rgba(0,0,0,.5))}
.qr-frame span:nth-child(1){left:0;top:0;border-width:5px 0 0 5px;border-radius:22px 0 0 0}.qr-frame span:nth-child(2){right:0;top:0;border-width:5px 5px 0 0;border-radius:0 22px 0 0}.qr-frame span:nth-child(3){right:0;bottom:0;border-width:0 5px 5px 0;border-radius:0 0 22px 0}.qr-frame span:nth-child(4){left:0;bottom:0;border-width:0 0 5px 5px;border-radius:0 0 0 22px}
.qr-scan-status{padding:14px 18px;background:#f8fbfa;border-top:1px solid #e1e7ed;color:#344054;font-weight:900;text-align:center;min-height:50px;display:flex;align-items:center;justify-content:center}
.qr-manual{padding:14px 18px 18px;background:#fff;display:grid;gap:10px}.qr-manual-row{display:grid;grid-template-columns:1fr auto;gap:8px}.qr-manual-row[hidden]{display:none!important}.qr-manual-row input{min-height:38px;border-radius:12px}
@media(max-width:620px){
  .employee-mode .employee-hero.employee-compact .employee-center{padding-left:16px;padding-right:16px}
  .employee-main-action{min-height:86px;border-radius:28px;font-size:32px;margin-top:auto}
  .qr-action-copy{margin-top:18px;padding:17px;border-radius:24px}.qr-action-copy b{font-size:20px}
  .employee-mode .employee-time-big{font-size:56px}.employee-logo-mini{margin-top:4px;margin-bottom:4px}
  .qr-modal{padding:0;align-items:stretch}.qr-modal-card{height:100vh;width:100%;border-radius:0;display:flex;flex-direction:column}.qr-video-wrap{flex:1;max-height:none;aspect-ratio:auto}.qr-modal-head{padding-top:calc(16px + env(safe-area-inset-top))}.qr-manual{padding-bottom:calc(18px + env(safe-area-inset-bottom))}
}

.interactive-kpis{grid-template-columns:repeat(6,minmax(0,1fr))}.kpi-link{text-decoration:none;color:inherit;position:relative;transition:.16s ease;border-color:var(--border)}.kpi-link:hover{transform:translateY(-2px);border-color:rgba(33,79,67,.35);box-shadow:0 16px 30px rgba(16,32,51,.08)}.kpi-link.active{border-color:var(--green);background:linear-gradient(180deg,#ffffff,#f3faf6);box-shadow:0 18px 34px rgba(33,79,67,.12)}.kpi-link.active:after{content:"";position:absolute;left:18px;right:18px;bottom:-1px;height:4px;border-radius:99px;background:var(--green)}.kpi em{display:block;margin-top:7px;color:var(--green);font-size:11px;font-style:normal;font-weight:950;letter-spacing:.02em}.kpi-detail-panel{scroll-margin-top:18px}.panel-head-inline{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.panel-head-inline h2{margin:0}.detail-count{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:var(--soft);color:var(--green);padding:8px 12px;font-weight:950;font-size:12px;white-space:nowrap}
@media(max-width:1280px){.interactive-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.interactive-kpis{grid-template-columns:1fr}.panel-head-inline{align-items:flex-start;flex-direction:column}}
.remember-row{display:flex;align-items:center;gap:10px;margin:14px 0 18px;color:#344054;font-size:13px;font-weight:850;line-height:1.25}.remember-row input{width:18px!important;height:18px!important;min-height:auto!important;accent-color:var(--green);flex:0 0 auto}.remember-row span{display:block}

/* v9 - smartphone employee view compact, inspired by reference left image */
.employee-mode .employee-hero.employee-style-left{background:linear-gradient(180deg,#202124 0 92px,#efefef 92px 100%);min-height:100vh}
.employee-mode .employee-hero.employee-style-left::after{inset:92px 0 0 0;background-image:linear-gradient(120deg,transparent 0 16%,rgba(0,0,0,.02) 16% 17%,transparent 17% 34%,rgba(0,0,0,.02) 34% 35%,transparent 35% 52%,rgba(0,0,0,.02) 52% 53%,transparent 53% 70%,rgba(0,0,0,.02) 70% 71%,transparent 71% 100%),linear-gradient(30deg,transparent 0 20%,rgba(0,0,0,.016) 20% 21%,transparent 21% 44%,rgba(0,0,0,.016) 44% 45%,transparent 45% 68%,rgba(0,0,0,.016) 68% 69%,transparent 69% 100%)}
.employee-mode .employee-hero.employee-style-left .employee-center{padding:14px 18px 22px;min-height:calc(100vh - 164px);display:flex;flex-direction:column}
.employee-place-compact{display:grid;grid-template-columns:74px 1fr 34px;gap:14px;align-items:start;padding:12px 14px;background:rgba(255,255,255,.95)}
.precision-box{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#98a2b3;font-weight:800;font-size:11px;line-height:1.1}
.precision-box b{font-size:18px;color:#47a74d;margin-top:4px}
.place-main strong{display:block;font-size:19px;color:#404040;line-height:1.05}.place-main span{display:block;font-size:12px;color:#909090;font-weight:700;margin-top:5px}
.place-info{width:32px;height:32px;border:1px solid #bcc0c6;border-radius:50%;display:grid;place-items:center;color:#8e9298;font-weight:900;font-size:17px;align-self:center}
.face-dots{position:relative;height:150px;margin:10px auto 4px;max-width:420px;width:100%}
.face-dots .dot,.face-dots .bar{position:absolute;background:linear-gradient(145deg,#f00067,#ff5132);box-shadow:0 10px 22px rgba(240,0,103,.15)}
.face-dots .dot{border-radius:50%}.face-dots .dot.top{width:72px;height:72px;left:50%;top:0;transform:translateX(-50%)}.face-dots .dot.small.left{width:56px;height:56px;left:10%;top:82px}.face-dots .dot.small.right{width:56px;height:56px;right:10%;top:82px}
.face-dots .bar{width:110px;height:44px;border-radius:28px}.face-dots .bar.left{left:22%;top:46px;transform:rotate(48deg)}.face-dots .bar.right{right:22%;top:46px;transform:rotate(-48deg)}
.employee-mode .employee-style-left .employee-date{font-size:18px;color:#6f6f70;font-weight:950;letter-spacing:.02em}.employee-mode .employee-style-left .employee-time-big{font-size:72px;color:#16181d;line-height:.95;margin-top:4px}
.employee-copy{font-size:15px;color:#444;margin-top:8px}.employee-start-time{font-size:24px;color:#e5155f;font-weight:950;line-height:1.05;margin-top:2px}.employee-client-copy{font-size:13px;color:#474747;margin-top:6px}.employee-client-name{font-size:20px;color:#d3115e;font-weight:950;line-height:1.1;letter-spacing:.01em;margin-top:2px}
.gps-status-inline{font-size:12px;color:#81858c;font-weight:800;max-width:420px;margin:8px auto 0;min-height:16px}.gps-status-inline b{font-weight:800}
.big-arrow{width:0;height:0;border-left:110px solid transparent;border-right:110px solid transparent;border-bottom:128px solid #f01b60;position:relative;margin:14px auto 18px;filter:drop-shadow(0 12px 20px rgba(240,0,103,.14))}.big-arrow::before{content:"";position:absolute;left:-26px;top:112px;width:52px;height:108px;background:#f01b60;border-radius:28px}.big-arrow.up{transform:none}.big-arrow.idle{opacity:.82}
.employee-action-row{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:auto;padding-top:4px}
.mobile-action,.mobile-action:visited{display:flex;align-items:center;justify-content:center;gap:12px;min-height:82px;border-radius:28px;text-decoration:none;font-size:24px;font-weight:950;letter-spacing:-.02em;border:none;box-shadow:0 16px 34px rgba(16,32,51,.08)}
.mobile-action.secondary{background:#6f7074;color:#fff}.mobile-action.primary,.mobile-action.danger{background:linear-gradient(145deg,#f00067,#ff5132);color:#fff}.mobile-action .action-ico{display:flex;align-items:center;justify-content:center}.mobile-action .action-ico .icon-svg{width:28px;height:28px}.mobile-action-form{margin:0}
.employee-timer-hidden{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden}
.compact-result{margin:14px auto 0;max-width:460px;border-radius:22px;padding:14px 16px;background:rgba(255,255,255,.88)}.compact-result-grid{gap:10px}.compact-result-grid div{background:#fff;border-radius:14px;padding:10px 12px}.compact-result-grid b{font-size:16px}
.employee-mode .employee-style-left .employee-topbar{padding-top:calc(16px + env(safe-area-inset-top));padding-left:18px;padding-right:18px}
@media(max-width:480px){.employee-mode .employee-style-left .employee-time-big{font-size:62px}.employee-client-name{font-size:18px}.employee-start-time{font-size:21px}.face-dots{height:134px}.face-dots .dot.top{width:62px;height:62px}.face-dots .dot.small.left,.face-dots .dot.small.right{width:48px;height:48px;top:74px}.face-dots .bar{width:94px;height:38px;top:44px}.big-arrow{border-left-width:94px;border-right-width:94px;border-bottom-width:114px}.big-arrow::before{top:98px;height:96px}.mobile-action{min-height:78px;font-size:21px}.place-main strong{font-size:17px}}

/* v11 - responsive desktop / medium browser widths */
@media (max-width: 1450px){
  .app-shell{grid-template-columns:92px minmax(0,1fr)}
  .sidebar{padding-left:13px;padding-right:13px}
  .side-logo{height:58px;border-radius:18px}
  .side-app,.side-sub,.nav-title,.side-panel{display:none}
  .nav a{justify-content:center;padding:0}
  .nav a .label{display:none}
  .main{padding:20px}
  .topbar{gap:14px}
  .topbar h1{font-size:28px}
  .subtitle{font-size:14px}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-3{grid-template-columns:1fr}
  .qr-box{grid-template-columns:1fr;justify-items:center;align-items:start}
  .qr-box > div:last-child{width:min(100%,760px)}
  .qr-img{width:min(320px,100%);height:auto;aspect-ratio:1/1}
}
@media (max-width: 1280px){
  .field-grid-3,.field-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .title-row{width:100%}
  .actions{width:100%;margin-top:0}
  .actions .btn{flex:1 1 220px}
  .panel{padding:18px}
}
