:root {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: #232031;
  background: #f7f6f7;
  --ink: #232031;
  --teal: #65374e;
  --muted: #605d68;
  --border: #e3e1e4;
}
* {
  box-sizing: border-box;
}
body,
h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}
button,
select,
input,
textarea {
  font: inherit;
  color: inherit;
}
button,
select {
  cursor: pointer;
}
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}
:focus-visible {
  outline: 3px solid #d88316;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
[hidden] {
  display: none !important;
}
.wrap {
  max-width: 1232px;
  width: calc(100% - 80px);
  margin: 0 auto;
}
header {
  color: white;
  background: #30293b;
}
.top,
.brand,
.hero,
.listhead,
.filters,
.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
}
.top {
  justify-content: space-between;
  min-height: 76px;
  gap: 14px;
}
.brand {
  gap: 13px;
}
.brand strong {
  font-size: 32px;
  letter-spacing: -2px;
}
.brand > span:last-child {
  border-left: 1px solid #77918a;
  padding-left: 16px;
  color: #e1ece4;
}
.brandmark {
  display: flex;
  align-items: center;
  gap: 3px;
  transform: skew(-14deg);
}
.brandmark i {
  display: block;
  height: 20px;
  width: 7px;
  background: #ffd2b3;
}
.brandmark i:nth-child(2) {
  height: 28px;
}
.brandmark i:last-child {
  height: 15px;
}
.account-bar {
  display: flex;
  gap: 20px;
  align-items: center;
}
.account-bar div { text-align: right; overflow-wrap: anywhere; }
.account-bar strong, .account-bar span { display: block; }
.account-bar span { font-size: 14px; color: #d9e6dc; margin-top: 2px; }
.exit-button {
  border: 1px solid #a4beb0;
  border-radius: 7px;
  padding: 9px 15px;
  min-height: 44px;
  background: transparent;
  color: white;
}
.login-card {
  width: min(460px, 100%);
  margin: clamp(34px, 9vh, 96px) auto;
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid var(--border);
  border-top: 4px solid var(--teal);
  border-radius: 15px;
  background: white;
}
.login-card h1 { font-size: clamp(32px, 5vw, 45px); margin-bottom: 26px; }
.login-card form { display: grid; gap: 5px; }
.login-card label:not(:first-child) { margin-top: 10px; }
.login-card .primary { margin-top: 16px; }
.hero {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin: 40px 0 28px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
h1 {
  font-size: clamp(35px, 4.6vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.056em;
  font-weight: 650;
}
h2 {
  font-size: clamp(23px, 2.5vw, 31px);
  letter-spacing: -0.045em;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.primary,
.secondary,
.x {
  border: 0;
  border-radius: 8px;
  padding: 13px 20px;
  font-weight: 650;
  min-height: 46px;
}
.primary {
  color: white;
  background: var(--teal);
}
.primary:hover {
  background: #502a40;
}
.primary b {
  font-size: 20px;
  vertical-align: -1px;
  margin-right: 4px;
  line-height: 0;
}
.secondary,
.x {
  background: #efeaf0;
}
.x {
  padding: 3px 12px;
  min-width: 44px;
  font-size: 23px;
  align-self: flex-start;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 0 24px;
}
.stat {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 105px;
  padding: 16px 20px;
  background: #fff;
}
.stat strong {
  display: block;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.06em;
  margin-top: 7px;
}
.stat[aria-pressed="true"] {
  border: 2px solid var(--teal);
  background: #f4e9ef;
  padding: 15px 19px;
}
.status-name,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}
.status-name {
  font-size: 14px;
}
.status-name:before,
.badge:before {
  content: "";
  background: var(--dot);
  border-radius: 50%;
  width: 8px;
  height: 8px;
  flex: none;
}
[data-status="nuovo"] {
  --dot: #b17615;
  --pale: #fbefcd;
  --dark: #694706;
}
[data-status="assegnato"] {
  --dot: #4f78a0;
  --pale: #e8eff6;
  --dark: #344f72;
}
[data-status="in_corso"] {
  --dot: #358378;
  --pale: #e1f1ec;
  --dark: #235c53;
}
[data-status="chiuso"] {
  --dot: #598143;
  --pale: #e9f1e3;
  --dark: #3c5c2b;
}
.badge {
  border-radius: 25px;
  padding: 6px 10px;
  width: fit-content;
  color: var(--dark);
  background: var(--pale);
  font-size: 13px;
  white-space: nowrap;
}
.register {
  border: 1px solid var(--border);
  border-radius: 15px;
  background: white;
}
.register {
  overflow: hidden;
}
.listhead {
  padding: 23px 25px;
  gap: 16px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.listhead p,
footer {
  color: var(--muted);
  font-size: 14px;
}
.listhead p {
  margin: 5px 0 0;
}
.filters {
  gap: 12px;
  flex-wrap: wrap;
}
label {
  display: block;
  font-weight: 650;
  font-size: 14px;
  color: var(--muted);
}
input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #a6b7ad;
  margin-top: 5px;
  border-radius: 7px;
  background: white;
  min-height: 44px;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
}
textarea {
  resize: vertical;
}
.row {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(100px, 1fr) minmax(
      135px,
      0.8fr
    ) 20px;
  gap: 12px;
  align-items: center;
  padding: 17px 25px;
}
.columns {
  background: #f3f5f0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-block: 10px;
}
.job {
  border: 0;
  width: 100%;
  text-align: left;
  background: white;
  border-top: 1px solid var(--border);
}
.job:hover {
  background: #faf7f9;
}
.job strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 17px;
  margin: 3px 0;
}
.job small {
  display: block;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.job .ref {
  color: #635967;
  font-weight: 650;
  font-size: 12px;
}
.arrow {
  font-size: 24px;
  color: var(--teal);
  text-align: right;
}
.empty {
  padding: 30px 25px;
  color: var(--muted);
}
.textBtn {
  margin: 0 25px 18px;
  padding: 8px 0;
  color: var(--teal);
  border: 0;
  background: none;
  text-decoration: underline;
}
footer {
  margin: 24px 0;
}
footer span {
  padding: 0 4px;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 15px;
  width: min(540px, calc(100% - 24px));
  max-height: 91dvh;
  padding: 0;
  color: var(--ink);
  box-shadow: 0 18px 80px #0d2f3329;
}
dialog::backdrop {
  background: #2320316c;
}
.modal-head {
  justify-content: space-between;
  gap: 15px;
  padding: 22px 24px;
  background: #f8f5f7;
  border-bottom: 1px solid var(--border);
}
#detailBody,
#createForm {
  padding: 22px 24px;
}
form label + label {
  margin-top: 14px;
}
label small {
  font-weight: 400;
  margin-left: 5px;
}
.modal-actions {
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}
dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 18px 0;
}
dt,
h3 {
  font-size: 14px;
  color: var(--muted);
  font-weight: 650;
}
dd {
  font-weight: 650;
  overflow-wrap: anywhere;
  margin-top: 4px;
}
.block {
  border-top: 1px solid var(--border);
  padding: 15px 0 6px;
  margin-top: 10px;
}
.block p {
  margin-top: 6px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#actionForm {
  border-top: 1px solid var(--border);
  margin-top: 18px;
  padding-top: 16px;
}
#act {
  margin-top: 12px;
  width: 100%;
}
.alert {
  background: #fff3d8;
  padding: 12px;
  border: 1px solid #d8ae60;
  border-radius: 8px;
  margin: 12px 0;
}
#notice {
  position: fixed;
  inset: auto 12px 16px;
  margin: auto;
  width: fit-content;
  max-width: calc(100% - 24px);
  background: #173f39;
  color: white;
  border-radius: 9px;
  padding: 13px 22px;
}
@media (max-width: 740px) {
  .wrap {
    width: calc(100% - 28px);
  }
  .hero {
    margin: 26px 0 19px;
  }
  .top {
    min-height: 64px;
  }
  .brand > span:last-child {
    display: none;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
  }
  .stat {
    min-height: 76px;
    padding: 10px 14px;
  }
  .stat[aria-pressed="true"] {
    padding: 9px 13px;
  }
  .stat strong {
    margin-top: 3px;
    font-size: 25px;
  }
  .listhead {
    align-items: stretch;
    flex-direction: column;
    padding: 17px;
  }
  .filters {
    align-items: flex-end;
  }
  .filters label {
    flex: 1 1 130px;
  }
  .columns {
    display: none;
  }
  .row.job {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px 17px;
    gap: 9px;
  }
  .job .summary {
    grid-column: 1/-1;
  }
  .job .arrow {
    display: none;
  }
  .account-bar { gap: 8px; }
  .account-bar span { font-size: 12px; }
  .modal-head,
  #detailBody,
  #createForm {
    padding: 18px;
  }
}

.office-actions,.member-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px }
.account-link { margin-top:18px }
#accessHint,.team-body>p { color:var(--muted); line-height:1.55; margin:0 0 16px }
#teamDlg { width:min(660px,calc(100% - 24px)) }
.team-body { padding:20px 24px }
.team-body h3 { font-size:18px; color:var(--ink); margin-bottom:8px }
#teamRows { list-style:none; margin:8px 0 25px; padding:0 }
#teamRows li { border-bottom:1px solid var(--border); padding:12px 0; display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap }
.member { display:grid; gap:3px; min-width:0; overflow-wrap:anywhere }
.member span,.member small { font-size:14px; color:var(--muted) }
.member-actions button { margin:0; padding:8px 0; min-height:40px }
.danger { background:#8d362e; color:white; font-weight:650; padding:12px 18px; border:0; border-radius:8px }
#inviteSend { margin-top:16px }
.success-msg,.team-body>.success-msg { padding:12px; color:#164c39; background:#e2f2e8; border-radius:8px; margin:16px 0; overflow-wrap:anywhere }
@media(max-width:480px) { .team-body {padding:16px} .office-actions {width:100%} .office-actions button {flex:1} }

#photoEditor { display: grid; gap: .6rem; }
#photoEditor small { color: var(--muted); line-height: 1.5; }
#closureFiles { width: 100%; padding: .5rem; }
#closureFiles::file-selector-button { padding: .5rem .7rem; margin-right: .5rem; border: 0; border-radius: .35rem; background: #eee8ed; color: #502a40; font-weight: 650; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(78px, 115px)); gap: .65rem; margin-top: .5rem; }
.photo-grid:empty { display: none; }
.photo-thumb { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border: 0; border-radius: .55rem; background: #dde4de; padding: 0; display: block; }
.photo-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
#photoDlg { width: min(94vw, 840px); }
#photoLarge { display: block; width: 100%; max-height: 74vh; object-fit: contain; background: #eef2ed; }
#photoStatus, #photoReadStatus { font-size: .92rem; }

/* L’elenco e la scheda condividono lo spazio di lavoro dell’ufficio. */
.context-bar { padding:17px 0; color:var(--muted); border-bottom:1px solid var(--border); font-size:14px }
.hero { margin:26px 0 22px }
.hero .eyebrow { display:none }
.stats { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:14px }
.stats .stat { display:flex; align-items:center; gap:8px; padding:8px 12px; min-height:44px; border:1px solid transparent; border-radius:7px; background:transparent }
.stats .stat[aria-pressed=true] { background:#e8e1e7; border-color:#b8a9b3 }
.stats .stat strong { font-size:14px; margin:0; color:var(--ink) }
.job.selected { background:#f8eff0; box-shadow:inset 4px 0 #65374e }
.job .ref, #code { font:13px/1.5 Consolas,monospace; color:#635967; letter-spacing:.035em }
.job strong { color:var(--ink); font-size:18px; letter-spacing:-.025em }
#entryPhoto { display:flex; align-items:flex-end; height:clamp(118px,14vw,205px); padding:12px 16px; background:#d9ccbd url('/ingresso-carrabile.jpg') center 55% / cover }
#entryPhoto span { background:#292432dd; color:white; padding:4px 8px; border-radius:5px; font-size:12px }
#deskEmpty { display:none }
#detailDlg { background:white }
#detailDlg .modal-head { background:white }
#detailTitle { line-height:1.12 }
#detailBody dl { gap:14px }
@media(min-width:1200px) {
  body:is(.office,.technician) { display:grid; grid-template-columns:clamp(165px,15vw,210px) minmax(0,1fr); min-height:100vh; align-items:start }
  body:is(.office,.technician) header { position:sticky; top:0; height:100vh; padding:30px 18px }
  body:is(.office,.technician) header .top { width:100%; height:100%; align-items:flex-start; flex-direction:column; justify-content:flex-start }
  body:is(.office,.technician) .brand > span:last-child { display:none }
  .account-bar { margin-top:auto; align-items:flex-start; flex-direction:column; gap:12px }
  .account-bar div { text-align:left }
  body:is(.office,.technician) main.wrap { width:100%; max-width:1600px; padding:0 clamp(20px,2.6vw,44px) }
  .technician main.wrap { max-width:1000px!important }
}
@media(min-width:960px) {
  .office .workbench { display:grid; grid-template-columns:minmax(285px,.92fr) minmax(310px,1.08fr); align-items:start; background:white; border:1px solid var(--border); border-radius:17px; overflow:clip }
  .office .register { border:0; border-radius:0; width:100%; border-right:1px solid var(--border) }
  .office .listhead { padding:16px; display:block; background:#faf9fa }
  .office .listhead h2 { font-size:20px }
  .office .listhead p { margin:2px 0 10px }
  .office .filters { display:flex; flex-wrap:wrap; gap:8px }
  .office .filters label { flex:1 1 125px; min-width:0 }
  .office .filters :is(select,input) { width:100%; min-width:0 }
  .office .columns,.office .arrow { display:none }
  .office .job { grid-template-columns:minmax(0,1fr) auto; padding:14px 18px; gap:5px 8px }
  .office .job .summary { grid-column:1 / -1 }
  .office .job .summary + span { font-size:14px; color:var(--muted) }
  .office #detailDlg[open]:not(:modal) { position:static; width:100%; max-width:none; max-height:none; margin:0; border:0; border-radius:0; box-shadow:none }
  .office #detailDlg:not([open]) + #deskEmpty { display:block }
}
@media(max-width:740px) {
  .technician .hero { margin:17px 0 }
  .technician .stats .stat { padding:4px 8px }
  .technician .listhead { gap:8px }
  .technician .listhead h2 { font-size:18px }
  #detailDlg { width:calc(100% - 16px); max-height:94dvh }
  #act { width:100% }
}
.side-nav { display:none }
@media(min-width:1200px) {
  body:is(.office,.technician) .side-nav { display:block; width:100%; margin-top:24px }
  .side-nav a { display:block; padding:14px 12px; border-radius:8px; color:#fff; background:#514655; text-decoration:none; font-weight:600 }
}

/* Tablet: la barra superiore e i contenuti usano gli stessi margini. */
@media (min-width:741px) and (max-width:1199px) {
  .wrap { width:calc(100% - 48px) }
  .top { min-height:58px }
  .context-bar { padding:12px 0 }
  .hero { margin:16px 0 12px }
  .hero h1 { font-size:38px }
  .stats { margin-bottom:8px }
  .listhead { align-items:flex-start; flex-wrap:wrap }
  .filters { flex-wrap:wrap }
  #detailDlg .modal-head, #detailBody { padding:16px 20px }
  #detailDlg .modal-head { align-items:flex-start }
  #detailBody dl { margin:12px 0; gap:10px }
  #detailBody .block { padding-top:10px }
}
@media (min-width:960px) and (max-width:1199px) {
  .office .workbench { grid-template-columns:minmax(0, .91fr) minmax(0, 1.09fr) }
  .office .listhead,.office .job { padding:16px 20px }
  .office #detailDlg[open]:not(:modal) { min-width:0 }
  .office #actionForm:has(#assignLabel:not([hidden])) {
    display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 12px; align-items:end
  }
  .office #actionForm:has(#assignLabel:not([hidden])) #detailError { grid-column:1 / -1 }
  .office #actionForm:has(#assignLabel:not([hidden])) #act { margin:0 }
}
@media (min-width:741px) and (max-width:959px) {
  .office .listhead { display:grid; grid-template-columns:minmax(0,1fr); gap:12px }
  .office .filters { display:grid; grid-template-columns:1fr 1fr; gap:12px }
  .office #detailDlg:modal { width:min(660px,calc(100% - 48px)) }
}

.customer-group { min-width:0; margin:18px 0; padding:14px 16px; border:1px solid var(--border); border-radius:10px }
.customer-group legend { padding:0 6px; font-weight:650; color:var(--ink) }
#siteName { display:block; margin-bottom:3px }
#siteName:not([hidden]) + #address { font-weight:400 }

.registry-layout {
  display:grid;
  grid-template-columns:minmax(240px, .75fr) minmax(0, 1.25fr);
  align-items:start;
  background:white;
  border:1px solid var(--border);
  border-radius:17px;
  overflow:clip;
}
.registry-list { min-width:0; border-right:1px solid var(--border) }
.registry-list > label { display:block; padding:18px; background:#faf9fa }
.registry-sheet { padding:22px; min-width:0; overflow-wrap:anywhere }
.registry-line,.registry-site,.site-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap }
.registry-line h3 { color:var(--ink); font-size:18px }
.registry-line small,.registry-site small,.directory-record small { display:block; color:var(--muted); margin-top:3px }
.registry-section { border-top:1px solid var(--border); margin-top:20px; padding-top:16px }
.registry-line label { max-width:100% }
.registry-line select { max-width:100% }
.registry-site { padding:12px 0; border-bottom:1px solid var(--border) }
.directory-record { display:block; width:100%; text-align:left; background:white; border:0; border-top:1px solid var(--border); padding:13px 18px; overflow-wrap:anywhere }
.directory-record:hover { background:#faf7f9 }
.directory-record[aria-pressed="true"] { background:#f8eff0; box-shadow:inset 4px 0 var(--teal) }
.registry-add { min-height:44px; padding:6px 0; border:0; color:var(--teal); text-decoration:underline; background:transparent }
#viewCustomer { display:block }
#registryContacts { color:var(--muted); margin-top:8px }
#registryHistory { margin-top:12px }
#registryHistory .directory-record { padding-inline:0 }
#whatsappNumbers { padding:0; list-style:none; margin:6px 0 18px }
#whatsappNumbers li { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:4px 0; border-bottom:1px solid var(--border) }
#entryForm fieldset { border:0; margin:0; padding:0; min-width:0 }
.directory-empty,#registryEmpty { padding:12px 0; color:var(--muted) }
.registry-list .directory-empty { padding-inline:18px }
@media(max-width:740px) {
  .registry-layout { grid-template-columns:minmax(0,1fr) }
  .registry-list { border-right:0; border-bottom:1px solid var(--border) }
  #registryRows { max-height:34dvh; overflow:auto }
  .registry-sheet { padding:16px }
  .site-actions { justify-content:flex-start }
}

.voice-editor { display:grid; gap:.5rem; margin-block:.3rem 1rem; }
.voice-editor > div { display:flex; flex-wrap:wrap; gap:.5rem; }
.voice-editor audio, .voice-editor textarea { width:100%; max-width:100%; }
.voice-editor small:empty { display:none; }

.urgenza { color: #a12625; font-weight: 700; }
#magDialog {width:min(840px,calc(100% - 24px)); max-height:90dvh; padding:0; overflow:auto}
.mag-body {padding:clamp(16px,3vw,28px)}
#magConfig {display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px}
.mag-nav,.mag-actions {display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:14px 0}
.mag-nav button[aria-pressed=true] {border-color:currentColor; font-weight:700}
#magNew {margin-inline-start:auto}
.mag-item {display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; text-align:left; width:100%; padding:12px 8px; gap:6px 16px; border:0; border-bottom:1px solid #d0d9d5; background:transparent; overflow-wrap:anywhere}
.mag-item small {font-size:.88rem}
.mag-fields,.mag-line {display:grid; grid-template-columns:2fr 1fr 1fr; gap:10px}
.mag-body input {box-sizing:border-box; width:100%; min-width:0}
.mag-body label {display:grid; align-content:start; gap:4px; min-width:0}
.mag-line {border:1px solid #cfdbd5; border-radius:10px; margin:0 0 12px; padding:12px}
.mag-line legend {padding:0 4px;font-weight:650}
.mag-line button {align-self:end}
.mag-body [hidden] {display:none!important}
#magStatus:empty {display:none}
@media(max-width:620px){.mag-fields,.mag-line{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.mag-fields>label:first-child,.mag-line .mag-desc{grid-column:1/-1}#magNew{margin-inline-start:0}}
.ocr-box { margin-block: .65rem; }
.ocr-box summary { cursor: pointer; }
.ocr-controls { display: grid; gap: .5rem; margin-block: .65rem; }
.ocr-box img { max-width: 100%; max-height: 17rem; object-fit: contain; }
.ocr-box textarea { width: 100%; }
.ocr-box small { display: block; margin-block: .4rem; }

#mobileStatusLabel { display: none; }

@media (max-width: 600px) {
  .login-card,
  body.technician {
    font-size: 1.125rem;
    line-height: 1.45;
  }
  .login-card { margin-block: 24px; padding: 22px 18px; }
  .login-card :is(label, .eyebrow),
  .technician :is(label, dt, h3, small) { font-size: 1rem; }
  .login-card :is(input, button),
  .technician :is(button, input:not([type=checkbox]), select, textarea) {
    min-height: 48px;
    max-width: 100%;
    font-size: 1.125rem;
  }
  .login-card .account-link { margin: 12px 0 0; }

  .technician .wrap { width: calc(100% - 32px); }
  .technician .top { gap: 10px; padding-block: 8px; }
  .technician .brand { gap: 7px; }
  .technician .brand strong { font-size: 1.875rem; }
  .technician .account-bar { min-width: 0; gap: 10px; }
  .technician .account-bar strong { line-height: 1.2; }
  .technician .account-bar span { font-size: 1rem; line-height: 1.2; }
  .technician .exit-button { padding: 6px 12px; }
  .technician #contextBar,
  .technician #signedHero .office-actions:not(:has(button:not([hidden]))) { display: none; }
  .technician .hero { margin: 20px 0 12px; }
  .technician .hero h1 { font-size: clamp(2rem, 8vw, 2.5rem); }
  .technician #fieldPanel {
    padding: 10px 14px; margin-bottom: 18px;
    border-inline-start: 3px solid #aa899c;
    background: #f1ebef; overflow-wrap: anywhere;
  }
  .technician #offlineStatus { display: block; color: var(--ink); font-size: 1rem; font-weight: 500; }
  .technician #fieldPanel .secondary {
    padding: 4px 0; background: transparent; color: var(--teal);
    text-decoration: underline; text-underline-offset: 3px;
  }

  .technician #stats { display: none; }
  .technician #mobileStatusLabel { display: block; }
  .technician .register { border: none; border-radius: 0; background: transparent; overflow: visible; }
  .technician .listhead {
    display: grid; grid-template-columns: minmax(0, 1fr);
    justify-content: stretch; gap: 10px; padding: 0 0 12px;
  }
  .technician .listhead > div:first-child {
    display: flex; flex-wrap: wrap; align-items: baseline;
    justify-content: space-between; gap: 4px 10px;
  }
  .technician .listhead h2 { font-size: 1.375rem; }
  .technician #count { margin: 0; font-size: 1rem; }
  .technician .filters { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 10rem),1fr)); gap: 8px 12px; }
  .technician .filters label { min-width: 0; }
  .technician #rows { display: grid; gap: 12px; }
  .technician .row.job {
    grid-template-columns: minmax(0, 1fr) 20px;
    grid-template-areas: "summary arrow" "state arrow";
    gap: 10px; padding: 16px; border: 1px solid #d8d1d8;
    border-radius: 12px; line-height: 1.4;
  }
  .technician .job .summary { grid-area: summary; }
  .technician .job .summary + span { display: none; }
  .technician .job .ref,
  .technician #code { font-size: 1rem; }
  .technician .job strong { margin-block: 3px 6px; font-size: 1.375rem; line-height: 1.2; }
  .technician .job .urgenza { color: #a12625; font-size: 1rem; }
  .technician .job-client, .technician .job-site { display: block; }
  .technician .job-client { font-weight: 650; color: var(--ink); font-size: 1.125rem; }
  .technician .job-place-separator { display: none; }
  .technician .job .badge { grid-area: state; }
  .technician .badge { font-size: 1rem; white-space: normal; }
  .technician .job .arrow { display: block; grid-area: arrow; font-size: 1.75rem; }

  .technician dialog { overflow-wrap: anywhere; }
  .technician #detailDlg {
    inset: 0; margin: 0; width: 100%; max-width: 100%; height: 100%; height: 100dvh;
    max-height: 100%; max-height: 100dvh; border: none; border-radius: 0;
    overscroll-behavior: contain;
  }
  .technician #detailDlg .modal-head { padding: 16px; align-items: flex-start; }
  .technician #detailTitle { font-size: 1.75rem; }
  .technician #entryPhoto { display: none; }
  .technician .modal-head .x { min-width: 48px; flex: none; font-size: 1.75rem; }
  .technician #detailBody { padding: 16px 16px max(24px, env(safe-area-inset-bottom)); }
  .technician #detailBody dl { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .technician #detailBody dd { margin-top: 2px; }
  .technician #detailBody > .secondary { display: block; margin-top: 8px; }
  .technician #ordineRicezione { margin-top: 12px; font-size: 1rem; color: var(--muted); }
  .technician #ordineRicezione.urgenza { color: #a12625; }
  .technician dialog :is(fieldset, label, input, textarea, select) { min-width: 0; }
  .technician dialog fieldset { margin-inline: 0; }
  .technician dialog summary { min-height: 48px; padding-block: 12px; font-weight: 650; }
  .technician dialog .block > h3 { font-size: 1.125rem; }
  .technician #note { line-height: 1.5; }
  .technician #actionForm > button { width: 100%; margin-top: 10px; }
  .technician .voice-editor > div > button { flex: 1 1 10rem; }
  .technician dialog :is(audio, img) { max-width: 100%; }
}
